template<class T, unsigned N>
class etcpal::StaticQueue< T, N >
An RTOS queue class.
See the module description for queue (RTOS queues) for usage information.
◆ 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.
◆ IsFull()
Check if a queue is full.
- Returns
- true if queue is full, false otherwise.
◆ IsFullFromIsr()
Check if a queue is full from an interrupt service routine.
- Returns
- true if queue is full, 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.
◆ ReceiveFromIsr()
bool ReceiveFromIsr |
( |
T & |
data | ) |
|
|
inline |
Get an item from the queue from an interrupt context.
- Parameters
-
data | A reference to the data that will receive the item from the queue. |
- Returns
- The result of the attempt to get an item from the queue.
◆ Reset()
Resets queue to empty state.
- Returns
- true on success, false otherwise.
◆ 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.
◆ SlotsAvailable()
Get number of remaining slots in the queue.
- Returns
- number of remaining slots in queue.
◆ SlotsUsed()
Get number of slots being stored in the queue.
- Returns
- number of slots in queue.
◆ SlotsUsedFromIsr()
Get number of slots being stored in the queue from an interrupt service routine.
- Returns
- number of slots in queue.
The documentation for this class was generated from the following file: