5 Service Sets ToC Previous Next

5.7 NodeManagement Service Set ToC Previous Next

5.7.2 AddNodes ToC Previous Next

5.7.2.1 Description ToC

This Service is used to add one or more Nodes into the AddressSpace hierarchy. Using this Service, each Node is added as the TargetNode of a HierarchicalReference to ensure that the AddressSpace is fully connected and that the Node is added as a child within the AddressSpace hierarchy (see OPC 10000-3).

When a Server creates an instance of a TypeDefinitionNode it shall create the same hierarchy of Nodes beneath the new Object or Variable depending on the ModellingRule of each InstanceDeclaration. All Nodes with a ModellingRule of Mandatory shall be created or an existing Node shall be referenced that conforms to the InstanceDeclaration. The creation of Nodes with other ModellingRules is Server specific.

5.7.2.2 Parameters ToC

Table 22 defines the parameters for the Service.

Table 22 – AddNodes Service Parameters

Name Type Description
Request    
   requestHeader RequestHeader Common request parameters (see 7.28 for RequestHeader definition).
   nodesToAdd [] AddNodesItem List of Nodes to add. All Nodes are added as a Reference to an existing Node using a hierarchical ReferenceType. This structure is defined in-line with the following indented items.
      parentNodeId Expanded NodeId ExpandedNodeId   of the parent Node for the Reference. The ExpandedNodeId type is defined in 7.11.
      referenceTypeId NodeId NodeId   of the hierarchical ReferenceType to use for the Reference from the parent Node to the new Node.
      requestedNewNodeId Expanded NodeId Client   requested expanded NodeId of the Node to add. The serverIndex in the expanded NodeId shall be 0.
If the Server cannot use this NodeId, it rejects this Node and returns the appropriate error code.
If the Client does not want to request a NodeId, then it sets the value of this parameter to the null expanded NodeId.
If the Node to add is a ReferenceType Node, its NodeId should be a numeric id. See OPC 10000-3 for a description of ReferenceType NodeIds.
      browseName QualifiedName The browse name of the Node to add.
      nodeClass NodeClass NodeClass   of the Node to add.
      nodeAttributes Extensible Parameter
NodeAttributes
The Attributes that are specific to the NodeClass. The NodeAttributes parameter type is an extensible parameter type specified in 7.19.
A Client is allowed to omit values for some or all Attributes. If an Attribute value is null, the Server shall use the default values from the TypeDefinitionNode. If a TypeDefinitionNode was not provided the Server shall choose a suitable default value.
The Server may still add an optional Attribute to the Node with an appropriate default value even if the Client does not specify a value.
      typeDefinition Expanded NodeId NodeId   of the TypeDefinitionNode for the Node to add. This parameter shall be null for all NodeClasses other than Object and Variable in which case it shall be provided.
     
Response    
   responseHeader Response Header Common response parameters (see 7.29 for ResponseHeader definition).
   results [] AddNodesResult List of results for the Nodes to add. The size and order of the list matches the size and order of the nodesToAdd request parameter. This structure is defined in-line with the following indented items.
      statusCode StatusCode StatusCode   for the Node to add (see 7.34 for StatusCode definition).
      addedNodeId NodeId Server   assigned NodeId of the added Node. Null NodeId if the operation failed.
   diagnosticInfos [] DiagnosticInfo List of diagnostic information for the Nodes to add (see 7.8 for DiagnosticInfo definition). The size and order of the list matches the size and order of the nodesToAdd request parameter. This list is empty if diagnostics information was not requested in the request header or if no diagnostic information was encountered in processing of the request.

5.7.2.3 Service results ToC

Table 23 defines the Service results specific to this Service. Common StatusCodes are defined in Table 177.

Table 23 – AddNodes Service Result Codes

Symbolic Id Description
Bad_NothingToDo See Table 177 for the description of this result code.
Bad_TooManyOperations See Table 177 for the description of this result code.

5.7.2.4 StatusCodes ToC

Table 24 defines values for the operation level statusCode parameter that are specific to this Service. Common StatusCodes are defined in Table 178.

Table 24 – AddNodes Operation Level Result Codes

Symbolic Id Description
Bad_ParentNodeIdInvalid The parent node id does not to refer to a valid node.
Bad_ReferenceTypeIdInvalid See Table 178 for the description of this result code.
Bad_ReferenceNotAllowed The reference could not be created because it violates constraints imposed by the data model.
Bad_NodeIdRejected The requested node id was rejected either because it was invalid or because the Server does not allow node ids to be specified by the client.
Bad_NodeIdExists The requested node id is already used by another node.
Bad_NodeClassInvalid See Table 178 for the description of this result code.
Bad_BrowseNameInvalid See Table 178 for the description of this result code.
Bad_BrowseNameDuplicated The browse name is not unique among nodes that share the same relationship with the parent.
Bad_NodeAttributesInvalid The node Attributes are not valid for the node class.
Bad_TypeDefinitionInvalid See Table 178 for the description of this result code.
Bad_UserAccessDenied See Table 177 for the description of this result code.

Previous Next