How amcolex/umsg works
μMsg is an embedded C publish-subscribe library with companion tools for generating typed topic APIs from JSON definitions and visualizing communication links in C source. The principal workflow is to define topics, generate a library, then have publisher and subscriber tasks use its typed API; the core dispatches published values to matching subscription queues. The graph tool separately scans application C files and emits a communication diagram. Relationships involving generated code and the graph tool’s output are documented or visible in the sampled implementation; unsampled application call sites are not asserted.
Main entry points: umsg_gen.py Topic generator · umsg.c Dispatch core · example.c Typed topic API · umsg_graph.py Graph analyzer
Components 12
Topic Definitions
- JSON topics
msg_defs
Code Generation
- Topic generator
umsg_gen/umsg_gen/umsg_gen.py - C templates
umsg_gen/umsg_gen/templates
Pub-Sub Runtime
- Typed topic API
umsg_lib/src/example.c - Dispatch core
umsg_lib/core/src/umsg.c - FreeRTOS port
umsg_lib/core/src/port_freertos.c - POSIX port
umsg_lib/core/src/port_posix.c
Communication Analysis
- Graph analyzer
umsg_graph/umsg_graph/umsg_graph.py
Other components
- Library integrator
- Subscriber tasks
- Application C sources
- Communication graph
Connections 14
- Library integrator → JSON topics: defines topics
README.md - Library integrator → Topic generator: runs generator
README.md - Topic generator → JSON topics: loads definitions
umsg_gen/umsg_gen/umsg_gen.py - Topic generator → C templates: renders code
umsg_gen/umsg_gen/umsg_gen.py - Topic generator → Dispatch core: copies runtime
umsg_gen/umsg_gen/umsg_gen.py - Topic generator → Typed topic API: generates API
README.md - Library integrator → Typed topic API: integrates library
README.md - Subscriber tasks → Typed topic API: subscribes and receives
README.md - Typed topic API → Dispatch core: delegates API calls
umsg_lib/src/example.c - Dispatch core → FreeRTOS port: uses queue port
umsg_lib/core/src/umsg.c - Dispatch core → POSIX port: uses queue port
- Library integrator → Graph analyzer: runs analyzer
umsg_graph/umsg_graph/umsg_graph.py - Graph analyzer → Application C sources: scans C sources
umsg_graph/umsg_graph/umsg_graph.py - Graph analyzer → Communication graph: renders links
umsg_graph/umsg_graph/umsg_graph.py