eclipse-sparkplug / sparkplug

Sparkplug
Eclipse Public License 2.0
115 stars 39 forks source link

Unclear normative statement `[tck-id-operational-behavior-host-application-death-payload]` #511

Open datafoo opened 9 months ago

datafoo commented 9 months ago

In the normative statement [tck-id-operational-behavior-host-application-death-payload], the phrasing is unclear:

[tck-id-operational-behavior-host-application-death-payload] The Death Certificate Payload registered as the MQTT Will Message in the MQTT CONNECT packet MUST be JSON UTF-8 data. It MUST include two key/value pairs where one key MUST be online and it’s value is a boolean false. The other key MUST be timestamp and the value MUST be a numeric value representing the current UTC time in milliseconds since Epoch.

https://github.com/eclipse-sparkplug/sparkplug/blob/e45b61002a2a0cacb4f11fa4be88670435ccfcb0/specification/src/main/asciidoc/chapters/Sparkplug_5_Operational_Behavior.adoc?plain=1#L808-L812

Considering the context (i.e. [tck-id-operational-behavior-host-application-termination]), we are in the case where the Sparkplug Host Application publishes a Death message directly, not via the MQTT Will Message mechanism. Therefore, the beginning of the statement "The Death Certificate Payload registered as the MQTT Will Message in the MQTT CONNECT packet MUST be JSON UTF-8 data." seems inappropriate and adds confusion.

How should the [tck-id-operational-behavior-host-application-death-payload] statement be understood?

The difference of interpretation leads to different values for the timestamp:

The normative statement could be reformulated to avoid the confusion.