Skip to content

About

Measurement and calibration registry for XCP in pure Rust, with derive macros

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

xcp-registry

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.

Crates

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.

Related projects

  • 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 xcpclient uses the registry to read and write A2L files.

Building and testing

The minimum supported Rust version is 1.90.

cargo test --workspace --features xcp_registry/a2l_reader
cargo clippy --workspace --all-targets --features xcp_registry/a2l_reader

The 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.

License

Licensed under either of

at your option.

Contribution

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.

About

Measurement and calibration registry for XCP in pure Rust, with derive macros

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages