#uavcan #uav #can #cyphal

no-std canadensis

A Cyphal implementation: Node types and re-exports from some other canadensis crates

8 releases

0.3.1 Oct 6, 2023
0.3.0 Mar 31, 2023
0.2.4 Oct 18, 2022
0.2.3 Apr 12, 2022
0.1.0 Jul 11, 2021

#146 in Embedded development

Download history 23/week @ 2023-10-26 10/week @ 2023-11-02 7/week @ 2023-11-09 14/week @ 2023-11-16 35/week @ 2023-11-23 33/week @ 2023-11-30 8/week @ 2023-12-07 16/week @ 2023-12-14 25/week @ 2023-12-21 6/week @ 2023-12-28 17/week @ 2024-01-04 11/week @ 2024-01-11 16/week @ 2024-01-18 22/week @ 2024-01-25 28/week @ 2024-02-01 30/week @ 2024-02-08

98 downloads per month
Used in 2 crates

MIT/Apache

1MB
18K SLoC

Canadensis: A Cyphal implementation

This project implements (most of) Cyphal (previously called UAVCAN v1.0). As the Cyphal website explains, "Cyphal is an open technology for real-time intravehicular distributed computing and communication based on modern networking standards (Ethernet, CAN FD, etc.). It was created to address the challenge of on-board deterministic computing and data distribution in next-generation intelligent vehicles: manned and unmanned aircraft, spacecraft, robots, and cars."

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

Submodule note

This repository uses a submodule for the public regulated data types. When cloning, use git clone --recursive. If you have already cloned the repository without the recursive option, run git submodule init followed by git submodule update. Otherwise, some tests will fail.

Published crates

Crate Description
canadensis (documentation) The main library with all core transport-independent functionality
canadensis_data_types (documentation) Rust types corresponding to the Cyphal public regulated data types
canadensis_can (documentation) Cyphal/CAN transport
canadensis_bxcan (documentation) Compatibility for bxCAN embedded CAN controllers
canadensis_linux (documentation) Compatibility for Linux SocketCAN interfaces
canadensis_serial (documentation) Experimental Cyphal/Serial transport
canadensis_udp (documentation) Experimental Cyphal/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 Cyphal 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 Cyphal/CAN (classic CAN and CAN FD)
  • Supports Cyphal/Serial and Cyphal/UDP (these transports are not fully specified yet, but the canadensis implementations were compatible with pycyphal 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.


lib.rs:

Canadensis: An implementation of Cyphal

This library (canadensis) provides all the basic Cyphal functionality, with some re-exports from other canadensis crates.

Basic Cyphal types Data type serialization and deserialization

Dependencies

~2.5MB
~49K SLoC