Infrared4Arduino
Public Member Functions | Static Public Member Functions | List of all members
Nec1Decoder Class Reference

A decoder class for NEC1 signals. More...

#include <Nec1Decoder.h>

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

Public Member Functions

 Nec1Decoder ()
 
 Nec1Decoder (const IrReader &irReader)
 Constructs a Nec1Decoder from an IrReader, containing data. More...
 
virtual ~Nec1Decoder ()
 
int getF () const
 Returns the F parameter, or -1 if invalid. More...
 
int getD () const
 Returns the D parameter, or -1 if invalid. More...
 
int getS () const
 Returns the S parameter, or -1 if invalid. More...
 
boolean isDitto () const
 Returns true if the signal received is a NEC1 ditto, i,e. More...
 
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...
 

Static Public Member Functions

static boolean tryDecode (const IrReader &irReader, Stream &stream)
 Convenience function; constructs an Nec1Decoder and calls its printDecode. 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 decoder class for NEC1 signals.

Definition at line 10 of file Nec1Decoder.h.

Constructor & Destructor Documentation

Nec1Decoder::Nec1Decoder ( )
Nec1Decoder::Nec1Decoder ( const IrReader irReader)

Constructs a Nec1Decoder from an IrReader, containing data.

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

Definition at line 36 of file Nec1Decoder.cpp.

virtual Nec1Decoder::~Nec1Decoder ( )
inlinevirtual

Definition at line 39 of file Nec1Decoder.h.

Member Function Documentation

int Nec1Decoder::getD ( ) const
inline

Returns the D parameter, or -1 if invalid.

Returns
int

Definition at line 53 of file Nec1Decoder.h.

const char* Nec1Decoder::getDecode ( ) const
inlinevirtual

Returns a textual description the decode for human consumption.

Returns
decode as text.

Implements IrDecoder.

Definition at line 81 of file Nec1Decoder.h.

int Nec1Decoder::getF ( ) const
inline

Returns the F parameter, or -1 if invalid.

Returns
int

Definition at line 45 of file Nec1Decoder.h.

int Nec1Decoder::getS ( ) const
inline

Returns the S parameter, or -1 if invalid.

Returns
int

Definition at line 61 of file Nec1Decoder.h.

boolean Nec1Decoder::isDitto ( ) const
inline

Returns true if the signal received is a NEC1 ditto, i,e.

a repeat sequence.

Returns
true if repeat sequence

Definition at line 69 of file Nec1Decoder.h.

boolean Nec1Decoder::tryDecode ( const IrReader irReader,
Stream &  stream 
)
static

Convenience function; constructs an Nec1Decoder and calls its printDecode.

Parameters
irReaderIrReader to use
streamStream
Returns
success of operation

Definition at line 20 of file Nec1Decoder.cpp.


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