@@ -82,15 +82,15 @@ The following message_type elements are defined for the Sparkplug topic namespac
82
82
83
83
* *NMETA* - Metadata definition for Sparkplug Edge Nodes
84
84
* *NBIRTH* – Birth certificate for Sparkplug Edge Nodes
85
+ * *NREBIRTH* - Edge Node Rebirth response sent from Sparkplug Edge Nodes
85
86
* *NDATA* – Edge Node data message
86
87
* *NDEATH* – Death certificate for Sparkplug Edge Nodes
87
- * *NREBIRTH* - Edge Node Rebirth response sent from Sparkplug Edge Nodes
88
88
89
89
* *DMETA* - Metadata definition for Sparkplug Devices
90
90
* *DBIRTH* – Birth certificate for Devices
91
+ * *DREBIRTH* - Device Rebirth response sent from Sparkplug Edge Nodes
91
92
* *DDATA* – Device data message
92
93
* *DDEATH* – Death certificate for Devices
93
- * *DREBIRTH* - Device Rebirth response sent from Sparkplug Edge Nodes
94
94
95
95
* *NCMD* – Edge Node command message
96
96
* *DCMD* – Device command message
@@ -225,12 +225,15 @@ a minimum each metric MUST include the metric name, datatype, and current value.
225
225
Template instances will be published by this Edge Node or any devices, all Template definitions MUST
226
226
be published in the NBIRTH.*#
227
227
* [tck-testable tck-id-topics-nbirth-bdseq-included]#[yellow-background]*[tck-id-topics-nbirth-bdseq-included] A
228
- bdSeq number as a metric MUST be included in the payload.*#
228
+ bdSeq number MUST be included in the payload.*#
229
229
* [tck-testable tck-id-topics-nbirth-bdseq-matching]#[yellow-background]*[tck-id-topics-nbirth-bdseq-matching] This
230
- MUST match the bdSeq number provided in the MQTT CONNECT packet’s Will Message payload.*#
230
+ MUST match the bdSeq number provided in the immediately prior MQTT CONNECT packet’s Will Message
231
+ payload.*#
231
232
** This allows Host Applications to correlate NBIRTHs to NDEATHs.
232
233
* [tck-testable tck-id-topics-nbirth-bdseq-increment]#[yellow-background]*[tck-id-topics-nbirth-bdseq-increment] The
233
- bdSeq number MUST start at zero and increment by one on every new MQTT CONNECT packet.*#
234
+ bdSeq number MUST start at zero and increment by one on every new MQTT CONNECT packet until it
235
+ reaches a maximum of 18446744073709551615 (max value of a UINT64). At this point, the following
236
+ bdSeq number MUST be zero.*#
234
237
235
238
The NBIRTH message can also include additional Node Control payload components. These are used by a
236
239
Sparkplug Host Application to control aspects of the Edge Node. The following are examples of Node
@@ -256,6 +259,83 @@ examples of Property metrics.
256
259
* Metric name: ‘Properties/OS Version’
257
260
** Used to transmit the OS version of the Edge Node
258
261
262
+ [[birth_message_nrebirth]]
263
+ ===== Birth Message (NREBIRTH)
264
+
265
+ [[topics_birth_message_nrebirth]]
266
+ ====== Topic (NREBIRTH)
267
+
268
+ * [tck-testable tck-id-topics-nrebirth-topic]#[yellow-background]*[tck-id-topics-nrebirth-topic] The
269
+ Birth Certificate topic for a Sparkplug Edge Node MUST be of the form
270
+ 'namespace/group_id/NREBIRTH/edge_node_id' where the namespace is replaced with the specific
271
+ namespace for this version of Sparkplug and the group_id and edge_node_id are replaced with the
272
+ Group and Edge Node ID for this specific Edge Node.*#
273
+
274
+ [[payloads_desc_nrebirth]]
275
+ ====== Payload (NREBIRTH)
276
+
277
+ The Sparkplug Edge Node Rebirth Certificate payload contains everything required to build out a data
278
+ structure for all metrics for this Edge Node. NREBIRTH messages are similar to NBIRTH messages but
279
+ are a response to a specific Host Application getting 'caught up' with an Edge Node's data stream.
280
+ The NREBIRTH message still includes all current values for all Metrics under its scope. But, it also
281
+ has a sequence number value that will fall in line with the existing Edge Nodes data stream.
282
+
283
+ The NREBIRTH message requires the following payload components.
284
+
285
+ * [tck-testable tck-id-topics-nrebirth-mqtt]#[yellow-background]*[tck-id-topics-nrebirth-mqtt] NREBIRTH
286
+ messages MUST be published with MQTT QoS equal to 0 and retain equal to false.*#
287
+ * [tck-testable tck-id-topics-nrebirth-seq-num]#[yellow-background]*[tck-id-topics-nrebirth-seq-num] The
288
+ NREBIRTH MUST include the sequence number specified in the payload and it MUST have a value that
289
+ lines up with the existing DATA message stream from the Edge Node.*#
290
+ * [tck-testable tck-id-topics-nrebirth-timestamp-1]#[yellow-background]*[tck-id-topics-nrebirth-timestamp-1] The
291
+ NREBIRTH MUST include the overall payload timestamp denoting the date and time the message was sent
292
+ from the Edge Node.*#
293
+ * [tck-testable tck-id-topics-nrebirth-timestamp-2]#[yellow-background]*[tck-id-topics-nrebirth-timestamp-2] Each
294
+ individual Metric in the payload MAY include its own timestamp. If it does not, it is assumed the
295
+ 'metric value change time' is that over the overall payload timestamp included in the NREBIRTH
296
+ paylaod.*#
297
+ * [tck-testable tck-id-topics-nrebirth-metric-reqs]#[yellow-background]*[tck-id-topics-nrebirth-metric-reqs] The
298
+ NREBIRTH MUST include every metric the Edge Node will ever report on.*#
299
+ * [tck-testable tck-id-topics-nrebirth-metrics]#[yellow-background]*[tck-id-topics-nrebirth-metrics] At
300
+ a minimum each metric MUST include the metric name, datatype, and current value.*#
301
+ * [tck-testable tck-id-topics-nrebirth-templates]#[yellow-background]*[tck-id-topics-nrebirth-templates] If
302
+ Template instances will be published by this Edge Node or any devices, all Template definitions MUST
303
+ be published in the NREBIRTH.*#
304
+ * [tck-testable tck-id-topics-nrebirth-bdseq-included]#[yellow-background]*[tck-id-topics-nrebirth-bdseq-included] A
305
+ bdSeq number MUST be included in the payload.*#
306
+ * [tck-testable tck-id-topics-nrebirth-bdseq-matching]#[yellow-background]*[tck-id-topics-nrebirth-bdseq-matching] This
307
+ MUST match the bdSeq number provided in the immediately prior MQTT CONNECT packet’s Will Message
308
+ payload.*#
309
+ ** This allows Host Applications to correlate NREBIRTHs to NDEATHs.
310
+ * [tck-testable tck-id-topics-nrebirth-bdseq-increment]#[yellow-background]*[tck-id-topics-nrebirth-bdseq-increment] The
311
+ bdSeq number MUST start at zero and increment by one on every new MQTT CONNECT packet until it
312
+ reaches a maximum of 18446744073709551615 (max value of a UINT64). At this point, the following
313
+ bdSeq number MUST be zero.*#
314
+
315
+ The NREBIRTH message can also include additional Node Control payload components. These are used by
316
+ a Sparkplug Host Application to control aspects of the Edge Node. The following are examples of Node
317
+ Control metrics.
318
+
319
+ * Metric name: ‘Node Control/Reboot’
320
+ ** Used by Host Application(s) to reboot an Edge Node.
321
+ * Metric name: ‘Node Control/Next Server’
322
+ ** Used by Host Application(s) to request an Edge Node to walk to the next MQTT Server in its
323
+ list in multi-MQTT Server environments.
324
+ * Metric name: ‘Node Control/Scan Rate’
325
+ ** Used by Host Application(s) to modify a poll rate on an Edge Node.
326
+
327
+ The NREBIRTH message can also include optional ‘Properties’ of an Edge Node. The following are
328
+ examples of Property metrics.
329
+
330
+ * Metric name: ‘Properties/Hardware Make’
331
+ ** Used to transmit the hardware manufacturer of the Edge Node
332
+ * Metric name: ‘Properties/Hardware Model’
333
+ ** Used to transmit the hardware model of the Edge Node
334
+ * Metric name: ‘Properties/OS’
335
+ ** Used to transmit the operating system of the Edge Node
336
+ * Metric name: ‘Properties/OS Version’
337
+ ** Used to transmit the OS version of the Edge Node
338
+
259
339
[[data_message_ndata]]
260
340
===== Data Message (NDATA)
261
341
@@ -308,10 +388,10 @@ The Death Certificate topic and payload described here are not “published” a
308
388
client, but provided as parameters within the MQTT CONNECT control packet when this Sparkplug Edge
309
389
Node first establishes the MQTT Client session.
310
390
311
- Immediately upon reception of an Edge Node Death Certificate (NDEATH message) with a bdSeq number
312
- that matches the preceding bdSeq number in the NBIRTH, any Host Application subscribed to this Edge
313
- Node should set the data quality of all metrics to STALE and should note the timestamp when the
314
- NDEATH message was received.
391
+ Immediately upon reception of an Edge Node Death Certificate (NDEATH message) with a bdSeq number in
392
+ this payload that matches the preceding bdSeq number in the NBIRTH, any Host Application subscribed
393
+ to this Edge Node should set the data quality of all metrics to STALE and should note the timestamp
394
+ when the NDEATH message was received.
315
395
316
396
[[topics_death_message_ndeath]]
317
397
====== Topic (NDEATH)
@@ -326,18 +406,17 @@ Node ID for this specific Edge Node.*#
326
406
====== Payload (NDEATH)
327
407
328
408
* [tck-testable tck-id-topics-ndeath-payload]#[yellow-background]*[tck-id-topics-ndeath-payload] The
329
- NDEATH message contains a very simple payload that MUST only include a single metric, the bdSeq
330
- number, so that the NDEATH event can be associated with the NBIRTH.*#
409
+ NDEATH message contains a very simple payload that MUST only include a bdSeq number, so that the
410
+ NDEATH event can be associated with the NBIRTH.*#
331
411
Since this is typically published by the MQTT Server on behalf of the Edge Node, information about
332
412
the current state of the Edge Node and its devices is not and cannot be known. As a result,
333
413
[tck-testable tck-id-topics-ndeath-seq]#[yellow-background]*[tck-id-topics-ndeath-seq] The NDEATH
334
414
message MUST NOT include a sequence number.*#
335
415
336
- The MQTT payload typically associated with this topic can include a Birth/Death sequence number used
337
- to track and synchronize Birth and Death sequences across the MQTT infrastructure. Since this
338
- payload will be defined in advance, and held in the MQTT server and only delivered on the
339
- termination of an MQTT session, not a lot of additional diagnostic information can be pre-populated
340
- into the payload.
416
+ The MQTT payload associated with this topic must include a Birth/Death sequence number used to track
417
+ and synchronize Birth and Death sequences across the MQTT infrastructure. Since this payload will be
418
+ defined in advance, held in the MQTT server and only delivered on the termination of an MQTT
419
+ session, not a lot of additional diagnostic information can be pre-populated into the payload.
341
420
342
421
[[command_ncmd]]
343
422
===== Command (NCMD)
@@ -440,6 +519,71 @@ Property metrics.
440
519
* Metric name: ‘Properties/FW’
441
520
** Used to transmit the firmware version of the device
442
521
522
+ [[birth_message_drebirth]]
523
+ ===== Birth Message (DREBIRTH)
524
+
525
+ The Sparkplug Edge Node is responsible for the management of all attached physical and/or logical
526
+ devices. Once the Edge Node has published its NREBIRTH, any Sparkplug Host Application ensures that
527
+ the metric structure has the Edge Node in an 'online' state. But each physical and/or logical device
528
+ connected to this node will still need to provide this DREBIRTH before the REBIRTH requesting Host
529
+ Application create/update the metric structure (if this is the first time this device has been seen)
530
+ and set any associated metrics in the application to a “*GOOD*” state.
531
+
532
+ The DREBIRTH payload contains everything required to build out a data structure for all metrics for
533
+ this device. The 'online' state of this device should be set to TRUE along with the associated
534
+ 'online' date and time this message was received by the requesting Host Application.
535
+
536
+ [[topics_birth_message_drebirth]]
537
+ ====== Topic (DREBIRTH)
538
+
539
+ * [tck-testable tck-id-topics-drebirth-topic]#[yellow-background]*[tck-id-topics-drebirth-topic] The
540
+ Device Rebirth topic for a Sparkplug Device MUST be of the form
541
+ 'namespace/group_id/DBIRTH/edge_node_id/device_id' where the namespace is replaced with the specific
542
+ namespace for this version of Sparkplug and the group_id, edge_node_id, and device_id are replaced
543
+ with the Group, Edge Node, and Device ID for this specific Device.*#
544
+
545
+ [[payloads_desc_drebirth]]
546
+ ====== Payload (DREBIRTH)
547
+
548
+ The DREBIRTH message requires the following payload components.
549
+
550
+ * [tck-testable tck-id-topics-drebirth-mqtt]#[yellow-background]*[tck-id-topics-drebirth-mqtt] DREBIRTH
551
+ messages MUST be published with MQTT QoS equal to 0 and retain equal to false.*#
552
+ * [tck-testable tck-id-topics-drebirth-seq]#[yellow-background]*[tck-id-topics-drebirth-seq] The DREBIRTH
553
+ MUST include a sequence number in the payload and it MUST have a value of one greater than the
554
+ previous MQTT message from the Edge Node contained unless the previous MQTT message contained a
555
+ value of 18446744073709551615 (max value of a UINT64). In this case the sequence number MUST be 0.*#
556
+ * [tck-testable tck-id-topics-drebirth-timestamp-1]#[yellow-background]*[tck-id-topics-drebirth-timestamp-1] The
557
+ DREBIRTH MUST include the overall payload timestamp denoting the date and time the message was sent
558
+ from the Edge Node.*#
559
+ * [tck-testable tck-id-topics-drebirth-timestamp-2]#[yellow-background]*[tck-id-topics-drebirth-timestamp-2] Each
560
+ individual Metric in the payload MAY include its own timestamp. If it does not, it is assumed the
561
+ 'metric value change time' is that over the overall payload timestamp included in the DREBIRTH
562
+ payload.*#
563
+ * [tck-testable tck-id-topics-drebirth-metric-reqs]#[yellow-background]*[tck-id-topics-drebirth-metric-reqs] The
564
+ DREBIRTH MUST include every metric the Edge Node will ever report on.*#
565
+ * [tck-testable tck-id-topics-drebirth-metrics]#[yellow-background]*[tck-id-topics-drebirth-metrics] At
566
+ a minimum each metric MUST include the metric name, metric datatype, and current value.*#
567
+
568
+ The DREBIRTH message can also include optional ‘Device Control’ payload components. These are used
569
+ by a Host Application to control aspects of a device. The following are examples of Device Control
570
+ metrics.
571
+
572
+ * Metric name: ‘Device Control/Reboot’
573
+ ** Used by Host Application(s) to reboot a device.
574
+ * Metric name: ‘Device Control/Scan rate’
575
+ ** Used by Host Application(s) to modify a poll rate on a device.
576
+
577
+ The DREBIRTH message can also include optional ‘Properties’ of a device. The following are examples
578
+ of Property metrics.
579
+
580
+ * Metric name: ‘Properties/Hardware Make’
581
+ ** Used to transmit the hardware manufacturer of the device
582
+ * Metric name: ‘Properties/Hardware Model’
583
+ ** Used to transmit the hardware model of the device
584
+ * Metric name: ‘Properties/FW’
585
+ ** Used to transmit the firmware version of the device
586
+
443
587
[[data_message_ddata]]
444
588
===== Data Message (DDATA)
445
589
0 commit comments