Versioned CANopen Device and Module YAML definitions consumed by CanOpenGen.
Device/ # one CANopen contract per device
Modules/ # reusable types and Object Dictionary fragments
Device/PressureSensor.yml is intentionally minimal: it defines the device identity
and its single pressure telemetry value. Reusable definitions start in Modules/:
CommonTypesprovides shared datatype aliases;Diagnosticsprovides common runtime telemetry;FirmwareInfoprovides firmware version metadata.
A firmware selects its local and remote contracts through CanOpenGen's
canopen_firmware(...) CMake function using this checkout as DEFINITIONS_DIR.
CanOpenGen is pinned in this repository as a Git submodule. Initialize the generator, its bundled Eds2Od tool, and a local Python virtual environment once:
make setupThen validate all definitions, inspect the resolved Object Dictionary map, or generate
the complete output for Device/PressureSensor.yml:
make validate
make map
make generateGenerated EDS, Markdown, and C++ files are written to build/canopen/. Full C++
generation uses the bundled Eds2Od project and requires .NET SDK 10 when no native
Eds2Od binary is available.
Select another definition or output directory with Make variables:
make generate DEFINITION=Device/OtherDevice.yml OUTPUT_DIR=build/other-deviceAfter cloning this repository without --recurse-submodules, make setup initializes
all required submodules automatically.
The CI workflow runs validation and full generation on
every push and pull request. It can also be started manually from the Actions tab.
Each successful run publishes the generated files as the PressureSensor-canopen
artifact for 14 days.