Class real_time_tools::ThreadsafeHistoryInterface¶
-
template<typename Type>
class ThreadsafeHistoryInterface¶ This is a template abstract interface class that define a data history.
This re-writting of the vector style class is thread safe. So it allows the user to use the object without having to deal with mutexes nor condition variables. This class is not used so far.
- Template Parameters:
Type – is the type of the data to store.
Private Functions
-
inline virtual Type get_next(size_t id) const¶
Get the element after the one with the given id.
if there is no newer element, then wait until one arrives.
- Parameters:
id – is the index of the element in the buffer.
- Returns:
Type the next element.
-
virtual size_t get_next_id(size_t id) const = 0¶
-
inline virtual Type get_newest() const¶
Get the newest value, this function waits if it is empty.
- Returns:
Type the newest element.
-
virtual size_t get_newest_id() const = 0¶
get_newest_id
- Returns:
size_t