From 424987d8c7230e555daddd8a9fb78880e99ccde3 Mon Sep 17 00:00:00 2001 From: Michael Aebli Date: Tue, 11 Aug 2026 00:08:24 +0200 Subject: [PATCH] fix: restore hex colors and deduplicate values --- CHANGELOG.md | 14 + Cargo.toml | 2 +- README.md | 5 +- cli/Cargo.toml | 4 +- docs/index.html | 18 +- docs/m_bus_parser_wasm_pack.js | 600 ++++++++++++++-------------- docs/m_bus_parser_wasm_pack_bg.wasm | Bin 1805974 -> 1791285 bytes python/Cargo.toml | 4 +- python/tests/test_bindings.py | 2 +- src/mbus_data.rs | 4 +- src/output.rs | 254 ++++-------- tests/docs_presentation.rs | 32 ++ tests/output_contract.rs | 41 +- wasm/Cargo.toml | 4 +- wasm/tests/web.rs | 2 +- 15 files changed, 488 insertions(+), 498 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44e266a..3933f37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.4.3] - 2026-08-11 + +### Changed + +- Advanced the canonical output schema to version 3. Record values now contain + one parsed `value` instead of repeating display, numeric, precision, scaling, + component, and raw-byte representations. Record bytes live only in + `header_hex` and `data_hex`. + +### Fixed + +- Restored frame, application-header, DIF/VIF, and payload colors in the web + hex view after annotation identifiers moved to `snake_case`. + ## [0.4.2] - 2026-08-10 ### Changed diff --git a/Cargo.toml b/Cargo.toml index 0e22a23..68b35d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "m-bus-parser" -version = "0.4.2" +version = "0.4.3" edition = "2021" description = "A library for parsing M-Bus frames" license = "MIT" diff --git a/README.md b/README.md index 6b6b72a..fec2ecb 100644 --- a/README.md +++ b/README.md @@ -236,8 +236,11 @@ share one vocabulary: when one is available, such as `W`, `Cel`, or `m3.h-1`. - Complete temporal values use ISO 8601 notation. The parser does not invent a timezone when a meter does not transmit one. +- Each record value contains a `kind` and at most one parsed `value`. Exact + decimals, text, and complete temporal values use strings; finite floats use + JSON numbers; partial temporal values use a compact component object. - Raw binary values use uppercase hexadecimal and fields containing them end - in `_hex`. + in `_hex`. Record bytes live only in `header_hex` and `data_hex`. There is no common JSON schema shared by M-Bus parsers. These rules retain the protocol vocabulary used by [M-Bus](https://m-bus.com/documentation-wired/06-application-layer) diff --git a/cli/Cargo.toml b/cli/Cargo.toml index 7dc5eef..8f27650 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "m-bus-parser-cli" -version = "0.4.2" +version = "0.4.3" edition = "2021" description = "A cli to use the library for parsing M-Bus frames" license = "MIT" @@ -22,7 +22,7 @@ default = ["decryption"] decryption = ["m-bus-parser/decryption"] [dependencies] -m-bus-parser = { path = "..", version = "0.4.2", features = ["std", "serde"] } +m-bus-parser = { path = "..", version = "0.4.3", features = ["std", "serde"] } hex = "0.4" clap = { version = "4.5.4", features = ["derive"] } terminal_size = "0.4" diff --git a/docs/index.html b/docs/index.html index a5205c5..518cd7f 100644 --- a/docs/index.html +++ b/docs/index.html @@ -859,7 +859,7 @@

Online M-Bus Parser