SeqRingSlotView Class Reference

Space-ng SDK: sol3::core::SeqRingSlotView Class Reference
Space-ng SDK
sol3::core::SeqRingSlotView Class Reference

A read only view of a specific seq ring buffer slot. More...

#include <sol3/core/seq_ring.h>

Public Member Functions

 SeqRingSlotView ()=default
 
 SeqRingSlotView (SeqRingSlotHeader const *header, size_t seq)
 This is typically constructed by SeqRingReader. More...
 
size_t copyTo (void *dest, std::chrono::steady_clock::duration time_out) const
 
size_t readInto (IStreamWriter &stream, std::chrono::steady_clock::duration time_out) const
 Copy into an append-only stream. Returns bytes written, 0 on timeout. More...
 
size_t maxSize () const
 Maximum size in bytes of the slot. More...
 
bool dirty (std::memory_order order=std::memory_order_seq_cst) const
 Is the slot considered dirty? More...
 
uint64_t seq () const
 The sequence number that this view refers to. More...
 
uint32_t slotType () const
 The type of the underlying slot data. More...
 

Detailed Description

A read only view of a specific seq ring buffer slot.

Constructor & Destructor Documentation

◆ SeqRingSlotView() [1/2]

sol3::core::SeqRingSlotView::SeqRingSlotView ( )
default

◆ SeqRingSlotView() [2/2]

sol3::core::SeqRingSlotView::SeqRingSlotView ( SeqRingSlotHeader const *  header,
size_t  seq 
)

This is typically constructed by SeqRingReader.

Member Function Documentation

◆ copyTo()

size_t sol3::core::SeqRingSlotView::copyTo ( void *  dest,
std::chrono::steady_clock::duration  time_out 
) const

Copy to dest, which must have at least maxSize() bytes. Returns number of bytes copied, 0 if slot became dirty during copy, in which case data in dest is considered undefined.

◆ dirty()

bool sol3::core::SeqRingSlotView::dirty ( std::memory_order  order = std::memory_order_seq_cst) const

Is the slot considered dirty?

◆ maxSize()

size_t sol3::core::SeqRingSlotView::maxSize ( ) const

Maximum size in bytes of the slot.

◆ readInto()

size_t sol3::core::SeqRingSlotView::readInto ( IStreamWriter stream,
std::chrono::steady_clock::duration  time_out 
) const

Copy into an append-only stream. Returns bytes written, 0 on timeout.

◆ seq()

uint64_t sol3::core::SeqRingSlotView::seq ( ) const

The sequence number that this view refers to.

◆ slotType()

uint32_t sol3::core::SeqRingSlotView::slotType ( ) const

The type of the underlying slot data.


The documentation for this class was generated from the following file:
  • /workspaces/astro/sol3-sdk/cpp/sol3/core/seq_ring.h