Skip to content

Reference

OpcAddReference Members

Defines a single command of the IOpcAddReferencesService used to add a logical reference between one and another node.

Reference

OpcAddReference Members ​

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

Inherits members from OpcNodeServiceCommand, OpcServiceCommand.

Constructors ​

OpcAddReference ​

4 overloads

OverloadDescription
OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory)Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other.
OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection)Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.
OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection, OpcReferenceType)Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.
OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection, OpcNodeId)Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.

OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory) ​

Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other. The new reference will be a ParentToChild relation using Organizes as the type of reference.

csharp
public OpcAddReference(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcNodeCategory targetNodeCategory)
vbnet
Public Sub New(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    targetNodeCategory As OpcNodeCategory)

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed. This identifier refers to the 'child' node.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target node can be identified and accessed. This identifier referes to the 'parent' node.
targetNodeCategoryOpcNodeCategoryOne of the members defined by the OpcNodeCategory enumeration which is used by the server to validate that the reference to be added matches the OpcNodeCategory of the target node identified by the targetNodeId.

Exceptions

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

OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection) ​

Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the Organizes as the type of reference.

csharp
public OpcAddReference(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcNodeCategory targetNodeCategory,
    OpcReferenceDirection direction)
vbnet
Public Sub New(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    targetNodeCategory As OpcNodeCategory,
    direction As OpcReferenceDirection)

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target node can be identified and accessed.
targetNodeCategoryOpcNodeCategoryOne of the members defined by the OpcNodeCategory enumeration which is used by the server to validate that the reference to be added matches the OpcNodeCategory of the target node identified by the targetNodeId.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.

Exceptions

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

OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection, OpcReferenceType) ​

Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the referenceType specified as the type of reference.

csharp
public OpcAddReference(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcNodeCategory targetNodeCategory,
    OpcReferenceDirection direction,
    OpcReferenceType referenceType)
vbnet
Public Sub New(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    targetNodeCategory As OpcNodeCategory,
    direction As OpcReferenceDirection,
    referenceType As OpcReferenceType)

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target node can be identified and accessed.
targetNodeCategoryOpcNodeCategoryOne of the members defined by the OpcNodeCategory enumeration which is used by the server to validate that the reference to be added matches the OpcNodeCategory of the target node identified by the targetNodeId.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.
referenceTypeOpcReferenceTypeOne of the members defined by the OpcReferenceType enumeration to use to setup the reference between the source and the target node identified by the nodeId and the targetNodeId.

Exceptions

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

OpcAddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection, OpcNodeId) ​

Initializes a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the type of reference identified by the referenceTypeId specified.

csharp
public OpcAddReference(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcNodeCategory targetNodeCategory,
    OpcReferenceDirection direction,
    OpcNodeId referenceTypeId)
vbnet
Public Sub New(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    targetNodeCategory As OpcNodeCategory,
    direction As OpcReferenceDirection,
    referenceTypeId As OpcNodeId)

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target node can be identified and accessed.
targetNodeCategoryOpcNodeCategoryOne of the members defined by the OpcNodeCategory enumeration which is used by the server to validate that the reference to be added matches the OpcNodeCategory of the target node identified by the targetNodeId.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.
referenceTypeIdOpcNodeIdThe OpcNodeId which identifies the type of reference to use to setup the reference between the source and the target node identified by the nodeId and the targetNodeId.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe nodeId, targetNodeId or referenceTypeId is a null reference (Nothing in Visual Basic).

Properties ​

Direction ​

Gets a value indicating the logical direction of the reference to add.

csharp
public OpcReferenceDirection Direction { get; }
vbnet
Public ReadOnly Property Direction As OpcReferenceDirection

Property value

OpcReferenceDirection

One of the members defined by the OpcReferenceDirection enumeration. The default value is ParentToChild.

ReferenceType ​

