FreeRTOScpp
FreeRTOScpp::QueueTypeBase< T > Class Template Reference

Typed Queue Wrapper. More...

#include <QueueCPP.h>

Inheritance diagram for FreeRTOScpp::QueueTypeBase< T >:
Collaboration diagram for FreeRTOScpp::QueueTypeBase< T >:

Public Member Functions

bool add (T const &item, TickType_t time=portMAX_DELAY)
 add an item at end of the Queue. More...
 
bool add (T const &item, Time_ms time)
 add an item at end of the Queue. More...
 
bool add_ISR (T const &item, portBASE_TYPE &waswoken)
 add an item at end of the Queue. More...
 
unsigned available () const
 Return number of spaces available in Queue. More...
 
bool empty ()
 Check if Queue is Empty. More...
 
bool empty_ISR ()
 Is Queue Empty. More...
 
bool full ()
 Check if Queue is Full. More...
 
bool full_ISR ()
 Is Queue Full. More...
 
bool peek (T &var, TickType_t time=0)
 Look at the first item in the Queue. More...
 
bool peek (T &var, Time_ms time)
 Look at the first item in the Queue. More...
 
bool peek_ISR (T &var, portBASE_TYPE &waswoken)
 Look at the first item in the Queue. More...
 
bool pop (T &var, TickType_t time=portMAX_DELAY)
 Get an item from the Queue. More...
 
bool pop (T &var, Time_ms time)
 Get an item from the Queue. More...
 
bool pop_ISR (T &var, portBASE_TYPE &waswoken)
 Get an item from the Queue. More...
 
bool push (T const &item, TickType_t time=portMAX_DELAY)
 Push an item onto the Queue. More...
 
bool push (T const &item, Time_ms time)
 Push an item onto the Queue. More...
 
bool push_ISR (T const &item, portBASE_TYPE &waswoken)
 Push an item onto the Queue. More...
 
void reset ()
 Reset the Queue. More...
 
unsigned waiting () const
 Get number of items in the Queue. More...
 
unsigned waiting_ISR ()
 Get number of message waiting. More...
 

Protected Member Functions

 QueueTypeBase (QueueHandle_t handle_)
 

Protected Attributes

QueueHandle_t queueHandle
 

Detailed Description

template<class T>
class FreeRTOScpp::QueueTypeBase< T >

Typed Queue Wrapper.

This Base Class provides the Type Dependent functionality for a Queue

Constructor & Destructor Documentation

◆ QueueTypeBase()

template<class T >
FreeRTOScpp::QueueTypeBase< T >::QueueTypeBase ( QueueHandle_t  handle_)
inlineprotected

Member Function Documentation

◆ add() [1/2]

template<class T >
bool FreeRTOScpp::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
itemThe item to put on the Queue.
timeHow long to wait for room if Queue is full.
Returns
True if successful

References FreeRTOScpp::QueueBase::queueHandle.

◆ add() [2/2]

template<class T >
bool FreeRTOScpp::QueueTypeBase< T >::add ( T const &  item,
Time_ms  time 
)
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
itemThe item to put on the Queue.
timeHow long to wait for room if Queue is full.
Returns
True if successful

References FreeRTOScpp::ms2ticks(), and FreeRTOScpp::QueueBase::queueHandle.

Here is the call graph for this function:

◆ add_ISR()

template<class T >
bool FreeRTOScpp::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
itemThe item to put on the Queue.
waswokenFlag variable to determine if context switch is needed.
Returns
True if successful

References FreeRTOScpp::QueueBase::queueHandle.

◆ available()

unsigned FreeRTOScpp::QueueBase::available ( ) const
inlineinherited

Return number of spaces available in Queue.

Returns
the number of spaces available in the Queue.

References FreeRTOScpp::QueueBase::queueHandle.

◆ empty()

bool FreeRTOScpp::QueueBase::empty ( )
inlineinherited

Check if Queue is Empty.

Returns
True if Queue is Empty.

References FreeRTOScpp::QueueBase::queueHandle.

◆ empty_ISR()

bool FreeRTOScpp::QueueBase::empty_ISR ( )
inlineinherited

Is Queue Empty.

Note: Interrupt service routines should only call _ISR routines.

Returns
True if Queue is Empty.

References FreeRTOScpp::QueueBase::queueHandle.

◆ full()

bool FreeRTOScpp::QueueBase::full ( )
inlineinherited

