FastArduino  v1.7
C++ library to build fast but small Arduino/AVR projects
containers Namespace Reference

Contains all FastArduino generic containers: More...

Classes

class  array
 Container that encapsulates a fixed size array. More...
 
class  Link
 A wrapper for items stored in a LinkedList. More...
 
class  LinkedList
 Linked list of type T_ items. More...
 
class  LinkWrapper
 A wrapper for items stored in a LinkedList. More...
 
class  Queue
 Queue of type T_ items. More...
 

Functions

template<typename T , typename TREF >
pull (Queue< T, TREF > &queue)
 Pull an item from the beginning of queue. More...
 
template<typename T , typename TREF >
peek (Queue< T, TREF > &queue)
 Peek an item from the beginning of queue. More...
 

Detailed Description

Contains all FastArduino generic containers:

  • linked list
  • ring buffer queue Those containers are often used directly by several FastArduino API but you may also use them for your own needs.

Function Documentation

◆ pull()

template<typename T , typename TREF >
T containers::pull ( Queue< T, TREF > &  queue)

Pull an item from the beginning of queue.

The item is removed from the queue. This method wait until one item is available in queue.

Returns
the first item pulled from queue
See also
Queue::pull()
time::yield()

Definition at line 556 of file queue.h.

◆ peek()

template<typename T , typename TREF >
T containers::peek ( Queue< T, TREF > &  queue)

Peek an item from the beginning of queue.

The queue is NOT modified, no item is removed from the queue. This method wait until one item is available in queue.

Returns
the first item peeked from queue
See also
Queue::peek()
time::yield()

Definition at line 573 of file queue.h.