Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Static Protected Member Functions | List of all members
IrSender Class Referenceabstract

Abstract base class for all sending classes. More...

#include <IrSender.h>

Inheritance diagram for IrSender:
Inheritance graph
[legend]

Public Member Functions

pin_t getPin () const
 
virtual ~IrSender ()
 
virtual void send (const IrSequence &irSequence, frequency_t frequency=IrSignal::defaultFrequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)
 Sends an IrSequence with the prescribed frequency. More...
 
void sendIrSignal (const IrSignal &irSignal, unsigned int noSends=1)
 Sends the IrSignal given as argument the prescribed number of times. More...
 
void sendWhile (const IrSignal &irSignal, bool(*trigger)())
 Send an IrSignal, when and as long as trigger() returns true. More...
 
void mute ()
 Force output pin inactive. More...
 

Protected Member Functions

void writeHigh ()
 
void writeLow ()
 
 IrSender (pin_t pin)
 
virtual void enable (frequency_t frequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)=0
 
virtual void sendSpace (microseconds_t time)
 
virtual void sendMark (microseconds_t time)=0
 

Static Protected Member Functions

static void barfForInvalidPin (pin_t sendPin __attribute__((unused)))
 

Detailed Description

Abstract base class for all sending classes.

Definition at line 27 of file IrSender.h.

Constructor & Destructor Documentation

◆ IrSender()

IrSender::IrSender ( pin_t  pin)
protected

Definition at line 21 of file IrSender.cpp.

◆ ~IrSender()

IrSender::~IrSender ( )
virtual

Definition at line 26 of file IrSender.cpp.

Member Function Documentation

◆ barfForInvalidPin()

static void IrSender::barfForInvalidPin ( pin_t sendPin   __attribute__(unused))
inlinestaticprotected

Definition at line 44 of file IrSender.h.

◆ enable()

virtual void IrSender::enable ( frequency_t  frequency,
dutycycle_t  dutyCycle = Board::defaultDutyCycle 
)
protectedpure virtual

Implemented in IrSenderPwmSoft.

◆ getPin()

pin_t IrSender::getPin ( ) const
inline

Definition at line 32 of file IrSender.h.

◆ mute()

void IrSender::mute ( )
inline

Force output pin inactive.

Definition at line 87 of file IrSender.h.

◆ send()

void IrSender::send ( const IrSequence irSequence,
frequency_t  frequency = IrSignal::defaultFrequency,
dutycycle_t  dutyCycle = Board::defaultDutyCycle 
)
virtual

Sends an IrSequence with the prescribed frequency.

Parameters
irSequence
frequencyfrequency in Hz
dutyCycle

Reimplemented in IrSenderSimulator.

Definition at line 57 of file IrSender.cpp.

◆ sendIrSignal()

void IrSender::sendIrSignal ( const IrSignal irSignal,
unsigned int  noSends = 1 
)

Sends the IrSignal given as argument the prescribed number of times.

This will send the intro sequence signal of the IrSignal, noSend of the repeat, alternatively noSends - 1 repeats if intro is non-empty, and finally the ending sequence.

Parameters
irSignal
noSends

Definition at line 30 of file IrSender.cpp.

◆ sendMark()

virtual void IrSender::sendMark ( microseconds_t  time)
protectedpure virtual

Implemented in IrSenderPwmSoft, and IrSenderSimulator.

◆ sendSpace()

virtual void IrSender::sendSpace ( microseconds_t  time)
inlineprotectedvirtual

Reimplemented in IrSenderSimulator.

Definition at line 47 of file IrSender.h.

◆ sendWhile()

void IrSender::sendWhile ( const IrSignal irSignal,
bool(*)()  trigger 
)

Send an IrSignal, when and as long as trigger() returns true.

Parameters
irSignal
triggerFunction returning bool.

Definition at line 37 of file IrSender.cpp.

◆ writeHigh()

void IrSender::writeHigh ( )
inlineprotected

Definition at line 38 of file IrSender.h.

◆ writeLow()

void IrSender::writeLow ( )
inlineprotected

Definition at line 39 of file IrSender.h.


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