npr::rf::NprNetworkConfig struct final

Slave-side NPR network parameters learned from CONNECT_ACK payload.

This structure represents role-specific MAC state, not generic runtime orchestration state. Current slave implementation learns it from master signaling and exposes it via snapshot APIs for network bridge/status code. Future master role is expected to use its own locally configured interface state instead of reusing this CONNECT_ACK-derived model.

Public types

struct ConnectAckApplyResult
Result of parsing/applying one CONNECT_ACK payload.

Public functions

auto apply_connect_ack_payload(const uint8_t* data, size_t len, uint64_t now_us) -> ConnectAckApplyResult
Parses CONNECT_ACK payload and updates network fields.
void clear()
Clears the configuration to initial discovery state.
auto master_callsign_display(char* out_display, size_t out_size) const -> bool
Converts stored master callsign field to printable text.

Public variables

uint8_t client_id
Assigned client id (or discovery id while unassigned).
uint32_t default_route
bool default_route_active
bool dns_active
uint32_t dns_value
uint32_t ip_size
Number of IPv4 addresses assigned to client.
uint32_t ip_start
First IPv4 address in assigned pool (network byte order encoded as u32).
std::array<uint8_t, 16> master_callsign_field
Raw 16-byte master callsign field.
uint32_t modem_ip
Local modem IP computed from allocation.
uint32_t revision
Monotonic revision incremented on each effective change.
uint32_t subnet_mask
uint64_t updated_at_us
Timestamp of last accepted update.
bool valid
true once configuration was successfully populated from master.

Function documentation

ConnectAckApplyResult npr::rf::NprNetworkConfig::apply_connect_ack_payload(const uint8_t* data, size_t len, uint64_t now_us)

Parses CONNECT_ACK payload and updates network fields.

Parameters
data Raw signaling payload starting at CONNECT_ACK body.
len Payload length in bytes.
now_us Current monotonic time.
Returns Parse and change status.

bool npr::rf::NprNetworkConfig::master_callsign_display(char* out_display, size_t out_size) const

Converts stored master callsign field to printable text.

Parameters
out_display Output text buffer.
out_size Capacity of out_display.
Returns true when output was produced.