| | Name | Description |
 | Constant | Overloaded. Modifies the metric to provide the specified constant data (value, timestamp), non-writable.
The metric will not be writable. |
 | ConstantValue | Overloaded. Modifies the metric to provide the specified constant value, non-writable.
The metric will not be writable.
The timestamp will be the current time of this method call. |
 | ProcessRead | Specifies that reads of this metric will be processed by the specified read function. |
 | ProcessWrite | Specifies that writes of this metric will be processed by the specified write function. |
 | Readable | Overloaded. Makes the metric readable. |
 | ReadFunction | Overloaded. Modifies the metric to provide Sparkplug data for the pull data provision model by a specified function.
This method always makes the metric readable, but that does not mean it automatically makes it non-writable. If you need a metric that is readable and non-writable, combine this method with calling Writable(SparkplugMetric,Boolean) method with the 'writable' parameter set to false. |
 | ReadValueFunction | Overloaded. Modifies the metric to provide value for the pull data provision model by a specified function.
This method always makes the metric readable, but that does not mean it automatically makes it non-writable. If you need a metric that is readable and non-writable, combine this method with calling Writable(SparkplugMetric,Boolean) method with the 'writable' parameter set to false. |
 | ReadWrite | Overloaded. 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. |
 | ReadWriteValue | Overloaded. 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. |
 | SetState<TNode> | Sets the arbitrary object associated with the node. |
 | SetState | Sets the arbitrary object associated with the metric. |
 | ValueType | Overloaded. Modifies the metric to use certain value type. |
 | Writable | Overloaded. Makes the metric writable. |
 | WriteFunction | Overloaded. Modifies the metric for consuming Sparkplug data by a specified function, for the push data consumption model.
This method always makes the metric writable, including its timestamp, i.e. Sparkplug host applications will be able to modify them. If you need a different behavior, call the Writable(SparkplugMetric,Boolean) method subsequently, with desired parameter, or modify the WritableTimestamp accordingly (set it to true).
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 function returns a boolean value that indicates the outcome of the Sparkplug write operation. The WriteFunction(SparkplugMetric,Type,Func<SparkplugData,Boolean>) method overloads are the most generic extensions methods for writing. If you only need to deal with the metric value (and not its timestamp), consider using one of the WriteValueFunction<TValue>(SparkplugMetric,Type,Func<TValue,Boolean>) or WriteValueAction<TValue>(SparkplugMetric,Type,Action<TValue>) method overloads, for shorter code and easier programming. |
 | WriteValueAction | Overloaded. 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. |
 | WriteValueFunction | Overloaded. Modifies the metric for consuming values by a specified function, for the push data consumption model.
This method always makes the metric writable; however, its timestamp will not be writable, i.e. Sparkplug host application 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 function returns a boolean that indicates the outcome of the Sparkplug write operation. If the outcome of your write operation should always be successful, you can make your code a bit simpler by using one of WriteValueAction<TValue>(SparkplugMetric,Type,Action<TValue>) method overloads instead. |