Infrared4Arduino 1.2.3
Loading...
Searching...
No Matches
IrSenderSimulator.h
Go to the documentation of this file.
1#pragma once
2
3#include "IrSender.h"
4
9class IrSenderSimulator : public IrSender {
10private:
11 Stream& stream;
12
13public:
14 IrSenderSimulator(Stream& stream_) : IrSender(Board::NO_PIN), stream(stream_) {};
15 IrSenderSimulator(const IrSenderSimulator& orig) : IrSender(Board::NO_PIN),stream(orig.stream) {};
16 virtual ~IrSenderSimulator() {};
17 void send(const IrSequence& irSequence, frequency_t frequency = IrSignal::defaultFrequency, dutycycle_t dutyCycle = Board::defaultDutyCycle);
18 void enable(frequency_t, dutycycle_t d __attribute__((unused)) = Board::defaultDutyCycle ) {};
21};
int8_t dutycycle_t
Type for duty cycle in percent.
Definition: InfraredTypes.h:36
uint16_t microseconds_t
Type for durations in micro seconds.
Definition: InfraredTypes.h:15
uint32_t frequency_t
Type for modulation frequency in Hz.
Definition: InfraredTypes.h:31
This class serves as an HAL (Hardware Abstraction Layer).
Definition: Board.h:33
static constexpr dutycycle_t defaultDutyCycle
Default duty cycle to use.
Definition: Board.h:69
Simulates sending in the sense that it prints the IrSequences on the Stream given as argument.
void enable(frequency_t, dutycycle_t d __attribute__((unused))=Board::defaultDutyCycle)
virtual ~IrSenderSimulator()
void sendMark(microseconds_t)
IrSenderSimulator(Stream &stream_)
void send(const IrSequence &irSequence, frequency_t frequency=IrSignal::defaultFrequency, dutycycle_t dutyCycle=Board::defaultDutyCycle)
Sends an IrSequence with the prescribed frequency.
IrSenderSimulator(const IrSenderSimulator &orig)
void sendSpace(microseconds_t)
Abstract base class for all sending classes.
Definition: IrSender.h:27
This class consists of a vector of durations.
Definition: IrSequence.h:11
static constexpr frequency_t defaultFrequency
Definition: IrSignal.h:13