template<class T>
class etcpal::Queue< T >
An RTOS queue class.
See the module description for queue (RTOS queues) for usage information.
◆ Queue()
Create a new queue.
- Parameters
-
size | The size of the queue. |
◆ IsEmpty()
Check if a queue is empty.
- Returns
- true if queue is empty, false otherwise.
◆ IsEmptyFromIsr()
Check if a queue is empty from an interrupt service routine.
- Returns
- true if queue is empty, false otherwise.
◆ Receive() [1/2]
bool Receive |
( |
T & |
data, |
|
|
const std::chrono::duration< Rep, Period > & |
timeout |
|
) |
| |
|
inline |
Get an item from the queue.
- Parameters
-
data | A reference to the data that will receive the item from the queue. |
timeout | Amount of time to wait for data. |
- Returns
- The result of the attempt to get an item from the queue.
◆ Receive() [2/2]
Get an item from the queue.
- Parameters
-
data | A reference to the data that will receive the item from the queue. |
timeout_ms | Amount of time to wait for data. |
- Returns
- The result of the attempt to get an item from the queue.
◆ Send()
Add some data to the queue.
Returns when either the timeout expires or the add was attempted. It is still possible for the attempt to be made and the add to not work. Check the return value for confirmation.
- Parameters
-
data | A reference to the data. |
timeout_ms | How long to wait to add to the queue. |
- Returns
- The result of the attempt to add to the queue.
◆ SendFromIsr()
bool SendFromIsr |
( |
const T & |
data | ) |
|
|
inline |
Add to a queue from an interrupt service routine.
- Parameters
-
data | A reference to the data to be added to the queue. |
- Returns
- The result of the attempt to add to the queue.
The documentation for this class was generated from the following file: