ReduxLib C++ 2025.0.0-beta2
Loading...
Searching...
No Matches
redux::frames::FrameListener< T > Class Template Reference

#include <Frame.h>

Public Member Functions

 FrameListener (std::condition_variable &cv, std::mutex &dataLock)
 
void UpdateValue (T value, units::second_t timestamp)
 

Public Attributes

std::condition_variable & cv
 
std::mutex & dataLock
 
std::optional< FrameData< T > > data {std::nullopt}
 

Detailed Description

template<typename T>
class redux::frames::FrameListener< T >

Internal class.

Constructor & Destructor Documentation

◆ FrameListener()

template<typename T >
redux::frames::FrameListener< T >::FrameListener ( std::condition_variable &  cv,
std::mutex &  dataLock 
)
inline

Instantiates a FrameListener, used internally for WaitForFrames

Parameters
cvthe condition variable to flag when data is received
dataLockthe associated data lock for the frame listener

Member Function Documentation

◆ UpdateValue()

template<typename T >
void redux::frames::FrameListener< T >::UpdateValue ( value,
units::second_t  timestamp 
)
inline

updates the framelistener with the value/timestamp pair, notifying its associated condition variable

Parameters
valuevalue to update with
timestamptimestamp to update with

Member Data Documentation

◆ cv

template<typename T >
std::condition_variable& redux::frames::FrameListener< T >::cv

condition variable reference

◆ data

template<typename T >
std::optional<FrameData<T> > redux::frames::FrameListener< T >::data {std::nullopt}

payload to hold received data – check if nullopt for populated-ness

◆ dataLock

template<typename T >
std::mutex& redux::frames::FrameListener< T >::dataLock

data lock reference


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