QueueArray Library For Arduino Author: Efstathios Chatzikyriakidis Contact: contact@efxa.org
Library was updated for Arduino 1.0
1.0 2014-02-03 - Brian Fletcher - added enqueue(), dequeue() and front().
1.0 2014-02-03 - Brian Fletcher - added enqueue(), dequeue() and front().
1.0 2010-09-29 - Efstathios Chatzikyriakidis - added resize(): for growing, shrinking the array size.
1.0 2010-09-25 - Efstathios Chatzikyriakidis - added exit(), blink(): error reporting and handling methods.
1.0 2010-09-24 - Alexander Brevig - added setPrinter(): indirectly reference a Serial object.
1.0 2010-09-20 - Efstathios Chatzikyriakidis - initial release of the library.
QueueArray is a library implementing a generic, dynamic queue (array version) for the Arduino.
It is created to help adding FIFO (First In - First Out) Abstract Data Structure to a program for any use.
QueueArray library is part of the "Data Structures & Algorithms" libraries.
Download here: QueueArray.zip
Put the "QueueArray" directory in "libraries" directory.
In the Arduino IDE, create a new sketch and select from the menubar "Sketch->Import Library->QueueArray".
Once the library is imported, an "#include <QueueArray.h>" line will appear at the top of your Sketch.
Replace "T" with the data type you want to use.
QueueArray <T> queue;
Create instance (object) of a QueueArray class.
Replace "T" with the data type you want to use.
Put an item with data type "T" to the queue.
Take an item with data type "T" from the front of the queue and remove it.
Take an item with data type "T" from the front of the queue but do not remove it.
Same as enqueue.
Same as dequeue.
Same as front.
Check if the queue is empty.
Check if the queue is full.
Get the number of items in the queue.
Sets the printer of the queue.
Manage a string by using a generic, dynamic queue data structure.
QueueArray is a class. Therefore to use multiple queues, you must create an instance for each of them.
Last Modified: February 03, 2014, at 06:16 PM
By: bfletcher