The operation monitoring services in Rapid Toolkit for Sparkplug allow your code to receive information about the status of Sparkplug operations. The operation monitoring services are purely for informational purposes, diagnostics and troubleshooting; you absolutely do not have to use these services if you do not want to.
This interface is used when developing Sparkplug edge nodes, and is implemented and available as a component service on edge node objects (EasySparkplugEdgeNode Class) and device objects (SparkplugDevice Class).
Using the ISparkplugSystemConnectionMonitoring Interface, your code can get notified about the status of the connection to the Sparkplug system (MQTT broker). The notifications are delivered through the SystemConnectionStateChanged Event. The event arguments (SparkplugConnectionStateChangedEventArgs Class) contain various related information, such as:
Practically all our examples for Sparkplug edge node development hook to the SystemConnectionStateChanged Event and display the incoming notifications, because it is a very useful tool for informing the user about the status of the program, and possible troubleshooting. The example below is a very simple Sparkplug edge node implementation with a single metric, and it shows the Sparkplug system connection notifications on the console.
This interface is used when developing Sparkplug edge nodes, and is available as a component service on edge node objects (EasySparkplugEdgeNode Class) and device objects (SparkplugDevice Class).
Using the ISparkplugProducerMonitoring service, your code can get notifications when the Sparkplug producer (edge node, or particular device on the edge node) is undergoing a birth, death, or rebirth sequence.
Edge node restart involves disconnection and reconnection to the broker, and happens when the primary host application goes offline. Edge node rebirth happens upon reception of true value on the special "Node Control/Rebirth" metric, or when your code calls the PerformRebirth Method.
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.