Infrared4Arduino
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 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...
 

Additional Inherited Members

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

Detailed Description

A preliminary multi protocol decoder.

Tries the Nec1- and the Rc5 decoders.

Definition at line 10 of file MultiDecoder.h.

Member Enumeration Documentation

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 15 of file MultiDecoder.h.

Constructor & Destructor Documentation

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.

virtual MultiDecoder::~MultiDecoder ( )
inlinevirtual

Definition at line 39 of file MultiDecoder.h.

Member Function Documentation

const char* MultiDecoder::getDecode ( ) const
inlinevirtual

Returns a textual description the decode for human consumption.

Returns
decode as text.

Implements IrDecoder.

Definition at line 42 of file MultiDecoder.h.

Type MultiDecoder::getType ( ) const
inline

Definition at line 29 of file MultiDecoder.h.


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