ANSI C Based OPC UA Client/Server SDK  1.8.3.398
UaServerInstance

Functions

OpcUa_StatusCode UaServer_CreateInstance (OpcUa_BaseNode **a_ppNewNode, OpcUa_NodeId *a_pNodeId, OpcUa_NodeId *a_pTypeId, const OpcUa_CharA *a_szBrowsename, const OpcUa_CharA *a_szDisplayname, OpcUa_UInt32 a_noOfOptionalNodePath, UaServer_OptionalNodePath *a_pOptionalNodePath, OpcUa_Boolean a_bInstantiateMethods)
 Create an instance of a given object or variable type. More...
 
OpcUa_StatusCode UaServer_DeleteInstance (OpcUa_NodeId *a_pNodeId)
 Delete an instance of any type. More...
 

Detailed Description

Function Documentation

OpcUa_StatusCode UaServer_CreateInstance ( OpcUa_BaseNode **  a_ppNewNode,
OpcUa_NodeId a_pNodeId,
OpcUa_NodeId a_pTypeId,
const OpcUa_CharA *  a_szBrowsename,
const OpcUa_CharA *  a_szDisplayname,
OpcUa_UInt32  a_noOfOptionalNodePath,
UaServer_OptionalNodePath *  a_pOptionalNodePath,
OpcUa_Boolean  a_bInstantiateMethods 
)

Create an instance of a given object or variable type.

The nodeids of the child nodes are generated dynamically and depend on a_pNodeId. If a_pNodeId has a string identifier, the new nodes are concatenations of this string with the browsename of the child node. If a_pNodeId has a numeric identifier, the nodeid is incremented for each child. If a_pNodeId has a GUID identifier, random GUID identifiers are generated for each new child node. Opaque identifiers are not supported for a_pNodeId.

Parameters
a_ppNewNodePointer to an OpcUa_BaseNode which will contain the new node on success.
a_pNodeIdNodeId the new instance should have. Must not exist yet. On success, if the type of the NodeId was numeric, the numeric identifier of a_pNodeId is set to the last numeric NodeId used for child nodes of the new instance.
a_pTypeIdThe type of the new instance.
a_szBrowsenameBrowsename for the new node.
a_szDisplaynameDisplayname for the new node.
a_noOfOptionalNodePathThe number of elements in a_pOptionalNodePath.
a_pOptionalNodePathArray of BrowsePaths to optional nodes that shall be created in addition to the mandatory ones.
a_bInstantiateMethodsIf true, create instances of all instance declaration methods of the type. If false, create references to the method instance declarations instead.
Returns
OpcUa_Good on success.
OpcUa_StatusCode UaServer_DeleteInstance ( OpcUa_NodeId a_pNodeId)

Delete an instance of any type.

Deletes the node a_pNodeId and all its hierachical referenced subnodes and all references from or to these nodes.

Note: If additional nodes were added to the instance these will also be deleted and if there is a hierachical reference to the root node your complete addressspace might be deleted.