You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 42 Next »

Basic Message Components

Topic 

The topic is published in the format spBv1.0/[Group ID]/[Verb]/[Edge Node ID]/[Device ID] where:

Payload

The payload contains the following :

  • timestamp
    • The time stamp the payload was created
  • metrics
    • An array containing the metrics being published
    • For each metric parameters include:
      • name
        • Tag folder hierarchy not used in the topic namespace when aliasing not used
      • alias
        • Numeric value representing the tag rather than a name when aliasing is used
      • timestamp
        • Timestamp associated with the last tag change event
      • dataType
        • DataType associated with the tag
      • isHistorical
        • Set to True to denote the metric represents a historical value
      • isTransient
        • Set to null
      • metaData
        • Included in BIRTH messages if tag Meta Data (Tooltip and Documentation) has changed from Ignition defaults
      • properties
        • See the Ignition Tag Properties reference for all available properties.
        • Included in BIRTH messages if they have been changed from the Ignition default or if they are custom properties. 

          If the Quality property is not included, the quality of the tag data is considered Good
      • value
        • Value associated with the tag
      • isNull
        • Boolean denoting the metric has a null value
  • seq
    • The message sequence number used to ensure that messages are processed in the correct order
  • uuid
    • Set to null
  • body
    • Set to null
Where a parameter is not specific to the metric being published, it is set to null

Examples

NBIRTH

Sparkplug Topic

spBv1.0/TestGroup/NBIRTH/TestEdge

Sparkplug Payload

[timestamp=1713266473578, metrics=[ Metric [name=Node Control/Next Server, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false], Metric [ name=Motor, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=03081691ee14510415e1036a4d1f416d, description=], properties=PropertySet [propertyMap={}], value=Template [version=, templateRef=, isDefinition=true, metrics=[Metric [name=T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value=null, isNull=true]], parameters=[]], isNull=false], Metric [name=E_T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engLow=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=1.0, isNull=false], Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=-2147483133, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=false, isNull=false]}], value=null, isNull=true], Metric [name=Node Info/Transmission Version, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=null, properties=null, value=4.0.22-SNAPSHOT (b2024041611), isNull=false], Metric [name=bdSeq, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=2, isNull=false], Metric [ name=E_M1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=false, isNull=false]}], value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engUnit=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=RPM, isNull=false], Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=-2147483133, isNull=false]}], value=null, isNull=true]], parameters=[]], isNull=false], Metric [name=Node Control/Rebirth, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false]], seq=0, uuid=null, body=null]

Sparkplug Payload Metrics (Examples)

Metric [name=Node Control/Next Server, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false]

Metric [name=Node Info/Transmission Version, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=null, properties=null, value=4.0.22-SNAPSHOT (b2024041611), isNull=false]

Metric [name=bdSeq, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=2, isNull=false]

Metric [ name=Motor, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=03081691ee14510415e1036a4d1f416d, description=], properties=PropertySet [propertyMap={}], value=Template [version=, templateRef=, isDefinition=true, metrics=[Metric [name=T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value=null, isNull=true]], parameters=[]], isNull=false]

Metric [name=E_T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engLow=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=1.0, isNull=false], Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=-2147483133, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=false, isNull=false]}], value=null, isNull=true]

Metric [name=T1, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engUnit=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=RPM, isNull=false], Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=-2147483133, isNull=false]}], value=null, isNull=true]], parameters=[]], isNull=false]

DBIRTH

Sparkplug Topic

spBv1.0/TestGroup/NBIRTH/TestEdge/TestDevice

Sparkplug Payload

[timestamp=1713266459127, metrics=[Metric [name=D_T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=192, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false], documentation=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=Some helpful docs, isNull=false]}], value={ "Key1": "Value3" }, isNull=false], Metric [name=Device Control/Rebirth, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false], Metric [name=D_M1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false]}], value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engHigh=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=60.0, isNull=false]}], value=12, isNull=false]], parameters=[]], isNull=false]], seq=1, uuid=null, body=null]

Sparkplug Payload Metrics (Examples)

Metric [name=Device Control/Rebirth, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], isHistorical=null, isTransient=null, metaData=null, properties=null, value=false, isNull=false]

Metric [name=D_T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={Quality=PropertyValue [type=PropertyDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], value=192, isNull=false], enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false], documentation=PropertyValue [type=PropertyDataType [type=String, intValue=12, clazz=class java.lang.String], value=Some helpful docs, isNull=false]}], value={ "Key1": "Value3" }, isNull=false]

Metric [name=D_M1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={enabled=PropertyValue [type=PropertyDataType [type=Boolean, intValue=11, clazz=class java.lang.Boolean], value=true, isNull=false]}], value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266459127, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=false, isTransient=false, metaData=MetaData [isMultiPart=false, contentType=, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={engHigh=PropertyValue [type=PropertyDataType [type=Double, intValue=10, clazz=class java.lang.Double], value=60.0, isNull=false]}], value=12, isNull=false]], parameters=[]], isNull=false]]

NDATA

