Sparkplug | This project has been moved to here : https : //github | Game Engine library
kandi X-RAY | Sparkplug Summary
kandi X-RAY | Sparkplug Summary
This project has been moved to here: More information can be found here: Some libraries including the C library will lag behind the initial transistion but all libraries will eventaully be moved and validated per the Eclipse Foundation processes.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Set the form item listeners .
- Publish the birth
- Initialize view .
- Set the metric value .
- Restore connection columns .
- Get the GPS location
- Attempt to reconnect the client .
- Gets the metric value .
- Iterates over all messages in the specified client handle .
- Creates a data set .
Sparkplug Key Features
Sparkplug Examples and Code Snippets
Community Discussions
Trending Discussions on Sparkplug
QUESTION
I am working on a Sparkplug B SCADA Host, and hoping to understand how the Sparkplug B SCADA Host keeps up-to-date with the Sparkplug B EoN Nodes and Devices that it is interested in. What I'm concerned with here is the metadata of EoN Nodes and Devices, as described by their NBIRTH and DBIRTH topics.
The scenario is:
Initially, an EoN Node has come online, and published its NBIRTH topic. The SCADA Host is offline, so it doesn’t see the NBIRTH.
The SCADA Host comes online. It has no knowledge of the the metrics on the EoN Node.
I haven't seen anything in the Sparkplug B specification that suggests how the SCADA Host can get the EoN Node to send its NBIRTH topic again. There is the Rebirth metric, which will request the BIRTH topic to be republished, but I am not sure that this is something that all implementations of Sparkplug B support.
It has been suggested to me that when the SCADA Host comes online it will publish a STATE topic to indicate that this has happened, and that the EoN Node will see this and Node publish its NBIRTH topic again. However, I don't see this behaviour mentioned in the Sparkplug B specification.
...ANSWER
Answered 2022-Feb-27 at 15:12The primary application (what you call SCADA host) sends a NCMD message to tell the EON to republish its NBIRTH and DBIRTH(s), as detailed at https://www.eclipse.org/tahu/spec/Sparkplug%20Topic%20Namespace%20and%20State%20ManagementV2.2-with%20appendix%20B%20format%20-%20Eclipse.pdf page 66 section 17.5 . More details may be hidden elsewhere in that spec. You can test all this with a client, eg. our free Sparkplug lab https://mqttlab.iotsim.io/sparkplug
QUESTION
I am interested in having EoN Nodes publish and receive messages through the Eclipse Hono MQTT broker. In reading the documentation it seems that the standard MQTT adapter in Eclipse Hono forces the device to publish to either a 'telemetry' topic or an 'event' topic.
This topics do not work with the standardised Sparkplug topic namespaces defined in the Sparkplug specification.
Does Eclipse Hono work "out-of-the-box" with the Sparkplug topics or would a specific MQTT adapter need to be written?
If a specific adapter needs to be written, is there clear documentation on how to do this?
Thank you.
...ANSWER
Answered 2021-Aug-10 at 05:55You are right in assuming that Hono's standard MQTT adapter supports the telemetry and event topics for publishing data only. Consequently, Hono does not work out-of-the-box with the Sparkplug topics. Given that Sparkplug is also an Eclipse standardization effort, it might be worth considering adding native support for Sparkplug to the standard MQTT adapter. Otherwise, implementing a dedicated Sparkplug adapter might be an option as well. There are no detailed instructions for how to implement a protocol adapter. However, the MQTT adapter in particular can serve as a blue print for doing so. It is already split up into a (generic) base class which provides means to forward messages from devices to downstream applications and vice versa. The Kura adapter simply extends this base MQTT adapter class and implements a different Kura-specific topic scheme on top of it. So, in general, this might be a good approach to take for a Sparkplug adapter as well.
QUESTION
I have two machines and am testing MQTT bridge connections with Sparkplug B payloads.
I have the bridges working as expected but when I simulate some failure points as annotated in the image below, things are not working as expected. My expectation is an NDEATH will be visible on the broker on Machine B when any of the three points in the image disconnect.
When I kill the publisher or the local MQTT Broker on Machine A, I do indeed see the NDEATH as expected when subscribed to the Machine B MQTT Broker, but when I pull the plug between Machine A & B as noted by #3 in the image, I do not see a NDEATH! I have waited for a long period to make sure the 60 second keep alive has had plenty of time to react which I understand to be 1.5x the keep alive typically.
The publisher and Broker on Machine A continue to operate and when the connection at point #3 is brought back online, all messages are delivered, but I was expecting with the bridge connection down, any nodes that had published a last will & testament (LWT) would see an NDEATH due to the connection loss at any point.
I have tested with mosquitto, vernemq and a little with hive-ce, however hive-ce is severely limited in functionality. Am I missing something with my understanding of MQTT bridging? Shouldn't NDEATH be sent in all three scenarios?
...ANSWER
Answered 2021-Aug-09 at 08:50From the sparkplug spec:
A critical aspect for MQTT in a real-time SCADA/IIoT application is making sure that the primary MQTT SCADA/IIoT Host Node can know the “STATE” of any EoN node in the infrastructure within the MQTT Keep Alive period (refer to section 3.1.2.10 in the MQTT Specification). To implement the state a known Will Topic and Will Message is defined and specified. The Will Topic and Will Message registered in the MQTT CONNECT session establishment, collectively make up what we are calling the Death Certificate. Note that the delivery of the Death Certificate upon any MQTT client going offline unexpectedly is part of the MQTT protocol specification, not part of this Sparkplug™ specification (refer to section 3.1 CONNECT in the MQTT Specification for further details on how an MQTT Session is established and maintained).
So, in MQTT terms, NDEATH is a 'Will' which, as mentioned above, is defined in section 3.1 of the the MQTT spec:
If the Will Flag is set to 1 this indicates that, if the Connect request is accepted, a Will Message MUST be stored on the Server and associated with the Network Connection. The Will Message MUST be published when the Network Connection is subsequently closed unless the Will Message has been deleted by the Server on receipt of a DISCONNECT Packet
In summary NDEATH creates a 'Will' which the MQTT broker publishes if it looses the connection with the publisher (unless a DISCONNECT is received first).
When you establish a bridge this relays messages published on whatever topic(s) the bridge is configured to relay. The bridge only communicates published messages; not information about what clients are connected (or any 'Will' they may have set) so when the bridged connection goes down subscribers will not receive the NDEATH.
Monitoring the connection status of bridges is not something covered by the spec so options vary from broker to broker. For example Mosquitto can (using a 'Will' on the bridge connection) provide a notification when the connection goes down (see notifications
in mosquitto.conf). This may provide you with some options to get the information you need.
QUESTION
I have seen example *.proto files where a google.protobuf.Any
data type is used. E.g. from the Eclipse Tahu Sparkplug Version B specification where there is something like:
ANSWER
Answered 2021-Feb-15 at 00:12Excellent question. I've been meaning to address this area for ages. The answer is a simple "no, I haven't even looked at it". I'd be happy to do so, but reality is that I have limited time and need to prioritise effort on features people are asking for. "Any" is something I've heard basically no noise about, until today. If you have a genuine use case for it, we can probably look. GitHub or email may be a better place to explore it, unless you're happy to handle it simply via byte[]
and your own code.
QUESTION
I'm coding a program that will print output on what is happening with parts of an internal combustion engine. I have an abstract class called CarSystemParts
that all car part classes inherit from.
I have a Dictionary>
that shows which classes should be affected or physically pushed by other parts. It's defined like this:
ANSWER
Answered 2020-Nov-24 at 23:04I think you can solve your problem using Where
to filter the elements you want, then Select
to only keep the Keys.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Sparkplug
You can use Sparkplug like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Sparkplug component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page