RTOS Wrapper
API reference
Loading...
Searching...
No Matches
Public Member Functions | List of all members
hf::SnapshotReader< T > Class Template Referenceabstract

#include <SeqlockSnapshot.h>

Inheritance diagram for hf::SnapshotReader< T >:
hf::SeqlockSnapshot< T >

Public Member Functions

virtual ~SnapshotReader () noexcept=default
 
virtual uint32_t Read (T &out) const noexcept=0
 Read the latest coherent snapshot.
 
virtual uint32_t Seq () const noexcept=0
 Monotonic change counter (each successful Publish adds 2).
 
virtual bool WaitForChange (uint32_t timeout_ms) noexcept=0
 Block up to timeout_ms waiting for any change since the last call to WaitForChange / ClearWaitEvent.
 
virtual bool ClearWaitEvent () noexcept=0
 Drop any pending change-signal without waiting.
 

Constructor & Destructor Documentation

◆ ~SnapshotReader()

template<typename T >
virtual hf::SnapshotReader< T >::~SnapshotReader ( )
virtualdefaultnoexcept

Member Function Documentation

◆ ClearWaitEvent()

template<typename T >
virtual bool hf::SnapshotReader< T >::ClearWaitEvent ( )
pure virtualnoexcept

Drop any pending change-signal without waiting.

Implemented in hf::SeqlockSnapshot< T >.

◆ Read()

template<typename T >
virtual uint32_t hf::SnapshotReader< T >::Read ( T &  out) const
pure virtualnoexcept

Read the latest coherent snapshot.

Returns
current sequence (post-read); always even on success.

Implemented in hf::SeqlockSnapshot< T >.

◆ Seq()

template<typename T >
virtual uint32_t hf::SnapshotReader< T >::Seq ( ) const
pure virtualnoexcept

Monotonic change counter (each successful Publish adds 2).

Implemented in hf::SeqlockSnapshot< T >.

◆ WaitForChange()

template<typename T >
virtual bool hf::SnapshotReader< T >::WaitForChange ( uint32_t  timeout_ms)
pure virtualnoexcept

Block up to timeout_ms waiting for any change since the last call to WaitForChange / ClearWaitEvent.

Implemented in hf::SeqlockSnapshot< T >.


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