Skip to content

Commit fd816a5

Browse files
authored
Merge pull request #560 from wes-johnson/174
[#174] Clarified Edge Node/MQTT Enabled Devices in the specification
2 parents 07ec0b8 + 7998682 commit fd816a5

File tree

8 files changed

+55
-48
lines changed

8 files changed

+55
-48
lines changed

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ jobs:
4141
run: ./gradlew build
4242

4343
- name: Upload specification artifact
44-
uses: actions/upload-artifact@v3
44+
uses: actions/upload-artifact@v4
4545
with:
4646
name: sparkplug_spec
4747
path: specification/build/docs/pdf/sparkplug_spec.pdf
4848
if-no-files-found: error
4949

5050
- name: Upload coverage artifact
51-
uses: actions/upload-artifact@v3
51+
uses: actions/upload-artifact@v4
5252
with:
5353
name: coverage-report
5454
path: tck/build/coverage-report/**/*

specification/src/main/asciidoc/assets/plantuml/infrastructure-components.puml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -96,13 +96,13 @@ package "Security" {
9696
]
9797

9898
card Node1Device1 [
99-
"" Device ""
99+
"" PLC ""
100100
]
101101
card Node1Sensor1 [
102102
"" Sensor ""
103103
]
104104
card Node1Device2 [
105-
"" Device ""
105+
"" RTU ""
106106
]
107107
}
108108

@@ -112,7 +112,7 @@ package "Security" {
112112
""(Sparkplug)""
113113
]
114114
card Node2Device [
115-
"" Device ""
115+
"" RTU ""
116116
]
117117
}
118118

@@ -122,7 +122,7 @@ package "Security" {
122122
""(Sparkplug)""
123123
]
124124
card Node3Device [
125-
"" Device ""
125+
"" PLC ""
126126
]
127127
}
128128

specification/src/main/asciidoc/chapters/Sparkplug_1_Introduction.adoc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -240,20 +240,20 @@ I/O, and/or any logical internal process variables (PVs).
240240

241241
Physical or logical device that makes sense in the context of a distributed Sparkplug application.
242242
Often times a Sparkplug Device will be a physical PLC, RTU, Flow Computer, Sensor, etc. However, a
243-
Sparkplug device could also represent a logical grouping of data points as makes sense for the
243+
Sparkplug Device could also represent a logical grouping of data points as makes sense for the
244244
specific Sparkplug Application being developed. For example, it could represent a set of data points
245245
across multiple PLCs that make up a logical device that makes sense within the context of that
246246
application.
247247

248-
[[introduction_mqtt_sparkplug_enabled_device]]
249-
===== MQTT/Sparkplug Enabled Device
248+
[[introduction_mqtt_sparkplug_enabled_component]]
249+
===== MQTT/Sparkplug Enabled Component
250250

251-
Any device, sensor, or hardware that directly connects to MQTT infrastructure using
252-
a compliant MQTT v3.1.1 or v5.0 connection with the payload and topic notation as outlined in this
253-
Sparkplug Specification. With MQTT/Sparkplug enabled directly in the device this could bypass the
254-
use of a Sparkplug Edge Node in the infrastructure. In this case, the physical device or sensor is
255-
the Edge Node. It is up to the developer of the application to decide if the concept of a 'Sparkplug
256-
Device' is to be used within their application.
251+
Any sensor or hardware component that directly connects to MQTT infrastructure using a compliant MQTT
252+
v3.1.1 or v5.0 connection with the payload and topic notation as outlined in this Sparkplug
253+
Specification. With MQTT/Sparkplug enabled directly in the component, the application could omit the
254+
use of a 'Sparkplug Device'. In this case, the physical component is represented by a Sparkplug
255+
Edge Node without any attached Sparkplug Devices. It is up to the developer of the application to
256+
decide if the concept of a 'Sparkplug Device' is to be used within their application.
257257

258258
[[introduction_host_applications]]
259259
===== Host Applications

specification/src/main/asciidoc/chapters/Sparkplug_2_Principles.adoc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -109,19 +109,20 @@ link:#payloads_b_state[Host Application Birth Certificates]
109109
=== Persistent vs Non-Persistent Connections for Edge Nodes
110110

