SeqRingReader Class Reference

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

#include <sol3/core/seq_ring.h>

Public Member Functions

 SeqRingReader ()=default
 
 SeqRingReader (void const *data, size_t data_size)
 Initializes the reader with a read only memory range. More...
 
uint64_t head () const
 
SeqRingSlotView slot (size_t seq) const
 
size_t slotCount () const
 Number of slots. More...
 
size_t slotSize () const
 Size in bytes of each slot. More...
 
uint32_t slotType () const
 
flatbuffers::span< uint8_t const > trailerSpan () const
 

Detailed Description

Seqlock ring buffer reader. Enables read only access to the ring buffer.

Constructor & Destructor Documentation

◆ SeqRingReader() [1/2]

sol3::core::SeqRingReader::SeqRingReader ( )
default

◆ SeqRingReader() [2/2]

sol3::core::SeqRingReader::SeqRingReader ( void const *  data,
size_t  data_size 
)

Initializes the reader with a read only memory range.

Member Function Documentation

◆ head()

uint64_t sol3::core::SeqRingReader::head ( ) const

The sequence number of the head of the ring buffer. This is atomically loaded from the shared memory region. A return value of 0 means no valid slot has been written yet.

◆ slot()

SeqRingSlotView sol3::core::SeqRingReader::slot ( size_t  seq) const

A read only view of the slot at the given sequence number. Sequence value 0 is a sentinel for "invalid / not written".

◆ slotCount()

size_t sol3::core::SeqRingReader::slotCount ( ) const

Number of slots.

◆ slotSize()

size_t sol3::core::SeqRingReader::slotSize ( ) const

Size in bytes of each slot.

◆ slotType()

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

The type represented by data in each slot. Typically this is the flatbuffer file_identifier

◆ trailerSpan()

flatbuffers::span<uint8_t const> sol3::core::SeqRingReader::trailerSpan ( ) const

returns a range of data past the end of the sequence ring. This region is used to store flatbuffer schema data.


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