Infrared4Arduino  1.1.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
IrWidgetAggregating Class Reference

This class implements the IrWidget. More...

#include <IrWidgetAggregating.h>

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

Public Member Functions

void capture ()
 
- Public Member Functions inherited from IrWidget
void receive ()
 For compatibility with the receiver classes, receive is a synonym for capture. More...
 
size_t getDataLength () const
 Returns the number of collected durations. More...
 
bool isReady () const
 Returns true if there is collected data. More...
 
void reset ()
 
microseconds_t getDuration (unsigned int i) const
 Returns the index-th duration, if possible. More...
 
void setEndingTimeout (milliseconds_t timeout)
 Sets the ending timeout. More...
 
milliseconds_t getEndingTimeout () const
 
frequency_t getFrequency () const
 Returns frequency of received signal. More...
 
void dump (Stream &stream) const
 Prints a textual representation of the received data to the Stream supplied. More...
 
- Public Member Functions inherited from IrReader
virtual void enable ()
 Start reception of IR data. More...
 
virtual void disable ()
 Stop reception of IR data. More...
 
IrSequencetoIrSequence () const
 Generates an IrSequence from the IrReader. More...
 
virtual bool isEmpty () 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...
 

Static Public Member Functions

static void deleteInstance ()
 
static IrWidgetAggregatinggetInstance ()
 
static IrWidgetAggregatingnewIrWidgetAggregating (size_t captureLength=defaultCaptureLength, bool pullup=false, int16_t markExcess=defaultMarkExcess, milliseconds_t beginningTimeout=defaultBeginningTimeout, milliseconds_t endingTimeout=defaultEndingTimeout)
 

Protected Member Functions

 IrWidgetAggregating (size_t captureLength=defaultCaptureLength, bool pullup=false, int16_t markExcess=defaultMarkExcess, milliseconds_t beginningTimeout=defaultBeginningTimeout, milliseconds_t endingTimeout=defaultEndingTimeout)
 
- Protected Member Functions inherited from IrWidget
 IrWidget (size_t captureLength=defaultCaptureLength, bool pullup=false, int16_t markExcess=defaultMarkExcess, milliseconds_t beginningTimeout=defaultBeginningTimeout, milliseconds_t endingTimeout=defaultEndingTimeout)
 
virtual ~IrWidget ()
 
void debugPinToggle (void)
 
void debugPinClear (void)
 
- 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 ()
 

Additional Inherited Members

- Static Public Attributes inherited from IrWidget
static const int16_t defaultMarkExcess = 0
 
static const bool invertingSensor = true
 Set true means if sensor signal is inverted (low = signal on) (false has not been tested, and is not supported). More...
 
- 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 Types inherited from IrWidget
typedef uint8_t ovlBitsDataType
 
- Static Protected Member Functions inherited from IrWidget
static uint32_t timerValueToNanoSeconds (uint32_t x)
 
- Static Protected Member Functions inherited from IrReader
static unsigned int forceEven (unsigned int x)
 
- Protected Attributes inherited from IrWidget
frequency_t frequency
 
ovlBitsDataType endingTimeout
 
uint16_t * captureData
 
uint16_t captureCount
 
- 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...
 
- Static Protected Attributes inherited from IrWidget
static const uint8_t RANGE_EXTENSION_BITS = 4
 
static const uint8_t sampleSize = 2
 

Detailed Description

This class implements the IrWidget.

It delivers the duration and an estimate of the modulation frequency based upon the collected samples. Since it uses a single timer, it is singleton class, only instantiable by the factory method newIrWidgetAggregating.

Definition at line 15 of file IrWidgetAggregating.h.

Constructor & Destructor Documentation

◆ IrWidgetAggregating()

IrWidgetAggregating::IrWidgetAggregating ( size_t  captureLength = defaultCaptureLength,
bool  pullup = false,
int16_t  markExcess = defaultMarkExcess,
milliseconds_t  beginningTimeout = defaultBeginningTimeout,
milliseconds_t  endingTimeout = defaultEndingTimeout 
)
protected

Member Function Documentation

◆ capture()

void IrWidgetAggregating::capture ( )
virtual

Implements IrWidget.

◆ deleteInstance()

static void IrWidgetAggregating::deleteInstance ( )
static

◆ getInstance()

static IrWidgetAggregating* IrWidgetAggregating::getInstance ( )
inlinestatic

Definition at line 25 of file IrWidgetAggregating.h.

◆ newIrWidgetAggregating()

static IrWidgetAggregating* IrWidgetAggregating::newIrWidgetAggregating ( size_t  captureLength = defaultCaptureLength,
bool  pullup = false,
int16_t  markExcess = defaultMarkExcess,
milliseconds_t  beginningTimeout = defaultBeginningTimeout,
milliseconds_t  endingTimeout = defaultEndingTimeout 
)
static

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