This Serviceis used to add one or more Nodesinto the AddressSpacehierarchy. Using this Service, each Nodeis added as the TargetNodeof a HierarchicalReferenceto ensure that the AddressSpaceis fully connected and that the Nodeis added as a child within the AddressSpacehierarchy (see OPC 10000-3).
When a Servercreates an instance of a TypeDefinitionNodeit shall create the same hierarchy of Nodes beneath the new Objector Variable depending on the ModellingRuleof each InstanceDeclaration. All Nodeswith a ModellingRuleof Mandatoryshall be created or an existing Nodeshall be referenced that conforms to the InstanceDeclaration. The creation of Nodes with other ModellingRulesis Serverspecific.
Table 22defines the parameters for the Service.
Table 22– AddNodes Service Parameters
Name |
Type |
Description |
Request |
|
|
requestHeader |
RequestHeader |
Common request parameters (see 7.33for RequestHeaderdefinition). |
nodesToAdd [] |
AddNodesItem |
List of Nodesto add. All Nodesare added as a Referenceto an existing Nodeusing a hierarchical ReferenceType. This structure is defined in-line with the following indented items. |
parentNodeId |
Expanded NodeId |
ExpandedNodeIdof the parent Nodefor the Reference. The ExpandedNodeIdtype is defined in 7.16. |
referenceTypeId |
NodeId |
NodeIdof the hierarchical ReferenceTypeto use for the Referencefrom the parent Nodeto the new Node. |
requestedNewNodeId |
Expanded NodeId |
Clientrequested expanded NodeIdof the Nodeto add. The serverIndexin the expanded NodeId shall be 0. If the Servercannot use this NodeId, it rejects this Nodeand returns the appropriate error code. If the Clientdoes not want to request a NodeId, then it sets the value of this parameter to the null expanded NodeId. If the Nodeto add is a ReferenceType Node, its NodeIdshould be a numeric id. See OPC 10000-3for a description of ReferenceType NodeIds. |
browseName |
QualifiedName |
The browse name of the Nodeto add. |
nodeClass |
NodeClass |
|
nodeAttributes |
Extensible Parameter NodeAttributes |
The Attributesthat are specific to the NodeClass. The NodeAttributesparameter type is an extensible parameter type specified in 7.24. A Clientis allowed to omit values for some or all Attributes. If an Attributevalue is null, the Servershall use the default values from the TypeDefinitionNode. If a TypeDefinitionNodewas not provided the Servershall choose a suitable default value. The Servermay still add an optional Attribute to the Nodewith an appropriate default value even if the Clientdoes not specify a value. |
typeDefinition |
Expanded NodeId |
NodeIdof the TypeDefinitionNodefor the Nodeto add. This parameter shall be null for all NodeClassesother than Objectand Variablein which case it shall be provided. |
|
|
|
Response |
|
|
responseHeader |
Response Header |
Common response parameters (see 7.34for ResponseHeaderdefinition). |
results [] |
AddNodesResult |
List of results for the Nodesto add. The size and order of the list matches the size and order of the nodesToAddrequest parameter. This structure is defined in-line with the following indented items. |
statusCode |
StatusCode |
StatusCodefor the Nodeto add (see 7.39for StatusCodedefinition). |
addedNodeId |
NodeId |
Serverassigned NodeIdof the added Node. Null NodeIdif the operation failed. |
diagnosticInfos [] |
DiagnosticInfo |
List of diagnostic information for the Nodesto add (see 7.12for 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. |
Table 23defines the Serviceresults specific to this Service. Common StatusCodesare defined in Table 182.
Table 23– AddNodes Service Result Codes
Symbolic Id |
Description |
Bad_NothingToDo |
See Table 182for the description of this result code. |
Bad_TooManyOperations |
See Table 182for the description of this result code. |
Table 24defines values for the operation level statusCodeparameter that are specific to this Service. Common StatusCodesare defined in Table 183.
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 183for 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 Serverdoes 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 183for the description of this result code. |
Bad_BrowseNameInvalid |
See Table 183for 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 Attributesare not valid for the node class. |
Bad_TypeDefinitionInvalid |
See Table 183for the description of this result code. |
Bad_UserAccessDenied |
See Table 182for the description of this result code. |