Repository navigation
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 onestringregister;partsnames the values inside it (name,offsetin registers,type,length,description). A tool that knowspartsshows 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 emptyparts,partson a register that is not astringwith a validlength, or a part that is missing itsnameoroffset, 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 intests/.
Compatibility
- The format version is still
2. A reader that does not knowpartsreads and writes the whole block as one string, in one request, exactly as before (§8). partscannot make a block more writable than the register:accessstays the register's.
Contents
- Specification:
SPEC.md - JSON Schema:
schema/mbmap-2.schema.json - Validator:
tools/validate/validate.py - Validation tests:
tests/