EtherCAT Client Library Code 0.0.1
EtherCAT Client library that uses different communication protocols with EtherCAT Master server.
Loading...
Searching...
No Matches
SpscValue< T > Class Template Reference
Collaboration diagram for SpscValue< T >:
Collaboration graph

Public Member Functions

 SpscValue (std::size_t size)
void resize (std::size_t size)
void write (const T &value)
template<typename Func>
bool consume (Func &&callback)
bool read (T &value)

Private Attributes

T _buffers [3] {}
unsigned _writer = 0
unsigned _reader = 1
std::atomic< unsigned > _middle {2}

Static Private Attributes

static constexpr unsigned dirty_bit = 4
static constexpr unsigned index_mask = 3

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