Skip to content

Reference

OpcNodeValueExtensions Members

Provides a set of static (Shared in Visual Basic) methods to perform different OpcClient related tasks using OpcNodeValue<T> instances.

Reference

OpcNodeValueExtensions Members ​

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

Methods ​

Read ​

static · 2 overloads

OverloadDescription
Read<T>(OpcNodeValue<T>, OpcClient)staticReads the value of the value attribute of the node represented by the node specified.
Read<T>(IEnumerable<OpcNodeValue<T>>, OpcClient)staticReads one or more values of one or more value attributes of one or more nodes represented by the nodes specified.

Known results: BadNodeIdInvalid, BadNodeIdUnknown, BadAttributeInvalid, BadIndexRangeInvalid, BadIndexRangeNoData, BadDataEncodingInvalid, BadDataEncodingUnsupported, BadNotReadable, BadUserAccessDenied

Exceptions (all overloads)

ExceptionCondition
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, BadTooManyOperations, BadMaxAgeInvalid and BadTimestampsToReturnInvalid.

Read<T>(OpcNodeValue<T>, OpcClient) ​

static

Reads the value of the value attribute of the node represented by the node specified.

csharp
public static T Read<T>(this OpcNodeValue<T> node, OpcClient client)
vbnet
Public Shared Function Read(Of T)(
    node As OpcNodeValue(Of T),
    client As OpcClient) As T

Type parameters

NameDescription
TThe type of value to read.

Parameters

NameTypeDescription
nodeOpcNodeValue<T>The OpcNodeValue<T> instance to process.
clientOpcClientThe OpcClient to use to read the value attribute of the node.

Returns

T

The T value read using the node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node or client is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe read service is currently not supported, especially using the node or client specified.

Read<T>(IEnumerable<OpcNodeValue<T>>, OpcClient) ​

static

Reads one or more values of one or more value attributes of one or more nodes represented by the nodes specified.

csharp
public static T[] Read<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client)
vbnet
Public Shared Function Read(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient) As T()

Type parameters

NameDescription
TThe type of value to read.

Parameters

NameTypeDescription
nodesIEnumerable<OpcNodeValue<T>>A sequence of OpcNodeValue<T> instances to process.
clientOpcClientThe OpcClient to use to read the value attributes of the nodes.

Returns

T[]

A sequence of T values read using the nodes specified. The number and order of items matches the number and order of items in the nodes sequence. There is for each node one entry which stores the value requested.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe nodes sequence, one of its items or client is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe read service is currently not supported, especially using the nodes or client specified.

Write ​

static · 5 overloads

OverloadDescription
Write<T>(OpcNodeValue<T>, OpcClient)staticWrites the value attribute of the node specified.
Write<T>(OpcNodeValue<T>, OpcClient, T)staticWrites the value attribute of the node using the value specified.
Write<T>(IEnumerable<OpcNodeValue<T>>, OpcClient)staticWrites one or more values to one or more value attributes of one or more nodes represented by the nodes specified.
Write<T>(IEnumerable<OpcNodeValue<T>>, OpcClient, IEnumerable<T>)staticWrites one or more values to one or more value attributes of one or more nodes represented by the nodes using the values specified.
Write<T>(IEnumerable<OpcNodeValue<T>>, OpcClient, params T[])staticWrites one or more values to one or more value attributes of one or more nodes represented by the nodes using the values specified.

Exceptions (all overloads)

ExceptionCondition
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.

Write<T>(OpcNodeValue<T>, OpcClient) ​

static

Writes the value attribute of the node specified.

csharp
public static OpcStatus Write<T>(this OpcNodeValue<T> node, OpcClient client)
vbnet
Public Shared Function Write(Of T)(
    node As OpcNodeValue(Of T),
    client As OpcClient) As OpcStatus

Type parameters

NameDescription
T

Parameters

NameTypeDescription
nodeOpcNodeValue<T>The OpcNodeValue<T> instance to process.
clientOpcClientThe OpcClient to use to write the value attribute of the node.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the operation for the node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node or client is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the node or client specified.

Remarks

Known results for the node specified are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

Write<T>(OpcNodeValue<T>, OpcClient, T) ​

static

Writes the value attribute of the node using the value specified.

csharp
public static OpcStatus Write<T>(
    this OpcNodeValue<T> node,
    OpcClient client,
    T value)
vbnet
Public Shared Function Write(Of T)(
    node As OpcNodeValue(Of T),
    client As OpcClient,
    value As T) As OpcStatus

Type parameters

NameDescription
T

Parameters

