Template Class Fifo
Defined in File fifo.h
Class Documentation
-
template<typename T>
class Fifo Public Functions
-
inline Fifo(int fifo_length = 20)
-
inline virtual ~Fifo()
-
inline virtual size_t Push(const T &element, const fifo_timestamp timestamp = fifo_clock::now(), size_t counter = 0)
-
inline virtual bool Pop(T &element, fifo_timestamp ×tamp, size_t &counter)
-
inline virtual size_t Size(void)
-
inline virtual void Shutdown(void)
-
inline virtual size_t TotalMessagesPushed()
-
inline virtual double SecondsSinceLastPush()
Public Static Functions
-
static inline double Seconds(const fifo_timestamp ×tamp_start, const fifo_timestamp ×tamp_end = fifo_clock::now())
Protected Types
-
typedef std::tuple<T, fifo_timestamp, size_t> fifo_element
Protected Attributes
-
std::queue<fifo_element> m_queue
-
std::mutex m_mutex
-
std::condition_variable m_cond
-
int m_fifo_length
-
bool m_shutdown
-
size_t m_num_messages_received
-
fifo_timestamp m_timestamp_last_msg_received
-
inline Fifo(int fifo_length = 20)