rf namespace
Namespaces
Classes
- struct ConnectRequestBuildInput
- Inputs required to build one CONNECT_REQ signaling frame.
- struct FecDecodeResult
- Result of one NPR FEC decode attempt.
- class IFrameCodecDiagnostics
- Narrow diagnostics sink used by the low-level NPR frame codec.
- class IMacEngine
- Thin role-neutral MAC boundary used by
NprRuntime. - class INprStatsSource
- Read-only observability contract consumed by NPR control adapters.
- class Ipv4Reassembly
- struct Ipv4ReassemblyResult
- Output status of one
Ipv4Reassembly::call.ingest - class Ipv4Segmenter
- Packet splitter with internal packet-counter generator.
- struct Ipv4SegmentView
- Borrowed view for next segment produced by
Ipv4Segmenter. - struct MacEngineCommonInit
- Common runtime context shared by all NPR MAC roles during construction.
- struct MacInitParams
- Common initialization parameters for NPR MAC engines.
- struct MacRxProcessResult
- Result of processing one RX packet in MAC engine.
- struct MacSlotBurstPlanInput
- Input contract for planning subsequent frames within one slot burst.
- struct MacSlotBurstPlanResult
- Encoded output for one slot-burst planning step.
- struct MacSlotBurstTxFeedback
- Feedback from one slotted TX attempt in an ongoing slot burst.
- struct MacSlotPlanInput
- Input contract for planning one frame in one TDMA slot.
- struct MacSlotPlanResult
- Encoded output of one slot-level planning attempt.
- struct MacTickInput
- Inputs needed for periodic MAC tick planning.
- struct MacTickPlan
- Actions produced by one MAC tick.
- struct MacUnslottedTxPlan
- Encoded unslotted role-specific signaling frame plan.
- class MasterMacEngine
- First PacketRF NPR master MAC implementation.
- class NprControlCommands
- Control adapter that exposes NPR interface state and mutable config under
/interface/<iface>/.... - class NprDiagnostics
- Thread-safe diagnostics counter store shared by runtime/MAC/PHY.
- struct NprDiagnosticsSnapshot
- Flat snapshot of NPR runtime counters and timing ages.
- class NprFrameCodec
- Low-level NPR parity/FEC codec shared by runtime, PHY, MAC, and frame builders.
- class NprInterfaceStatsProvider
- NPR implementation of the generic interface-stats provider adapter.
- class NprNetworkBridge
- NPR-to-generic networking bridge used by shared network task runner.
- struct NprNetworkConfig
- Slave-side NPR network parameters learned from CONNECT_ACK payload.
- class NprRadioTaskRunner
- NPR radio worker task runner.
- class NprRuntime
- NPR runtime orchestrator singleton.
- class NprRuntimeStatsSource
- Runtime-backed implementation of the control-interface observability contract.
- struct PhyRxPacket
- One received packet captured by PHY for MAC processing.
- struct PhySlotTxOpportunity
- Slot opportunity status returned by PHY after alarm consumption.
- class PhyTdmExecutor
- PHY execution backend: SI4463 RX/TX + precise slot alarm execution.
- struct RadioProfile
- Immutable timing/radio constants for one NPR modulation id.
- class RadioProfileRegistry
- Static registry of supported NPR radio modulation profiles.
- class RadioRxCapture
- SI4463 RX capture helper that translates IRQ/FIFO state into packet callbacks.
- struct Si4463Config
- Runtime-configurable SI4463 radio parameters layered over profile defaults.
- class Si4463Device
- Thin SI4463 device driver (SPI command path + FIFO RX/TX streaming).
- struct Si4463Hal
- Hardware bindings required by SI4463 driver.
- struct Si4463TxTelemetry
- Timing telemetry collected from one TX call for slot-edge diagnostics.
- class SignalingClientCache
- Observability-only cache of signaling WHO data and local RSSI samples.
- struct SignalingWhoEntry
- Cached WHO/neighbor view entry used for periodic observability logs.
- class SlaveConnectionFsm
- Slave connection finite-state machine for signaling CONNECT lifecycle.
- class SlaveMacEngine
- Main slave-side NPR MAC engine.
- struct SlotPlanInput
- Inputs used to plan and encode one uplink frame for current slot.
- struct SlotPlanResult
- Encoded output of one slot planning attempt.
- struct SlotTxDecisionInput
- Runtime state used for one slot-level frame-kind decision.
- struct SlotTxTimeBudget
- Time window available for one TDMA uplink transmission burst.
- class TdmaSyncState
- Tracks NPR TDMA sync/allocation state from received downlink frames and predicts next local uplink slot start.
- class TdmSlotExecutor
- Owns one-shot hardware alarm scheduling and ISR-to-worker handoff for precise slot TX wakeups.
- class TdmSlotTimingController
- Minimal placeholder for TX timing preparation and TA lead mapping.
- class UplinkFramePlanner
- Builds uplink NPR frames and applies slot TX selection logic for the slave role.
Enums
- enum class Ipv4ReassemblyDropReason: uint8_t { None = 0, Timeout, GapOrCounterMismatch, Overflow, MalformedIpv4, OutputTooSmall }
- Reason why a received segment or packet was dropped during reassembly.
- enum class MacSlotAlarmAction: uint8_t { None = 0u, Arm, Clear }
- Action requested by MAC for slot alarm state.
- enum class MacSlotBurstPlanAction: uint8_t { Stop = 0u, Transmit }
- MAC decision after evaluating one burst-planning step output.
- enum class MacSlotBurstPlanStatus: uint8_t { NoFrame = 0u, FrameReady, BuildFailed }
- Status of one burst-step planning attempt.
- enum class MacSlotPlanStatus: uint8_t { NoFrame = 0u, FrameReady, BuildFailed }
- Status of one slot-level planning attempt.
- enum class MacUnslottedAction: uint8_t { None = 0u, ConnectReq, DisconnectReq, WakeProbe, SignalingReply, WhoBroadcast }
- Unslotted action requested by MAC while not fully slotted/connected.
- enum class ModulationClass: uint8_t { Gfsk = 0 }
- Logical modulation family used by the NPR profile.
- enum class PhySlotAlarmAction: uint8_t { None = 0u, Arm, Clear }
- Requested slot-alarm operation from MAC/runtime.
- enum class SlotPlanStatus: uint8_t { NoFrame = 0u, FrameReady, BuildFailed }
- Result state of one slot planning attempt.
- enum class SlotTxFrameKind: uint8_t { None = 0, Ipv4 = 1, ConnectReq = 2, Who = 3, NullFrame = 4, Disconnect = 5 }
- Frame class selected for one uplink TX opportunity.
Typedefs
- using DeviceIdReaderFn = bool(*)(uint8_t out_device_id_8[8])
- Injected callback that reads 8-byte unique device identifier.
- using SlaveMacRxProcessResult = MacRxProcessResult
- using SlaveMacSlotAlarmAction = MacSlotAlarmAction
- using SlaveMacSlotBurstPlanAction = MacSlotBurstPlanAction
- using SlaveMacSlotBurstPlanInput = MacSlotBurstPlanInput
- using SlaveMacSlotBurstPlanResult = MacSlotBurstPlanResult
- using SlaveMacSlotBurstPlanStatus = MacSlotBurstPlanStatus
- using SlaveMacSlotBurstTxFeedback = MacSlotBurstTxFeedback
- using SlaveMacSlotPlanInput = MacSlotPlanInput
- using SlaveMacSlotPlanResult = MacSlotPlanResult
- using SlaveMacSlotPlanStatus = MacSlotPlanStatus
- using SlaveMacTickInput = MacTickInput
- using SlaveMacTickPlan = MacTickPlan
- using SlaveMacUnslottedConnectAction = MacUnslottedAction
- using SlaveMacUnslottedConnectTxPlan = MacUnslottedTxPlan
Functions
- void build_callsign_field(const uint8_t prefix[2], const char* suffix, uint8_t out_field[kCallsignFieldBytes])
- Builds NPR callsign field as
[prefix0, prefix1, suffix..., zero padding]. - auto callsign_identity_matches_field(const uint8_t local_prefix[2], const char* local_suffix, const uint8_t* callsign_field) -> bool
- Compares full local identity (prefix+suffix) with encoded NPR callsign field.
- auto callsign_suffix_from_field(const uint8_t* callsign_field, char* out_suffix, size_t out_size) -> bool
- Extracts human-entered callsign suffix from NPR field bytes 2..15.
- auto callsign_suffix_matches_field(const char* local_suffix, const uint8_t* callsign_field) -> bool
- Compares local callsign suffix with suffix encoded in NPR callsign field.
- void callsign_suffix_to_display(const char* raw_suffix, char* out_display, size_t out_size)
- Converts raw suffix bytes to printable display form (
?for non-printables). - auto clamp_uplink_buffer_state(uint16_t pending_segments) -> uint8_t
- Clamps pending-segment count to NPR low-5 range
0..30. - auto compute_uplink_buffer_state(bool connect_req_pending, bool who_pending, uint16_t pending_ipv4_segments) -> uint8_t
- Computes advertised uplink demand from pending control and IPv4 traffic.
-
auto create_mac_engine(const npr::
cfg:: NprConfigSection& config, const MacEngineCommonInit& common_init) -> std::unique_ptr<IMacEngine> - Builds and initializes the MAC engine selected by current NPR config.
-
auto create_mac_engine_in_place(const npr::
cfg:: NprConfigSection& config, const MacEngineCommonInit& common_init, void* storage, size_t storage_size, IMacEngine** out_engine) -> bool - Builds and initializes the selected MAC engine in caller-provided storage.
- auto derive_callsign_prefix(uint8_t out_prefix[2], DeviceIdReaderFn read_device_id) -> bool
- Derives stable non-zero 2-byte callsign prefix from 8-byte device id.
Variables
- size_t kCallsignFieldBytes constexpr
- Number of bytes in NPR fixed-width callsign field.
- size_t kCallsignPrefixBytes constexpr
- Number of bytes reserved for deterministic per-device prefix.
- size_t kCallsignSuffixMaxLen constexpr
- Maximum user-editable suffix length (excluding prefix and terminator).
- uint8_t kMaxUplinkBufferState constexpr
Enum documentation
enum class npr:: rf:: Ipv4ReassemblyDropReason: uint8_t
#include <npr/ipv4/ipv4_reassembly.hpp>
Reason why a received segment or packet was dropped during reassembly.
enum class npr:: rf:: MacSlotAlarmAction: uint8_t
#include <npr/mac/mac_engine.hpp>
Action requested by MAC for slot alarm state.
enum class npr:: rf:: MacSlotBurstPlanAction: uint8_t
#include <npr/mac/mac_engine.hpp>
MAC decision after evaluating one burst-planning step output.
| Enumerators | |
|---|---|
| Stop |
No frame should be transmitted in this slot anymore. |
| Transmit |
Planner produced valid frame bytes and runtime should transmit them. |
enum class npr:: rf:: MacSlotBurstPlanStatus: uint8_t
#include <npr/mac/mac_engine.hpp>
Status of one burst-step planning attempt.
enum class npr:: rf:: MacSlotPlanStatus: uint8_t
#include <npr/mac/mac_engine.hpp>
Status of one slot-level planning attempt.
enum class npr:: rf:: MacUnslottedAction: uint8_t
#include <npr/mac/mac_engine.hpp>
Unslotted action requested by MAC while not fully slotted/connected.
enum class npr:: rf:: ModulationClass: uint8_t
#include <npr/common/radio_profile.hpp>
Logical modulation family used by the NPR profile.
enum class npr:: rf:: PhySlotAlarmAction: uint8_t
#include <npr/phy/phy_tdm_executor.hpp>
Requested slot-alarm operation from MAC/runtime.
enum class npr:: rf:: SlotPlanStatus: uint8_t
#include <npr/mac/uplink_frame_planner.hpp>
Result state of one slot planning attempt.
enum class npr:: rf:: SlotTxFrameKind: uint8_t
#include <npr/common/slot_tx_types.hpp>
Frame class selected for one uplink TX opportunity.
Typedef documentation
using npr:: rf:: DeviceIdReaderFn = bool(*)(uint8_t out_device_id_8[8])
#include <npr/callsign_codec.hpp>
Injected callback that reads 8-byte unique device identifier.
using npr:: rf:: SlaveMacRxProcessResult = MacRxProcessResult
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotAlarmAction = MacSlotAlarmAction
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotBurstPlanAction = MacSlotBurstPlanAction
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotBurstPlanInput = MacSlotBurstPlanInput
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotBurstPlanResult = MacSlotBurstPlanResult
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotBurstPlanStatus = MacSlotBurstPlanStatus
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotBurstTxFeedback = MacSlotBurstTxFeedback
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotPlanInput = MacSlotPlanInput
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotPlanResult = MacSlotPlanResult
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacSlotPlanStatus = MacSlotPlanStatus
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacTickInput = MacTickInput
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacTickPlan = MacTickPlan
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacUnslottedConnectAction = MacUnslottedAction
#include <npr/mac/slave_mac_engine.hpp>
using npr:: rf:: SlaveMacUnslottedConnectTxPlan = MacUnslottedTxPlan
#include <npr/mac/slave_mac_engine.hpp>
Function documentation
void npr:: rf:: build_callsign_field(const uint8_t prefix[2],
const char* suffix,
uint8_t out_field[kCallsignFieldBytes])
#include <npr/callsign_codec.hpp>
Builds NPR callsign field as [prefix0, prefix1, suffix..., zero padding].
| Parameters | |
|---|---|
| prefix | Two-byte stable prefix. |
| suffix | User-configured suffix string. |
| out_field | Output 16-byte NPR callsign field. |
bool npr:: rf:: callsign_identity_matches_field(const uint8_t local_prefix[2],
const char* local_suffix,
const uint8_t* callsign_field)
#include <npr/callsign_codec.hpp>
Compares full local identity (prefix+suffix) with encoded NPR callsign field.
| Returns | true when full 16-byte callsign field matches local identity. |
|---|
bool npr:: rf:: callsign_suffix_from_field(const uint8_t* callsign_field,
char* out_suffix,
size_t out_size)
#include <npr/callsign_codec.hpp>
Extracts human-entered callsign suffix from NPR field bytes 2..15.
| Parameters | |
|---|---|
| callsign_field | Pointer to 16-byte NPR callsign field. |
| out_suffix | Output C-string buffer for suffix text. |
| out_size | Capacity of out_suffix in bytes. |
| Returns | true when extraction succeeded and output is NUL-terminated. |
bool npr:: rf:: callsign_suffix_matches_field(const char* local_suffix,
const uint8_t* callsign_field)
#include <npr/callsign_codec.hpp>
Compares local callsign suffix with suffix encoded in NPR callsign field.
| Returns | true when suffix values match. |
|---|
void npr:: rf:: callsign_suffix_to_display(const char* raw_suffix,
char* out_display,
size_t out_size)
#include <npr/callsign_codec.hpp>
Converts raw suffix bytes to printable display form (? for non-printables).
| Parameters | |
|---|---|
| raw_suffix | Input NUL-terminated suffix. |
| out_display | Output display buffer. |
| out_size | Capacity of out_display. |
uint8_t npr:: rf:: clamp_uplink_buffer_state(uint16_t pending_segments)
#include <npr/uplink_buffer_state.hpp>
Clamps pending-segment count to NPR low-5 range 0..30.
| Parameters | |
|---|---|
| pending_segments | Number of pending frames/segments. |
| Returns | Clamped protocol value for TDMA header low-5 bits. |
uint8_t npr:: rf:: compute_uplink_buffer_state(bool connect_req_pending,
bool who_pending,
uint16_t pending_ipv4_segments)
#include <npr/uplink_buffer_state.hpp>
Computes advertised uplink demand from pending control and IPv4 traffic.
| Parameters | |
|---|---|
| connect_req_pending | Whether CONNECT_REQ is pending. |
| who_pending | Whether periodic WHO is pending. |
| pending_ipv4_segments | Number of pending IPv4 segments. |
| Returns | Demand value encoded for TDMA low-5 bits. |
std::unique_ptr<IMacEngine> npr:: rf:: create_mac_engine(const npr:: cfg:: NprConfigSection& config,
const MacEngineCommonInit& common_init)
#include <npr/mac/mac_engine_factory.hpp>
Builds and initializes the MAC engine selected by current NPR config.
Runtime stays role-neutral and delegates all role-specific construction to this factory. Master/slave-specific config keys are translated here into the narrow MacInitParams contract consumed by concrete engines.
bool npr:: rf:: create_mac_engine_in_place(const npr:: cfg:: NprConfigSection& config,
const MacEngineCommonInit& common_init,
void* storage,
size_t storage_size,
IMacEngine** out_engine)
#include <npr/mac/mac_engine_factory.hpp>
Builds and initializes the selected MAC engine in caller-provided storage.
| Parameters | |
|---|---|
| config | Active NPR config section that selects the concrete role. |
| common_init | Role-neutral runtime context shared with both MAC roles. |
| storage | Caller-owned aligned storage buffer. |
| storage_size | Size of storage in bytes. |
| out_engine | Receives initialized engine pointer on success. |
| Returns | true when one engine was constructed and initialized successfully. |
This is used by firmware runtime to keep the large role-specific MAC object out of newlib heap while preserving the same role/config translation logic as create_mac_engine(...).
bool npr:: rf:: derive_callsign_prefix(uint8_t out_prefix[2],
DeviceIdReaderFn read_device_id)
#include <npr/callsign_codec.hpp>
Derives stable non-zero 2-byte callsign prefix from 8-byte device id.
| Parameters | |
|---|---|
| out_prefix | Output two-byte prefix. |
| read_device_id | Callback that provides 8-byte unique id. |
| Returns | true when prefix derivation succeeded. |
Device-id source is injected (HAL on target, mock in tests).
Variable documentation
size_t npr:: rf:: kCallsignFieldBytes constexpr
#include <npr/callsign_codec.hpp>
Number of bytes in NPR fixed-width callsign field.
size_t npr:: rf:: kCallsignPrefixBytes constexpr
#include <npr/callsign_codec.hpp>
Number of bytes reserved for deterministic per-device prefix.
size_t npr:: rf:: kCallsignSuffixMaxLen constexpr
#include <npr/callsign_codec.hpp>
Maximum user-editable suffix length (excluding prefix and terminator).
uint8_t npr:: rf:: kMaxUplinkBufferState constexpr
#include <npr/uplink_buffer_state.hpp>