25 {
"sx1262_response_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.sx1262_response_preamble); },
27 {
"sx1262_post_tx_settle_us", [](
const TuningConfig &t) {
return static_cast<float>(t.sx1262_post_tx_settle_us); },
29 {
"sx1276_response_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.sx1276_response_preamble); },
31 {
"sx1276_discovery_hop_slice_ms",
32 [](
const TuningConfig &t) {
return static_cast<float>(t.sx1276_discovery_hop_slice_ms); },
34 {
"sx1262_discovery_hop_slice_ms",
35 [](
const TuningConfig &t) {
return static_cast<float>(t.sx1262_discovery_hop_slice_ms); },
37 {
"lr1121_response_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.lr1121_response_preamble); },
39 {
"lr1121_post_tx_settle_us", [](
const TuningConfig &t) {
return static_cast<float>(t.lr1121_post_tx_settle_us); },
41 {
"lr1121_discovery_hop_slice_ms",
42 [](
const TuningConfig &t) {
return static_cast<float>(t.lr1121_discovery_hop_slice_ms); },
48 {
"cold_broadcast_reply_preamble",
49 [](
const TuningConfig &t) {
return static_cast<float>(t.cold_broadcast_reply_preamble); },
54 {
"normal_start_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.normal_start_preamble); },
56 {
"low_power_wake_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.low_power_wake_preamble); },
58 {
"lbt_max_retries", [](
const TuningConfig &t) {
return static_cast<float>(t.lbt_max_retries); },
60 {
"lbt_rssi_threshold_dbm", [](
const TuningConfig &t) {
return static_cast<float>(t.lbt_rssi_threshold_dbm); },
62 {
"exchange_start_response_wait_ms",
63 [](
const TuningConfig &t) {
return static_cast<float>(t.exchange_start_response_wait_ms); },
65 {
"exchange_response_wait_ms", [](
const TuningConfig &t) {
return static_cast<float>(t.exchange_response_wait_ms); },
67 {
"exchange_total_budget_ms", [](
const TuningConfig &t) {
return static_cast<float>(t.exchange_total_budget_ms); },
71 {
"pairing_discovery_preamble",
72 [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_discovery_preamble); },
74 {
"pairing_discovery_wait_ms", [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_discovery_wait_ms); },
76 {
"pairing_discovery_initial_dwell_ms",
77 [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_discovery_initial_dwell_ms); },
79 {
"pairing_key_exchange_retries",
80 [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_key_exchange_retries); },
84 {
"pairing_key_init_delay_ms", [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_key_init_delay_ms); },
93 return t.*Field ?
"On" :
"Off";
96 if (v !=
"On" && v !=
"Off")
98 t.*Field = (v ==
"On");
137 {
"pairing_discovery_commands",
142 std::size_t start = 0;
143 while (start < v.size()) {
144 const std::size_t comma = v.find(
',', start);
145 std::string token = v.substr(start, comma - start);
147 token.erase(0, token.find_first_not_of(
" \t"));
148 token.erase(token.find_last_not_of(
" \t") + 1);
152 if (comma == std::string::npos)
159 {
"pairing_discovery_destination",
162 t.pairing_discovery_destination.data());
169 if (v ==
"0x00003B") {
174 if (v ==
"0x00003F") {
182 if (v ==
"0x0001BF" || v ==
"0x0001BB") {
183 uint8_t typed[NODE_ID_SIZE] = {0};
186 typed[2] =
static_cast<uint8_t
>((typed[2] & ~DEVICE_SUBTYPE_MASK) | ADDRESS_SUFFIX_DISCOVERY);
194 {
"pairing_discovery_payload",
218 if (!selection.has_value())
224 {
"pairing_discover_confirm",
228 if (!mode.has_value())
234 {
"pairing_discovery_listen_channels",
238 if (!channels.has_value())
249 if (!mode.has_value())
259 if (name == param.name)
267 if (name == param.name)
std::string discovery_commands_to_csv(const std::vector< DiscoveryCommand > &commands)
Format the ordered discovery command list as a UI/preset option string.
std::optional< LR1121RxBandwidth > lr1121_bandwidth_from_string(const std::string &value)
Convert a YAML LR1121 bandwidth string to the enum value.
const TuningNumberParam * tuning_number_params_end()
void encode_broadcast_address(DeviceType type, uint8_t out[NODE_ID_SIZE])
Encode a device type into its typed-broadcast destination address — the exact inverse of broadcast_ta...
std::string bool_select_get(const TuningConfig &t)
const TuningSelectParam * tuning_select_params_end()
std::string discovery_payload_to_string(bool payload_enabled, uint8_t payload)
Format a payload option for YAML/logs.
std::optional< DiscoveryCommand > discovery_command_from_string(const std::string &value)
Parse a discovery command string (e.g., "0x28") into the enum.
std::optional< DiscoverConfirmMode > discover_confirm_mode_from_string(const std::string &value)
Parse a pairing_discover_confirm string into the enum.
std::string lr1121_bandwidth_to_string(LR1121RxBandwidth bw)
Format an LR1121 bandwidth enum as its YAML/UI option string (bare kHz number).
std::string key_transfer_mode_to_string(KeyTransferMode value)
Render a KeyTransferMode as its YAML/select option string.
std::optional< ScanPowerClasses > scan_power_classes_from_string(const std::string &value)
Parse a scan_power_classes string into the enum.
std::optional< KeyTransferMode > key_transfer_mode_from_string(const std::string &value)
Parse a KeyTransferMode from its YAML/select option string.
bool bool_select_set(TuningConfig &t, const std::string &v)
std::optional< SX1262RxBandwidth > sx1262_bandwidth_from_string(const std::string &value)
Convert a YAML bandwidth string to the enum value.
std::string sx1276_bandwidth_to_string(SX1276RxBandwidth bw)
Format an SX1276 bandwidth enum as its YAML/UI option string (bare kHz number).
std::optional< DiscoveryListenChannels > discovery_listen_channels_from_string(const std::string &value)
Parse a DiscoveryListenChannels from its YAML/select option string.
const TuningNumberParam * tuning_number_params_begin()
std::string sx1262_bandwidth_to_string(SX1262RxBandwidth bw)
Format a bandwidth enum as its YAML/UI option string (bare kHz number, e.g.
const TuningSelectParam * find_tuning_select(const std::string &name)
Look up a select tuning parameter by name; returns nullptr if unknown.
const TuningSelectParam * tuning_select_params_begin()
std::string discovery_listen_channels_to_string(DiscoveryListenChannels value)
Render a DiscoveryListenChannels as its YAML/select option string.
static constexpr TuningSelectParam SELECT_PARAMS[]
const TuningNumberParam * find_tuning_number(const std::string &name)
Look up a numeric tuning parameter by name; returns nullptr if unknown.
static constexpr TuningNumberParam NUMBER_PARAMS[]
std::optional< SX1276RxBandwidth > sx1276_bandwidth_from_string(const std::string &value)
Convert a YAML SX1276 bandwidth string to the enum value.
std::string discovery_destination_to_string(bool destination_auto, const uint8_t destination[NODE_ID_SIZE])
Format a destination option for YAML/logs.
std::string discover_confirm_mode_to_string(DiscoverConfirmMode value)
Format a DiscoverConfirmMode value for YAML/logs.
std::string scan_power_classes_to_string(ScanPowerClasses value)
Format a ScanPowerClasses value for YAML/logs.
Device-name, address-classification and 1W-frame codecs.
IO-Homecontrol device-type model, capabilities and runtime device state.
All runtime tunable parameters for pairing and radio diagnostics.
uint16_t pairing_discovery_initial_dwell_ms
Initial dwell on CH2 before discovery hopping begins.
bool pairing_discovery_destination_auto
When true, map commands to conventional addresses.
SX1276RxBandwidth sx1276_rx_bandwidth
SX1276 RX bandwidth selector.
uint16_t normal_start_preamble
Preamble for a directed start frame to a non-low-power target.
int16_t lbt_rssi_threshold_dbm
LBT channel-free threshold (dBm).
SX1262RxBandwidth sx1262_rx_bandwidth
SX1262 RX bandwidth selector.
uint16_t low_power_wake_preamble
Wake-up preamble (bytes) on a directed start frame to a low_power target believed at rest.
uint16_t cold_broadcast_reply_preamble
Preamble for a start-flagged key-extraction broadcast reply (0x29).
std::vector< uint8_t > pairing_discovery_destination
Destination when auto=false.
std::vector< DiscoveryCommand > pairing_discovery_commands
Ordered discovery commands.
DiscoveryListenChannels pairing_discovery_listen_channels
Channels the discovery response wait covers.
uint16_t lr1121_discovery_hop_slice_ms
Per-channel dwell while LR1121 discovery hops.
uint16_t sx1276_response_preamble
SX1276 response preamble in bytes.
uint16_t exchange_response_wait_ms
Reply window for continuation frames and the post-auth final response.
uint16_t sx1262_post_tx_settle_us
Delay after SX1262 TX before RX (µs).
uint8_t pairing_key_exchange_retries
Retries for the authenticated key exchange phase.
uint16_t pairing_key_init_delay_ms
Pause after the discover-confirm step, before CMD_KEY_INIT (0x31).
DiscoverConfirmMode pairing_discover_confirm
Whether/how to send CMD_DISCOVER_CONFIRM (0x2C) during pairing.
uint16_t sx1276_discovery_hop_slice_ms
Per-channel dwell while SX1276 discovery hops.
uint16_t exchange_start_response_wait_ms
Reply window for a start frame (wakes a sleeping device).
KeyTransferMode pairing_key_transfer
Push our key, or pull the device's key.
uint16_t sx1262_response_preamble
SX1262 response preamble in bytes.
uint16_t pairing_discovery_preamble
Preamble for the discovery broadcast (0x28/0x2E) start frame.
uint16_t pairing_discovery_wait_ms
Total wait window after sending discovery commands.
bool pairing_discovery_payload_enabled
Whether the optional payload is enabled.
LR1121RxBandwidth lr1121_rx_bandwidth
LR1121 RX bandwidth selector.
uint16_t lr1121_post_tx_settle_us
Delay after LR1121 TX before RX (µs).
uint8_t lbt_max_retries
LBT retries before forced TX.
uint16_t sx1262_discovery_hop_slice_ms
Per-channel dwell while SX1262 discovery hops.
uint16_t exchange_total_budget_ms
Ceiling on one whole exchange, retries included.
uint16_t lr1121_response_preamble
LR1121 response preamble in bytes.
uint8_t pairing_discovery_payload
Optional payload byte (used for 0x2E).
ScanPowerClasses scan_power_classes
Power classes the scan_paired_devices roll-call calls.
One numeric tuning parameter: its wire name plus accessors over TuningConfig.
One select tuning parameter: its wire name plus string accessors over TuningConfig.
Table-driven registry of runtime tuning parameters.