<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Messages</title><link>https://forge.codesys.com/lib/cobolt/home/Messages/</link><description>Recent changes to Messages</description><language>en</language><lastBuildDate>Mon, 20 Sep 2021 19:14:47 -0000</lastBuildDate><atom:link href="https://forge.codesys.com/lib/cobolt/home/Messages/feed" rel="self" type="application/rss+xml"></atom:link><item><title>Messages modified by h-hermsen</title><link>https://forge.codesys.com/lib/cobolt/home/Messages/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -1,12 +1,12 @@
 [[startpage]]
-[[section align=right]]
-
-@hermsen
-@i-campbell
-
+[[section bgcolor=darkgrey color=white align=right]]
 [[img src=https://forge.codesys.com/svn/prj,cfunit,code/trunk/www/logo_codesys_forge.png height=96p align=left]][[img src=https://forge.codesys.com/prj/mqttsparkplugb/screenshot/co5e%20sparkplug%20bolt%20logo%20round%20blue.png height=96p align=left]]

-[[section bgcolor=white color=black align=center]]
+[[members]]
+Sparkplug™ and the Sparkplug™ logo are trademarks of the Eclipse Foundation
+Copyright © 10/11/19 Eclipse Foundation, Inc. https://www.eclipse.org/legal/efsl.php
+
+[[section bgcolor=darkgrey color=white align=center]]
 # Sparkplug B Messages
 **This Page**
 [Introduction](#Introduction) | [Topic Namespace](#Topic Namespace) | [Message Payload &amp;amp; Metrics Component](#Message Payload &amp;amp; Metrics Component)
@@ -17,7 +17,7 @@
 **Information and guides**
 [Sparkplug™ information](General Sparkplug info) | [Preview how-to](Preview how-to) | [Setup a test system with Ignition Primary Host](Setup a test system with Ignition Primary Host) | [Add SparkplugB to an existing CODESYS project](Add SparkplugB to existing CODESYS project)

-[[section bgcolor=lightgrey color=black align=left]]
+[[section bgcolor=white color=black align=left]]
 # Introduction 
 Sparkplug Messages consists of two parts;

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h-hermsen</dc:creator><pubDate>Mon, 20 Sep 2021 19:14:47 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com9024bf683843df93135446a22f40176c433ba29e</guid></item><item><title>Messages modified by h-hermsen</title><link>https://forge.codesys.com/lib/cobolt/home/Messages/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;&lt;br/&gt;

    &lt;/p&gt;&lt;div class="markdown_content" style="clear: both; background-color: white; color: black; text-align: right;"&gt;&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a class="user-mention" href="/u/hermsen/"&gt;@hermsen&lt;/a&gt;&lt;br/&gt;
&lt;a class="user-mention" href="/u/i-campbell/"&gt;@i-campbell&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;img align="left" height="96p" src="https://forge.codesys.com/svn/prj,cfunit,code/trunk/www/logo_codesys_forge.png"/&gt;&lt;img align="left" height="96p" src="https://forge.codesys.com/prj/mqttsparkplugb/screenshot/co5e%20sparkplug%20bolt%20logo%20round%20blue.png"/&gt;&lt;/p&gt;
&lt;/div&gt;
    &lt;div class="markdown_content" style="clear: both; background-color: white; color: black; text-align: center;"&gt;

&lt;h1 id="sparkplug-b-messages"&gt;Sparkplug B Messages&lt;/h1&gt;
&lt;p&gt;&lt;strong&gt;This Page&lt;/strong&gt;&lt;br/&gt;
&lt;a class="" href="#Introduction"&gt;Introduction&lt;/a&gt; | &lt;a class="" href="#Topic%20Namespace"&gt;Topic Namespace&lt;/a&gt; | &lt;a class="" href="#Message%20Payload%20&amp;amp;%20Metrics%20Component"&gt;Message Payload &amp;amp; Metrics Component&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;General Sparkplug info&lt;/strong&gt;&lt;br/&gt;
&lt;a class="" href="/lib/cobolt/home/Infrastructure/"&gt;Infrastructure&lt;/a&gt; | &lt;a class="" href="../Security"&gt;Security&lt;/a&gt; | &lt;em&gt;Messages&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Information and guides&lt;/strong&gt;&lt;br/&gt;
&lt;a class="" href="/lib/cobolt/home/General%20Sparkplug%20info/"&gt;Sparkplug™ information&lt;/a&gt; | &lt;a class="" href="../Preview%20how-to"&gt;Preview how-to&lt;/a&gt; | &lt;a class="" href="../Setup%20a%20test%20system%20with%20Ignition%20Primary%20Host"&gt;Setup a test system with Ignition Primary Host&lt;/a&gt; | &lt;a class="" href="/lib/cobolt/home/Add%20SparkplugB%20to%20existing%20CODESYS%20project/"&gt;Add SparkplugB to an existing CODESYS project&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
    &lt;div class="markdown_content" style="clear: both; background-color: lightgrey; color: black; text-align: left;"&gt;

&lt;h1 id="introduction"&gt;Introduction&lt;/h1&gt;
&lt;p&gt;Sparkplug Messages consists of two parts;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;1 Topic Namespace,&lt;/li&gt;
&lt;li&gt;2 Message (a Payload and Metrics)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The idea is simple;&lt;br/&gt;
Basicly a Sparkplug message containing a SparkplugB encoded payload is posted in a specific Sparkplug Topic Namespace on the broker by an Edge Node or any other node that can publish messages. These message can be consumed by any other Node that is subscribed on these messages.&lt;/p&gt;
&lt;p&gt;Each EoN node can share data on a broker via a set of pre-defined topic rules (these are the namespaces). The topics follow these pre-defined rules. When your infrastucture changes, the topics will change along. If your infrastructure grows, the topics grow accordingly, if your infrastructure shrinks, your topics shrink accordingly.&lt;br/&gt;
Each message consists of a single Topic in the form of a hierarchy and a payload which consists of one or several metrics and it's metadata.&lt;/p&gt;
&lt;p&gt;The Node decides what payload information will sent the broker (and thus shared to all other clients in the network which are subscribed) and whether this information is refreshed in a timely fashion or on change of the data (The decision of what information is shared is ultimatly determined by the goal of the software)&lt;br/&gt;
So, it is up to the EoN node device how much information and what kind of meta data of the information is shared.&lt;/p&gt;
&lt;h2 id="topic-namespace"&gt;Topic Namespace&lt;/h2&gt;
&lt;p&gt;Sparkplug defines the Topic Namespace for a set of MQTT messages that are used to manage connection state as well as bidirectional metric information exchange that would apply to many typical real-time SCADA/IIoT, monitoring, and data collection system use cases.  &lt;/p&gt;
&lt;p&gt;Using these defined messages host SCADA/IIoT applications can:&lt;br/&gt;
1. Discover all metadata and monitor state of any EoN/Device connected to the MQTT infrastructure.&lt;br/&gt;
2. Discover all metrics which include all diagnostics, properties, metadata, and current state values. &lt;br/&gt;
3. Issue write/command messages to any EoN/Device metric.&lt;/p&gt;
&lt;p&gt;All MQTT clients using the Sparkplug specification use the following Topic Namespace structure:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="w"&gt;    &lt;/span&gt;&lt;span class="n"&gt;namespace&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;group_id&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;message_type&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;edge_node_id&lt;/span&gt;&lt;span class="o"&gt;/[&lt;/span&gt;&lt;span class="n"&gt;device_id&lt;/span&gt;&lt;span class="o"&gt;]&lt;/span&gt;&lt;span class="w"&gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;p&gt;Where:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;namespace is either “spAv1.0” or “spBv1.0” (the Sparkplug A and Sparkplug B or any new future releases of the specification),&lt;/li&gt;
&lt;li&gt;group_id is a group string reference to a logical grouping of nodes, for instance a machine, manufacturing cell or an oil pipeline section,&lt;/li&gt;
&lt;li&gt;message_type element is an name string that defines how the MQTT Server processes the message,&lt;/li&gt;
&lt;li&gt;edge_node_id is the Name ID of the MQTT Edge device that interfaces to real-world inputs and outputs or a acts as gateway device,&lt;/li&gt;
&lt;li&gt;device_id is the name ID of the end device that physically interfaces to the real-world input and outputs. The device ID is optional and not present if the edge node is the actual device interfacing to the real world inputs and outputs.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;img src="https://forge.codesys.com/prj/mqttsparkplugb/screenshot/SparkplugB%20Topic%20Namespace%20Elements.png"/&gt;&lt;/p&gt;
&lt;h3 id="namespace"&gt;namespace&lt;/h3&gt;
&lt;p&gt;The root element that will define both the structure of the remaining namespace elements as well as the encoding used for the associated payload data. The current Sparkplug specification defines two namespaces&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;Sparkplug payload definition B -&amp;gt; namespace element is “spBv1.0”&lt;/span&gt;
&lt;span class="err"&gt;Sparkplug payload definition A -&amp;gt; namespace element is “spAv1.0” (Deprecated!)&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="group_id"&gt;group_id&lt;/h3&gt;
&lt;p&gt;This provides unique logical group ID of MQTT EoN nodes. For group_id the format should be  UTF-8 alphanumeric string, except for the reserved characters of ‘+’ (plus), ‘/’ (forward slash), and ‘#’ (number sign). &lt;br/&gt;
Examples of where the group_id might be used include Cement industry where MQTT EoN nodes on different department have the different group_id&lt;/p&gt;
&lt;h3 id="message_type-element"&gt;message_type Element&lt;/h3&gt;
&lt;p&gt;Provide the indication as to, how to handle the MQTT payload of the message. &lt;br/&gt;
The following message_type elements are defined for the Sparkplug Topic Namespace:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;span class="err"&gt;NBIRTH – Birth certificate for MQTT EoN nodes.&lt;/span&gt;
&lt;span class="err"&gt;NDEATH – Death certificate for MQTT EoN nodes.&lt;/span&gt;
&lt;span class="err"&gt;DBIRTH – Birth certificate for Devices.&lt;/span&gt;
&lt;span class="err"&gt;DDEATH – Death certificate for Devices.&lt;/span&gt;
&lt;span class="err"&gt;NDATA – Node data message.&lt;/span&gt;
&lt;span class="err"&gt;DDATA – Device data message.&lt;/span&gt;
&lt;span class="err"&gt;NCMD – Node command message.&lt;/span&gt;
&lt;span class="err"&gt;DCMD – Device command message.&lt;/span&gt;
&lt;span class="err"&gt;STATE – Critical application state message.&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;


&lt;h3 id="edge_node_id"&gt;edge_node_id&lt;/h3&gt;
&lt;p&gt;Unique identification for the MQTT EoN nodes within the infrastructure.&lt;br/&gt;
For edge_node_id the format should be UTF-8 alphanumeric string, except for the reserved characters of ‘+’ (plus), ‘/’ (forward slash), and ‘#’ (number sign). &lt;br/&gt;
The edge_node_id travels with every message published, so it should be as short as possible&lt;/p&gt;
&lt;h3 id="device_id"&gt;device_id&lt;/h3&gt;
&lt;p&gt;Unique ID which used to identify the device attached to the MQTT EoN node. &lt;br/&gt;
The device_id is an optional element since some messages will be either originating or destined to the edge_node_id, in that place device_id would not be required. &lt;br/&gt;
The format of the device_id is a valid UTF-8 alphanumeric String except for the reserved characters of ‘+’ (plus), ‘/’ (forward slash), and ‘#’ (number sign). &lt;br/&gt;
The device_id travels with every message published, so it should be as short as possible.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;For an in depth overview of all namespaces see &lt;br/&gt;
SparkPlug Specification Chapter 6. Sparkplug™ MQTT Topic Namespace&lt;/em&gt;&lt;/p&gt;
&lt;h1 id="message-payload-metrics-component"&gt;Message Payload &amp;amp; Metrics Component&lt;/h1&gt;
&lt;p&gt;As specified the second part of the message consists of a Payload and Metrics&lt;br/&gt;
A Sparkplug B payload is the top-level component that is encoded and used in an MQTT message. &lt;br/&gt;
It contains some basic information such as a timestamp and a sequence number as well as an array of metrics which contain key/value pairs of data.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;For a in depth overview of all Payload components &amp;amp; metrics see &lt;br/&gt;
SparkPlug Specification Chapter 15. Sparkplug™ B v1.0 Payload Components&lt;/em&gt;&lt;/p&gt;&lt;/div&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">h-hermsen</dc:creator><pubDate>Wed, 11 Aug 2021 19:56:24 -0000</pubDate><guid isPermaLink="false">https://forge.codesys.com273b95b0967515bd6225731ad6f71e28437dddfa</guid></item></channel></rss>