Rogue

Contents:

  • Introduction
  • PyRogue Tree Getting Started Guide
  • Advanced Tutorials
  • PyRogue Tree
  • Interfaces
  • Utilities
  • Hardware
  • Protocols
  • Logging In Rogue
  • Creating Custom Modules
  • Using the PyDM Gui
  • Migration Notes
  • Table of Contents
  • Installing & Compiling Rogue
  • API Reference
    • Python API
    • C++ API
      • AXI Hardware Interface Class Descriptions
      • Hardware Interface Class Descriptions
      • Memory Interface Class Descriptions
      • Stream Interface Class Descriptions
      • Batcher Protocol Class Descriptions
      • Packetizer Protocol Class Descriptions
      • RSSI Protocol Class Descriptions
        • Client
        • Server
        • Header
        • Controller
        • Application
        • Transport
      • SRP Protocol Class Descriptions
      • UDP Protocol Class Descriptions
      • Xilinx Protocol Class Descriptions
      • Compression Classes
      • File Operation Classes
      • PRBS Utilities
Rogue
  • Table of Contents
  • API Reference
  • RSSI Protocol Class Descriptions
  • Header
  • View page source

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:

typedef std::shared_ptr<rogue::protocols::rssi::Header> rogue::protocols::rssi::HeaderPtr

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

explicit Header(std::shared_ptr<rogue::interfaces::stream::Frame> frame)

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

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

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

Parameters:

frame – Frame containing RSSI header bytes.

Returns:

Shared pointer to the created header wrapper.

Public Static 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.

Previous Next

© Copyright 2026, SLAC National Accelerator Laboratory.

Built with Sphinx using a theme provided by Read the Docs.