Connectivity Software User's Guide and Reference
SparkplugDevice Class Members
Fields  Properties  Methods  Events


OpcLabs.EasySparkplug Assembly > OpcLabs.EasySparkplug Namespace : SparkplugDevice Class

The following tables list the members exposed by SparkplugDevice.

Public Constructors
 NameDescription
Public ConstructorOverloaded. Initializes a new instance of the class.  
Top
Public Fields
 NameDescription
Public FieldThe default value of ConvertCommandData property.

This is a constant, and its value is True.

 
Public FieldThe default value of DataSourceConnectionMode property.

This is a constant, and its value is WhenComponentStarted.

 
Public FieldThe default value of DeviceId property.

This is a constant, and its value is "easyDevice".

 
Public FieldThe default value of MetricIdentificationMode property.

This is a constant, and its value is SparkplugMetricIdentificationMode.Alias.

 
Public FieldThe default value of PublishingInterval property.

This is a constant, and its value is 1000.

 
Top
Public Properties
 NameDescription
Public PropertyDetermines whether the Primary Host Application is online.  
Public Property (Inherited from System.ComponentModel.Component)
Public PropertyDetermines whether an attempt will be made to convert the data in the incoming command to the type of the metric.  
Public PropertyCan be used to distinguish otherwise equal widgets. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public PropertyContains the condition of the data source connection associated with the Sparkplug producer.  
Public PropertyDetermines when and how the Sparkplug producer (edge node or device) connects and disconnects its data source.  
Public PropertyContains device ID of this Sparkplug device.  
Public PropertyContains reference to the edge node that this device belongs to.  
Public PropertyDetermines whether this device is currently alive.  
Public PropertyDetermines whether this device is currently frozen.  
Public PropertyDetermines whether the publishing is currently locked, i.e. metric data changes are not immediately published.  
Public PropertyDetermines whether the component is currently started.  
Public PropertyDefines how the Sparkplug metrics are identified in the Birth and Data messages.  
Public PropertyThe collection of Sparkplug metrics that this producer publishes.  
Public PropertyDetermines whether this Sparkplug producer (edge node or device) is online.  
Public PropertyThe interval in milliseconds at which the Sparkplug producer (edge node or device) publishes its data.  
Public PropertyDetermines whether the Sparkplug producer (edge node or device) publishes only the last data known.  
Public PropertyDetermines whether your code will report any changed data to the producer, or whether the producer will poll for data changes.  
Public Property (Inherited from System.ComponentModel.Component)
Public PropertyAn arbitrary object associated with the device.  
Top
Protected Properties
 NameDescription
Protected Property (Inherited from System.ComponentModel.Component)
Protected Property (Inherited from System.ComponentModel.Component)
Protected Property (Inherited from System.ComponentModel.Component)
Protected PropertyDetermines whether the object has been disposed. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Protected PropertyThe service container provided by this widget to inheritors. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Top
Public Methods
 NameDescription
