Builder for a transmit; Call is the concrete call type and Entity its entity, so the fluent setters r...
Everything an infrared or radio frequency entity does that does not depend on the medium: the remote_...
RadioFrequencyCall - Builder pattern for transmitting radio frequency signals.
optional< uint32_t > frequency_hz_
RadioFrequencyCall & set_frequency(uint32_t frequency_hz)
Set the carrier frequency in Hz (e.g. 433920000 for 433.92 MHz)
RadioFrequencyCall(RadioFrequency *parent)
RadioFrequencyModulation modulation_
RadioFrequencyCall & set_modulation(RadioFrequencyModulation modulation)
Set the modulation type (defaults to OOK)
RadioFrequencyModulation get_modulation() const
Get the modulation type.
const optional< uint32_t > & get_frequency() const
Get the frequency in Hz.
RadioFrequency - Base class for radio frequency implementations.
RadioFrequencyCall make_call()
Create a call object for transmitting.
void on_call_(const RadioFrequencyCall &call)
Fires the on_control hooks before the platform-specific control() runs.
LazyCallbackManager< void(const RadioFrequencyCall &)> control_callback_
LazyCallbackManager< void(remote_base::RemoteReceiveData)> receive_callback_
bool on_receive(remote_base::RemoteReceiveData data) override
Called when RF data is received (from RemoteReceiverListener)
void add_on_receive_callback(F &&callback)
Add a callback to invoke when RF data is received.
const RadioFrequencyTraits & get_traits() const
void dump_config() override
void add_on_control_callback(F &&callback)
Add a callback to invoke when a transmit call is made on this entity.
RadioFrequencyTraits & get_traits()
Get the traits for this radio frequency implementation.
RadioFrequencyTraits traits_
virtual bool control(const RadioFrequencyCall &call)=0
Perform the actual transmission (called by RadioFrequencyCall::perform()) Platforms must override thi...
RadioFrequencyTraits - Describes the capabilities of a radio frequency implementation.
uint32_t get_frequency_min_hz() const
Hardware-supported tunable frequency range in Hz.
uint32_t frequency_min_hz_
uint32_t get_supported_modulations() const
Bitmask of supported RadioFrequencyModulation values (bit N = modulation value N supported).
uint32_t frequency_max_hz_
uint32_t get_frequency_max_hz() const
uint32_t supported_modulations_
void set_supported_modulations(uint32_t mask)
void set_frequency_min_hz(uint32_t freq)
void set_fixed_frequency_hz(uint32_t freq)
Convenience setter for fixed-frequency hardware (sets min == max).
void add_supported_modulation(RadioFrequencyModulation mod)
void set_frequency_max_hz(uint32_t freq)
RadioFrequencyModulation
Modulation types supported by radio frequency implementations.
@ RADIO_FREQUENCY_MODULATION_OOK