Skip to content

MBMap - Specification v2.1.0

Choose a tag to compare

@nobrega8 nobrega8 released this 10 Nov 13:44
· 190 commits to main since this release

MBMap Specification v2.1.0

Two additions to the version 2 format. Both are optional keys that older readers can ignore, so the format version stays 2 and every existing map stays valid.

What's new

  • Identity from the device (identify, §4.8): a new top-level block that describes the answer to Report Slave ID (FC17) or Read Device Identification (FC43). Each field says where the value sits, its type, and a role (model, firmware or serial), with an optional enum to turn a type code into a model name. This lets a tool check the map against devices that do not expose their model in a register. An answer that cannot be read counts as unknown, never as a mismatch (§9).
  • Reading in separate requests (read_alone and read_group, §4.9): two optional register keys for devices that refuse a read running across the border between two internal tables, even though every register in it exists. read_alone: true reads a register in a request of its own; read_group reads a register only together with registers of the same group.
  • New diagnostics (§7): bad-identify and bad-read. The JSON Schema and the validator cover both additions, with new test files in tests/.

Compatibility

  • The format version is still 2. Readers that do not know the new keys ignore them (§8) and read the same registers as before.
  • On a device that refuses a joined request, an older reader fails exactly as it did without read_alone and read_group. Readers that support them avoid the failure.

Contents

  • Specification: SPEC.md
  • JSON Schema: schema/mbmap-2.schema.json
  • Validator: tools/validate/validate.py
  • Validation tests: tests/