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



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

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 also makes the timestamp of the metric writable, i.e. Sparkplug host applications will be able to modify its value. If you need a different behavior, call the Writable(SparkplugMetric,Boolean) method subsequently, with the desired parameter, or modify the WritableTimestamp accordingly (set it 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(SparkplugMetric,Type) overloads.

Overload List
OverloadDescription
Makes the metric into a read-write register, specifying value type and initial Sparkplug data (value, timestamp).  
Makes the metric into a read-write register, specifying value type code and initial Sparkplug data (value, timestamp).  
Makes the metric into a read-write register, specifying the Sparkplug data type and initial Sparkplug data (value, timestamp).  
Makes the metric into a read-write register, specifying initial typed Sparkplug data (typed value, timestamp).  
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