Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • do we need a queue for RXing CAN messages?

  • should modules call main, or should main grab messages from queues stored in the modules?

Notes from July 1st, Max and Jess

  • worked out structure of ring buffer (to use for queues)

  • Yes, we need a queue for RXing CAN messages. CAN and Websocket will both expose TX and RX queues. The module will act as the consumer for the TX queue and the producer for the RX queue. Main will act as the consumer for the RX queues and the producer for the TX queues.

  • Main will be implemented as an infinite loop that constantly checks the RX queues. Each queue will expose a read-only counter for how many items there are that main can check for values at. This doesn’t have to happen atomically since the number will never decrement after main checks it because main is the only consumer.