Gets a value which defines a pre-defined used ReferenceTypeId as one of the members defined by the OpcReferenceType enumeration to simplify querying standard reference types.

csharp
public OpcReferenceType ReferenceType { get; }
vbnet
Public ReadOnly Property ReferenceType As OpcReferenceType

Property value

OpcReferenceType

One of the members defined by the OpcReferenceType enumeration. The default value is Organizes.

ReferenceTypeId ​

Gets the identifier which identifies the node that defines the semantic of the reference between the source and the target node and generally reflects an operation between the two, such as "A contains B".

csharp
public OpcNodeId ReferenceTypeId { get; }
vbnet
Public ReadOnly Property ReferenceTypeId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the reference type node which defines the relation semantic between the source and the target node. The default value is Organizes.

TargetNodeCategory ​

Gets the OpcNodeCategory of the target node identified by TargetNodeId. The client shall define the concrete category of node the TargetNodeId refers to, since the target node might not be accessible directly by the server. Additionally the server uses the category to validate that the reference to be added matches the category of node of the target node identified by the TargetNodeId.

csharp
public OpcNodeCategory TargetNodeCategory { get; }
vbnet
Public ReadOnly Property TargetNodeCategory As OpcNodeCategory

Property value

OpcNodeCategory

One of the members defined by the OpcNodeCategory enumeration which defines the category of node of the target node to reference.

TargetNodeId ​

Gets the identifier which identifies the target node which acts as the opponent in the reference to construct between the source node (identified by NodeId) the target node.

csharp
public OpcNodeId TargetNodeId { get; }
vbnet
Public ReadOnly Property TargetNodeId As OpcNodeId

Property value

OpcNodeId

The OpcNodeId of the target node acting as the opponent of the reference to add.

TargetServerUri ​

Gets or sets the Uri of the remote server which provides the node identified by TargetNodeId.

csharp
public Uri TargetServerUri { get; set; }
vbnet
Public Property TargetServerUri As Uri

Property value

Uri

An instance of the Uri class which provides the full qualified resource identifier to access the server of the target node identified by the TargetNodeId or a null reference (Nothing in Visual Basic) if the command receiving server shall execute this command (the default value).

Methods ​

ToObject ​

static · 4 overloads

OverloadDescription
ToObject(OpcNodeId, OpcNodeId)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other.
ToObject(OpcNodeId, OpcNodeId, OpcReferenceDirection)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.
ToObject(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcReferenceType)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.
ToObject(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcNodeId)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.

ToObject(OpcNodeId, OpcNodeId) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other. The new reference will be a ParentToChild relation using Organizes as the type of reference while the target node shall be a node of the category Object.