111111
Persistent connections are intended to remain connected to the MQTT infrastructure at all times.
112-
They never send an MQTT DISCONNECT control packet [MQTTV5-3.14] during normal operation. This fact lets the
113-
Host Applications provide the real-time state of every persistent node in the infrastructure within
114-
the configured MQTT Keep Alive period using the BIRTH/DEATH mechanisms defined above.
112+
They never send an MQTT DISCONNECT control packet [MQTTV5-3.14] during normal operation. This fact
113+
lets the Host Applications provide the real-time state of every persistent node in the infrastructure
114+
within the configured MQTT Keep Alive period using the BIRTH/DEATH mechanisms defined above.
115115

116116
But in some use cases, such as sending GPS coordinates for asset tracking or other IOT applications
117-
with periodic data from sensors, MQTT enabled devices do not need to remain connected to the MQTT
118-
infrastructure. In these use cases, all the Device needs to do is to issue an MQTT DISCONNECT
119-
control packet prior to going offline to leave the MQTT infrastructure “gracefully”. In this case an
120-
MQTT device or associated DEATH certificate will not be sent to Sparkplug Host Applications. System
121-
designers just need to be aware that the metric in the Host Application will represent “Last Known
122-
Good” values with a timestamp of this data where the current state of the of the MQTT Device is not
123-
a real-time indication. The Host Application metric timestamp values can be used to determine when
124-
the values from this Edge Node were last updated.
117+
with periodic data from sensors, Sparkplug Edge Nodes do not need to remain connected to the MQTT
118+
infrastructure. In these use cases, all the component needs to do is to send an MQTT DISCONNECT
119+
control packet prior to going offline to leave the MQTT infrastructure “gracefully”. In this case a
120+
DEATH certificate will not be delivered to Sparkplug Host Applications. As a result, the Host
121+
Applications will not set the qualities of the metrics associated with the Edge Node to STALE.
122+
System designers just need to be aware that the metric in the Host Application will represent “Last
123+
Known Good” values with a timestamp of this data where the current state of the of the MQTT Device
124+
is not a real-time indication. The Host Application metric timestamp values can be used to determine
125+
when the values from this Edge Node were last updated.
125126

126127
Non-persistent MQTT Enabled Devices should still register a proper DEATH Certificate upon the
127128
establishment of an MQTT session. In this manner, the Host Application can still have a good

specification/src/main/asciidoc/chapters/Sparkplug_3_Components.adoc

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,34 @@ also be sized to properly manage all MQTT message traffic.
3535
One can implement the use (if required) of multiple MQTT servers for redundancy, high availability,
3636
and scalability within any given infrastructure.
3737

38-
[[components_mqtt_edge_node]]
39-
=== MQTT Edge Node
38+
[[components_sparkplug_edge_node]]
39+
=== Sparklplug Edge Node
4040