Check if Queue is Full.

Returns
True if Queue is Full.

References FreeRTOScpp::QueueBase::queueHandle.

◆ full_ISR()

bool FreeRTOScpp::QueueBase::full_ISR ( )
inlineinherited

Is Queue Full.

Note: Interrupt service routines should only call _ISR routines.

Returns
True if Queue is Full.

References FreeRTOScpp::QueueBase::queueHandle.

◆ peek() [1/2]

template<class T >
bool FreeRTOScpp::QueueTypeBase< T >::peek ( T &  var,
TickType_t  time = 0 
)
inline

Look at the first item in the Queue.

Gets the first item from the Queue leaving it there.

Parameters
varVariable to place the item
timeHow long to wait for an item to be available.
Returns
True if an item returned.

References FreeRTOScpp::QueueBase::queueHandle.

◆ peek() [2/2]

template<class T >
bool FreeRTOScpp::QueueTypeBase< T >::peek ( T &  var,
Time_ms  time 
)
inline

Look at the first item in the Queue.

Gets the first item from the Queue leaving it there.

Parameters
varVariable to place the item
timeHow long to wait for an item to be available.
Returns
True if an item returned.

References FreeRTOScpp::ms2ticks(), and FreeRTOScpp::QueueBase::queueHandle.

Here is the call graph for this function:

◆ peek_ISR()

template<class T >
bool FreeRTOScpp::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
varVariable to place the item
waswokenFlag variable to determine if context switch is needed.
Returns
True if an item returned.

References FreeRTOScpp::QueueBase::queueHandle.

◆ pop() [1/2]

template<class T >
bool FreeRTOScpp::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
varVariable to place the item
timeHow long to wait for an item to be available.
Returns
True if an item returned.

References FreeRTOScpp::QueueBase::queueHandle.

◆ pop() [2/2]

template<class T >
bool FreeRTOScpp::QueueTypeBase< T >::pop ( T &  var,
Time_ms  time 
)
inline

Get an item from the Queue.

Gets the first item from the Queue

Parameters
varVariable to place the item
timeHow long to wait for an item to be available.
Returns
True if an item returned.

References FreeRTOScpp::ms2ticks(), and FreeRTOScpp::QueueBase::queueHandle.

Here is the call graph for this function:

◆ pop_ISR()

template<class T >
bool FreeRTOScpp::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
varVariable to place the item
waswokenFlag variable to determine if context switch is needed.
Returns
True if an item returned.

References FreeRTOScpp::QueueBase::queueHandle.

◆ push() [1/2]

template<class T >
bool FreeRTOScpp::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
itemThe item to put on the Queue.
timeHow long to wait for room if Queue is full.
Returns
True if successful

References FreeRTOScpp::QueueBase::queueHandle.

◆ push() [2/2]

template<class T >
bool FreeRTOScpp::QueueTypeBase< T >::push ( T const &  item,
Time_ms  time 
)
inline

Push an item onto the Queue.

Puts an item onto the Queue so it will be the next item to remove.

Parameters
itemThe item to put on the Queue.
timeHow long to wait for room if Queue is full.
Returns
True if successful

References FreeRTOScpp::ms2ticks(), and FreeRTOScpp::QueueBase::queueHandle.

Here is the call graph for this function:

◆ push_ISR()

template<class T >
bool FreeRTOScpp::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
itemThe item to put on the Queue.
waswokenFlag variable to determine if context switch is needed.
Returns
True if successful

References FreeRTOScpp::QueueBase::queueHandle.

◆ reset()

void FreeRTOScpp::QueueBase::reset ( )
inlineinherited

Reset the Queue.

Resets the Queue to an empty state.

References FreeRTOScpp::QueueBase::queueHandle.

◆ waiting()

unsigned FreeRTOScpp::QueueBase::waiting ( ) const
inlineinherited

Get number of items in the Queue.

Returns
The number of item in the Queue.

References FreeRTOScpp::QueueBase::queueHandle.

◆ waiting_ISR()

unsigned FreeRTOScpp::QueueBase::waiting_ISR ( )
inlineinherited

Get number of message waiting.

Note: Interrupt service routines should only call _ISR routines.

Returns
The number of messages waiting.

References FreeRTOScpp::QueueBase::queueHandle.

Member Data Documentation

◆ queueHandle


The documentation for this class was generated from the following file: