![]() |
DUNE: Uniform Navigational Environment
2024.09.0
|
The TSQueue is a thread-safe implementation of a FIFO (first-in, first-out) data structure.
Public Member Functions | |
TSQueue (void) | |
void | push (const T &v) |
T | pop (void) |
bool | pop (T &value) |
bool | waitForItems (double timeout=-1.0) |
bool | empty (void) |
unsigned | size (void) |
void | close (void) |
bool | closed (void) |
|
inline |
Constructor.
|
inline |
|
inline |
|
inline |
Verify if the queue has elements.
Referenced by DUNE::Concurrency::TSQueue< DUNE::IMC::Message *>::waitForItems().
|
inline |
Retrieve the first element of the queue and removes it from the queue.
Referenced by DUNE::Hardware::BasicModem::readLine(), DUNE::Hardware::BasicModem::readRaw(), and DUNE::Hardware::BasicModem::setReadMode().
|
inline |
Retrieve the first element of the queue and removes it from the queue.
[in,out] | value | where to store the popped value. |
|
inline |
Adds an element to the end of the queue.
Signaling waiting threads.
v | variable to insert. |
Referenced by DUNE::Hardware::BasicModem::flushInput(), and DUNE::Hardware::BasicModem::setReadMode().
|
inline |
Retrieve the number of elements currently in the queue.
Referenced by DUNE::Hardware::BasicModem::setReadMode().
|
inline |
Wait for items to be available.
timeout | timeout in seconds, use a negative number to wait forever. |
Referenced by DUNE::Hardware::BasicModem::readLine(), and DUNE::Hardware::BasicModem::readRaw().