#uavcan #cyphal

canadensis_dsdl_parser

Parser for the Cyphal Data Structure Description Language

3 releases

0.2.2 Apr 12, 2022
0.2.1 Nov 6, 2021
0.2.0 Oct 31, 2021

#88 in Robotics

Download history 2/week @ 2022-01-28 2/week @ 2022-02-04 2/week @ 2022-02-11 4/week @ 2022-02-18 2/week @ 2022-02-25 2/week @ 2022-03-04 9/week @ 2022-03-11 10/week @ 2022-03-18 2/week @ 2022-03-25 5/week @ 2022-04-01 34/week @ 2022-04-08 13/week @ 2022-04-15 9/week @ 2022-04-22 10/week @ 2022-04-29 28/week @ 2022-05-06 58/week @ 2022-05-13

109 downloads per month
Used in 3 crates (via canadensis_dsdl_frontend)

MIT/Apache

94KB
1K SLoC

Canadensis: A UAVCAN 1.0 implementation

This project implements (most of) UAVCAN v1.0. As the UAVCAN website explains, "UAVCAN is an open lightweight protocol designed for reliable intravehicular communication in aerospace and robotic applications over CAN bus, Ethernet, and other robust transports. It is created to address the challenge of deterministic on-board data exchange between systems and components of next-generation intelligent vehicles: manned and unmanned aircraft, spacecraft, robots, and cars."

This is currently an independent project, not affiliated with the UAVCAN Consortium.

Published crates

Crate Description
canadensis (documentation) The main library with all core transport-independent functionality
canadensis_data_types (documentation) Rust types corresponding to the UAVCAN public regulated data types
canadensis_can (documentation) UAVCAN/CAN transport
canadensis_bxcan (documentation) Compatibility for bxCAN embedded CAN controllers
canadensis_linux (documentation) Compatibility for Linux SocketCAN interfaces
canadensis_serial (documentation) Experimental UAVCAN/Serial transport
canadensis_udp (documentation) Experimental UAVCAN/UDP transport
canadensis_pnp_client (documentation) A client library for plug-and-play node ID allocation
canadensis_crc (documentation) Access to the software image CRC
canadensis_write_crc (documentation) A tool to calculate and write the CRC of a software image for use with canadensis_crc
canadensis_codegen_rust (documentation) A DSDL processor that generates Rust data types and serialization code
canadensis_macro (documentation) A procedural macro that generates Rust data types and serialization code from inline and/or external DSDL files

Other crates (canadensis_bit_length_set, canadensis_core, canadensis_derive_register_block, canadensis_dsdl_frontend, canadensis_dsdl_parser, canadensis_encoding, and canadensis_filter_config) are re-exported in various places, so you normally will not need to depend on them directly.

Status

This code is intended to conform to version 1.0-beta of the UAVCAN specification.

Most of the functionality works. Some parts are incomplete:

  • There are some tests, but there are probably several bugs in areas that have not been tested.
  • The amount of dynamic memory allocation can be reduced, or at least documented better.
  • It needs better documentation

Principles

  • Runs on embedded devices
  • Uses dynamic memory allocation, but only when necessary
  • Supports UAVCAN/CAN (classic CAN and CAN FD)
  • Supports UAVCAN/Serial and UAVCAN/UDP (these transports are not fully specified yet, but the canadensis implementations were compatible with pyuavcan when they were released)

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.

Dependencies

~2.5MB
~52K SLoC