How rtlabs-com/c-open works
C-Open is an embedded C CANopen stack for master and slave nodes. An application uses its public API to configure and operate a network; the stack communicates over a platform CAN channel and implements CANopen services including object-dictionary access, SDO transfers, PDO process data, NMT, synchronization, and monitoring. The source index shows the core modules and their references, but sampled excerpts do not expose the complete runtime dispatch path, so those connections are shown as unverified. The evaluation README says this version omits ports, although port implementations are present in the tree.
Main entry points: co_main.c Network Runtime · coal_can.h CAN Abstraction · co_pdo.c PDO Process Data · co_api.h Public API
Components 21
Application API
- Public API
include/co_api.h - Object Descriptors
include/co_obj.h
Stack Core
- Network Runtime
src/co_main.c - Runtime State
src/co_main.h - Object Dictionary
src/co_od.c - Dictionary Helpers
src/co_obj.c - Bitmap Utility
src/co_bitmap.c
CANopen Services
- SDO Client
src/co_sdo_client.c - SDO Server
src/co_sdo_server.c - PDO Process Data
src/co_pdo.c - NMT State Machine
src/co_nmt.c - SYNC
src/co_sync.c - Emergency Handling
src/co_emcy.c - Heartbeat
src/co_heartbeat.c - Node Guarding
src/co_node_guard.c - Layer Setting Services
src/co_lss.c
CAN Platform
- CAN Abstraction
src/coal_can.h - Linux CAN Port
src/ports/linux/coal_can.c - RT-Kernel CAN Port
src/ports/rt-kernel/coal_can.c - Windows CAN Port
src/ports/windows/coal_can.c
Other components
- Application
Connections 18
- Application → Public API: uses
include/co_api.h - Public API → Network Runtime: operates
src/co_main.c - Network Runtime → NMT State Machine: dispatches
src/co_main.c - Network Runtime → SDO Client: dispatches
src/co_main.c - Network Runtime → SDO Server: dispatches
src/co_main.c - Network Runtime → PDO Process Data: dispatches
src/co_main.c - Network Runtime → SYNC: dispatches
src/co_main.c - Network Runtime → Emergency Handling: dispatches
src/co_main.c - Network Runtime → Heartbeat: dispatches
src/co_main.c - Network Runtime → Node Guarding: dispatches
src/co_main.c - Network Runtime → Layer Setting Services: dispatches
src/co_main.c - SDO Client → CAN Abstraction: sends frames
src/co_sdo_client.c - PDO Process Data → Object Dictionary: maps entries
src/co_pdo.c - PDO Process Data → Emergency Handling: reports timeout
src/co_pdo.c - Dictionary Helpers → Object Descriptors: uses descriptors
src/co_obj.c - Linux CAN Port → CAN Abstraction: implements
src/ports/linux/coal_can.c - RT-Kernel CAN Port → CAN Abstraction: implements
src/ports/rt-kernel/coal_can.c - Windows CAN Port → CAN Abstraction: implements
src/ports/windows/coal_can.c