Reference
OpcClient.AddReference Method
Adds a new reference to existing nodes in the address space hierarchy using the command specified.
Reference
OpcClient.AddReference 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
| Overload | Description |
|---|---|
| AddReference( | Adds a new reference to existing nodes in the address space hierarchy using the command specified. |
| AddReference( | Adds a new reference to existing nodes in the address space hierarchy using the identifiers of the nodes which shall reference each other. |
| AddReference( | Adds a new reference to existing nodes in the address space hierarchy using the identifiers of the nodes which shall reference each other using the direction specified. |
| AddReference( | Adds a new reference to existing nodes in the address space hierarchy using the identifiers of the nodes which shall reference each other using the direction specified. |
| AddReference( | Adds a new reference to existing nodes in the address space hierarchy using the identifiers of the nodes which shall reference each other using the direction specified. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Object | The object has been disposed of. |
| OpcException | The service execution failed upon different circumstances; for more details see exception details. The following issues can lead to that exception: BadNothingToDo and Bad |
AddReference(OpcAddReference)
Adds a new reference to existing nodes in the address space hierarchy using the command specified.
public OpcStatus AddReference(OpcAddReference command)Public Function AddReference(command As OpcAddReference) As OpcStatusParameters
| Name | Type | Description |
|---|---|---|
command | OpcAddReference | The OpcAddReference instance to process. |
Returns
An instance of the OpcStatus class which contains the information about the outcome of the processed command.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The command is a null reference ( |
| Invalid | The add node service is currently not supported, especially using the command specified. |
Remarks
Known results for the command specified are:
| Status | Description |
|---|---|
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | The reference could not be created because it violates constraints imposed by the data model on this server. |
| Bad | The reference type is not valid for a reference to a remote server. |
| Bad | For more details see Bad |
| Bad | The reference type between the nodes is already defined. |
| Bad | The server does not allow this type of self reference on this node. |
AddReference(OpcNodeId, OpcNodeId, OpcNodeCategory)
Adds a new reference to existing nodes in the address space hierarchy 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.
public OpcStatus AddReference(
OpcNodeId nodeId,
OpcNodeId targetNodeId,
OpcNodeCategory targetNodeCategory)Public Function AddReference(
nodeId As OpcNodeId,
targetNodeId As OpcNodeId,
targetNodeCategory As OpcNodeCategory) As OpcStatusParameters
| Name | Type | Description |
|---|---|---|
nodeId | OpcNodeId | The OpcNodeId through that the source node can be identified and accessed. This identifier refers to the 'child' node. |
targetNodeId | OpcNodeId | The OpcNodeId through that the target node can be identified and accessed. This identifier referes to the 'parent' node. |
target | OpcNodeCategory | One 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. |
Returns
Exceptions
| Exception | Condition |
|---|---|
| Argument | The nodeId or targetNodeId is equals Null. |
| Argument | The nodeId or targetNodeId is a null reference ( |
| Invalid | The add node service is currently not supported, especially using the parameters specified. |
Remarks
Known results for the service invocation are:
| Status | Description |
|---|---|
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | The reference could not be created because it violates constraints imposed by the data model on this server. |
| Bad | The reference type is not valid for a reference to a remote server. |
| Bad | For more details see Bad |
| Bad | The reference type between the nodes is already defined. |
| Bad | The server does not allow this type of self reference on this node. |
AddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection)
Adds a new reference to existing nodes in the address space hierarchy 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.
public OpcStatus AddReference(
OpcNodeId nodeId,
OpcNodeId targetNodeId,
OpcNodeCategory targetNodeCategory,
OpcReferenceDirection direction)Public Function AddReference(
nodeId As OpcNodeId,
targetNodeId As OpcNodeId,
targetNodeCategory As OpcNodeCategory,
direction As OpcReferenceDirection) As OpcStatusParameters
| Name | Type | Description |
|---|---|---|
nodeId | OpcNodeId | The OpcNodeId through that the source node can be identified and accessed. |
targetNodeId | OpcNodeId | The OpcNodeId through that the target node can be identified and accessed. |
target | OpcNodeCategory | One 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. |
direction | Opc | One of the members defined by the Opc |
Returns
Exceptions
| Exception | Condition |
|---|---|
| Argument | The nodeId or targetNodeId is equals Null. |
| Argument | The nodeId or targetNodeId is a null reference ( |
| Invalid | The add node service is currently not supported, especially using the parameters specified. |
Remarks
Known results for the service invocation are:
| Status | Description |
|---|---|
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | The reference could not be created because it violates constraints imposed by the data model on this server. |
| Bad | The reference type is not valid for a reference to a remote server. |
| Bad | For more details see Bad |
| Bad | The reference type between the nodes is already defined. |
| Bad | The server does not allow this type of self reference on this node. |
AddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection, OpcReferenceType)
Adds a new reference to existing nodes in the address space hierarchy 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.
public OpcStatus AddReference(
OpcNodeId nodeId,
OpcNodeId targetNodeId,
OpcNodeCategory targetNodeCategory,
OpcReferenceDirection direction,
OpcReferenceType referenceType)Public Function AddReference(
nodeId As OpcNodeId,
targetNodeId As OpcNodeId,
targetNodeCategory As OpcNodeCategory,
direction As OpcReferenceDirection,
referenceType As OpcReferenceType) As OpcStatusParameters
| Name | Type | Description |
|---|---|---|
nodeId | OpcNodeId | The OpcNodeId through that the source node can be identified and accessed. |
targetNodeId | OpcNodeId | The OpcNodeId through that the target node can be identified and accessed. |
target | OpcNodeCategory | One 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. |
direction | Opc | One of the members defined by the Opc |
referenceType | OpcReferenceType | One 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
Exceptions
| Exception | Condition |
|---|---|
| Argument | The nodeId or targetNodeId is equals Null. |
| Argument | The nodeId or targetNodeId is a null reference ( |
| Invalid | The add node service is currently not supported, especially using the parameters specified. |
Remarks
Known results for the service invocation are:
| Status | Description |
|---|---|
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | The reference could not be created because it violates constraints imposed by the data model on this server. |
| Bad | The reference type is not valid for a reference to a remote server. |
| Bad | For more details see Bad |
| Bad | The reference type between the nodes is already defined. |
| Bad | The server does not allow this type of self reference on this node. |
AddReference(OpcNodeId, OpcNodeId, OpcNodeCategory, OpcReferenceDirection, OpcNodeId)
Adds a new reference to existing nodes in the address space hierarchy 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.
public OpcStatus AddReference(
OpcNodeId nodeId,
OpcNodeId targetNodeId,
OpcNodeCategory targetNodeCategory,
OpcReferenceDirection direction,
OpcNodeId referenceTypeId)Public Function AddReference(
nodeId As OpcNodeId,
targetNodeId As OpcNodeId,
targetNodeCategory As OpcNodeCategory,
direction As OpcReferenceDirection,
referenceTypeId As OpcNodeId) As OpcStatusParameters
| Name | Type | Description |
|---|---|---|
nodeId | OpcNodeId | The OpcNodeId through that the source node can be identified and accessed. |
targetNodeId | OpcNodeId | The OpcNodeId through that the target node can be identified and accessed. |
target | OpcNodeCategory | One 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. |
direction | Opc | One of the members defined by the Opc |
referenceTypeId | OpcNodeId | The 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
Exceptions
| Exception | Condition |
|---|---|
| Argument | The nodeId, targetNodeId or referenceTypeId is equals Null. |
| Argument | The nodeId, targetNodeId or referenceTypeId is a null reference ( |
| Invalid | The add node service is currently not supported, especially using the parameters specified. |
Remarks
Known results for the service invocation are:
| Status | Description |
|---|---|
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | The reference could not be created because it violates constraints imposed by the data model on this server. |
| Bad | The reference type is not valid for a reference to a remote server. |
| Bad | For more details see Bad |
| Bad | The reference type between the nodes is already defined. |
| Bad | The server does not allow this type of self reference on this node. |

