Typed Queue Wrapper.
More...
#include <QueueCPP.h>
|
bool | add (T const &item, TickType_t time=portMAX_DELAY) |
| add an item at end of the Queue.
|
|
bool | add_ISR (T const &item, portBASE_TYPE &waswoken) |
| add an item at end of the Queue.
|
|
unsigned | available () const |
| Return number of spaces available in Queue.
|
|
bool | empty () |
| Check if Queue is Empty.
|
|
bool | empty_ISR () |
| Is Queue Empty.
|
|
bool | full () |
| Check if Queue is Full.
|
|
bool | full_ISR () |
| Is Queue Full.
|
|
bool | peek (T &var, TickType_t time=0) |
| Look at the first item in the Queue.
|
|
bool | peek_ISR (T &var, portBASE_TYPE &waswoken) |
| Look at the first item in the Queue.
|
|
bool | pop (T &var, TickType_t time=portMAX_DELAY) |
| Get an item from the Queue.
|
|
bool | pop_ISR (T &var, portBASE_TYPE &waswoken) |
| Get an item from the Queue.
|
|
bool | push (T const &item, TickType_t time=portMAX_DELAY) |
| Push an item onto the Queue.
|
|
bool | push_ISR (T const &item, portBASE_TYPE &waswoken) |
| Push an item onto the Queue.
|
|
void | reset () |
| Reset the Queue.
|
|
unsigned | waiting () const |
| Get number of items in the Queue.
|
|
unsigned | waiting_ISR () |
| Get number of message waiting.
|
|
template<class T>
class QueueTypeBase< T >
Typed Queue Wrapper.
This Base Class provides the Type Dependent functionality for a Queue
◆ QueueTypeBase()
◆ add()
template<class T >
bool QueueTypeBase< T >::add |
( |
T const & | item, |
|
|
TickType_t | time = portMAX_DELAY ) |
|
inline |
add an item at end of the Queue.
Puts an item onto the Queue so it will be the last item to remove.
- Parameters
-
item | The item to put on the Queue. |
time | How long to wait for room if Queue is full. |
- Returns
- True if successful
◆ add_ISR()
template<class T >
bool QueueTypeBase< T >::add_ISR |
( |
T const & | item, |
|
|
portBASE_TYPE & | waswoken ) |
|
inline |
add an item at end of the Queue.
Puts an item onto the Queue so it will be the last item to remove.
Note: Interrupt service routines should only call _ISR routines.
- Parameters
-
item | The item to put on the Queue. |
waswoken | Flag variable to determine if context switch is needed. |
- Returns
- True if successful
◆ available()
unsigned QueueBase::available |
( |
| ) |
const |
|
inlineinherited |
Return number of spaces available in Queue.
- Returns
- the number of spaces available in the Queue.
◆ empty()
bool QueueBase::empty |
( |
| ) |
|
|
inlineinherited |
Check if Queue is Empty.
- Returns
- True if Queue is Empty.
◆ empty_ISR()
bool QueueBase::empty_ISR |
( |
| ) |
|
|
inlineinherited |
Is Queue Empty.
Note: Interrupt service routines should only call _ISR routines.
- Returns
- True if Queue is Empty.
◆ full()
Check if Queue is Full.
- Returns
- True if Queue is Full.
◆ full_ISR()
bool QueueBase::full_ISR |
( |
| ) |
|
|
inlineinherited |
Is Queue Full.
Note: Interrupt service routines should only call _ISR routines.
- Returns
- True if Queue is Full.
◆ peek()
Look at the first item in the Queue.
Gets the first item from the Queue leaving it there.
- Parameters
-
var | Variable to place the item |
time | How long to wait for an item to be available. |
- Returns
- True if an item returned.
◆ peek_ISR()
template<class T >
bool QueueTypeBase< T >::peek_ISR |
( |
T & | var, |
|
|
portBASE_TYPE & | waswoken ) |
|
inline |
Look at the first item in the Queue.
Gets the first item from the Queue leaving it there.
Note: Interrupt service routines should only call _ISR routines.
- Parameters
-
var | Variable to place the item |
waswoken | Flag variable to determine if context switch is needed. |
- Returns
- True if an item returned.
◆ pop()
template<class T >
bool QueueTypeBase< T >::pop |
( |
T & | var, |
|
|
TickType_t | time = portMAX_DELAY ) |
|
inline |
Get an item from the Queue.
Gets the first item from the Queue
- Parameters
-
var | Variable to place the item |
time | How long to wait for an item to be available. |
- Returns
- True if an item returned.
◆ pop_ISR()
template<class T >
bool QueueTypeBase< T >::pop_ISR |
( |
T & | var, |
|
|
portBASE_TYPE & | waswoken ) |
|
inline |
Get an item from the Queue.
Gets the first item from the Queue
Note: Interrupt service routines should only call _ISR routines.
- Parameters
-
var | Variable to place the item |
waswoken | Flag variable to determine if context switch is needed. |
- Returns
- True if an item returned.
◆ push()
template<class T >
bool QueueTypeBase< T >::push |
( |
T const & | item, |
|
|
TickType_t | time = portMAX_DELAY ) |
|
inline |
Push an item onto the Queue.
Puts an item onto the Queue so it will be the next item to remove.
- Parameters
-
item | The item to put on the Queue. |
time | How long to wait for room if Queue is full. |
- Returns
- True if successful
◆ push_ISR()
template<class T >
bool QueueTypeBase< T >::push_ISR |
( |
T const & | item, |
|
|
portBASE_TYPE & | waswoken ) |
|
inline |
Push an item onto the Queue.
Puts an item onto the Queue so it will be the next item to remove.
Note: Interrupt service routines should only call _ISR routines.
- Parameters
-
item | The item to put on the Queue. |
waswoken | Flag variable to determine if context switch is needed. |
- Returns
- True if successful
◆ reset()
void QueueBase::reset |
( |
| ) |
|
|
inlineinherited |
Reset the Queue.
Resets the Queue to an empty state.
◆ waiting()
unsigned QueueBase::waiting |
( |
| ) |
const |
|
inlineinherited |
Get number of items in the Queue.
- Returns
- The number of item in the Queue.
◆ waiting_ISR()
unsigned QueueBase::waiting_ISR |
( |
| ) |
|
|
inlineinherited |
Get number of message waiting.
Note: Interrupt service routines should only call _ISR routines.
- Returns
- The number of messages waiting.
◆ queueHandle
QueueHandle_t QueueBase::queueHandle |
|
protectedinherited |
The documentation for this class was generated from the following file: