Infrared4Arduino
|
This class models an IR signal with intro-, repeat-, and ending sequences. More...
#include <IrSignal.h>
Public Member Functions | |
IrSignal () | |
IrSignal (const IrSignal &orig) | |
virtual | ~IrSignal () |
IrSignal (const microseconds_t *intro, size_t lengthIntro, const microseconds_t *repeat, size_t lengthRepeat, const microseconds_t *ending, size_t lengthEnding, frequency_t frequency=defaultFrequency, boolean toBeFreed=false) | |
IrSignal (const microseconds_t *intro, size_t lengthIntro, const microseconds_t *repeat, size_t lengthRepeat, frequency_t frequency=defaultFrequency, boolean toBeFreed=false) | |
IrSignal (const IrSequence &intro, const IrSequence &repeat, const IrSequence &ending, frequency_t frequency, boolean toBeFreed) | |
IrSignal (const IrSequence &intro, const IrSequence &repeat, const IrSequence &ending, frequency_t frequency=defaultFrequency) | |
IrSignal * | clone () const |
Creates a (deep) copy of the current object. More... | |
frequency_t | getFrequency () const |
const IrSequence & | getEnding () const |
const IrSequence & | getRepeat () const |
const IrSequence & | getIntro () const |
void | dump (Stream &stream, boolean usingSigns=false) const |
Print a human readable representation of the IrSignal on the Stream supplied. More... | |
void | dumpWithSigns (Stream &stream) const |
Print a human readable representation of the IrSignal on the Stream supplied, using signs. More... | |
boolean | dumpFrequency (Stream &stream) const |
If the frequency is sensible, print it to the stream and return true. More... | |
unsigned int | noRepetitions (unsigned int noSends) const |
Implementation of the count semantics, i.e., how many repetitions should be sent if the signal is sent noSend times. More... | |
Static Public Member Functions | |
static boolean | dumpFrequency (Stream &stream, frequency_t frequency) |
Static version of dumpFrequency. More... | |
Static Public Attributes | |
static const frequency_t | defaultFrequency = 38000U |
static const frequency_t | invalidFrequency = (frequency_t) -1 |
This class models an IR signal with intro-, repeat-, and ending sequences.
This class is immutable.
Definition at line 11 of file IrSignal.h.
IrSignal::IrSignal | ( | ) |
IrSignal::IrSignal | ( | const IrSignal & | orig | ) |
Definition at line 18 of file IrSignal.cpp.
|
virtual |
Definition at line 32 of file IrSignal.cpp.
IrSignal::IrSignal | ( | const microseconds_t * | intro, |
size_t | lengthIntro, | ||
const microseconds_t * | repeat, | ||
size_t | lengthRepeat, | ||
const microseconds_t * | ending, | ||
size_t | lengthEnding, | ||
frequency_t | frequency = defaultFrequency , |
||
boolean | toBeFreed = false |
||
) |
Definition at line 22 of file IrSignal.cpp.
IrSignal::IrSignal | ( | const microseconds_t * | intro, |
size_t | lengthIntro, | ||
const microseconds_t * | repeat, | ||
size_t | lengthRepeat, | ||
frequency_t | frequency = defaultFrequency , |
||
boolean | toBeFreed = false |
||
) |
IrSignal::IrSignal | ( | const IrSequence & | intro, |
const IrSequence & | repeat, | ||
const IrSequence & | ending, | ||
frequency_t | frequency, | ||
boolean | toBeFreed | ||
) |
Definition at line 4 of file IrSignal.cpp.
IrSignal::IrSignal | ( | const IrSequence & | intro, |
const IrSequence & | repeat, | ||
const IrSequence & | ending, | ||
frequency_t | frequency = defaultFrequency |
||
) |
Definition at line 9 of file IrSignal.cpp.
IrSignal * IrSignal::clone | ( | ) | const |
Creates a (deep) copy of the current object.
The user must delete it manually.
Definition at line 38 of file IrSignal.cpp.
void IrSignal::dump | ( | Stream & | stream, |
boolean | usingSigns = false |
||
) | const |
Print a human readable representation of the IrSignal on the Stream supplied.
stream | Stream onto the output is printed. |
usingSigns | is true, prepend marks with '+' and gaps with '-'. |
Definition at line 42 of file IrSignal.cpp.
|
inline |
If the frequency is sensible, print it to the stream and return true.
Otherwise do nothing and return false. No extra spaces or line feeds are generated.
Definition at line 88 of file IrSignal.h.
|
static |
Static version of dumpFrequency.
stream | Stream onto the output is printed. |
frequency | modulation frequency |
Definition at line 51 of file IrSignal.cpp.
|
inline |
Print a human readable representation of the IrSignal on the Stream supplied, using signs.
stream | Stream onto the output is printed. |
Definition at line 79 of file IrSignal.h.
|
inline |
Definition at line 56 of file IrSignal.h.
|
inline |
Definition at line 52 of file IrSignal.h.
|
inline |
Definition at line 64 of file IrSignal.h.
|
inline |
Definition at line 60 of file IrSignal.h.
|
inline |
Implementation of the count semantics, i.e., how many repetitions should be sent if the signal is sent noSend times.
noSends | number of times to "send signal". |
Definition at line 104 of file IrSignal.h.
|
static |
Definition at line 13 of file IrSignal.h.
|
static |
Definition at line 14 of file IrSignal.h.