Skip to content

MBMap - Specification v2.2.0

Latest

Choose a tag to compare

@nobrega8 nobrega8 released this 13 Nov 21:44
· 80 commits to main since this release
9c99a32

MBMap Specification v2.2.0

One addition to the version 2 format. It is an optional key that older readers can ignore, so the format version stays 2 and every existing map stays valid.

What's new

  • Parts of a block (parts, §4.10): a new optional register key for devices that keep several values in one block and only accept the block written whole, such as an SMS gateway whose block holds the recipient's number followed by the text. The map still describes the block as one string register; parts names the values inside it (name, offset in registers, type, length, description). A tool that knows parts shows each part as a field of its own, decodes them on read, and on write builds the whole block from the parts and sends it in one request (FC16). An empty part is sent as zero bytes, and a write that covers only some parts is never sent.
  • New diagnostic (§7): bad-parts, for an empty parts, parts on a register that is not a string with a valid length, or a part that is missing its name or offset, has an unknown type, goes beyond the block or overlaps another part. The JSON Schema and the validator cover the new key, with new test files in tests/.

Compatibility

  • The format version is still 2. A reader that does not know parts reads and writes the whole block as one string, in one request, exactly as before (§8).
  • parts cannot make a block more writable than the register: access stays the register's.

Contents

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