csharp
public static OpcAddReference ToObject(OpcNodeId nodeId, OpcNodeId targetNodeId)
vbnet
Public Shared Function ToObject(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed. This identifier refers to the 'child' node.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target object node can be identified and accessed. This identifier referes to the 'parent' node.

Returns

OpcAddReference

Exceptions

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

ToObject(OpcNodeId, OpcNodeId, OpcReferenceDirection) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the Organizes as the type of reference while the target node shall be a node of the category Object.

csharp
public static OpcAddReference ToObject(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcReferenceDirection direction)
vbnet
Public Shared Function ToObject(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    direction As OpcReferenceDirection) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target object node can be identified and accessed.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.

Returns

OpcAddReference

Exceptions

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

ToObject(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcReferenceType) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the referenceType specified as the type of reference while the target node shall be a node of the category Object.

csharp
public static OpcAddReference ToObject(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcReferenceDirection direction,
    OpcReferenceType referenceType)
vbnet
Public Shared Function ToObject(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    direction As OpcReferenceDirection,
    referenceType As OpcReferenceType) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target object node can be identified and accessed.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.
referenceTypeOpcReferenceTypeOne of the members defined by the OpcReferenceType enumeration to use to setup the reference between the source and the target node identified by the nodeId and the targetNodeId.

Returns

OpcAddReference

Exceptions

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

ToObject(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcNodeId) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the type of reference identified by the referenceTypeId specified while the target node shall be a node of the category Object.

csharp
public static OpcAddReference ToObject(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcReferenceDirection direction,
    OpcNodeId referenceTypeId)
vbnet
Public Shared Function ToObject(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    direction As OpcReferenceDirection,
    referenceTypeId As OpcNodeId) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target object node can be identified and accessed.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.
referenceTypeIdOpcNodeIdThe OpcNodeId which identifies the type of reference to use to setup the reference between the source and the target node identified by the nodeId and the targetNodeId.

Returns

OpcAddReference

Exceptions

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

ToVariable ​

static · 4 overloads

OverloadDescription
ToVariable(OpcNodeId, OpcNodeId)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other.
ToVariable(OpcNodeId, OpcNodeId, OpcReferenceDirection)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.
ToVariable(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcReferenceType)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.
ToVariable(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcNodeId)staticCreates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified.

ToVariable(OpcNodeId, OpcNodeId) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other. The new reference will be a ParentToChild relation using Organizes as the type of reference while the target node shall be a node of the category Variable.

csharp
public static OpcAddReference ToVariable(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId)
vbnet
Public Shared Function ToVariable(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed. This identifier refers to the 'child' node.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target variable node can be identified and accessed. This identifier referes to the 'parent' node.

Returns

OpcAddReference

Exceptions

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

ToVariable(OpcNodeId, OpcNodeId, OpcReferenceDirection) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the Organizes as the type of reference while the target node shall be a node of the category Variable.

csharp
public static OpcAddReference ToVariable(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcReferenceDirection direction)
vbnet
Public Shared Function ToVariable(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    direction As OpcReferenceDirection) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target variable node can be identified and accessed.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.

Returns

OpcAddReference

Exceptions

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

ToVariable(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcReferenceType) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the referenceType specified as the type of reference while the target node shall be a node of the category Variable.

csharp
public static OpcAddReference ToVariable(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcReferenceDirection direction,
    OpcReferenceType referenceType)
vbnet
Public Shared Function ToVariable(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    direction As OpcReferenceDirection,
    referenceType As OpcReferenceType) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target variable node can be identified and accessed.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.
referenceTypeOpcReferenceTypeOne of the members defined by the OpcReferenceType enumeration to use to setup the reference between the source and the target node identified by the nodeId and the targetNodeId.

Returns

OpcAddReference

Exceptions

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

ToVariable(OpcNodeId, OpcNodeId, OpcReferenceDirection, OpcNodeId) ​

static

Creates a new instance of the OpcAddReference class using the identifiers of the nodes which shall reference each other using the direction specified. The new reference will use the relation defined by direction using the type of reference identified by the referenceTypeId specified while the target node shall be a node of the category Variable.

csharp
public static OpcAddReference ToVariable(
    OpcNodeId nodeId,
    OpcNodeId targetNodeId,
    OpcReferenceDirection direction,
    OpcNodeId referenceTypeId)
vbnet
Public Shared Function ToVariable(
    nodeId As OpcNodeId,
    targetNodeId As OpcNodeId,
    direction As OpcReferenceDirection,
    referenceTypeId As OpcNodeId) As OpcAddReference

Parameters

NameTypeDescription
nodeIdOpcNodeIdThe OpcNodeId through that the source node can be identified and accessed.
targetNodeIdOpcNodeIdThe OpcNodeId through that the target variable node can be identified and accessed.
directionOpcReferenceDirectionOne of the members defined by the OpcReferenceDirection enumeration which defines the kind of relation the reference will construct.
referenceTypeIdOpcNodeIdThe OpcNodeId which identifies the type of reference to use to setup the reference between the source and the target node identified by the nodeId and the targetNodeId.

Returns

OpcAddReference

Exceptions

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