OpcNodeValueExtensions Members

Namespace: Opc.UaFx.Client
Assemblies: Opc.UaFx.Advanced.dll, Opc.UaFx.Advanced.dll
The OpcNodeValueExtensions type exposes the following members.

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

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

C#

public static T[] Read<T>(this IEnumerable<OpcNodeValue<T>> nodes, OpcClient client)


Parameters

nodes IEnumerable<OpcNodeValue>

A sequence of OpcNodeValue´1 instances to process.

client OpcClient

The 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

ArgumentNullException

The nodes sequence, one of its items or client is a null reference (Nothing in Visual Basic).

InvalidOperationException

The read service is currently not supported, especially using the nodes or client specified.

ObjectDisposedException

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


Remarks

Known results for the nodes specified are:

Status Description
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadDataEncodingInvalid For more details see BadDataEncodingInvalid.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNotReadable For more details see BadNotReadable.
BadUserAccessDenied For more details see BadUserAccessDenied.

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

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

C#

public static T Read<T>(this OpcNodeValue<T> node, OpcClient client)


Parameters

node OpcNodeValue<T>

The OpcNodeValue´1 instance to process.

client OpcClient

The OpcClient to use to read the value attribute of the node.


Returns

T

The T value read using the node.



Exceptions

ArgumentNullException

The node or client is a null reference (Nothing in Visual Basic).

InvalidOperationException

The read service is currently not supported, especially using the node or client specified.

ObjectDisposedException

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


Remarks

Known results for the operation are:

Status Description
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadDataEncodingInvalid For more details see BadDataEncodingInvalid.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNotReadable For more details see BadNotReadable.
BadUserAccessDenied For more details see BadUserAccessDenied.

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

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

C#

public static OpcStatusCollection Write<T>(this IEnumerable<OpcNodeValue<T>> nodes, OpcClient client)


Parameters

nodes IEnumerable<OpcNodeValue>

A sequence of OpcNodeValue´1 instances to process.

client OpcClient

The 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

ArgumentNullException

The nodes sequence or one of its items or client is a null reference (Nothing in Visual Basic).

InvalidOperationException

The write service is currently not supported, especially using the nodes or client specified.

ObjectDisposedException

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


Remarks

Known results for the nodes specified are:

Status Description
GoodCompletesAsynchronously The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadWriteNotSupported The 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.
BadNotWritable For more details see BadNotWritable.
BadUserAccessDenied For more details see BadUserAccessDenied.
BadOutOfRange If 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.
BadTypeMismatch For more details see BadTypeMismatch.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNoCommunication For more details see BadNoCommunication.

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

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

C#

public static OpcStatusCollection Write<T>(this IEnumerable<OpcNodeValue<T>> nodes, OpcClient client, IEnumerable<T> values)


Parameters

nodes IEnumerable<OpcNodeValue>

A sequence of OpcNodeValue´1 instances to process.

client OpcClient

The OpcClient to use to read the value attributes of the nodes.

values IEnumerable<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

ArgumentException

The number of items in nodes does not match the number of items in values.

ArgumentNullException

The nodes sequence or one of its items, client or values is a null reference (Nothing in Visual Basic).

InvalidOperationException

The write service is currently not supported, especially using the nodes or client specified.

ObjectDisposedException

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


Remarks

Known results for the nodes specified are:

Status Description
GoodCompletesAsynchronously The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadWriteNotSupported The 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.
BadNotWritable For more details see BadNotWritable.
BadUserAccessDenied For more details see BadUserAccessDenied.
BadOutOfRange If 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.
BadTypeMismatch For more details see BadTypeMismatch.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNoCommunication For more details see BadNoCommunication.

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

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

C#

public static OpcStatusCollection Write<T>(this IEnumerable<OpcNodeValue<T>> nodes, OpcClient client, params T[] values)


Parameters

nodes IEnumerable<OpcNodeValue>

A sequence of OpcNodeValue´1 instances to process.

client OpcClient

The OpcClient to use to read the value attributes of the nodes.

values 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

ArgumentException

The number of items in nodes does not match the number of items in values.

ArgumentNullException

The nodes sequence or one of its items, client or values is a null reference (Nothing in Visual Basic).

InvalidOperationException

The write service is currently not supported, especially using the nodes or client specified.

ObjectDisposedException

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


Remarks

Known results for the nodes specified are:

Status Description
GoodCompletesAsynchronously The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadWriteNotSupported The 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.
BadNotWritable For more details see BadNotWritable.
BadUserAccessDenied For more details see BadUserAccessDenied.
BadOutOfRange If 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.
BadTypeMismatch For more details see BadTypeMismatch.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNoCommunication For more details see BadNoCommunication.

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

Writes the value attribute of the node specified.

C#

public static OpcStatus Write<T>(this OpcNodeValue<T> node, OpcClient client)


Parameters

node OpcNodeValue<T>

The OpcNodeValue´1 instance to process.

client OpcClient

The 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

ArgumentNullException

The node or client is a null reference (Nothing in Visual Basic).

InvalidOperationException

The write service is currently not supported, especially using the node or client specified.

ObjectDisposedException

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


Remarks

Known results for the node specified are:

Status Description
GoodCompletesAsynchronously The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadWriteNotSupported The 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.
BadNotWritable For more details see BadNotWritable.
BadUserAccessDenied For more details see BadUserAccessDenied.
BadOutOfRange If 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.
BadTypeMismatch For more details see BadTypeMismatch.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNoCommunication For more details see BadNoCommunication.

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

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

C#

public static OpcStatus Write<T>(this OpcNodeValue<T> node, OpcClient client, T value)


Parameters

node OpcNodeValue<T>

The OpcNodeValue´1 instance to process.

client OpcClient

The OpcClient to use to write the value attribute of the node using the value.

value T

The 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

ArgumentNullException

The node or client is a null reference (Nothing in Visual Basic).

InvalidOperationException

The write service is currently not supported, especially using the node or client specified.

ObjectDisposedException

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


Remarks

Known results for the node specified are:

Status Description
GoodCompletesAsynchronously The value was successfully written to an intermediate system but the Server does not know if the data source was updated properly.
BadNodeIdInvalid For more details see BadNodeIdInvalid.
BadNodeIdUnknown For more details see BadNodeIdUnknown.
BadAttributeInvalid For more details see BadAttributeInvalid.
BadIndexRangeInvalid For more details see BadIndexRangeInvalid.
BadIndexRangeNoData For more details see BadIndexRangeNoData.
BadWriteNotSupported The 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.
BadNotWritable For more details see BadNotWritable.
BadUserAccessDenied For more details see BadUserAccessDenied.
BadOutOfRange If 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.
BadTypeMismatch For more details see BadTypeMismatch.
BadDataEncodingUnsupported For more details see BadDataEncodingUnsupported.
BadNoCommunication For more details see BadNoCommunication.