Public MethodAdds a Sparkplug metric to the edge node.  
Public MethodOverridden.   
Public Methodstatic (Shared in Visual Basic)Creates and returns a device (with given device ID) in the specified edge node.  
Public MethodCreates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (Inherited from System.MarshalByRefObject)
Public MethodIndicates that the data source connection for the edge node or device has failed.  
Public MethodIndicates that the data source connection for the edge node or device has been successfully established.  
Public MethodIndicates that the data source connection for the edge node or device has been successfully disconnected.  
Public MethodOverloaded.  (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public Method (Inherited from object)
Public MethodFreezes the device, preventing it from being considered alive.  
Public Method  
Public MethodServes as the default hash function. (Inherited from object)
Public MethodRetrieves the current lifetime service object that controls the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public MethodOverridden.   
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public MethodOverridden.   
Public MethodGets the System.Type of the current instance. (Inherited from object)
Public MethodObtains a lifetime service object to control the lifetime policy for this instance. (Inherited from System.MarshalByRefObject)
Public MethodLocks the publishing of metric data changes, so that they are not immediately published.  
Public MethodIn manual data source connection mode, instructs the producer to connect to the data source.  
Public MethodIn manual data source connection mode, instructs the producer to disconnect from the data source.  
Public MethodPerforms the periodic polling of data from the data source, and publishes the data payload.  
Public MethodPublishes the specified data payload to the Sparkplug system (MQTT broker).  
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public MethodThaws the device, allowing it to be considered alive again.  
Public MethodOverridden.   
Public MethodPublishes any assembled metric data changes, and unlocks the publishing.  
Public MethodOverloaded. Defines a generalized method that classes must implement to create type-specific method for determining value equality of instances. Determines whether this instance has the same value as a given other instance. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Public Method (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Top
Protected Methods
 NameDescription
Protected Method (Inherited from System.ComponentModel.Component)
Protected MethodOverloaded. Creates a shallow copy of the current System.MarshalByRefObject object. (Inherited from System.MarshalByRefObject)
Protected MethodRaises the ApplicationOnlineChanged event.  
Protected MethodRaises the ConnectDataSource event.  
Protected MethodInfrastructure. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Protected MethodRaises the DataSourceConditionChanged event.  
Protected MethodRaises the DisconnectDataSource event.  
Protected MethodRaises the IsAliveChanged event.  
Protected MethodRaises the IsFrozenChanged event.  
Protected MethodRaises the MetricNotification event.  
Protected MethodRaises the PayloadNotification event.  
Protected MethodRaises the Poll event.  
Protected MethodRaises the ProducerOnlineChanged event.  
Protected MethodRaises the PublishingError event.  
Protected MethodRaises the Read event.  
Protected MethodRaises the Starting event.  
Protected MethodRaises the Stopped event.  
Protected MethodRaises the SystemConnectionStateChanged event.  
Protected MethodRaises the Write event.  
Protected MethodRaises the WriteError event.  
Protected MethodInfrastructure. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Protected MethodInfrastructure. (Inherited from OpcLabs.BaseLib.Widgets.Widget)
Top
Extension Methods
 NameDescription
Public Extension MethodRemoves all metrics from the device.
Public Extension MethodDefines an action to be performed for connecting the edge node or device to a data source.
Public Extension MethodOverloaded. Indicates that the data source connection for the edge node or device has failed.
Public Extension MethodDefines an action to be performed for disconnecting the edge node or device from a data source.
Public Extension MethodLocks the publishing of metric data changes and returns an object that unlocks the publishing upon its disposal.
Public Extension MethodGets the Sparkplug metric with the specified metric name from the Sparkplug edge node or device.
Public Extension MethodPerforms a rebirth of the device.
Public Extension MethodDefines a function that will be called when the producer is polled for data.
Public Extension MethodReads from a Sparkplug metric with the specified metric name from the Sparkplug edge node or device and returns the Sparkplug data object.
Public Extension MethodReads from a Sparkplug metric with the specified metric name from the Sparkplug edge node or device and returns the metric value.
Public Extension MethodSets the arbitrary object associated with the node.
Public Extension MethodSets the arbitrary object associated with the device.
Public Extension MethodWrites Sparkplug data to a Sparkplug metric with the specified metric name.
Public Extension MethodWrites a value to a Sparkplug metric with the specified metric name.
Top
Public Events
 NameDescription
Public EventRaised when the online status of the configured primary host application has changed.  
Public EventRaised when the data source connection for the edge node or device is requested to be established.  
Public EventRaised when the connected condition of the data source for the edge node or device has changed.  
Public EventRaised when the data source connection for the edge node or device is requested to be disconnected.  
Public Event (Inherited from System.ComponentModel.Component)
Public EventRaised when the alive status of this device has changed.  
Public EventRaised when the frozen status of this device has changed.  
Public EventRaised for notifications related to subscribed Sparkplug metric.  
Public EventRaised for notifications related to subscribed Sparkplug payload.  
Public EventRaised to poll for data and return the Sparkplug payload.  
Public EventRaised when the Sparkplug producer's online status changes.  
Public EventRaised when a publishing error occurs in the Sparkplug producer.  
Public EventRaised for obtaining the Sparkplug metric read data.  
Public EventRaised when the component is starting.  
Public EventRaised when the component has stopped.  
Public EventRaised when the state of a connection to the Sparkplug system changed.  
Public EventRaised for supplying the Sparkplug metric write data.  
Public EventRaised when a write error occurs in the Sparkplug metric.  
Top
See Also

Reference

SparkplugDevice Class
OpcLabs.EasySparkplug Namespace