Connectivity Software User's Guide and Reference
SparkplugData Class
Members 



OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug Namespace : SparkplugData Class
A class that stores the value in Sparkplug, together with the timestamp and the transient flag.
Syntax
'Declaration
 
<ExceptionContractAnnotationAttribute(True)>
<CLSCompliantAttribute(True)>
<TypeConverterAttribute(System.ComponentModel.ExpandableObjectConverter)>
<ValueControlAttribute("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.83.473.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", 
   DefaultReadWrite=False, 
   Export=True, 
   PageId=10001)>
<SerializableAttribute()>
Public Class SparkplugData 
   Inherits OpcLabs.BaseLib.Info
   Implements LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable 
'Usage
 
Dim instance As SparkplugData
[ExceptionContractAnnotation(true)]
[CLSCompliant(true)]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.83.473.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", 
   DefaultReadWrite=false, 
   Export=true, 
   PageId=10001)]
[Serializable()]
public class SparkplugData : OpcLabs.BaseLib.Info, LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
[ExceptionContractAnnotation(true)]
[CLSCompliant(true)]
[TypeConverter(System.ComponentModel.ExpandableObjectConverter)]
[ValueControl("OpcLabs.BaseLib.Forms.Common.ObjectSerializationControl, OpcLabs.BaseLibForms, Version=5.83.473.1, Culture=neutral, PublicKeyToken=6faddca41dacb409", 
   DefaultReadWrite=false, 
   Export=true, 
   PageId=10001)]
[Serializable()]
public ref class SparkplugData : public OpcLabs.BaseLib.Info, LINQPad.ICustomMemberProvider, OpcLabs.BaseLib.ComTypes._Info, OpcLabs.BaseLib.ComTypes._Object2, System.ICloneable, System.IFormattable, System.Runtime.Serialization.ISerializable, System.Xml.Serialization.IXmlSerializable  
Remarks

When the Sparkplug producer (edge node or device) sends out information or receives commands, it is always Sparkplug data in some form. Conversely, when the Sparkplug consumer (host application) receives information or sends out commands, it is always Sparkplug data in some form.

The actual value is stored in the Value property, and can be of different types.

The timestamp represents the time at which the value of a metric was captured.

Transient data can be considered those that are of interest to a host application(s) but should not be stored in a historian.

This class belong to the category of Sparkplug data transfer objects. They encapsulate the data used in Sparkplug, and carry them inside the toolkit and to/from your code. Sparkplug data transfer objects operations do not affect anything external (and not passed) to them; they simply care of their own data for the purpose of storage, retrieval, comparisons, serialization/deserialization and such.

 

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.

Inheritance Hierarchy

System.Object
   OpcLabs.BaseLib.Object2
      OpcLabs.BaseLib.Info
         OpcLabs.EasySparkplug.SparkplugData
            OpcLabs.EasySparkplug.Generic.SparkplugData<TValue>
            OpcLabs.EasySparkplug.SparkplugMetricData

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