...
Block Diagram
...
Of course this is a WIP
Components:
CAN handler
receives messages to send from the message handler in main, stores them in a TX queue, and sends them asap
Reads messages off the CAN bus and sends them to the message handler in main.
Project Manager
takes commands to power on and off boards
sends logs from projects to the log parser in main
each project runs in its own process
project manager holds a handle to each running project and gathers the logs accordingly
Project manager should also handle running drivers for the motor controller and charger, etc. Basically the logic for any hardware interactions we have should be run in project manager
Data store
stores the shared data for the projects
handles mapping / unmapping of shared memory depending on what project is spun up (should expose an API to be called by project manager? for whenever a new project spins up)
sends updates to the update handler in main
Websockets
receives commands over websockets and passes them to the message handler in main to be processed accordingly
sends messages passed to it by the message handler over websocket to expose to clients (e.g. CAN messages, datastore updates, project logs)
Questions:
do we need a queue for RXing CAN messages?
should modules call main, or should main grab messages from queues stored in the modules?