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()).
Header objects in C++ are referenced by the following shared pointer typedef:
The class description is shown below:
-
class 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.
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.
-
~Header()
Destroys the header wrapper.
-
std::shared_ptr<rogue::interfaces::stream::Frame> getFrame()
Returns the underlying frame.
- Returns:
Frame associated with this header object.
-
bool verify()
Verifies header checksum and initializes cached fields.
- Returns:
True if the header checksum and format are valid.
-
void update()
Encodes current field values into the frame and updates checksum.
-
struct timeval &getTime()
Returns the last transmit timestamp.
- Returns:
Reference to timestamp associated with this header.
-
uint32_t count()
Returns the transmit count.
- Returns:
Transmit count associated with this header.
-
void rstTime()
Resets transmit timestamp to the current time.
-
std::string dump()
Returns a formatted string of header contents.
- Returns:
Human-readable header dump.
Public Members
-
bool syn
SYN flag (synchronization/header-extension present).
-
bool ack
ACK flag.
-
bool rst
RST flag.
-
bool nul
NUL/keepalive flag.
-
bool busy
Busy flag.
-
uint8_t sequence
Sequence number field.
-
uint8_t acknowledge
Acknowledge number field.
-
uint8_t version
Protocol version (SYN headers only).
-
bool chk
CHK capability flag (SYN headers only).
-
uint8_t maxOutstandingSegments
Maximum outstanding segments (SYN headers only).
-
uint16_t maxSegmentSize
Maximum segment size (SYN headers only).
-
uint16_t retransmissionTimeout
Retransmission timeout (SYN headers only).
-
uint16_t cumulativeAckTimeout
Cumulative ACK timeout (SYN headers only).
-
uint16_t nullTimeout
NULL/keepalive timeout (SYN headers only).
-
uint8_t maxRetransmissions
Maximum retransmissions (SYN headers only).
-
uint8_t maxCumulativeAck
Maximum cumulative ACK count (SYN headers only).
-
uint8_t timeoutUnit
Timeout unit field (SYN headers only).
-
uint32_t connectionId
Connection ID (SYN headers only).
Public Static Functions
Creates a header wrapper for an existing frame.
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.