Modifies the metric for consuming values by a specified action, for the push data consumption model.
This method always makes the metric writable; however, its timestamp will not be writable, i.e. Sparkplug host applications will not be able to modify them. If you need a different behavior, use one of the WriteFunction(SparkplugMetric,Type,Func<SparkplugData,Boolean>) method overloads instead.
This method does not change the readability access of the metric. By default, metrics are readable. If you need a metric that is writable but non-readable, combine this method with calling Readable(SparkplugMetric,Boolean) method with the 'readable' parameter set to false.
The write operation defined by this method always succeeds. If you need support the option of failing the write operation to fail, use one of the WriteValueFunction<TValue>(SparkplugMetric,Type,Func<TValue,Boolean>) method overloads instead.
Overload List
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