Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 2.01 KB

File metadata and controls

59 lines (42 loc) · 2.01 KB

CanOpenDef

CI

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/:

  • CommonTypes provides shared datatype aliases;
  • Diagnostics provides common runtime telemetry;
  • FirmwareInfo provides firmware version metadata.

A firmware selects its local and remote contracts through CanOpenGen's canopen_firmware(...) CMake function using this checkout as DEFINITIONS_DIR.

Local generation

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 setup

Then validate all definitions, inspect the resolved Object Dictionary map, or generate the complete output for Device/PressureSensor.yml:

make validate
make map
make generate

Generated 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-device

After cloning this repository without --recurse-submodules, make setup initializes all required submodules automatically.

Continuous integration

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.