NameTypeDescription
nodeOpcNodeValue<T>The OpcNodeValue<T> instance to process.
clientOpcClientThe OpcClient to use to write the value attribute of the node using the value.
valueTThe T value to write to the node.

Returns

OpcStatus

An instance of the OpcStatus class which indicates the outcome of the operation for the node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe node or client is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the node or client specified.

Remarks

Known results for the node specified are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

Write<T>(IEnumerable<OpcNodeValue<T>>, OpcClient) ​

static

Writes one or more values to one or more value attributes of one or more nodes represented by the nodes specified.

csharp
public static OpcStatusCollection Write<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client)
vbnet
Public Shared Function Write(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient) As OpcStatusCollection

Type parameters

NameDescription
T

Parameters

NameTypeDescription
nodesIEnumerable<OpcNodeValue<T>>A sequence of OpcNodeValue<T> instances to process.
clientOpcClientThe OpcClient to use to read the value attributes of the nodes.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the nodes. There is for each node one entry which indicates the outcome of the operation for that node.

Exceptions

ExceptionCondition
ArgumentNullExceptionThe nodes sequence or one of its items or client is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the nodes or client specified.

Remarks

Known results for the nodes specified are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

Write<T>(IEnumerable<OpcNodeValue<T>>, OpcClient, IEnumerable<T>) ​

static

Writes one or more values to one or more value attributes of one or more nodes represented by the nodes using the values specified.

csharp
public static OpcStatusCollection Write<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client,
    IEnumerable<T> values)
vbnet
Public Shared Function Write(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient,
    values As IEnumerable(Of T)) As OpcStatusCollection

Type parameters

NameDescription
T

Parameters

NameTypeDescription
nodesIEnumerable<OpcNodeValue<T>>A sequence of OpcNodeValue<T> instances to process.
clientOpcClientThe OpcClient to use to read the value attributes of the nodes.
valuesIEnumerable<T>A sequence of T values to write.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the nodes. There is for each node one entry which indicates the outcome of the operation for that node.

Exceptions

ExceptionCondition
ArgumentExceptionThe number of items in nodes does not match the number of items in values.
ArgumentNullExceptionThe nodes sequence or one of its items, client or values is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the nodes or client specified.

Remarks

Known results for the nodes specified are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.

Write<T>(IEnumerable<OpcNodeValue<T>>, OpcClient, params T[]) ​

static

Writes one or more values to one or more value attributes of one or more nodes represented by the nodes using the values specified.

csharp
public static OpcStatusCollection Write<T>(
    this IEnumerable<OpcNodeValue<T>> nodes,
    OpcClient client,
    params T[] values)
vbnet
Public Shared Function Write(Of T)(
    nodes As IEnumerable(Of OpcNodeValue(Of T)),
    client As OpcClient,
    ParamArray values As T()) As OpcStatusCollection

Type parameters

NameDescription
T

Parameters

NameTypeDescription
nodesIEnumerable<OpcNodeValue<T>>A sequence of OpcNodeValue<T> instances to process.
clientOpcClientThe OpcClient to use to read the value attributes of the nodes.
valuesparams T[]An array of T values to write.

Returns

OpcStatusCollection

An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the nodes. There is for each node one entry which indicates the outcome of the operation for that node.

Exceptions

ExceptionCondition
ArgumentExceptionThe number of items in nodes does not match the number of items in values.
ArgumentNullExceptionThe nodes sequence or one of its items, client or values is a null reference (Nothing in Visual Basic).
InvalidOperationExceptionThe write service is currently not supported, especially using the nodes or client specified.

Remarks

Known results for the nodes specified are:

StatusDescription
GoodCompletesAsynchronouslyThe value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalidFor more details see BadNodeIdInvalid.
BadNodeIdUnknownFor more details see BadNodeIdUnknown.
BadAttributeInvalidFor more details see BadAttributeInvalid.
BadIndexRangeInvalidFor more details see BadIndexRangeInvalid.
BadIndexRangeNoDataFor more details see BadIndexRangeNoData.
BadWriteNotSupportedThe requested write operation is not supported. If a client attempts to write any value, quality, timestamp combination and the server does not support the requested combination (which could be a single quantity such as just timestamp), then the Server shall not perform any write on this node and shall return this status for that node.
BadNotWritableFor more details see BadNotWritable.
BadUserAccessDeniedFor more details see BadUserAccessDenied.
BadOutOfRangeIf a client attempts to write a value outside the valid range like a value not contained in the enumeration data type of a node, the server shall return this status for that node.
BadTypeMismatchFor more details see BadTypeMismatch.
BadDataEncodingUnsupportedFor more details see BadDataEncodingUnsupported.
BadNoCommunicationFor more details see BadNoCommunication.