Motion Master 6.0.0-alpha.111
Next-generation motion control software
Loading...
Searching...
No Matches
mm::comm::spoe::SpoeOutputSlot Class Reference

#include <spoe_process_data.h>

Public Member Functions

void reset (std::size_t frameBytes)
 Sizes every buffer and clears them. Not safe while the writer or the reader runs.
 
void write (std::span< const uint8_t > frame)
 Writer side. frame must hold the size given to reset.
 
std::span< const uint8_t > read ()
 Reader side. Returns the newest frame, or the previous one again when nothing newer arrived.
 

Detailed Description

Hands the newest output frame from one writer to one reader. Three buffers: the writer fills its own and swaps it with the middle one, and the reader swaps the middle one with its own when a newer frame is there. Neither side waits, and neither side sees a half-written frame.

Member Function Documentation

◆ read()

std::span< const uint8_t > mm::comm::spoe::SpoeOutputSlot::read ( )

Reader side. Returns the newest frame, or the previous one again when nothing newer arrived.

◆ reset()

void mm::comm::spoe::SpoeOutputSlot::reset ( std::size_t  frameBytes)

Sizes every buffer and clears them. Not safe while the writer or the reader runs.

◆ write()

void mm::comm::spoe::SpoeOutputSlot::write ( std::span< const uint8_t >  frame)

Writer side. frame must hold the size given to reset.


The documentation for this class was generated from the following files: