-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Amend the RX RPC API and populate README.md & CONTRIBUTING.md (#53)
- Loading branch information
1 parent
a6980ac
commit 6e72fe5
Showing
6 changed files
with
152 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,32 @@ | ||
# WORK IN PROGRESS, NOT READY FOR USE | ||
# LibUDPard contribution guidelines | ||
|
||
While this is a work in progress, contribute via the forums at [https://forum.opencyphal.org/](https://forum.opencyphal.org/) | ||
## Standards | ||
|
||
The library shall be implemented in ISO C99/C11 following MISRA C:2012. | ||
The MISRA compliance is enforced by Clang-Tidy and SonarQube. | ||
Deviations are documented directly in the source code as follows: | ||
|
||
```c | ||
// Intentional violation of MISRA: <some valid reason> | ||
<... deviant construct ...> | ||
``` | ||
|
||
The full list of deviations with the accompanying explanation can be found by grepping the sources. | ||
|
||
Do not suppress compliance warnings using the means provided by static analysis tools because such deviations | ||
are impossible to track at the source code level. | ||
An exception applies for the case of false-positive (invalid) warnings -- those should not be mentioned in the codebase. | ||
|
||
Unfortunately, some rules are hard or impractical to enforce automatically, | ||
so code reviewers shall be aware of MISRA and general high-reliability coding practices | ||
to prevent non-compliant code from being accepted into upstream. | ||
|
||
## Build & test | ||
|
||
Consult with the CI workflow files for the required tools and build & test instructions. | ||
You may want to use the [toolshed](https://github.com/OpenCyphal/docker_toolchains/pkgs/container/toolshed) | ||
container for this. | ||
|
||
## Releasing | ||
|
||
Simply create a new release & tag on GitHub. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,63 @@ | ||
# NOTICE | ||
|
||
This package is a staging package to make changes before committing a pull request for the github repo: https://github.com/OpenCyphal-Garage/libudpard based on @schoberm's prototype work | ||
|
||
# Compact Cyphal/UDP v1 in C | ||
# Compact Cyphal/UDP in C | ||
|
||
[![Main Workflow](https://github.com/OpenCyphal-Garage/libudpard/actions/workflows/main.yml/badge.svg)](https://github.com/OpenCyphal-Garage/libudpard/actions/workflows/main.yml) | ||
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=libudpard&metric=reliability_rating)](https://sonarcloud.io/summary?id=libudpard) | ||
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=libudpard&metric=coverage)](https://sonarcloud.io/summary?id=libudpard) | ||
[![Forum](https://img.shields.io/discourse/users.svg?server=https%3A%2F%2Fforum.opencyphal.org&color=1700b3)](https://forum.opencyphal.org) | ||
|
||
LibUDPard is a compact implementation of the Cyphal/UDP protocol stack in C99/C11 for high-integrity real-time | ||
LibUDPard is a compact implementation of the Cyphal/UDP protocol in C99/C11 for high-integrity real-time | ||
embedded systems. | ||
|
||
[Cyphal](https://opencyphal.org) is an open lightweight data bus standard designed for reliable intravehicular | ||
communication in aerospace and robotic applications via CAN bus, UDP, and other robust transports. | ||
|
||
We pronounce LibUDPard as *lib-you-dee-pee-ard*. | ||
|
||
## WORK IN PROGRESS, NOT READY FOR FORMAL USE | ||
## Features | ||
|
||
Some of the features listed here are intrinsic properties of Cyphal. | ||
|
||
- Full branch coverage and extensive static analysis. | ||
|
||
- Compliance with automatically enforceable MISRA C rules (reach out to https://forum.opencyphal.org for details). | ||
|
||
- Detailed time complexity and memory requirement models for the benefit of real-time high-integrity applications. | ||
|
||
- Purely reactive time-deterministic API without the need for background servicing. | ||
|
||
- Zero-copy data pipeline on reception -- | ||
payload is moved from the underlying NIC driver all the way to the application without copying. | ||
|
||
**Read the docs in [`libudpard/udpard.h`](/libudpard/udpard.h).** | ||
- Support for redundant network interfaces with seamless interface aggregation and no fail-over delay. | ||
|
||
Building | ||
``` | ||
cmake -B ./build -DCMAKE_BUILD_TYPE=Debug -DNO_STATIC_ANALYSIS=1 -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_EXPORT_COMPILE_COMMANDS=1 tests | ||
``` | ||
Testing | ||
``` | ||
cd build | ||
make | ||
make test | ||
``` | ||
Or to debug | ||
``` | ||
TEST_OUTPUT_ON_FAILURE=TRUE make test | ||
``` | ||
- Out-of-order multi-frame transfer reassembly, including cross-transfer interleaved frames. | ||
|
||
## Features, Description, and Usage | ||
- Support for repetition-coding forward error correction (FEC) for lossy links (e.g., wireless) | ||
transparent to the application. | ||
|
||
To be added at a later date. | ||
- No dependency on heap memory; the library can be used with fixed-size block pool allocators. | ||
|
||
- Compatibility with all conventional 8/16/32/64-bit platforms. | ||
|
||
- Compatibility with extremely resource-constrained baremetal environments starting from 64K ROM and 64K RAM. | ||
|
||
- Implemented in ≈2000 lines of code. | ||
|
||
## Usage | ||
|
||
The library implements the Cyphal/UDP protocol, which is a transport-layer entity. | ||
An application using this library will need to implement the presentation layer above the library, | ||
perhaps with the help of the [Nunavut transpiler](https://github.com/OpenCyphal/nunavut), | ||
and the network layer below the library using a third-party UDP/IP stack implementation with multicast/IGMP support | ||
(TCP and ARP are not needed). | ||
In the most straightforward case, the network layer can be based on the standard Berkeley socket API | ||
or a lightweight embedded stack such as LwIP. | ||
|
||
**Read the API docs in [`libudpard/udpard.h`](libudpard/udpard.h).** | ||
For complete usage examples, please refer to <https://github.com/OpenCyphal-Garage/demos>. | ||
|
||
## Revisions | ||
### v0.0 | ||
|
||
Prototype commit | ||
### v1.0 | ||
|
||
Initial release. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters