ReduxLib C++ 2024.3.2
|
Classes | |
class | Frame |
class | FrameData |
class | FrameListener |
Functions | |
template<typename... T> | |
std::optional< std::tuple< FrameData< T >... > > | WaitForFrames (units::second_t timeout, Frame< T > &... frames) |
template<typename... T> | |
units::second_t | MaxTimestamp (std::tuple< FrameData< T >... > frameData) |
Namespace holding classes relating to device data frames
units::second_t redux::frames::MaxTimestamp | ( | std::tuple< FrameData< T >... > | frameData | ) |
Returns the max timestamp from a tuple of FrameData objects. Most useful for getting the "latest" CAN timestamp from a result of WaitForFrames.
frameData | value from WaitForFrames |
std::optional< std::tuple< FrameData< T >... > > redux::frames::WaitForFrames | ( | units::second_t | timeout, |
Frame< T > &... | frames | ||
) |
Waits for all Frames to have transmitted a value. Either returns an std::tuple of FrameData<T>; representing the data from corresponding frames passed in (in the order they are passed in) or std::nullopt if timeout or interrupt is hit.
Code example:
timeout | maximum seconds to wait for before giving up |
frames | references to Frames to wait on. Position in argument list corresponds to position in the returned FrameData tuple. |