Header
Header is a helper codec/container for RSSI header fields. It parses frame
bytes into structured fields (verify()), and encodes fields back into frame
bytes with updated checksum (update()).
For conceptual guidance, see RSSI Protocol.
Header objects in C++ are referenced by the following shared pointer typedef:
The class description is shown below:
-
class Header
[header] RSSI header container and codec.
Wraps a stream frame and provides helpers for encoding, decoding, and validating RSSI header fields.
Field model:
Public members are the decoded/encoded RSSI header fields.
verify()parses bytes from the frame into these members and validates checksum/size.update()writes members back to frame bytes and updates checksum.SYN-only fields are meaningful when
syn == true.
Public Functions
Constructs a header wrapper for an existing frame.
Creator.
This constructor is a low-level C++ allocation path. Prefer
create()when shared ownership or Python exposure is required.- Parameters:
frame – Frame containing RSSI header bytes.
-
std::shared_ptr<rogue::interfaces::stream::Frame> getFrame()
[header] [impl] Returns the underlying frame.
Get Frame.
- Returns:
Frame associated with this header object.
-
bool verify()
[header] [impl] Verifies header checksum and initializes cached fields.
Verify header contents.
- Returns:
True if the header checksum and format are valid.
-
void update()
[header] [impl] Encodes current field values into the frame and updates checksum.
Update checksum, set tx time and increment tx count.
-
struct timeval &getTime()
[header] [impl] Returns the last transmit timestamp.
Get time.
- Returns:
Reference to timestamp associated with this header.
Public Members
Public Static Functions
Creates a header wrapper for an existing frame.
Create.
Parameter semantics are identical to the constructor; see
Header()for wrapper-construction details. This static factory is the preferred construction path when the object is shared across Rogue graph connections or exposed to Python. It returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.- Parameters:
frame – Frame containing RSSI header bytes.
- Returns:
Shared pointer to the created header wrapper.