Infrared4Arduino 1.2.3
|
A decoder class using FNV-1 hashes of length 32. More...
#include <HashDecoder.h>
Public Member Functions | |
virtual | ~HashDecoder () |
HashDecoder (const IrReader &irReader) | |
Constructs a HashDecoder from an IrReader, containing data. More... | |
HashDecoder (const IrSequence &irSequence) | |
Constructs a HashDecoder from an IrSequence. More... | |
HashDecoder (const IrSignal &irSignal) | |
uint32_t | getHash () const |
Returns the hash value. 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 uint32_t | decodeHash (const IrSequence &irSequence) |
static uint32_t | decodeHash (const IrReader &irReader) |
static bool | tryDecode (const IrReader &irReader, Stream &stream) |
Convenience function; constructs a HashDecoder 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 |
A decoder class using FNV-1 hashes of length 32.
This is not a decoder in the proper sense of the word, but instead computes a hash value from the IrSequence. For different IrSequences, this will, with high probability, be different.
Definition at line 19 of file HashDecoder.h.
|
inlinevirtual |
Definition at line 57 of file HashDecoder.h.
|
inline |
Constructs a HashDecoder from an IrReader, containing data.
irReader | IrReader with data, i.e. with isReady() true. |
Definition at line 63 of file HashDecoder.h.
|
inline |
Constructs a HashDecoder from an IrSequence.
irSequence |
Definition at line 72 of file HashDecoder.h.
|
inline |
Definition at line 77 of file HashDecoder.h.
|
static |
Definition at line 45 of file HashDecoder.cpp.
|
static |
Definition at line 40 of file HashDecoder.cpp.
|
inlinevirtual |
Returns a textual description the decode for human consumption.
Implements IrDecoder.
Definition at line 102 of file HashDecoder.h.
|
inline |
|
static |
Convenience function; constructs a HashDecoder and calls its printDecode.
irReader | IrReader to use |
stream | Stream |
Definition at line 10 of file HashDecoder.cpp.