24 {
"sx1262_response_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.sx1262_response_preamble); },
26 {
"sx1262_post_tx_settle_us", [](
const TuningConfig &t) {
return static_cast<float>(t.sx1262_post_tx_settle_us); },
28 {
"sx1276_response_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.sx1276_response_preamble); },
30 {
"sx1276_discovery_hop_slice_ms",
31 [](
const TuningConfig &t) {
return static_cast<float>(t.sx1276_discovery_hop_slice_ms); },
33 {
"sx1262_discovery_hop_slice_ms",
34 [](
const TuningConfig &t) {
return static_cast<float>(t.sx1262_discovery_hop_slice_ms); },
36 {
"lr1121_response_preamble", [](
const TuningConfig &t) {
return static_cast<float>(t.lr1121_response_preamble); },
38 {
"lr1121_post_tx_settle_us", [](
const TuningConfig &t) {
return static_cast<float>(t.lr1121_post_tx_settle_us); },
40 {
"lr1121_discovery_hop_slice_ms",
41 [](
const TuningConfig &t) {
return static_cast<float>(t.lr1121_discovery_hop_slice_ms); },
43 {
"lbt_max_retries", [](
const TuningConfig &t) {
return static_cast<float>(t.lbt_max_retries); },
45 {
"lbt_rssi_threshold_dbm", [](
const TuningConfig &t) {
return static_cast<float>(t.lbt_rssi_threshold_dbm); },
47 {
"exchange_start_response_wait_ms",
48 [](
const TuningConfig &t) {
return static_cast<float>(t.exchange_start_response_wait_ms); },
50 {
"exchange_response_wait_ms", [](
const TuningConfig &t) {
return static_cast<float>(t.exchange_response_wait_ms); },
52 {
"pairing_discovery_wait_ms", [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_discovery_wait_ms); },
54 {
"pairing_discovery_initial_dwell_ms",
55 [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_discovery_initial_dwell_ms); },
57 {
"pairing_key_exchange_retries",
58 [](
const TuningConfig &t) {
return static_cast<float>(t.pairing_key_exchange_retries); },
95 {
"pairing_discovery_commands",
100 std::size_t start = 0;
101 while (start < v.size()) {
102 const std::size_t comma = v.find(
',', start);
103 std::string token = v.substr(start, comma - start);
105 token.erase(0, token.find_first_not_of(
" \t"));
106 token.erase(token.find_last_not_of(
" \t") + 1);
110 if (comma == std::string::npos)
117 {
"pairing_discovery_destination",
120 t.pairing_discovery_destination.data());
127 if (v ==
"0x00003B") {
132 if (v ==
"0x00003F") {
140 {
"pairing_discovery_payload",
157 {
"pairing_discovery_low_power",
158 [](
const TuningConfig &t) -> std::string {
return t.pairing_discovery_low_power ?
"On" :
"Off"; },
168 if (name == param.name)
176 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()
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.
static constexpr uint8_t ADDRESS_SUFFIX_BROADCAST
Suffix for "all devices of this type" broadcast.
std::optional< DiscoveryCommand > discovery_command_from_string(const std::string &value)
Parse a discovery command string (e.g., "0x28") into the enum.
static constexpr uint8_t ADDRESS_SUFFIX_DISCOVERY
Suffix for discovery-related broadcasts.
std::string lr1121_bandwidth_to_string(LR1121RxBandwidth bw)
Format an LR1121 bandwidth enum as its YAML/UI option string (bare kHz number).
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).
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()
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.
Device-name, address-classification and 1W-frame codecs.
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.
int16_t lbt_rssi_threshold_dbm
LBT channel-free threshold (dBm).
SX1262RxBandwidth sx1262_rx_bandwidth
SX1262 RX bandwidth selector.
std::vector< uint8_t > pairing_discovery_destination
Destination when auto=false.
std::vector< DiscoveryCommand > pairing_discovery_commands
Ordered discovery commands.
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.
bool pairing_discovery_low_power
Set LOW_POWER flag in discovery frames.
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).
uint16_t sx1262_response_preamble
SX1262 response preamble in bytes.
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 lr1121_response_preamble
LR1121 response preamble in bytes.
uint8_t pairing_discovery_payload
Optional payload byte (used for 0x2E).
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.