Infrared4Arduino
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
IrDecoder Class Referenceabstract

Abstract base class for all decoder classes. More...

#include <IrDecoder.h>

Inheritance diagram for IrDecoder:
Inheritance graph
[legend]

Public Member Functions

 IrDecoder ()
 
virtual ~IrDecoder ()
 
virtual const char * getDecode () const =0
 Returns a textual description the decode for human consumption. More...
 
virtual boolean isValid () const
 Returns true if the decode was successful. More...
 
boolean printDecode (Stream &stream) const
 If valid, prints the decode to the stream. More...
 

Protected Member Functions

void setValid (bool valid_)
 

Static Protected Member Functions

static boolean isEnding (microseconds_t duration)
 Tests if the argument is large enough to be considered an ending of a decodable signal. More...
 

Static Protected Attributes

static const int invalid = -1
 

Detailed Description

Abstract base class for all decoder classes.

Definition at line 9 of file IrDecoder.h.

Constructor & Destructor Documentation

IrDecoder::IrDecoder ( )
inline

Definition at line 11 of file IrDecoder.h.

virtual IrDecoder::~IrDecoder ( )
inlinevirtual

Definition at line 15 of file IrDecoder.h.

Member Function Documentation

virtual const char* IrDecoder::getDecode ( ) const
pure virtual

Returns a textual description the decode for human consumption.

Returns
decode as text.

Implemented in Nec1Decoder, Rc5Decoder, and MultiDecoder.

static boolean IrDecoder::isEnding ( microseconds_t  duration)
inlinestaticprotected

Tests if the argument is large enough to be considered an ending of a decodable signal.

Parameters
durationtime to be tested
Returns
true if the duration is long enough

Definition at line 57 of file IrDecoder.h.

virtual boolean IrDecoder::isValid ( ) const
inlinevirtual

Returns true if the decode was successful.

Returns
validity

Definition at line 27 of file IrDecoder.h.

boolean IrDecoder::printDecode ( Stream &  stream) const
inline

If valid, prints the decode to the stream.

Parameters
streamwhere the output is generated
Returns
success status

Definition at line 36 of file IrDecoder.h.

void IrDecoder::setValid ( bool  valid_)
inlineprotected

Definition at line 48 of file IrDecoder.h.

Member Data Documentation

const int IrDecoder::invalid = -1
staticprotected

Definition at line 47 of file IrDecoder.h.


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