Arduino-Scheduler
Portable Collaborative Multi-Tasking Scheduler for Arduino
Queue< T, NMEMB > Class Template Reference

#include <Queue.h>

Collaboration diagram for Queue< T, NMEMB >:
Collaboration graph

Public Member Functions

 Queue ()
 
unsigned int available () const
 
unsigned int room () const
 
void push (const T *data)
 
void push_P (const T *data)
 
void pull (T *data)
 

Detailed Description

template<class T, uint8_t NMEMB>
class Queue< T, NMEMB >

Template class for ring-buffer of queueing data elements.

Parameters
[in]Telement class.
[in]nmembnumber of elements in queue.

Definition at line 28 of file Queue.h.

Constructor & Destructor Documentation

template<class T, uint8_t NMEMB>
Queue< T, NMEMB >::Queue ( )
inline

Construct a ring-buffer queue with given number of members and member type.

Definition at line 35 of file Queue.h.

Member Function Documentation

template<class T, uint8_t NMEMB>
unsigned int Queue< T, NMEMB >::available ( ) const
inline

Return number of elements in queue.

Returns
available elements.

Definition at line 44 of file Queue.h.

template<class T, uint8_t NMEMB>
void Queue< T, NMEMB >::pull ( T *  data)
inline

Pull data from queue to given buffer. Will yield until data is available.

Parameters
[in,out]datapointer to data buffer.

Definition at line 90 of file Queue.h.

template<class T, uint8_t NMEMB>
void Queue< T, NMEMB >::push ( const T *  data)
inline

Push given data into queue. Will yield until room is available.

Parameters
[in]datapointer to data buffer.

Definition at line 64 of file Queue.h.

template<class T, uint8_t NMEMB>
void Queue< T, NMEMB >::push_P ( const T *  data)
inline

Push given data in program memory into queue. Will yield until room is available.

Parameters
[in]datapointer to data buffer in program memory.

Definition at line 77 of file Queue.h.

template<class T, uint8_t NMEMB>
unsigned int Queue< T, NMEMB >::room ( ) const
inline

Number of elements room in queue.

Returns
room for elements.

Definition at line 54 of file Queue.h.


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