Connectivity Software User's Guide and Reference
ReadWriteValue Method (SparkplugMetricExtension)



OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug Namespace > SparkplugMetricExtension Class : ReadWriteValue Method
Modifies the metric to behave as read-write register, with specified initial value.

This method makes the metric both readable and writable. The data written to the metric will become the data subsequently read from the metric.

This method keeps the settings of WritableTimestamp. This means that by default, the timestamp of the metric will not writable. i.e. Sparkplug host applications will not be able to modify it. If you need a different behavior, call the Writable(SparkplugMetric,Boolean) method subsequently, with desired parameter, or modify the WritableTimestamp accordingly (set one or both to true).

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(SparkplugMetric,Type) overloads.

Overload List
OverloadDescription
Makes the metric into a read-write register, specifying value type and initial value.  
Makes the metric into a read-write register, specifying value type code and initial value.  
Makes the metric into a read-write register, specifying the Sparkplug data type and initial value.  
Makes the metric into a read-write register, specifying the typed initial value.  
Remarks

 

Sparkplug is a trademark of Eclipse Foundation, Inc. "MQTT" is a trademark of the OASIS Open standards consortium. Other related terms are trademarks of their respective owners. Any use of these terms on this site is for descriptive purposes only and does not imply any sponsorship, endorsement or affiliation.

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