Measurement and calibration registry for XCP in pure Rust, with the derive macros that fill it.
The registry holds the description of all measurement and calibration objects of an application: events, calibration segments, type definitions and instances. From it an A2L file is written, which a tool such as CANape uses to access the application over XCP.
This repository contains two crates. They are released together with the same version number.
| Crate | Content | Links |
|---|---|---|
xcp_registry |
The registry: data model, A2L writer, optional A2L reader, JSON | crates.io · docs.rs |
xcp_registry_derive |
#[derive(McRegisterType)] and #[derive(McRegisterEnum)] |
crates.io · docs.rs |
An application only needs xcp_registry, it re-exports the derive macros:
[dependencies]
xcp_registry = "0.1"The feature a2l_reader adds loading and checking of A2L files. The documentation with examples is
in the README of xcp_registry.
- xcp-lite: XCP for Rust. The registry was developed as part of xcp-lite and moved into this repository after xcp-lite V3.0.11.
- XCPlite: XCP for C and C++. Its tool
xcpclientuses the registry to read and write A2L files.
The minimum supported Rust version is 1.90.
cargo test --workspace --features xcp_registry/a2l_readercargo clippy --workspace --all-targets --features xcp_registry/a2l_readerThe A2L files in xcp_registry/tests/fixtures/ are test cases, see the comment at the top of
xcp_registry/tests/round_trip.rs for how to add one.
Changes are listed in the changelog.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.