RadioFrequencyCall - Builder pattern for transmitting radio frequency signals.
More...
#include <radio_frequency.h>
RadioFrequencyCall - Builder pattern for transmitting radio frequency signals.
Definition at line 32 of file radio_frequency.h.
◆ RadioFrequencyCall()
| esphome::radio_frequency::RadioFrequencyCall::RadioFrequencyCall |
( |
RadioFrequency * | parent | ) |
|
|
inlineexplicit |
◆ get_base64url_data()
| const std::string & esphome::radio_frequency::RadioFrequencyCall::get_base64url_data |
( |
| ) |
const |
|
inline |
◆ get_frequency()
| const optional< uint32_t > & esphome::radio_frequency::RadioFrequencyCall::get_frequency |
( |
| ) |
const |
|
inline |
◆ get_modulation()
◆ get_packed_count()
| uint16_t esphome::radio_frequency::RadioFrequencyCall::get_packed_count |
( |
| ) |
const |
|
inline |
◆ get_packed_data()
| const uint8_t * esphome::radio_frequency::RadioFrequencyCall::get_packed_data |
( |
| ) |
const |
|
inline |
Get packed data (only valid if set via set_raw_timings_packed)
Definition at line 87 of file radio_frequency.h.
◆ get_packed_length()
| uint16_t esphome::radio_frequency::RadioFrequencyCall::get_packed_length |
( |
| ) |
const |
|
inline |
◆ get_raw_timings()
| const std::vector< int32_t > & esphome::radio_frequency::RadioFrequencyCall::get_raw_timings |
( |
| ) |
const |
|
inline |
Get the raw timings (only valid if set via set_raw_timings)
Definition at line 75 of file radio_frequency.h.
◆ get_repeat_count()
| uint32_t esphome::radio_frequency::RadioFrequencyCall::get_repeat_count |
( |
| ) |
const |
|
inline |
◆ has_raw_timings()
| bool esphome::radio_frequency::RadioFrequencyCall::has_raw_timings |
( |
| ) |
const |
|
inline |
Check if raw timings have been set (any format)
Definition at line 77 of file radio_frequency.h.
◆ is_base64url()
| bool esphome::radio_frequency::RadioFrequencyCall::is_base64url |
( |
| ) |
const |
|
inline |
◆ is_packed()
| bool esphome::radio_frequency::RadioFrequencyCall::is_packed |
( |
| ) |
const |
|
inline |
◆ perform()
| void esphome::radio_frequency::RadioFrequencyCall::perform |
( |
| ) |
|
◆ set_frequency()
Set the carrier frequency in Hz (e.g. 433920000 for 433.92 MHz)
Definition at line 17 of file radio_frequency.cpp.
◆ set_modulation()
◆ set_raw_timings()
| RadioFrequencyCall & esphome::radio_frequency::RadioFrequencyCall::set_raw_timings |
( |
const std::vector< int32_t > & | timings | ) |
|
Set the raw timings from a vector (positive = mark, negative = space)
- Note
- Lifetime: Stores a pointer to the vector. The vector must outlive perform().
-
Usage: Primarily for lambdas/automations where the vector is in scope.
Definition at line 27 of file radio_frequency.cpp.
◆ set_raw_timings_base64url()
| RadioFrequencyCall & esphome::radio_frequency::RadioFrequencyCall::set_raw_timings_base64url |
( |
const std::string & | base64url | ) |
|
Set the raw timings from base64url-encoded little-endian int32 data.
- Note
- Lifetime: Stores a pointer to the string. The string must outlive perform().
-
Usage: For web_server - base64url is fully URL-safe (uses '-' and '_').
-
Decoding happens at perform() time, directly into the transmit buffer.
Definition at line 34 of file radio_frequency.cpp.
◆ set_raw_timings_packed()
| RadioFrequencyCall & esphome::radio_frequency::RadioFrequencyCall::set_raw_timings_packed |
( |
const uint8_t * | data, |
|
|
uint16_t | length, |
|
|
uint16_t | count ) |
Set the raw timings from packed protobuf sint32 data (zigzag + varint encoded)
- Note
- Lifetime: Stores a pointer to the buffer. The buffer must outlive perform().
-
Usage: For API component where data comes directly from the protobuf message.
Definition at line 41 of file radio_frequency.cpp.
◆ set_repeat_count()
Set the number of times to repeat transmission (1 = transmit once, 2 = transmit twice, etc.)
Definition at line 50 of file radio_frequency.cpp.
◆ base64url_ptr_
| const std::string* esphome::radio_frequency::RadioFrequencyCall::base64url_ptr_ {nullptr} |
|
protected |
◆ frequency_hz_
| optional<uint32_t> esphome::radio_frequency::RadioFrequencyCall::frequency_hz_ {} |
|
protected |
◆ modulation_
◆ packed_count_
| uint16_t esphome::radio_frequency::RadioFrequencyCall::packed_count_ {0} |
|
protected |
◆ packed_data_
| const uint8_t* esphome::radio_frequency::RadioFrequencyCall::packed_data_ {nullptr} |
|
protected |
◆ packed_length_
| uint16_t esphome::radio_frequency::RadioFrequencyCall::packed_length_ {0} |
|
protected |
◆ parent_
◆ raw_timings_
| const std::vector<int32_t>* esphome::radio_frequency::RadioFrequencyCall::raw_timings_ {nullptr} |
|
protected |
◆ repeat_count_
| uint32_t esphome::radio_frequency::RadioFrequencyCall::repeat_count_ {1} |
|
protected |
The documentation for this class was generated from the following files: