IRremote
IRrecv Class Reference

Main class for receiving IR signals. More...

#include <IRremoteInt.h>

Collaboration diagram for IRrecv:

Public Member Functions

 IRrecv ()
 Instantiate the IRrecv class. More...
 
 IRrecv (uint_fast8_t aReceivePin)
 
 IRrecv (uint_fast8_t aReceivePin, uint_fast8_t aFeedbackLEDPin)
 Instantiate the IRrecv class. More...
 
void setReceivePin (uint_fast8_t aReceivePinNumber)
 Sets / changes the receiver pin number. More...
 
void registerReceiveCompleteCallback (void(*aReceiveCompleteCallbackFunction)(void))
 Sets the function to call if a protocol message has arrived. More...
 
void begin (uint_fast8_t aReceivePin, bool aEnableLEDFeedback=false, uint_fast8_t aFeedbackLEDPin=USE_DEFAULT_FEEDBACK_LED_PIN)
 Initializes the receive and feedback pin. More...
 
void restartTimer ()
 
void start ()
 Start the receiving process. More...
 
void enableIRIn ()
 Alias for start(). More...
 
void start (uint32_t aMicrosecondsToAddToGapCounter)
 Configures the timer and the state machine for IR reception. More...
 
void restartTimer (uint32_t aMicrosecondsToAddToGapCounter)
 
void startWithTicksToAdd (uint16_t aTicksToAddToGapCounter)
 
void restartTimerWithTicksToAdd (uint16_t aTicksToAddToGapCounter)
 
void restartAfterSend ()
 Restarts receiver after send. More...
 
void addTicksToInternalTickCounter (uint16_t aTicksToAddToInternalTickCounter)
 
void addMicrosToInternalTickCounter (uint16_t aMicrosecondsToAddToInternalTickCounter)
 
bool available ()
 Returns true if IR receiver data is available. More...
 
IRDataread ()
 If IR receiver data is available, returns pointer to IrReceiver.decodedIRData, else NULL. More...
 
void stopTimer ()
 
void stop ()
 Disables the timer for IR reception. More...
 
void disableIRIn ()
 Alias for stop(). More...
 
void end ()
 Alias for stop(). More...
 
bool isIdle ()
 Returns status of reception. More...
 
bool decode ()
 The main decode function, attempts to decode the recently receive IR signal. More...
 
void resume ()
 Restart the ISR (Interrupt Service Routine) state machine, to enable receiving of the next IR frame. More...
 
void printIRResultMinimal (Print *aSerial)
 Function to print protocol number, address, command, raw data and repeat flag of IrReceiver.decodedIRData in one short line. More...
 
void printIRResultRawFormatted (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the timings in IrReceiver.decodedIRData.rawDataPtr->rawbuf[] array 8 values per line. More...
 
void printIRResultAsCVariables (Print *aSerial)
 Print results as C variables to be used for sendXXX() More...
 
uint32_t getTotalDurationOfRawData ()
 
bool printIRResultShort (Print *aSerial, bool aPrintRepeatGap=true, bool aCheckForRecordGapsMicros=true)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
void printDistanceWidthTimingInfo (Print *aSerial, DistanceWidthTimingInfoStruct *aDistanceWidthTimingInfo)
 
void printIRSendUsage (Print *aSerial)
 Function to print values and flags of IrReceiver.decodedIRData in one line. More...
 
const char * getProtocolString ()
 
void compensateAndPrintIRResultAsCArray (Print *aSerial, bool aOutputMicrosecondsInsteadOfTicks=true)
 Dump out the IrReceiver.decodedIRData.rawDataPtr->rawbuf[] to be used as C definition for sendRaw(). More...
 
void compensateAndPrintIRResultAsPronto (Print *aSerial, uint16_t frequency=38000U)
 Print the result (second argument) as Pronto Hex on the Print supplied as argument. More...
 
void compensateAndStoreIRResultInArray (uint8_t *aArrayPtr)
 Store the decodedIRData to be used for sendRaw(). More...
 
size_t compensateAndStorePronto (String *aString, uint16_t frequency=38000U)
 
bool decodePulseDistanceWidthData (PulseDistanceWidthProtocolConstants *aProtocolConstants, uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset=3)
 Decode pulse distance protocols for PulseDistanceWidthProtocolConstants. More...
 
bool decodePulseDistanceWidthData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, uint16_t aOneMarkMicros, uint16_t aZeroMarkMicros, uint16_t aOneSpaceMicros, uint16_t aZeroSpaceMicros, bool aMSBfirst)
 Decode pulse distance width protocols. More...
 
bool decodeBiPhaseData (uint_fast8_t aNumberOfBits, uint_fast8_t aStartOffset, uint_fast8_t aStartClockCount, uint_fast8_t aValueOfSpaceToMarkTransition, uint16_t aBiphaseTimeUnit)
 
