Skip to content

Reference

OpcClient.AddReferences Method

Adds one or more references to existing nodes in the address space hierarchy using the commands specified.

Reference

OpcClient.AddReferences 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

2 overloads · since v2.7

OverloadDescription
AddReferences(IEnumerable<OpcAddReference>)since v2.7Adds one or more references to existing nodes in the address space hierarchy using the commands specified.
AddReferences(params OpcAddReference[])since v2.7Adds one or more references to existing nodes in the address space hierarchy using the commands specified.

Exceptions (all overloads)

ExceptionCondition
ArgumentNullExceptionThe commands sequence or one of its items is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe add reference service is currently not supported, especially using the commands 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.

AddReferences(IEnumerable<OpcAddReference>) ​

since v2.7

Adds one or more references to existing nodes in the address space hierarchy using the commands specified.

csharp
public OpcStatusCollection AddReferences(IEnumerable<OpcAddReference> commands)
vbnet
Public Function AddReferences(
    commands As IEnumerable(Of OpcAddReference)) As OpcStatusCollection

Parameters

NameTypeDescription
commandsIEnumerable<OpcAddReference>A sequence of OpcAddReference instances to process.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection class which contains the information about the outcome of each processed command.

Remarks

Known results for the commands specified are:

StatusDescription
BadSourceNodeIdInvalidFor more details see BadSourceNodeIdInvalid.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadServerUriInvalidFor more details see BadServerUriInvalid.
BadTargetNodeIdInvalidFor more details see BadTargetNodeIdInvalid.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model on this server.
BadReferenceLocalOnlyThe reference type is not valid for a reference to a remote server.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadDuplicateReferenceNotAllowedThe reference type between the nodes is already defined.
BadInvalidSelfReferenceThe server does not allow this type of self reference on this node.

AddReferences(params OpcAddReference[]) ​

since v2.7

Adds one or more references to existing nodes in the address space hierarchy using the commands specified.

csharp
public OpcStatusCollection AddReferences(params OpcAddReference[] commands)
vbnet
Public Function AddReferences(
    ParamArray commands As OpcAddReference()) As OpcStatusCollection

Parameters

NameTypeDescription
commandsparams OpcAddReference[]An array of OpcAddReference instances to process.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection class which contains the information about the outcome of each processed command.

Remarks

Known results for the commands specified are:

StatusDescription
BadSourceNodeIdInvalidFor more details see BadSourceNodeIdInvalid.
BadReferenceTypeIdInvalidFor more details see BadReferenceTypeIdInvalid.
BadServerUriInvalidFor more details see BadServerUriInvalid.
BadTargetNodeIdInvalidFor more details see BadTargetNodeIdInvalid.
BadNodeClassInvalidFor more details see BadNodeClassInvalid.
BadReferenceNotAllowedThe reference could not be created because it violates constraints imposed by the data model on this server.
BadReferenceLocalOnlyThe reference type is not valid for a reference to a remote server.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadDuplicateReferenceNotAllowedThe reference type between the nodes is already defined.
BadInvalidSelfReferenceThe server does not allow this type of self reference on this node.