TdmaAllocationFrame class final
Encoder/decoder for TDMA allocation payload (protocol-id kTdmaAllocation).
Public static variables
- static size_t kMaxEntries constexpr
Public static functions
- static auto encode(const TdmaAllocationEntry* entries, size_t entry_count, uint8_t* out_decoded, size_t out_capacity, size_t* out_size) -> bool
- Builds decoded TDMA allocation payload layout (without FEC/radio envelope).
Public functions
- auto decode(const uint8_t* decoded, size_t decoded_size) -> bool
- Parses decoded payload and extracts allocation entries.
- auto entry_at(size_t index) const -> const TdmaAllocationEntry*
- Returns entry by index or
nullptrfor invalid index. - auto entry_count() const -> size_t
- Number of parsed entries.
- auto has_end_marker() const -> bool
truewhen END marker was found in payload.
Function documentation
static bool npr:: rf:: frames:: TdmaAllocationFrame:: encode(const TdmaAllocationEntry* entries,
size_t entry_count,
uint8_t* out_decoded,
size_t out_capacity,
size_t* out_size)
Builds decoded TDMA allocation payload layout (without FEC/radio envelope).
| Parameters | |
|---|---|
| entries | Input entry array. |
| entry_count | Number of entries in entries. |
| out_decoded | Output payload buffer. |
| out_capacity | Capacity of out_decoded. |
| out_size | Written payload size. |
| Returns | true when output was encoded successfully. |