Skip to content

Reference

OpcClient.AddVariableNode Method

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name defined.

Reference

OpcClient.AddVariableNode Method ​

Type
OpcClient
Namespace
Opc.UaFx.Client
Assembly
Opc.UaFx.Advanced.dll
Package
Opc.UaFx.Advanced v2.59.0
Members
OpcClient Members
Also in
Opc.UaFx.Client

10 overloads · since v2.7

OverloadDescription
AddVariableNode(OpcVariableType, OpcName)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name defined.
AddVariableNode(OpcVariableType, OpcName, object)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, object)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, object)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType, object)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.
AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId, object)since v2.7Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined.

Exceptions (all overloads)

ExceptionCondition
InvalidOperationExceptionThe add node service is currently not supported, especially using the parameters specified.
ObjectDisposedExceptionThe object has been disposed of.
OpcExceptionThe service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: BadNothingToDo and BadTooManyOperations.

AddVariableNode(OpcVariableType, OpcName) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name defined. The according OpcNodeId to identify and access the new node is determined by the service. The new node will be a child of the ObjectsFolder node using HasComponent as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(OpcVariableType type, OpcName name)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe name is equals Null.
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, object) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name defined. The according OpcNodeId to identify and access the new node is determined by the service. The new node will be a child of the ObjectsFolder node using HasComponent as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    object value)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    value As Object) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
valueObjectThe initial value of the new variable node.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe name is equals Null.
ArgumentNullExceptionThe name is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the ObjectsFolder node using HasComponent as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe name is equals Null.
ArgumentNullExceptionThe name or nodeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, object) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the ObjectsFolder node using HasComponent as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    object value)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    value As Object) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
valueObjectThe initial value of the new variable node.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe name is equals Null.
ArgumentNullExceptionThe name or nodeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the node identified by parentNodeId using HasComponent as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
parentNodeIdOpcNodeIdThe OpcNodeId of the parent node to reference using HasComponent as the type of reference.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe parentNodeId is equals Null or name is equals Null.
ArgumentNullExceptionThe name, nodeId or parentNodeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, object) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the node identified by parentNodeId using HasComponent as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    object value)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    value As Object) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
parentNodeIdOpcNodeIdThe OpcNodeId of the parent node to reference using HasComponent as the type of reference.
valueObjectThe initial value of the new variable node.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe parentNodeId is equals Null or name is equals Null.
ArgumentNullExceptionThe name, nodeId or parentNodeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the node identified by parentNodeId using the referenceType specified as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcReferenceType referenceType)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceType As OpcReferenceType) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
parentNodeIdOpcNodeIdThe OpcNodeId of the parent node to reference using HasComponent as the type of reference.
referenceTypeOpcReferenceTypeOne of the members defined by the OpcReferenceType enumeration to use to setup the reference between the new node and the existing parent node identified by parentNodeId.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe parentNodeId is equals Null or name is equals Null.
ArgumentNullExceptionThe name, nodeId or parentNodeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcReferenceType, object) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the node identified by parentNodeId using the referenceType specified as the type of reference.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcReferenceType referenceType,
    object value)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceType As OpcReferenceType,
    value As Object) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
parentNodeIdOpcNodeIdThe OpcNodeId of the parent node to reference using HasComponent as the type of reference.
referenceTypeOpcReferenceTypeOne of the members defined by the OpcReferenceType enumeration to use to setup the reference between the new node and the existing parent node identified by parentNodeId.
valueObjectThe initial value of the new variable node.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe parentNodeId is equals Null or name is equals Null.
ArgumentNullExceptionThe name, nodeId or parentNodeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the node identified by parentNodeId using the type of reference identified by the referenceTypeId specified.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcNodeId referenceTypeId)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
parentNodeIdOpcNodeIdThe OpcNodeId of the parent node to reference using the type of reference identified by referenceTypeId.
referenceTypeIdOpcNodeIdThe OpcNodeId which identifies the type of reference to use for the new node and the existing parent node identified by parentNodeId.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe parentNodeId or referenceTypeId is equals Null or name is equals Null.
ArgumentNullExceptionThe name, nodeId, parentNodeId or referenceTypeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.

AddVariableNode(OpcVariableType, OpcName, OpcNodeId, OpcNodeId, OpcNodeId, object) ​

since v2.7

Adds a new variable node into the address space hierarchy using the specified type of variable node to add, which shall be accessible by the name and nodeId defined. The new node will be a child of the node identified by parentNodeId using the type of reference identified by the referenceTypeId specified.

csharp
public OpcAddNodeResult AddVariableNode(
    OpcVariableType type,
    OpcName name,
    OpcNodeId nodeId,
    OpcNodeId parentNodeId,
    OpcNodeId referenceTypeId,
    object value)
vbnet
Public Function AddVariableNode(
    type As OpcVariableType,
    name As OpcName,
    nodeId As OpcNodeId,
    parentNodeId As OpcNodeId,
    referenceTypeId As OpcNodeId,
    value As Object) As OpcAddNodeResult

Parameters

NameTypeDescription
typeOpcVariableTypeOne of the members defined by the OpcVariableType enumeration which identifies the predefined underlying type definition the new node will represent an instance of.
nameOpcNameThe OpcName through that the new variable node can be accessed.
nodeIdOpcNodeIdThe OpcNodeId through that the new node can be identified and accessed. In case there Null is specified the server will determine the according OpcNodeId by its own.
parentNodeIdOpcNodeIdThe OpcNodeId of the parent node to reference using the type of reference identified by referenceTypeId.
referenceTypeIdOpcNodeIdThe OpcNodeId which identifies the type of reference to use for the new node and the existing parent node identified by parentNodeId.
valueObjectThe initial value of the new variable node.

Returns

OpcAddNodeResult

An instance of the OpcAddNodeResult class which contains the node identifier used or created for the node added through the the call to the add nodes service; together with information about the outcome of the processed service invocation.

Exceptions

ExceptionCondition
ArgumentExceptionThe parentNodeId or referenceTypeId is equals Null or name is equals Null.
ArgumentNullExceptionThe name, nodeId, parentNodeId or referenceTypeId is a null reference (Nothing in Visual Basic).

Remarks

Known results for the service invocation are:

StatusDescription
BadParentNodeIdInvalidThe parent node id does not refer to a valid node.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model.
BadNodeIdRejectedThe requested node id is already used by another node.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadBrowseNameInvalidFor more details see BadBrowseNameInvalid.
BadBrowseNameDuplicatedThe browse name is not unique among nodes that share the same relationship with the parent.
BadNodeAttributesInvalidThe node attributes are not valid for the node class.
BadTypeDefinitionInvalidFor more details see BadTypeDefinitionInvalid.
BadUserAccessDeniedFor more details see BadUserAccessDenied.