rogue
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
rogue::protocols::rssi::Header Class Reference

RSSI header container and codec. More...

#include <Header.h>

Public Member Functions

 Header (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Constructs a header wrapper for an existing frame.
 
 ~Header ()
 Destroys the header wrapper.
 
std::shared_ptr< rogue::interfaces::stream::FramegetFrame ()
 Returns the underlying frame.
 
bool verify ()
 Verifies header checksum and initializes cached fields.
 
void update ()
 Encodes current field values into the frame and updates checksum.
 
struct timeval & getTime ()
 Returns the last transmit timestamp.
 
uint32_t count ()
 Returns the transmit count.
 
void rstTime ()
 Resets transmit timestamp to the current time.
 
std::string dump ()
 Returns a formatted string of header contents.
 

Static Public Member Functions

static std::shared_ptr< rogue::protocols::rssi::Headercreate (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Creates a header wrapper for an existing frame.
 

Public Attributes

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).
 

Static Public Attributes

static const int32_t HeaderSize = 8
 Encoded RSSI non-SYN header size in bytes.
 
static const uint32_t SynSize = 24
 Encoded RSSI SYN header size in bytes.
 

Detailed Description

RSSI header container and codec.

Wraps a stream frame and provides helpers for encoding, decoding, and validating RSSI header fields.

Field model:

Definition at line 46 of file Header.h.

Constructor & Destructor Documentation

◆ Header()

rogue::protocols::rssi::Header::Header ( std::shared_ptr< rogue::interfaces::stream::Frame frame)
explicit

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
frameFrame containing RSSI header bytes.

Definition at line 78 of file Header.cpp.

◆ ~Header()

rogue::protocols::rssi::Header::~Header ( )

Destroys the header wrapper.

Destructor.

Definition at line 103 of file Header.cpp.

Member Function Documentation

◆ count()

uint32_t rogue::protocols::rssi::Header::count ( )

Returns the transmit count.

Get Count.

Returns
Transmit count associated with this header.

Definition at line 213 of file Header.cpp.

◆ create()

rogue::protocols::rssi::HeaderPtr rogue::protocols::rssi::Header::create ( std::shared_ptr< rogue::interfaces::stream::Frame frame)
static

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 returns std::shared_ptr ownership compatible with Rogue pointer typedefs.

Parameters
frameFrame containing RSSI header bytes.
Returns
Shared pointer to the created header wrapper.

Definition at line 72 of file Header.cpp.

◆ dump()

std::string rogue::protocols::rssi::Header::dump ( )

Returns a formatted string of header contents.

Dump message.

Returns
Human-readable header dump.

Definition at line 223 of file Header.cpp.

◆ getFrame()

rogue::interfaces::stream::FramePtr rogue::protocols::rssi::Header::getFrame ( )

Returns the underlying frame.

Get Frame.

Returns
Frame associated with this header object.

Definition at line 106 of file Header.cpp.

◆ getTime()

struct timeval & rogue::protocols::rssi::Header::getTime ( )

Returns the last transmit timestamp.

Get time.

Returns
Reference to timestamp associated with this header.

Definition at line 208 of file Header.cpp.

◆ rstTime()

void rogue::protocols::rssi::Header::rstTime ( )

Resets transmit timestamp to the current time.

Reset timer.

Definition at line 218 of file Header.cpp.

◆ update()

void rogue::protocols::rssi::Header::update ( )

Encodes current field values into the frame and updates checksum.

Update checksum, set tx time and increment tx count.

Definition at line 154 of file Header.cpp.

◆ verify()

bool rogue::protocols::rssi::Header::verify ( )

Verifies header checksum and initializes cached fields.

Verify header contents.

Returns
True if the header checksum and format are valid.

Definition at line 111 of file Header.cpp.

Member Data Documentation

◆ ack

bool rogue::protocols::rssi::Header::ack

ACK flag.

Definition at line 149 of file Header.h.

◆ acknowledge

uint8_t rogue::protocols::rssi::Header::acknowledge

Acknowledge number field.

Definition at line 164 of file Header.h.

◆ busy

bool rogue::protocols::rssi::Header::busy

Busy flag.

Definition at line 158 of file Header.h.

◆ chk

bool rogue::protocols::rssi::Header::chk

CHK capability flag (SYN headers only).

Definition at line 170 of file Header.h.

◆ connectionId

uint32_t rogue::protocols::rssi::Header::connectionId

Connection ID (SYN headers only).

Definition at line 197 of file Header.h.

◆ cumulativeAckTimeout

uint16_t rogue::protocols::rssi::Header::cumulativeAckTimeout

Cumulative ACK timeout (SYN headers only).

Definition at line 182 of file Header.h.

◆ HeaderSize

const int32_t rogue::protocols::rssi::Header::HeaderSize = 8
static

Encoded RSSI non-SYN header size in bytes.

Definition at line 74 of file Header.h.

◆ maxCumulativeAck

uint8_t rogue::protocols::rssi::Header::maxCumulativeAck

Maximum cumulative ACK count (SYN headers only).

Definition at line 191 of file Header.h.

◆ maxOutstandingSegments

uint8_t rogue::protocols::rssi::Header::maxOutstandingSegments

Maximum outstanding segments (SYN headers only).

Definition at line 173 of file Header.h.

◆ maxRetransmissions

uint8_t rogue::protocols::rssi::Header::maxRetransmissions

Maximum retransmissions (SYN headers only).

Definition at line 188 of file Header.h.

◆ maxSegmentSize

uint16_t rogue::protocols::rssi::Header::maxSegmentSize

Maximum segment size (SYN headers only).

Definition at line 176 of file Header.h.

◆ nul

bool rogue::protocols::rssi::Header::nul

NUL/keepalive flag.

Definition at line 155 of file Header.h.

◆ nullTimeout

uint16_t rogue::protocols::rssi::Header::nullTimeout

NULL/keepalive timeout (SYN headers only).

Definition at line 185 of file Header.h.

◆ retransmissionTimeout

uint16_t rogue::protocols::rssi::Header::retransmissionTimeout

Retransmission timeout (SYN headers only).

Definition at line 179 of file Header.h.

◆ rst

bool rogue::protocols::rssi::Header::rst

RST flag.

Definition at line 152 of file Header.h.

◆ sequence

uint8_t rogue::protocols::rssi::Header::sequence

Sequence number field.

Definition at line 161 of file Header.h.

◆ syn

bool rogue::protocols::rssi::Header::syn

SYN flag (synchronization/header-extension present).

Definition at line 146 of file Header.h.

◆ SynSize

const uint32_t rogue::protocols::rssi::Header::SynSize = 24
static

Encoded RSSI SYN header size in bytes.

Definition at line 77 of file Header.h.

◆ timeoutUnit

uint8_t rogue::protocols::rssi::Header::timeoutUnit

Timeout unit field (SYN headers only).

Definition at line 194 of file Header.h.

◆ version

uint8_t rogue::protocols::rssi::Header::version

Protocol version (SYN headers only).

Definition at line 167 of file Header.h.


The documentation for this class was generated from the following files: