Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
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...
 
bool 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 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...
 

Static Public Member Functions

static bool 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 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 decoder class for NEC1 signals.

Definition at line 9 of file Nec1Decoder.h.

Constructor & Destructor Documentation

◆ Nec1Decoder() [1/2]

Nec1Decoder::Nec1Decoder ( )

◆ Nec1Decoder() [2/2]

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 34 of file Nec1Decoder.cpp.

◆ ~Nec1Decoder()

virtual Nec1Decoder::~Nec1Decoder ( )
inlinevirtual

Definition at line 39 of file Nec1Decoder.h.

Member Function Documentation

◆ getD()

int Nec1Decoder::getD ( ) const
inline

Returns the D parameter, or -1 if invalid.

Returns
int

Definition at line 53 of file Nec1Decoder.h.

◆ getDecode()

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.

◆ getF()

int Nec1Decoder::getF ( ) const
inline

Returns the F parameter, or -1 if invalid.

Returns
int

Definition at line 45 of file Nec1Decoder.h.

◆ getS()

int Nec1Decoder::getS ( ) const
inline

Returns the S parameter, or -1 if invalid.

Returns
int

Definition at line 61 of file Nec1Decoder.h.

◆ isDitto()

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

◆ tryDecode()

bool 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 18 of file Nec1Decoder.cpp.


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