Modifies the data variable to behave as read-write register, with specified initial attribute data (value, status code, timestamp).
This method makes the data variable both readable and writable. The data written to the data variable will become the data subsequently read from the data variable.
This method also makes the status code and source timestamp of the data variable writable, i.e. OPC UA clients will be able to modify their values. If you need a different behavior, call the Writable(UADataVariable,Boolean,Boolean,Boolean) method subsequently, with desired parameters, or modify the UADataVariable.WritableStatusCode and/or UADataVariable.WritableSourceTimestamp accordingly (set one or both to false
).
In order to make a read-write register of certain type, but without having to specify initial data, consider simply using one of the ValueType(UADataVariable,Type) overloads.
Overload List
Overload | Description |
ReadWrite(UADataVariable,Type,UAAttributeData) | Makes the data variable into a read-write register, specifying value type and initial attribute data (value, status code, timestamp). |
ReadWrite(UADataVariable,TypeCode,UAAttributeData) | Makes the data variable into a read-write register, specifying value type code and initial attribute data (value, status code, timestamp). |
ReadWrite(UADataVariable,UANodeId,Int32,UAAttributeData) | Makes the data variable into a read-write register, specifying the data type Id, array rank, and initial attribute data (value, status code, timestamp). |
ReadWrite(UADataVariable,UANodeId,IReadOnlyList<Int32>,UAAttributeData) | Makes the data variable into a read-write register, specifying the data type Id, array dimension list, and initial attribute data (value, status code, timestamp). |
ReadWrite(UADataVariable,UANodeId,UAAttributeData) | Makes the data variable into a read-write register, specifying the data type Id and initial attribute data (value, status code, timestamp). Use an empty array dimension list. |
ReadWrite<TValue>(UADataVariable,UAAttributeData<TValue>) | Makes the data variable into a read-write register, specifying initial typed attribute data (typed value, status code, timestamp). |
ReadWrite<TValue>(UADataVariable,UAAttributeData<TValue>,Int32[]) | Makes the data variable into a read-write register, specifying initial typed attribute data (typed value, status code, timestamp), and array dimensions. |
Requirements
Target Platforms: .NET Framework: Windows 10 (selected versions), Windows 11 (selected versions), Windows Server 2016, Windows Server 2022; .NET: Linux, macOS, Microsoft Windows
See Also