Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
MultiDecoder Class Reference

A preliminary multi protocol decoder. More...

#include <MultiDecoder.h>

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

Public Types

enum  Type {
  timeout , noise , undecoded , nec ,
  nec_ditto , rc5
}
 Enum over possible outcomes of the decoder. More...
 

Public Member Functions

Type getType () const
 
 MultiDecoder (const IrReader &irReader)
 Constructs a MultiDecoder from an IrReader, containing data. More...
 
virtual ~MultiDecoder ()
 
const char * getDecode () const
 Returns a textual description the decode for human consumption. More...
 
- Public Member Functions inherited from IrDecoder
 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...
 

Additional Inherited Members

- Protected Member Functions inherited from IrDecoder
void setValid (bool valid_)
 
- Static Protected Member Functions inherited from IrDecoder
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 inherited from IrDecoder
static constexpr int invalid = -1
 

Detailed Description

A preliminary multi protocol decoder.

Tries the Nec1- and the Rc5 decoders.

Definition at line 9 of file MultiDecoder.h.

Member Enumeration Documentation

◆ Type

Enum over possible outcomes of the decoder.

Enumerator
timeout 

beginTimeout reached

noise 

nothing sensible found

undecoded 

decoding failed

nec 

NEC1 intro.

nec_ditto 

NEC1 repeat.

rc5 

RC5 signal (= repeat sequence)

Definition at line 14 of file MultiDecoder.h.

Constructor & Destructor Documentation

◆ MultiDecoder()

MultiDecoder::MultiDecoder ( const IrReader irReader)

Constructs a MultiDecoder from an IrReader, containing data.

Parameters
irReaderIrReader with data, i.e. with isReady() true.

Definition at line 6 of file MultiDecoder.cpp.

◆ ~MultiDecoder()

virtual MultiDecoder::~MultiDecoder ( )
inlinevirtual

Definition at line 46 of file MultiDecoder.h.

Member Function Documentation

◆ getDecode()

const char * MultiDecoder::getDecode ( ) const
inlinevirtual

Returns a textual description the decode for human consumption.

Returns
decode as text.

Implements IrDecoder.

Definition at line 49 of file MultiDecoder.h.

◆ getType()

Type MultiDecoder::getType ( ) const
inline

Definition at line 28 of file MultiDecoder.h.


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