Orocos Real-Time Toolkit
2.8.3
|
Create an atomic, non-blocking Multi-Writer Single-Reader FIFO for storing a pointer T by value. More...
#include <rtt/internal/AtomicMWSRQueue.hpp>
Public Types | |
typedef unsigned int | size_type |
Public Member Functions | |
AtomicMWSRQueue (unsigned int size) | |
Create an AtomicMWSRQueue with queue size size. More... | |
~AtomicMWSRQueue () | |
bool | isFull () const |
Inspect if the Queue is full. More... | |
bool | isEmpty () const |
Inspect if the Queue is empty. More... | |
size_type | capacity () const |
Return the maximum number of items this queue can contain. More... | |
size_type | size () const |
Return the number of elements in the queue. More... | |
bool | enqueue (const T &value) |
Enqueue an item. More... | |
bool | dequeue (T &result) |
Dequeue an item. More... | |
const T | front () const |
Return the next to be read value. More... | |
void | clear () |
Clear all contents of the Queue and thus make it empty. More... | |
Create an atomic, non-blocking Multi-Writer Single-Reader FIFO for storing a pointer T by value.
Any number of writer threads may access the queue concurrently, but only one thread may read it.
T | The pointer type to be stored in the Queue. Example : AtomicMWSRQueue< A* > is a queue of pointers to A. |
Definition at line 59 of file AtomicMWSRQueue.hpp.
typedef unsigned int RTT::internal::AtomicMWSRQueue< T >::size_type |
Definition at line 161 of file AtomicMWSRQueue.hpp.
|
inline |
Create an AtomicMWSRQueue with queue size size.
size | The size of the queue, should be 1 or greater. |
Definition at line 167 of file AtomicMWSRQueue.hpp.
|
inline |
Definition at line 174 of file AtomicMWSRQueue.hpp.
|
inline |
Return the maximum number of items this queue can contain.
Definition at line 208 of file AtomicMWSRQueue.hpp.
Referenced by RTT::base::BufferLockFree< T >::capacity().
|
inline |
Clear all contents of the Queue and thus make it empty.
Definition at line 268 of file AtomicMWSRQueue.hpp.
Referenced by RTT::internal::AtomicMWSRQueue< Item * >::AtomicMWSRQueue().
|
inline |
Dequeue an item.
value | Stores the dequeued value. It is unchanged when dequeue returns false and contains the dequeued value when it returns true. |
Definition at line 247 of file AtomicMWSRQueue.hpp.
Referenced by RTT::base::BufferLockFree< T >::clear(), RTT::base::BufferLockFree< T >::Pop(), RTT::base::BufferLockFree< T >::PopWithoutRelease(), and RTT::base::BufferLockFree< T >::Push().
|
inline |
Enqueue an item.
value | The value to enqueue. |
Definition at line 229 of file AtomicMWSRQueue.hpp.
Referenced by RTT::base::BufferLockFree< T >::Push().
|
inline |
Return the next to be read value.
Definition at line 260 of file AtomicMWSRQueue.hpp.
|
inline |
Inspect if the Queue is empty.
Definition at line 197 of file AtomicMWSRQueue.hpp.
Referenced by RTT::base::BufferLockFree< T >::empty().
|
inline |
Inspect if the Queue is full.
Definition at line 183 of file AtomicMWSRQueue.hpp.
Referenced by RTT::base::BufferLockFree< T >::full().
|
inline |
Return the number of elements in the queue.
Definition at line 216 of file AtomicMWSRQueue.hpp.
Referenced by RTT::base::BufferLockFree< T >::Push(), and RTT::base::BufferLockFree< T >::size().