Infrared4Arduino 1.2.3
|
This class consists of a vector of durations. More...
#include <IrSequence.h>
Public Member Functions | |
IrSequence () | |
Create an empty sequence. More... | |
IrSequence (const microseconds_t *durations, size_t length) | |
Creates an IrSequence. More... | |
virtual | ~IrSequence () |
IrSequence (const IrSequence &orig) | |
Copy constructor. More... | |
IrSequence (IrSequence &&orig) | |
Move constructor. More... | |
IrSequence & | operator= (const IrSequence &rhs) |
Copy assignment. More... | |
IrSequence & | operator= (IrSequence &&rhs) |
Move assignment. More... | |
operator bool () const | |
True if and only if non-empty. More... | |
size_t | getLength () const |
Returns the number of durations. More... | |
bool | isEmpty () const |
const microseconds_t * | getDurations () const |
size_t | size () const |
const microseconds_t * | begin () const |
const microseconds_t * | end () const |
microseconds_t | operator[] (int i) const |
void | dump (Stream &stream, bool usingSigns=false) const |
Prints the IrSequence on the stream provided. More... | |
void | dumpWithSigns (Stream &stream) const |
Prints the IrSequence on the stream provided. More... | |
Static Public Member Functions | |
static IrSequence * | readFlash (const microseconds_t *flashData, size_t length) |
Create an IrSequence from data in PROGMEM. More... | |
Static Public Attributes | |
static const IrSequence | emptyInstance |
This class consists of a vector of durations.
The even entries denotes spaces, while the odd entries denotes gaps. The length should always be even, i.e., the sequences starts with a space, and ends with a gap. This class is immutable (except for assignments).
Definition at line 11 of file IrSequence.h.
|
inline |
Create an empty sequence.
Definition at line 18 of file IrSequence.h.
IrSequence::IrSequence | ( | const microseconds_t * | durations, |
size_t | length | ||
) |
Creates an IrSequence.
durations | const array of microseconds durations. Will be "moved", and delete []-d by the destructor. |
length | length of durations. Should be even (not checked). |
Definition at line 5 of file IrSequence.cpp.
|
virtual |
Definition at line 41 of file IrSequence.cpp.
IrSequence::IrSequence | ( | const IrSequence & | orig | ) |
Copy constructor.
orig | original IrSequence to be copied. |
Definition at line 13 of file IrSequence.cpp.
IrSequence::IrSequence | ( | IrSequence && | orig | ) |
Move constructor.
orig | original IrSequence to be moved |
Definition at line 8 of file IrSequence.cpp.
|
inline |
Definition at line 81 of file IrSequence.h.
void IrSequence::dump | ( | Stream & | stream, |
bool | usingSigns = false |
||
) | const |
Prints the IrSequence on the stream provided.
stream | Stream onto the output is printed. |
usingSigns | If true, Gaps are written with a leading '+', spaces with a leading '-'. |
Definition at line 47 of file IrSequence.cpp.
|
inline |
Prints the IrSequence on the stream provided.
Gaps are written with a leading '+', spaces with a leading '-'.
stream | Stream onto the output is printed. |
Definition at line 105 of file IrSequence.h.
|
inline |
Definition at line 85 of file IrSequence.h.
|
inline |
Definition at line 73 of file IrSequence.h.
|
inline |
|
inline |
Definition at line 69 of file IrSequence.h.
|
inline |
IrSequence & IrSequence::operator= | ( | const IrSequence & | rhs | ) |
IrSequence & IrSequence::operator= | ( | IrSequence && | rhs | ) |
|
inline |
Definition at line 89 of file IrSequence.h.
|
static |
Create an IrSequence from data in PROGMEM.
This must manually be deleted by the programmer. The function is available only on platforms implementing the memcpy_PF call.
flashData | |
length |
|
inline |
Definition at line 77 of file IrSequence.h.
|
static |
Definition at line 53 of file IrSequence.h.