154 operator bool()
const {
return intro || repeat || ending; }
161 void dump(Stream& stream,
bool usingSigns =
false)
const;
210 return noSends == 0 ? 0
211 : intro ? noSends -1 : noSends;
This file defines some general data types that are used in the library.
int8_t dutycycle_t
Type for duty cycle in percent.
uint16_t microseconds_t
Type for durations in micro seconds.
uint32_t frequency_t
Type for modulation frequency in Hz.
This class consists of a vector of durations.
This class models an IR signal with intro-, repeat-, and ending sequences.
void dump(Stream &stream, bool usingSigns=false) const
Print a human readable representation of the IrSignal on the Stream supplied.
static constexpr frequency_t invalidFrequency
IrSignal & operator=(const IrSignal &rhs)=default
bool dumpDutyCycle(Stream &stream) const
If the duty cycle is sensible, print it to the stream and return true.
bool dumpFrequency(Stream &stream) const
If the frequency is sensible, print it to the stream and return true.
static constexpr const char * version
virtual ~IrSignal()=default
frequency_t getFrequency() const
const IrSequence & getIntro() const
const IrSequence & getRepeat() const
void dumpWithSigns(Stream &stream) const
Print a human readable representation of the IrSignal on the Stream supplied, using signs.
unsigned int noRepetitions(unsigned int noSends) const
Implementation of the count semantics, i.e., how many repetitions should be sent if the signal is sen...
IrSignal()
Constructs an empty IrSignal.
IrSignal & operator=(IrSignal &&rhs)=default
IrSignal(const IrSignal &orig)=default
static constexpr frequency_t defaultFrequency
static constexpr dutycycle_t defaultDutyCycle
const IrSequence & getEnding() const
static IrSignal * readFlash(const microseconds_t *intro, size_t lengthIntro, const microseconds_t *repeat, size_t lengthRepeat, const microseconds_t *ending, size_t lengthEnding, frequency_t frequency=defaultFrequency, dutycycle_t dutyCycle=defaultDutyCycle)
static IrSignal * readFlash(const microseconds_t *intro, size_t lengthIntro, const microseconds_t *repeat, size_t lengthRepeat, frequency_t frequency=defaultFrequency, dutycycle_t dutyCycle=defaultDutyCycle)
static constexpr dutycycle_t noDutyCycle
dutycycle_t getDutyCycle() const
IrSignal(IrSignal &&orig)=default
#define VERSION
Version of the current library.