feat(mqtt): Sparkplug DataSet / Template / PropertySet metric support #515

Open
opened 2026-07-27 13:51:16 -04:00 by dohertj2 · 0 comments
Owner

SparkplugCodec handles scalar metrics. DataSet, Template (UDT instances) and PropertySet metrics are
skipped with a warning — v1-unsupported by explicit decision, recorded in the plan's Deferred / out of
scope
section and design §3.5. This issue tracks closing that.

The current behaviour is the right default and should survive any fix: an unsupported metric is skipped and
warned about, never coerced into a guessed type. A Template flattened into a String, or a DataSet whose
first column is silently taken as "the value", would bind a tag to data that is not what its name says — worse
than not binding it. Whatever shape support takes, do not lose the skip-and-warn fallback for the cases it
still does not cover.

Design questions to settle first, since these are structured values and OPC UA has more than one honest
mapping:

  • Template — map to an OPC UA Structure/UDT, or flatten members into sibling tags (Motor/Speed,
    Motor/Torque)? Flattening interacts with #509: member paths contain /.
  • DataSet — a table has no single scalar value. Array-valued variable, or per-column tags?
  • PropertySet — arguably not a value at all; likely belongs on the node as OPC UA properties/metadata
    rather than as tags.

Bytes/File metrics beyond a base64/raw-String fallback are the same class of gap and can ride along or split
out.

Acceptance. A simulator publishing a Template and a DataSet metric produces addressable, correctly-typed
OPC UA nodes, live-verified; every still-unsupported kind continues to skip with a warning.

`SparkplugCodec` handles scalar metrics. `DataSet`, `Template` (UDT instances) and `PropertySet` metrics are **skipped with a warning** — v1-unsupported by explicit decision, recorded in the plan's *Deferred / out of scope* section and design §3.5. This issue tracks closing that. **The current behaviour is the right default and should survive any fix:** an unsupported metric is skipped and warned about, **never coerced into a guessed type**. A `Template` flattened into a String, or a `DataSet` whose first column is silently taken as "the value", would bind a tag to data that is not what its name says — worse than not binding it. Whatever shape support takes, do not lose the skip-and-warn fallback for the cases it still does not cover. **Design questions to settle first,** since these are structured values and OPC UA has more than one honest mapping: - **`Template`** — map to an OPC UA Structure/UDT, or flatten members into sibling tags (`Motor/Speed`, `Motor/Torque`)? Flattening interacts with #509: member paths contain `/`. - **`DataSet`** — a table has no single scalar value. Array-valued variable, or per-column tags? - **`PropertySet`** — arguably not a value at all; likely belongs on the node as OPC UA properties/metadata rather than as tags. `Bytes`/`File` metrics beyond a base64/raw-String fallback are the same class of gap and can ride along or split out. **Acceptance.** A simulator publishing a `Template` and a `DataSet` metric produces addressable, correctly-typed OPC UA nodes, live-verified; every still-unsupported kind continues to skip with a warning.
dohertj2 added the driver/mqtt label 2026-07-27 13:51:16 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: dohertj2/lmxopcua#515