Infrared4Arduino
Public Member Functions | List of all members
IrSequenceReader Class Reference

This class packs an IrSequence into a dummy, immutable IrReader. More...

#include <IrSequenceReader.h>

Inheritance diagram for IrSequenceReader:
Inheritance graph
[legend]
Collaboration diagram for IrSequenceReader:
Collaboration graph
[legend]

Public Member Functions

 IrSequenceReader ()
 
 IrSequenceReader (const IrSequenceReader &orig)
 
 IrSequenceReader (const IrSequence &irSequence_)
 
virtual ~IrSequenceReader ()
 
void receive ()
 Convenience function: enable, wait until data is collected or timeout has occured, disable. More...
 
boolean 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 void enable ()
 Start reception of IR data. More...
 
virtual void disable ()
 Stop reception of IR data. More...
 
virtual void dump (Stream &stream) const
 Prints a textual representation of the received data to the Stream supplied. More...
 
IrSequencetoIrSequence () const
 Generates an IrSequence from the IrReader. More...
 
virtual boolean 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 const milliseconds_t defaultBeginningTimeout = 2000U
 
static const milliseconds_t defaultEndingTimeout = 30U
 
static const 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...
 
boolean timeouted
 True if last receive ended with a timeout. More...
 

Detailed Description

This class packs an IrSequence into a dummy, immutable IrReader.

It is basically intended for debugging and such.

Definition at line 11 of file IrSequenceReader.h.

Constructor & Destructor Documentation

IrSequenceReader::IrSequenceReader ( )
inline

Definition at line 16 of file IrSequenceReader.h.

IrSequenceReader::IrSequenceReader ( const IrSequenceReader orig)
inline

Definition at line 19 of file IrSequenceReader.h.

IrSequenceReader::IrSequenceReader ( const IrSequence irSequence_)
inline

Definition at line 22 of file IrSequenceReader.h.

virtual IrSequenceReader::~IrSequenceReader ( )
inlinevirtual

Definition at line 25 of file IrSequenceReader.h.

Member Function Documentation

size_t IrSequenceReader::getDataLength ( ) const
inlinevirtual

Returns the number of collected durations.

Returns
number durations

Implements IrReader.

Definition at line 35 of file IrSequenceReader.h.

microseconds_t IrSequenceReader::getDuration ( unsigned int  index) const
inlinevirtual

Returns the index-th duration, if possible.

Parameters
indexindex of duration
Returns
requested duration

Implements IrReader.

Definition at line 39 of file IrSequenceReader.h.

boolean IrSequenceReader::isReady ( ) const
inlinevirtual

Returns true if there is collected data.

Returns
status

Implements IrReader.

Definition at line 31 of file IrSequenceReader.h.

void IrSequenceReader::receive ( )
inlinevirtual

Convenience function: enable, wait until data is collected or timeout has occured, disable.

Implements IrReader.

Definition at line 28 of file IrSequenceReader.h.


The documentation for this class was generated from the following file: