Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/opencyphal/public_regulated_data_types
Regulated DSDL definitions for Cyphal (standard and third-party)
https://github.com/opencyphal/public_regulated_data_types
aerospace can can-bus communication-protocol cyphal databus drones onboard-diagnostics opencyphal robotics space uav uavcan vehicle-bus
Last synced: 28 days ago
JSON representation
Regulated DSDL definitions for Cyphal (standard and third-party)
- Host: GitHub
- URL: https://github.com/opencyphal/public_regulated_data_types
- Owner: OpenCyphal
- License: mit
- Created: 2015-06-10T11:15:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2024-03-19T09:52:20.000Z (11 months ago)
- Last Synced: 2024-10-29T18:47:21.456Z (3 months ago)
- Topics: aerospace, can, can-bus, communication-protocol, cyphal, databus, drones, onboard-diagnostics, opencyphal, robotics, space, uav, uavcan, vehicle-bus
- Language: Python
- Homepage: https://nunaweb.opencyphal.org
- Size: 533 KB
- Stars: 72
- Watchers: 24
- Forks: 95
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Regulated DSDL definitions
==========================[![Main Workflow](https://github.com/OpenCyphal/public_regulated_data_types/actions/workflows/main.yml/badge.svg)](https://github.com/OpenCyphal/public_regulated_data_types/actions/workflows/main.yml)
[![Forum](https://img.shields.io/discourse/https/forum.opencyphal.org/users.svg)](https://forum.opencyphal.org)This repository contains definitions of the regulated Cyphal data types.
[Cyphal](http://opencyphal.org) is an open technology for real-time intravehicular distributed computing
and communication based on modern networking standards.Contributors must obey the guidelines defined in this document.
Feedback and proposals are welcome on the [Cyphal forum](https://forum.opencyphal.org).A web-based DSDL compiler is available at [nunaweb.opencyphal.org](https://nunaweb.opencyphal.org).
## Namespaces
Regulated data types include the standard data types and domain-specific public definitions.
Per the specification, standard data types are contained in the root namespace `uavcan`,
and domain-specific public regulated definitions are in the root namespace `reg`.
The latter contains nested namespaces named after the domain.Vendors are encouraged to define interfaces to their products or systems using the definitions available
in this repository instead of defining custom types in order to facilitate reusability and reduce the
fragmentation of the ecosystem.If a fixed regulated port-ID is needed for a new type,
developers are free to choose any unoccupied identifier from the ranges
defined by the specification before submitting the pull request.## Identifier ranges
Refer to the specification for background information and motivation.
The limits specified here are inclusive.The upper part of the non-standard ranges may be repurposed for standard types shall that become necessary,
so new non-standard regulated fixed port-ID allocations should be done near the bottom.
Likewise, the non-standard ranges may be expanded into the unregulated area if their exhaustion becomes imminent.### Subjects
From | To | Purpose
--------|-----------|-------------------------------------
0 | 6143 | Unregulated identifiers
6144 | 7167 | Non-standard regulated identifiers (namespace `reg`)
7168 | 8191 | Standard regulated identifiers (namespace `uavcan`)### Services
From | To | Purpose
--------|-----------|------------------------------------------------
0 | 255 | Unregulated identifiers
256 | 383 | Non-standard regulated identifiers (namespace `reg`)
384 | 511 | Standard regulated identifiers (namespace `uavcan`)## Standard data types
The standard data types are contained in the root namespace `uavcan`.
### Standard fixed identifier allocation
#### Subjects
Ordered by priority from high to low.
Namespace | Lower bound (inclusive)
----------------------------|-------------------------
`uavcan.time` | 7168
`uavcan.node` | 7509
`uavcan.pnp` | 8164
`uavcan.internet` | 8174
`uavcan.diagnostic` | 8184The value 7509 contains the longest possible sequence of alternating bits,
which can be leveraged for automatic bit rate detection (depending on the physical layer).#### Services
Ordered by priority from high to low.
Namespace | Lower bound (inclusive)
----------------------------|-------------------------
`uavcan.register` | 384
`uavcan.pnp` | 390
`uavcan.file` | 400
`uavcan.node` | 430
`uavcan.internet` | 500
`uavcan.time` | 510### Generic data type definitions
#### SI
The namespace `uavcan.si` contains a collection of generic data types describing commonly used
physical quantities.
The namespace `uavcan.si.unit` contains basic units that can be used as type-safe wrappers over native `float32`
and other scalar and array types.
The namespace `uavcan.si.sample` contains time-stamped versions of these.All units follow the [International System of Units](https://en.wikipedia.org/wiki/International_System_of_Units).
All units are unscaled basic units of measure -- meters rather than kilometers, kilograms rather than milligrams.All coordinate systems are right-handed.
In relation to body, the preferred standard is as follows: **X** -- forward, **Y** -- right, **Z** -- down.
In case of cameras, the following convention should be preferred: **Z** -- forward, **X** -- right, **Y** -- down.
For world frames, the North-East-Down (NED) notation should be preferred.#### Primitives
A collection of primitive data types is intended as a very generic solution for odd use cases
and prototyping. They permit the user to broadcast a completely arbitrary value via the bus
while not having to deal with custom data type design and distribution.Since these types lack any semantic information, their usage in production environments is discouraged.
Another important application of these types is in the schemaless register protocol defined
in the namespace `uavcan.register`.#### Registers
The register protocol provides a highly generic interface to vendor-specific functionality
and configuration parameters via named registers.## Non-standard data types
Non-standard regulated data types are contained in the root namespace `reg`.
The root namespace contains nested namespaces, one per application domain, named after the domain.Note for authors of ***unregulated*** data type definitions:
the Cyphal specification explicitly bans namespaces that share the same name but differ in their contents.
Users seeking to define unregulated data types shall not put those into the regulated namespace;
instead, a new root namespace (named after the vendor) shall be used.## Guidelines for data type authors
Follow the interface design guidelines provided in [**The Cyphal Guide**](https://opencyphal.org/guide).
Every data type definition should have a header comment.
Every field should be followed by a comment, unless it is certain that it is completely self-explanatory.
An exception is made for trivial definitions where the comment would not add useful information.When using void fields for alignment, insert them after the alignee.
For example, `bool foo` followed by `void7` is the recommended sequence; the opposite is to be avoided.
To understand the motivation, read the DSDL serialization specification.Attributes shall be separated by exactly one blank line, excepting tightly related attributes and
void fields used for post-alignment (e.g., after bit fields), in which case blank lines are not necessary.
More than one blank line is never allowed.
There shall be exactly one blank line at the end of the file.The lines of text should not be longer than 120 characters.
Here is an example:
# This is a header comment.
# It explains what this data type definition is for and why do we need it.void48 # This space is reserved for future use.
uint8 VALUE_A = 1 # A comment describing the constant.
uint8 VALUE_B = 2 # Another one. Constants go before the field they relate to.
uint8 value
# This is an enumeration.
# We don't need blank lines because the items are tightly related.float32[<100] aligned_array
# This is a new field, mind the blank line above.Remember, the set of standard data types is an important part of the protocol specification,
so the quality of the documentation is very important.## IDE setup
For editing DSDL definitions, we recommend Visual Studio Code.
See `.vscode/` for recommended extensions and workspace settings.