You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ju...@apache.org on 2025/12/04 06:54:50 UTC
(iotdb) branch new_opc_server updated: invalid
This is an automated email from the ASF dual-hosted git repository.
justinchen pushed a commit to branch new_opc_server
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/new_opc_server by this push:
new b7552bcc2b8 invalid
b7552bcc2b8 is described below
commit b7552bcc2b86ce57df4593b25ff307e0ce4c97cc
Author: Caideyipi <87...@users.noreply.github.com>
AuthorDate: Thu Dec 4 14:54:37 2025 +0800
invalid
---
.../iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
index 14ead70362f..f242975263a 100644
--- a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
+++ b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/sink/protocol/opcua/OpcUaNameSpace.java
@@ -509,6 +509,14 @@ public class OpcUaNameSpace extends ManagedNamespaceWithLifecycle {
new StatusCode(StatusCodes.Bad_ParentNodeIdInvalid), NodeId.NULL_VALUE));
continue;
}
+ final Optional<NodeId> typeDefinition =
+ item.getTypeDefinition().toNodeId(getServer().getNamespaceTable());
+ if (!typeDefinition.isPresent()) {
+ results.add(
+ new AddNodesResult(
+ new StatusCode(StatusCodes.Bad_TypeDefinitionInvalid), NodeId.NULL_VALUE));
+ continue;
+ }
final VariableAttributes variableAttributes =
(VariableAttributes)
item.getNodeAttributes().decode(getServer().getSerializationContext());
@@ -520,7 +528,7 @@ public class OpcUaNameSpace extends ManagedNamespaceWithLifecycle {
.setBrowseName(item.getBrowseName())
.setDisplayName(variableAttributes.getDisplayName())
.setDataType(variableAttributes.getDataType())
- .setTypeDefinition(Identifiers.BaseDataVariableType)
+ .setTypeDefinition(typeDefinition.get())
.build();
getNodeManager().addNode(measurementNode);
parentNode.addReference(