4141
In the context of this specification, an MQTT Edge Node is any MQTT v3.1.1 [MQTTV3.1.1] or v5.0
4242
[MQTTV5] compliant MQTT Client application that manages an MQTT session and provides the physical
4343
and/or logical gateway functions required to participate in the topic namespace and payload
4444
definitions described in this document. The Edge Node is responsible for any local protocol
45-
interface to existing legacy devices (PLCs, RTUs, Flow Computers, Sensors, etc.) and/or any local
46-
discrete I/O, and/or any logical internal process variables(PVs).
47-
48-
[[components_device_sensor]]
49-
=== Device/Sensor
50-
51-
The Device/Sensor represents any physical or logical device connected to the MQTT Edge Node
52-
providing any data, process variables or metrics.
53-
54-
[[components_mqtt_enabled_device]]
55-
=== MQTT Enabled Device (Sparkplug)
56-
57-
This represents any device, sensor, or hardware that directly connects to MQTT infrastructure using
58-
a compliant MQTT v3.1.1 or v5.0 connection with the payload and topic notation as outlined in this
59-
Sparkplug Specification. Note that it will be represented as an Edge Node in the Sparkplug topic.
45+
interface to existing legacy hardware components (PLCs, RTUs, Flow Computers, Sensors, etc.) and/or
46+
any local discrete I/O, and/or any logical internal process variables(PVs).
47+
48+
[[components_sparkplug_device]]
49+
=== Sparkplug Device
50+
51+
Sparkplug Devices typically represent hardware components including, but not limited to PLCs, RTUs,
52+
Flow Computers, and Sensors. However, a Sparkplug Device can also represent a logical grouping of
53+
data across multiple physical or logical hardware or software components. Sparkplug Devices exist
54+
under the scope of a Sparkplug Edge Node and have their own lifecycle within the context of the
55+
Sparkplug Edge Node.
56+
57+
[[components_mqtt_sparkplug_enabled_component]]
58+
=== MQTT/Sparkplug Enabled Component
59+
60+
This represents any hardware component that directly connects to MQTT infrastructure using a
61+
compliant MQTT v3.1.1 or v5.0 connection with the payload and topic notation as outlined in this
62+
Sparkplug Specification. Hardware components can be represented as 'Sparkplug Edge Nodes' or as
63+
'Sparkplug Devices'. This is up to the developers of the Sparkplug Application. Note if it is
64+
represented as a Sparkplug Device, a Sparkplug Edge Node must also be present in the application. It
65+
is not possible to have a Sparkplug Device outside of the scope of a Sparkplug Edge Node.
6066

6167
[[components_primary_host_application]]
6268
=== Primary Host Application

specification/src/main/asciidoc/chapters/Sparkplug_4_Topics.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@ NCMD MUST include the metrics that need to be written to on the Edge Node.*#
450450
NCMD MUST have the 'source' field set in the payload and it MUST have a string value representing
451451
the Host ID of the Sparkplug Host Application that sent the NCMD message.*#
452452

453-
[[topics_device_sensor]]
454-
==== Device/Sensor
453+
[[topics_device]]
454+
==== Device
455455
[upperalpha, start=1]
456456

457457
[[birth_message_dbirth]]

specification/src/main/asciidoc/chapters/Sparkplug_5_Operational_Behavior.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ link:#operational_behavior_edge_node_session_establishment[Edge Node Session Est
462462
flow diagram assumes that the Edge Node session has already been established with the Primary Host
463463
Application. Depending on the target platform, the Edge Node may be a physical "Edge of Network"
464464
gateway device polling physical legacy devices via Modbus, AB, DNP3.0, HART, etc, an MQTT enabled
465-
sensor or device, or it might be a logical implementation of one of the Eclipse Tahu compatible
465+
hardware component, or it might be a logical implementation of one of the Eclipse Tahu compatible
466466
implementations for prototype Edge Nodes running on a Raspberry Pi. Regardless of the
467467
implementation, at some point the device interface will need to provide a state and associated
468468
metrics to publish to the MQTT infrastructure.

specification/src/main/asciidoc/chapters/Sparkplug_6_Payloads.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Buffer schema was developed that could be used to represent and encode the more
107107
being requested. The entire Google Protocol Buffers definition is below.
108108

109109
----
110-
// * Copyright (c) 2015-2021 Cirrus Link Solutions and others
110+
// * Copyright (c) 2015-2025 Cirrus Link Solutions and others
111111
// *
112112
// * This program and the accompanying materials are made available under the
113113
// * terms of the Eclipse Public License 2.0 which is available at
@@ -1188,7 +1188,7 @@ This would result in a structure as follows on the Host Application.
11881188
.Figure 10 – Sparkplug B Metric Structure 1
11891189
plantuml::{assetsdir}assets/plantuml/sparkplugb-metric-structure-1.puml[format=svg, alt="Sparkplug B Metric Structure 1"]
11901190

1191-
[[payloads_b_nbirth]]
1191+
[[payloads_b_nrebirth]]
11921192
==== NREBIRTH
11931193

11941194
The NREBIRTH is responsible for informing a specific host application of all of the information

0 commit comments

Comments
 (0)