Sparkplug Topic

spBv1.0/TestGroup/NDATA/TestEdge

Sparkplug Payload

[timestamp=1713266453938, metrics=[ Metric [name=E_M1, alias=null, timestamp=1713266452937, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=null, properties=null, value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266445706, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=null, properties=null, value=12, isNull=false]], parameters=[]], isNull=false], Metric [name=E_T1, alias=null, timestamp=1713266452939, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value={ "Key1": "Value3" }, isNull=false]], seq=6, uuid=null, body=null]

Sparkplug Payload Metrics (Examples)

Metric [name=E_M1, alias=null, timestamp=1713266452937, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=null, properties=null, value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266445706, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=null, properties=null, value=12, isNull=false]], parameters=[]], isNull=false]

Metric [name=E_T1, alias=null, timestamp=1713266452939, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value={ "Key1": "Value3" }, isNull=false]]

DDATA

Sparkplug Topic

spBv1.0/TestGroup/DDATA/TestEdge/TestDevice

Sparkplug Payload 1

[timestamp=1713266761298, metrics=[Metric [name=DT1, alias=null, timestamp=1713266730315, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=5, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730416, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=6, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730516, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=7, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730617, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=8, isNull=false], Metric [name=DT1, alias=null, timestamp=1713266730718, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=9, isNull=false]], seq=15, uuid=null, body=null]

Sparkplug Payload 1 Metrics (Examples)

Metric [name=DT1, alias=null, timestamp=1713266730315, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=5, isNull=false]

Metric [name=DT1, alias=null, timestamp=1713266730416, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=6, isNull=false]

Metric [name=DT1, alias=null, timestamp=1713266730516, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=7, isNull=false]

Sparkplug Payload 2

[timestamp=1713266453943, metrics=[ Metric [name=D_M1, alias=null, timestamp=1713266452942, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=null, properties=null, value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266445725, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=null, properties=null, value=12, isNull=false]], parameters=[]], isNull=false], Metric [name=D_T1, alias=null, timestamp=1713266452947, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value={ "Key1": "Value3" }, isNull=false]], seq=7, uuid=null, body=null]

Sparkplug Payload 2 Metrics (Examples)

Metric [name=D_M1, alias=null, timestamp=1713266452942, dataType=MetricDataType [type=Template, intValue=19, clazz=class org.eclipse.tahu.message.model.Template], isHistorical=null, isTransient=null, metaData=null, properties=null, value=Template [version=, templateRef=Motor, isDefinition=false, metrics=[Metric [name=T1, alias=null, timestamp=1713266445725, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=null, isTransient=null, metaData=null, properties=null, value=12, isNull=false]], parameters=[]], isNull=false]

Metric [name=D_T1, alias=null, timestamp=1713266452947, dataType=MetricDataType [type=String, intValue=12, clazz=class java.lang.String], isHistorical=null, isTransient=null, metaData=MetaData [isMultiPart=false, contentType=application/json, size=0, seq=0, fileName=, fileType=, md5=, description=], properties=PropertySet [propertyMap={}], value={ "Key1": "Value3" }, isNull=false]]

NDEATH

Sparkplug Topic

spBv1.0/TestGroup/NDEATH/TestEdge

Sparkplug Payload

[timestamp=1713266459127, metrics=[Metric [name=bdSeq, alias=null, timestamp=1713266473578, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=2, isNull=false]], seq=7, uuid=null, body=null]

DDEATH

Sparkplug Topic

spBv1.0/TestGroup/DDEATH/TestEdge/TestDevice

Sparkplug Payload

[timestamp=1713266459127, metrics=[Metric [name=bdSeq, alias=null, timestamp=1713266442358, dataType=MetricDataType [type=Int64, intValue=4, clazz=class java.lang.Long], isHistorical=null, isTransient=null, metaData=null, properties=null, value=5, isNull=false]], seq=7, uuid=null, body=null]

NCMD

Sparkplug Topic

spBv1.0/TestGroup/NCMD/TestEdge

Sparkplug Payload

[timestamp=1713266761298, metrics=[Metric [name=ET1, alias=null, timestamp=1713266730315, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=5, isNull=false]], seq=15, uuid=null, body=null]

DCMD

Sparkplug Topic

spBv1.0/TestGroup/DCMD/TestEdge/TestDevice

Sparkplug Payload

[timestamp=1713266761298, metrics=[Metric [name=DT1, alias=null, timestamp=1713266785263, dataType=MetricDataType [type=Int32, intValue=3, clazz=class java.lang.Integer], isHistorical=true, isTransient=null, metaData=null, properties=null, value=25, isNull=false]], seq=12, uuid=null, body=null]

STATE

Sparkplug™ B payloads are not used for encoding in this payload and this allows Host/backend application(s) to work across Sparkplug™ payload types.


Sparkplug Topic

spBv1.0/STATE/primary_host_id

Sparkplug Payload

{ "online" : true,  "timestamp" : 1668114759262}  or { "offline" : true,  "timestamp" : 1668114759452}

  • No labels