void initBiphaselevel (uint_fast8_t aRCDecodeRawbuffOffset, uint16_t aBiphaseTimeUnit)
 
uint_fast8_t getBiphaselevel ()
 Gets the level of one time interval (aBiphaseTimeUnit) at a time from the raw buffer. More...
 
bool decodeBangOlufsen ()
 
bool decodeBoseWave ()
 
bool decodeDenon ()
 
bool decodeFAST ()
 
bool decodeJVC ()
 
bool decodeKaseikyo ()
 
bool decodeLegoPowerFunctions ()
 
bool decodeLG ()
 
bool decodeMagiQuest ()
 
bool decodeNEC ()
 Decodes also Onkyo and Apple. More...
 
bool decodeRC5 ()
 Try to decode data as RC5 protocol. More...
 
bool decodeRC6 ()
 Try to decode data as RC6 protocol. More...
 
bool decodeSamsung ()
 
bool decodeSharp ()
 
bool decodeSony ()
 
bool decodeWhynter ()
 
bool decodeDistanceWidth ()
 
bool decodeHash ()
 decodeHash - decode an arbitrary IR code. More...
 
bool decodeShuzu ()
 
bool decodeDenonOld (decode_results *aResults)
 
bool decodeJVCMSB (decode_results *aResults)
 
bool decodeLGMSB (decode_results *aResults)
 
bool decodeNECMSB (decode_results *aResults)
 
bool decodePanasonicMSB (decode_results *aResults)
 
bool decodeSonyMSB (decode_results *aResults)
 
bool decodeSAMSUNG (decode_results *aResults)
 
bool decodeHashOld (decode_results *aResults)
 
bool decode_old (decode_results *aResults)
 
bool decode (decode_results *aResults) __attribute__((deprecated("Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> .")))
 
void blink13 (uint8_t aEnableLEDFeedback) __attribute__((deprecated("Please use setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback().")))
 Old deprecated function name for setLEDFeedback() or enableLEDFeedback() / disableLEDFeedback() More...
 
void initDecodedIRData ()
 Is internally called by decode before calling decoders. More...
 
uint_fast8_t compare (uint16_t oldval, uint16_t newval)
 Compare two (tick) values for Hash decoder Use a tolerance of 20% to enable e.g. More...
 
bool checkHeader (PulseDistanceWidthProtocolConstants *aProtocolConstants)
 
void checkForRepeatSpaceTicksAndSetFlag (uint16_t aMaximumRepeatSpaceTicks)
 
bool checkForRecordGapsMicros (Print *aSerial)
 

Static Public Member Functions

static void printActiveIRProtocols (Print *aSerial)
 

Public Attributes

IRData decodedIRData
 
decode_type_t lastDecodedProtocol
 
uint32_t lastDecodedAddress
 
uint32_t lastDecodedCommand
 
uint8_t repeatCount
 

Detailed Description

Main class for receiving IR signals.

Definition at line 176 of file IRremoteInt.h.

Member Function Documentation

◆ decode()

bool IRrecv::decode ( decode_results aResults)

Definition at line 29 of file IRremote.h.

◆ decodeBangOlufsen()

bool IRrecv::decodeBangOlufsen ( )

Definition at line 290 of file ir_BangOlufsen.hpp.

◆ decodeBiPhaseData()

bool IRrecv::decodeBiPhaseData ( uint_fast8_t  aNumberOfBits,
uint_fast8_t  aStartOffset,
uint_fast8_t  aStartClockCount,
uint_fast8_t  aValueOfSpaceToMarkTransition,
uint16_t  aBiphaseTimeUnit 
)

◆ decodeMagiQuest()

bool IRrecv::decodeMagiQuest ( )

Definition at line 151 of file ir_MagiQuest.hpp.

◆ decodePanasonicMSB()

bool IRrecv::decodePanasonicMSB ( decode_results aResults)

◆ decodeShuzu()

bool IRrecv::decodeShuzu ( )

Definition at line 139 of file ir_Template.hpp.

Member Data Documentation

◆ decodedIRData

IRData IRrecv::decodedIRData

Definition at line 321 of file IRremoteInt.h.

◆ lastDecodedAddress

uint32_t IRrecv::lastDecodedAddress

Definition at line 325 of file IRremoteInt.h.

◆ lastDecodedCommand

uint32_t IRrecv::lastDecodedCommand

Definition at line 326 of file IRremoteInt.h.

◆ lastDecodedProtocol

decode_type_t IRrecv::lastDecodedProtocol

Definition at line 324 of file IRremoteInt.h.

◆ repeatCount

uint8_t IRrecv::repeatCount

Definition at line 328 of file IRremoteInt.h.


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