...
- namespace
- edgeNodeDescriptor
- The combination of the Group ID and Edge Node ID which provides a unique identifier for the Edge Node
- groupId
- edgeNodeId
- deviceId
- type
- Message type including:
- NBIRTH
- DBIRTH
- NDATA
- DDATA
- NDEATH
- DDEATH
Note |
---|
The deviceId is only included for the device level message types of DBIRTH, DDATA and DDEATH |
...
NBIRTH
The Metrics metrics array for the Edge Node BIRTH message will contain:
...
Code Block |
---|
title | Edge Node Birth message |
---|
|
{
"topic": {
"namespace": "spBv1.0",
"edgeNodeDescriptor": "G1/E1",
"groupId": "G1",
"edgeNodeId": "E1"
"type": "NBIRTH"
},
"payload": {
"timestamp": 1638223073190,
"metrics": [
{
"name": "bdSeq",
"timestamp": 1638223073187,
"dataType": "Int64",
"value": 5
},
{
"name": "Tag 4",
"timestamp": 1638223073156,
"dataType": "Int32",
"metaData": {},
"properties": {
"Quality": {
"type": "Int32",
"value": 192
}
},
"value": 100
{,
{
"name": "Tag 5",
"timestamp": 1638223073001,
"dataType": "Boolean",
"metaData": {},
"properties": {
"Quality": {
"type": "Int32",
"value": 192
}
},
"value": false
{,}
],
"seq": 0
}
} |
...
DBIRTH
The metrics array for the Device BIRTH message will contain the following:
...
- A "timestamp" for when the payload was constructed
- Any Device tags defined in the Device folderA message sequence number
Code Block |
---|
title | Device BIRTH message |
---|
|
{
"topic": {
"namespace": "spBv1.0",
"edgeNodeDescriptor": "G1/E1",
"groupId": "G1",
"edgeNodeId": "E1",
"deviceId": "D1",
"type": "DBIRTH"
},
"payload": {
"timestamp": 1638223073192,
"metrics": [
{
"name": "Tag 1",
"timestamp": 1638223073192,
"dataType": "Int32",
"metaData": {},
"properties": {
"Quality": {
"type": "Int32",
"value": 192
}
},
"value": 1
},
{
"name": "T1Tag 2",
"timestamp": 16382230731921638223073011,
"dataType" "dataType": "Boolean",
"metaData": {},
"properties": {
"Quality": {
"type": "Int32",
"value": 192
}
},
"value": false
},
{
"name": "Tag 3",
"timestamp": 1638223073041,
"dataType": "Float",
"metaData": {},
"properties": {
"Quality": {
"type": "Int32",
"value": 192
}
},
}
},
"value": 12
}
1.23
}
],
"seq": 1
}
} |
DDATA
The metrics array for the Device DDATA message will contain the following::
- The Sparkplug elements: Namespace, Group ID, Edge Node ID, Device ID. They will be grouped under "topic" along with Message Type
- A "timestamp" for when the payload was constructed
- Any Device tags defined in the " Device folder that have changed
- A message sequence number
- , For example if we write the value 10 to Tag 1
Code Block |
---|
|
{
"topic": {
"namespace": "spBv1.0",
"edgeNodeDescriptor": "G1/E1",
"groupId": "G1",
"edgeNodeId": "E1",
"deviceId": "D1"
"type": "DDATA"
},
"payload": {
"timestamp": 1638223663812,
"metrics": [
{
"name": "T1Tag 1",
"timestamp": 1638223662800,
"dataType": "INT32",
"value": 10010
}
],
"seq": 2
}
} |
...
NDEATH
DDEATH
...