Infrared4Arduino 1.2.3
|
This class packs an IrSequence into a dummy, immutable IrReader. More...
#include <IrSequenceReader.h>
Public Member Functions | |
IrSequenceReader () | |
IrSequenceReader (const IrSequenceReader &orig) | |
IrSequenceReader (IrSequenceReader &&orig) | |
IrSequenceReader (const IrSequence &irSequence_) | |
virtual | ~IrSequenceReader () |
virtual frequency_t | getFrequency () const |
Returns frequency of received signal. More... | |
void | receive () |
Convenience function: enable, wait until data is collected or timeout has occured, disable. More... | |
bool | isReady () const |
Returns true if there is collected data. More... | |
size_t | getDataLength () const |
Returns the number of collected durations. More... | |
microseconds_t | getDuration (unsigned int index) const |
Returns the index-th duration, if possible. More... | |
Public Member Functions inherited from IrReader | |
virtual void | reset () |
virtual frequency_t | getFrequency () const =0 |
Returns frequency of received signal. More... | |
virtual void | enable () |
Start reception of IR data. More... | |
virtual void | disable () |
Stop reception of IR data. More... | |
virtual void | receive ()=0 |
Convenience function: enable, wait until data is collected or timeout has occured, disable. More... | |
virtual bool | isReady () const =0 |
Returns true if there is collected data. More... | |
operator bool () const | |
Same as isReady() More... | |
virtual size_t | getDataLength () const =0 |
Returns the number of collected durations. More... | |
virtual microseconds_t | getDuration (unsigned int index) const =0 |
Returns the index-th duration, if possible. More... | |
virtual void | dump (Stream &stream) const |
Prints a textual representation of the received data to the Stream supplied. More... | |
IrSequence * | toIrSequence () const |
Generates an IrSequence from the IrReader. More... | |
virtual bool | isEmpty () const |
virtual void | setEndingTimeout (milliseconds_t timeOut) |
virtual milliseconds_t | getEndingTimeout () const |
virtual void | setBeginningTimeout (milliseconds_t timeOut) |
virtual milliseconds_t | getBeginningTimeout () const |
unsigned int | getBufferSize () const |
void | setMarkExcess (int16_t markExcess_) |
Sets the markExcess, a number (possibly negative) to be subtracted from the on-durations and added to the off.durations. More... | |
int16_t | getMarkExcess () const |
Gets the markExcess, a number (possibly negative) to be subtracted from the on-durations and added to the off.durations. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from IrReader | |
static constexpr milliseconds_t | defaultBeginningTimeout = 2000U |
static constexpr milliseconds_t | defaultEndingTimeout = 30U |
static constexpr size_t | defaultCaptureLength = 100U |
Protected Member Functions inherited from IrReader | |
IrReader (size_t bufSize_) | |
Constructs an IrReader with buffersize bufSize_, possibly increased to be even. More... | |
IrReader () | |
virtual | ~IrReader () |
Static Protected Member Functions inherited from IrReader | |
static unsigned int | forceEven (unsigned int x) |
Protected Attributes inherited from IrReader | |
milliseconds_t | beginningTimeout |
milliseconds_t | endingTimeout |
size_t | bufferSize |
int16_t | markExcess |
Microseconds subtracted from pulses and added to gaps. More... | |
bool | timeouted |
True if last receive ended with a timeout. More... | |
This class packs an IrSequence into a dummy, immutable IrReader.
It is basically intended for debugging and such.
Definition at line 10 of file IrSequenceReader.h.
|
inline |
Definition at line 15 of file IrSequenceReader.h.
|
inline |
Definition at line 18 of file IrSequenceReader.h.
|
inline |
Definition at line 21 of file IrSequenceReader.h.
|
inline |
Definition at line 24 of file IrSequenceReader.h.
|
inlinevirtual |
Definition at line 27 of file IrSequenceReader.h.
|
inlinevirtual |
Returns the number of collected durations.
Implements IrReader.
Definition at line 41 of file IrSequenceReader.h.
|
inlinevirtual |
Returns the index-th duration, if possible.
index | index of duration |
Implements IrReader.
Definition at line 45 of file IrSequenceReader.h.
|
inlinevirtual |
Returns frequency of received signal.
This is a dumb default implementation, to be overridden when meaningful.
Implements IrReader.
Definition at line 30 of file IrSequenceReader.h.
|
inlinevirtual |
Returns true if there is collected data.
Implements IrReader.
Definition at line 37 of file IrSequenceReader.h.
|
inlinevirtual |
Convenience function: enable, wait until data is collected or timeout has occured, disable.
Implements IrReader.
Definition at line 34 of file IrSequenceReader.h.