Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
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 bool isValid () const
 Returns true if the decode was successful. More...
 
 operator bool () const
 Same as isValid(). More...
 
bool 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 bool 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 constexpr int invalid = -1
 

Detailed Description

Abstract base class for all decoder classes.

Definition at line 8 of file IrDecoder.h.

Constructor & Destructor Documentation

◆ IrDecoder()

IrDecoder::IrDecoder ( )
inline

Definition at line 10 of file IrDecoder.h.

◆ ~IrDecoder()

virtual IrDecoder::~IrDecoder ( )
inlinevirtual

Definition at line 19 of file IrDecoder.h.

Member Function Documentation

◆ getDecode()

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

Returns a textual description the decode for human consumption.

Returns
decode as text.

Implemented in HashDecoder, MultiDecoder, Nec1Decoder, and Rc5Decoder.

◆ isEnding()

static bool 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 69 of file IrDecoder.h.

◆ isValid()

virtual bool IrDecoder::isValid ( ) const
inlinevirtual

Returns true if the decode was successful.

Returns
validity

Definition at line 31 of file IrDecoder.h.

◆ operator bool()

IrDecoder::operator bool ( ) const
inline

Same as isValid().

Returns

Definition at line 39 of file IrDecoder.h.

◆ printDecode()

bool 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 48 of file IrDecoder.h.

◆ setValid()

void IrDecoder::setValid ( bool  valid_)
inlineprotected

Definition at line 60 of file IrDecoder.h.

Member Data Documentation

◆ invalid

constexpr int IrDecoder::invalid = -1
staticconstexprprotected

Definition at line 59 of file IrDecoder.h.


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