89 void setup()
override;
InfraredCall - Builder pattern for transmitting infrared signals.
InfraredCall & set_raw_timings(const std::vector< int32_t > &timings)
Set the raw timings (positive = mark, negative = space) Note: The timings vector must outlive the Inf...
bool is_packed() const
Check if using packed data format.
uint32_t get_repeat_count() const
Get the repeat count.
InfraredCall & set_carrier_frequency(uint32_t frequency)
Set the carrier frequency in Hz.
InfraredCall & set_repeat_count(uint32_t count)
Set the number of times to repeat transmission (1 = transmit once, 2 = transmit twice,...
bool has_raw_timings() const
Check if raw timings have been set (either vector or packed)
void perform()
Perform the transmission.
InfraredCall & set_raw_timings_packed(const uint8_t *data, uint16_t length, uint16_t count)
Set the raw timings from packed protobuf sint32 data (zero-copy from wire) Note: The data must outliv...
const uint8_t * get_packed_data() const
Get packed data (only valid if set via set_raw_timings_packed)
const optional< uint32_t > & get_carrier_frequency() const
Get the carrier frequency.
const std::vector< int32_t > & get_raw_timings() const
Get the raw timings (only valid if set via set_raw_timings, not packed)
uint16_t get_packed_count() const
optional< uint32_t > carrier_frequency_
const uint8_t * packed_data_
uint16_t get_packed_length() const
const std::vector< int32_t > * raw_timings_
InfraredCall(Infrared *parent)
Infrared - Base class for infrared remote control implementations.
void dump_config() override
remote_base::RemoteReceiverBase * receiver_
bool on_receive(remote_base::RemoteReceiveData data) override
Called when IR data is received (from RemoteReceiverListener)
void set_transmitter(remote_base::RemoteTransmitterBase *transmitter)
Set the remote transmitter component.
InfraredCall make_call()
Create a call object for transmitting.
float get_setup_priority() const override
virtual void control(const InfraredCall &call)
Perform the actual transmission (called by InfraredCall)
remote_base::RemoteTransmitterBase * transmitter_
const InfraredTraits & get_traits() const
bool has_transmitter() const
Check if this infrared has a transmitter configured.
bool has_receiver() const
Check if this infrared has a receiver configured.
InfraredTraits & get_traits()
Get the traits for this infrared implementation.
uint32_t get_capability_flags() const
Get capability flags for this infrared instance.
void set_receiver(remote_base::RemoteReceiverBase *receiver)
Set the remote receiver component.
InfraredTraits - Describes the capabilities of an infrared implementation.
bool get_supports_transmitter() const
bool get_supports_receiver() const
void set_supports_transmitter(bool supports)
bool supports_transmitter_
void set_supports_receiver(bool supports)
InfraredCapability
Capability flags for individual infrared instances.
const float AFTER_CONNECTION
For components that should be initialized after a data connection (API/MQTT) is connected.