|
Motion Master 6.0.0-alpha.111
Next-generation motion control software
|
#include <spoe_process_data.h>
Public Member Functions | |
| void | reset (std::size_t frameBytes, std::size_t capacity) |
| Sizes the queue and empties it. Not safe while the producer or the consumer runs. | |
| bool | push (std::span< const uint8_t > frame) |
Producer side. Returns false, and drops frame, when the queue is full. | |
| bool | pop (std::span< uint8_t > frame) |
| std::size_t | dropOldest (std::size_t keep) |
| std::size_t | size () const |
A single-producer, single-consumer queue of fixed-size input frames. The exchange thread pushes and the RT thread pops.
| std::size_t mm::comm::spoe::SpoeInputQueue::dropOldest | ( | std::size_t | keep | ) |
Consumer side. Removes the oldest frames until at most keep remain, and returns how many it removed. Keeping the queue short keeps the delay between the drive and the RT cycle short.
| bool mm::comm::spoe::SpoeInputQueue::pop | ( | std::span< uint8_t > | frame | ) |
Consumer side. Copies the oldest frame into frame and removes it. Returns false, and leaves frame untouched, when the queue is empty.
| bool mm::comm::spoe::SpoeInputQueue::push | ( | std::span< const uint8_t > | frame | ) |
Producer side. Returns false, and drops frame, when the queue is full.
| void mm::comm::spoe::SpoeInputQueue::reset | ( | std::size_t | frameBytes, |
| std::size_t | capacity | ||
| ) |
Sizes the queue and empties it. Not safe while the producer or the consumer runs.
| std::size_t mm::comm::spoe::SpoeInputQueue::size | ( | ) | const |