FrameDecoder class final
#include <npr/frames/frame_decoder.hpp>
Decodes on-air NPR frames and classifies them for MAC layer.
Constructors, destructors, conversion operators
- FrameDecoder() defaulted
- FrameDecoder(const NprFrameCodec* codec) explicit
Public functions
- void bind_codec(const NprFrameCodec* codec)
- Binds codec used for FEC/parity decode.
- auto decode(const uint8_t* packet, size_t packet_size, uint8_t local_client_id, bool local_connected, DecodedFrame* out_frame) const -> bool
- Decodes one raw packet captured from PHY and classifies target semantics.
Function documentation
bool npr:: rf:: frames:: FrameDecoder:: decode(const uint8_t* packet,
size_t packet_size,
uint8_t local_client_id,
bool local_connected,
DecodedFrame* out_frame) const
Decodes one raw packet captured from PHY and classifies target semantics.
| Parameters | |
|---|---|
| packet | On-air bytes including TDMA/client-id header. |
| packet_size | Number of bytes in packet. |
| local_client_id | Current local client id. |
| local_connected | Whether local side is already connected. |
| out_frame | Output normalized decode structure. |
| Returns | true when packet was syntactically decoded. |