Skip to content

MBMap - Specification v2.0.0

Choose a tag to compare

@nobrega8 nobrega8 released this 17 Oct 17:28
· 505 commits to main since this release

MBMap Specification v2.0.0

This release introduces version 2 of the MBMap specification, a JSON-based format for describing Modbus device register maps.

Highlights

  • JSON format: Replaces the legacy CSV-based format with structured .mbmap.json files.
  • JSON Schema: Defines the structure and constraints of MBMap v2 files.
  • Addressing: Explicit support for 0-based and 1-based register addressing.
  • Data types and byte order: Defines signed and unsigned integers, floating-point values, strings, byte order, and word order.
  • Register decoding: Adds scaling, offsets, dynamic scale factors, enumerations, sentinels, and bit fields.
  • Access control: Describes read/write permissions and write limits for registers.
  • Firmware compatibility: Supports model identification, firmware ranges, and firmware-dependent registers.
  • Map validation: Defines validation rules, diagnostic codes, severity levels, and JSON Pointer locations.
  • Versioning: Separates specification versioning from individual map revisions.
  • Interoperability: Defines compatibility rules for readers and support for vendor-specific extensions.
  • Device verification: Supports reference values and device identity checks to help detect incorrect maps or connection settings.

Migration from v1

Version 1, based on CSV, is deprecated. The repository includes a migration tool to convert legacy maps to the new format.

New implementations do not need to support v1 files.

Contents

  • Specification: SPEC.md
  • JSON Schema: schema/mbmap-2.schema.json
  • Examples: examples/
  • Validation tests: tests/
  • Migration tool: tools/migrate/migrate.py

Compatibility

This release defines MBMap format version 2. The format version is independent of the library's release version.

See SPEC.md for the complete specification, validation rules, and compatibility requirements.