Reference
IOpcWriteNodesService Members
Defines a specialized IOpcService<TResponse, TRequest> which can be used to write values to one or more attributes (see OpcAttribute) of one or more nodes.
Reference
IOpcWriteNodesService Members
- Type
- IOpcWriteNodesService
- Namespace
- Opc.UaFx.Services
- Assembly
- Opc.UaFx.Advanced.dll
- Package
- Opc.UaFx.Advanced v2.59.0
- Also in
- Opc.UaFx.Client
Inherits members from IOpcService<OpcWriteNodesResponse, OpcWriteNodesRequest>.
Properties
MaxNodesPerWrite
Gets or sets the maximum number of nodes which shall be written using a single write request. This number indirectly defines the number of requests used to send a specific number of write requests to the server.
uint? MaxNodesPerWrite { get; set; }Property MaxNodesPerWrite As UInteger?Property value
The absolute number of write commands which shall be send to the server per request or a null reference (Nothing in Visual Basic). In case there a specific number of nodes is used, a request with more commands as the MaxNodesPerWrite is partitioned into multiple requests and the responses of them are accumulated. The default value of this property is a null reference (Nothing in Visual Basic) and means that all commands defined are send to the server using the server defined number of nodes per write request.
TimestampSource
Gets or sets the OpcTimestampSource to use to prepare OpcValue timestamp values before sending a write request to a server.
OpcTimestampSource? TimestampSource { get; set; }Property TimestampSource As OpcTimestampSource?Property value
One of the members defined by the OpcTimestampSource enumeration; otherwise a null reference (Nothing in Visual Basic). In case there the value is null reference (Nothing in Visual Basic) there will be tried to automatically determine the timestamp sourcing to match the needs of the server. The default value of this property is a null reference (Nothing in Visual Basic).
UsedMaxNodesPerWrite
Gets the maximum number of nodes which are written using a single write request. This property will use either the MaxNodesPerWrite or the maximum number of nodes which can be written in one request as defined by the server. The lowest number of nodes is used to partition the commands to execute into multiple write requests.
uint? UsedMaxNodesPerWrite { get; }ReadOnly Property UsedMaxNodesPerWrite As UInteger?Property value
In case there has already been one write attempt (with more than one write command) the definite number of commands per write request; otherwise a null reference (Nothing in Visual Basic).
UsedTimestampSource
Gets the OpcTimestampSource currently used to prepare OpcValue timestamp values before sending a write request to a server. In case there TimestampSource is a null reference (Nothing in Visual Basic) this property will define the OpcTimestampSource automatically determined during the first write attempt which does write an OpcValue of the Value attribute.
OpcTimestampSource? UsedTimestampSource { get; }ReadOnly Property UsedTimestampSource As OpcTimestampSource?Property value
In case there has already been one write attempt to a Value attribute the definite timestamp source; otherwise a null reference (Nothing in Visual Basic).
Methods
WriteNodes
| Overload | Description |
|---|---|
| WriteNodes( | Writes one or more values to one or more attributes of one or more nodes using the specified commands. |
| WriteNodes( | Writes one or more values to one or more attributes of one or more nodes using the specified commands. |
Exceptions (all overloads)
| Exception | Condition |
|---|---|
| Invalid | The write service is currently not supported, especially using the commands specified. |
| 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 |
WriteNodes(IEnumerable<OpcWriteNode>)
Writes one or more values to one or more attributes of one or more nodes using the specified commands.
OpcStatusCollection WriteNodes(IEnumerable<OpcWriteNode> commands)Function WriteNodes(
commands As IEnumerable(Of OpcWriteNode)) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
commands | IEnumerable<OpcWriteNode> | A sequence of OpcWriteNode instances to process. |
Returns
An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the commands sequence. There is for each command one entry which indicates the outcome of the operation for that command.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The commands sequence or one of its items is a null reference ( |
Remarks
Known results for the commands specified are:
| Status | Description |
|---|---|
| Good | 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. |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | 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 ( |
| BadNotWritable | For more details see BadNotWritable. |
| Bad | For more details see Bad |
| 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. |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
WriteNodes(params OpcWriteNode[])
Writes one or more values to one or more attributes of one or more nodes using the specified commands.
OpcStatusCollection WriteNodes(params OpcWriteNode[] commands)Function WriteNodes(
ParamArray commands As OpcWriteNode()) As OpcStatusCollectionParameters
| Name | Type | Description |
|---|---|---|
commands | params OpcWriteNode[] | An array of OpcWriteNode instances to process. |
Returns
An instance of the OpcStatusCollection its number and order of items matches the number and order of items in the commands. There is for each command one entry which indicates the outcome of the operation for that command.
Exceptions
| Exception | Condition |
|---|---|
| Argument | The commands array or one of its items is a null reference ( |
Remarks
Known results for the commands specified are:
| Status | Description |
|---|---|
| Good | 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. |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | For more details see Bad |
| Bad | 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 ( |
| BadNotWritable | For more details see BadNotWritable. |
| Bad | For more details see Bad |
| 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. |
| Bad | For more details see Bad |
| Bad | For more details see Bad |

