|
14 | 14 | ----- |
15 | 15 |
|
16 | 16 | Libcanard is a robust implementation of the Cyphal/CAN transport layer in C for high-integrity real-time embedded systems. |
17 | | -Supports Cyphal v1.1, Cyphal v1.0, and legacy protocols: UAVCAN v0 and DroneCAN; works with Classic CAN and CAN FD. |
| 17 | +Supports Cyphal v1.1, v1.0, and legacy UAVCAN v0 aka DroneCAN. |
18 | 18 |
|
19 | | -[Cyphal](https://opencyphal.org) is an open lightweight data bus standard designed for reliable intravehicular |
20 | | -communication in aerospace and robotic applications via CAN bus, Ethernet, and other robust transports. |
| 19 | +The library supports both Classic CAN and CAN FD, in redundant and non-redundant configurations. |
21 | 20 |
|
22 | | -**Read the docs in [`libcanard/canard.h`](/libcanard/canard.h).** |
23 | | - |
24 | | -## Features |
25 | | - |
26 | | -- Full test coverage and extensive static analysis. |
27 | | -- Compliance with automatically enforceable MISRA C rules (reach out to <https://forum.opencyphal.org> for details). |
28 | | -- Detailed time complexity and memory requirement models for the benefit of real-time high-integrity applications. |
29 | | -- Support for the Classic CAN and CAN FD. |
30 | | -- Support for redundant network interfaces. |
31 | | -- Compatibility with 8/16/32/64-bit platforms. |
32 | | -- Compatibility with extremely resource-constrained baremetal environments starting from 32K ROM and 32K RAM. |
33 | | -- Implemented in ≈1000 SLoC. |
34 | | - |
35 | | -## Platforms |
36 | | - |
37 | | -The library is designed to be usable out of the box with any conventional 8/16/32/64-bit platform, |
38 | | -including deeply embedded baremetal platforms, as long as there is a standard-compliant compiler available. |
39 | | -The platform-specific media IO layer (driver) is supposed to be provided by the application: |
40 | | - |
41 | | - +---------------------------------+ |
42 | | - | Application | |
43 | | - +-------+-----------------+-------+ |
44 | | - | | |
45 | | - +-------+-------+ +-------+-------+ |
46 | | - | Libcanard | | CAN driver | |
47 | | - +---------------+ +-------+-------+ |
48 | | - | |
49 | | - +-------+-------+ |
50 | | - | CAN controller| |
51 | | - +---------------+ |
| 21 | +The library is compatible with 8/16/32/64-bit platforms, including extremely resource-constrained |
| 22 | +baremetal MCU platforms starting from 32K ROM and 32K RAM. |
52 | 23 |
|
| 24 | +The interface with the underlying platform is very clean and minimal, enabling quick adaptation to any CAN-enabled MCU. |
53 | 25 | The OpenCyphal Development Team maintains a collection of various platform-specific components in a separate repository |
54 | 26 | at <https://github.com/OpenCyphal/platform_specific_components>. |
55 | 27 | Users are encouraged to search through that repository for drivers, examples, and other pieces that may be |
56 | 28 | reused in the target application to speed up the design of the media IO layer (driver) for the application. |
57 | 29 |
|
| 30 | +[Cyphal](https://opencyphal.org) is an open lightweight data bus standard designed for reliable intravehicular |
| 31 | +communication in aerospace and robotic applications via CAN bus, Ethernet, and other robust transports. |
| 32 | + |
| 33 | +**Read the docs in [`libcanard/canard.h`](libcanard/canard.h).** |
| 34 | + |
58 | 35 | ## Revisions |
59 | 36 |
|
60 | 37 | To release a new version, simply publish a new release on GitHub. |
61 | 38 |
|
62 | 39 | ### v5.0 [WORK IN PROGRESS] |
63 | 40 |
|
64 | | -- Added support for Cyphal v1.1 alongside v1.0. |
65 | | -- Added support for legacy protocols: UAVCAN v0 and DroneCAN. |
| 41 | +v5 is a major rework based on the experience gained from extensive production use of the previous revisions. |
| 42 | +The API has been redesigned from scratch and as such there is no migration guide available; |
| 43 | +please read the new `canard.h` to see how to use the library -- the new API is simpler than the old one. |
| 44 | + |
| 45 | +Main changes: |
| 46 | + |
| 47 | +- Support for new protocols alongside Cyphal v1.0: |
| 48 | + - Cyphal/CAN v1.1, which adds support for 16-bit subject-IDs (like in UAVCAN v0) via a new CAN ID layout format. |
| 49 | + - UAVCAN v0 aka DroneCAN, a legacy predecessor to Cyphal v1.0 that is still widely used. |
| 50 | + |
| 51 | +- Ability to emit anonymous messages has been removed. Anonymous messages can still be received though. |
| 52 | + |
| 53 | +- A new passive node-ID autoconfiguration based on a simple occupancy observer. |
| 54 | + This method is decentralized and is compatible with old nodes. |
| 55 | + A node-ID can still be assigned manually if desired, but collision monitoring cannot be disabled by design. |
| 56 | + |
| 57 | +- Automatic CAN acceptance filter configuration based on the current subscription set. |
| 58 | + The configuration is refreshed whenever the subscription set is modified or the local node-ID is changed. |
| 59 | + |
| 60 | +- Rebuilt TX pipeline to use per-transfer queue granularity with efficient CAN frame deduplication across redundant |
| 61 | + interfaces, which resulted in a major reduction of the heap memory footprint in non-redundant interface |
| 62 | + configurations, and even more so in applications using redundant interfaces (typ. over 2x heap use reduction). |
| 63 | + |
| 64 | +- Rebuilt RX pipeline to support priority level preemption without transfer loss and reduce memory consumption. |
| 65 | + The old v4 revision was susceptible to transfer loss when the remote initiated a higher-priority multi-frame |
| 66 | + transfer while a lower-priority multi-frame transfer was in flight. The v5 revision maintains concurrent |
| 67 | + reassemblers per priority level, enabling arbitrary priority nesting. |
66 | 68 |
|
67 | 69 | ### v4.0 |
68 | 70 |
|
|
0 commit comments