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

RSSI protocol controller. More...

#include <Controller.h>

Inheritance diagram for rogue::protocols::rssi::Controller:
rogue::EnableSharedFromThis< rogue::protocols::rssi::Controller > rogue::EnableSharedFromThisBase

Public Member Functions

 Controller (uint32_t segSize, std::shared_ptr< rogue::protocols::rssi::Transport > tran, std::shared_ptr< rogue::protocols::rssi::Application > app, bool server)
 Constructs an RSSI controller.
 
 ~Controller ()
 Destroys the controller and stops background processing.
 
void stopQueue ()
 Stops internal queues used by controller worker paths.
 
std::shared_ptr< rogue::interfaces::stream::FramereqFrame (uint32_t size)
 Allocates a frame for transport-path transmission.
 
void transportRx (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Processes a frame received from transport.
 
std::shared_ptr< rogue::interfaces::stream::FrameapplicationTx ()
 Gets next frame to transmit from the application side.
 
void applicationRx (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Processes a frame received from the application side.
 
bool getOpen ()
 Returns whether the RSSI link is in open state.
 
uint32_t getDownCount ()
 Returns link down transition counter.
 
uint32_t getDropCount ()
 Returns dropped-frame counter.
 
uint32_t getRetranCount ()
 Returns retransmit counter.
 
bool getLocBusy ()
 Returns local busy state.
 
uint32_t getLocBusyCnt ()
 Returns local busy event counter.
 
bool getRemBusy ()
 Returns remote busy state.
 
uint32_t getRemBusyCnt ()
 Returns remote busy event counter.
 
void setLocTryPeriod (uint32_t val)
 Sets local connection retry period.
 
uint32_t getLocTryPeriod ()
 Gets local connection retry period.
 
void setLocMaxBuffers (uint8_t val)
 Sets local max outstanding buffers parameter.
 
uint8_t getLocMaxBuffers ()
 Gets local max outstanding buffers parameter.
 
void setLocMaxSegment (uint16_t val)
 Sets local max segment size.
 
uint16_t getLocMaxSegment ()
 Gets local max segment size.
 
void setLocCumAckTout (uint16_t val)
 Sets local cumulative ACK timeout.
 
uint16_t getLocCumAckTout ()
 Gets local cumulative ACK timeout.
 
void setLocRetranTout (uint16_t val)
 Sets local retransmit timeout.
 
uint16_t getLocRetranTout ()
 Gets local retransmit timeout.
 
void setLocNullTout (uint16_t val)
 Sets local null-segment timeout.
 
uint16_t getLocNullTout ()
 Gets local null-segment timeout.
 
void setLocMaxRetran (uint8_t val)
 Sets local max retransmit count.
 
uint8_t getLocMaxRetran ()
 Gets local max retransmit count.
 
void setLocMaxCumAck (uint8_t val)
 Sets local max cumulative ACK interval.
 
uint8_t getLocMaxCumAck ()
 Gets local max cumulative ACK interval.
 
uint8_t curMaxBuffers ()
 Gets negotiated max outstanding buffers.
 
uint16_t curMaxSegment ()
 Gets negotiated max segment size.
 
uint16_t curCumAckTout ()
 Gets negotiated cumulative ACK timeout.
 
uint16_t curRetranTout ()
 Gets negotiated retransmit timeout.
 
uint16_t curNullTout ()
 Gets negotiated null-segment timeout.
 
uint8_t curMaxRetran ()
 Gets negotiated max retransmit count.
 
uint8_t curMaxCumAck ()
 Gets negotiated max cumulative ACK interval.
 
void resetCounters ()
 Resets runtime counters.
 
void setTimeout (uint32_t timeout)
 Sets timeout in microseconds for frame transmits.
 
void stop ()
 Stops the RSSI connection and worker thread.
 
void start ()
 Starts or restarts RSSI connection establishment.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::protocols::rssi::Controller >
std::shared_ptr< rogue::protocols::rssi::Controllershared_from_this ()
 Returns a shared_ptr<T> for this instance.
 
- Public Member Functions inherited from rogue::EnableSharedFromThisBase
virtual ~EnableSharedFromThisBase ()
 Virtual destructor for polymorphic base usage.
 

Static Public Member Functions

static std::shared_ptr< rogue::protocols::rssi::Controllercreate (uint32_t segSize, std::shared_ptr< rogue::protocols::rssi::Transport > tran, std::shared_ptr< rogue::protocols::rssi::Application > app, bool server)
 Factory method to create an RSSI controller.
 

Detailed Description

RSSI protocol controller.

Implements connection state, flow control, retransmission, and parameter negotiation between RSSI application and transport endpoints.

Protocol reference: https://confluence.slac.stanford.edu/x/1IyfD

Class relationship within rogue::protocols::rssi:

Operationally, frames received from Transport are decoded and processed for ACK/SYN/state transitions and delivery, while Application frames are segmented/tracked for reliable delivery according to negotiated parameters.

Definition at line 63 of file Controller.h.

Constructor & Destructor Documentation

◆ Controller()

rogue::protocols::rssi::Controller::Controller ( uint32_t  segSize,
std::shared_ptr< rogue::protocols::rssi::Transport tran,
std::shared_ptr< rogue::protocols::rssi::Application app,
bool  server 
)

Constructs an RSSI controller.

Creator.

This constructor is a low-level C++ allocation path. Prefer create() when shared ownership or Python exposure is required.

Parameters
segSizeInitial local max segment size.
tranTransport endpoint used for link traffic.
appApplication endpoint used for payload traffic.
serverTrue to run the server-side handshake behavior.

Definition at line 54 of file Controller.cpp.

◆ ~Controller()

rogue::protocols::rssi::Controller::~Controller ( )

Destroys the controller and stops background processing.

Destructor.

Definition at line 122 of file Controller.cpp.

Member Function Documentation

◆ applicationRx()

void rogue::protocols::rssi::Controller::applicationRx ( std::shared_ptr< rogue::interfaces::stream::Frame frame)

Processes a frame received from the application side.

Frame received at application interface.

Parameters
frameInput frame from application endpoint.

Definition at line 365 of file Controller.cpp.

◆ applicationTx()

rogue::interfaces::stream::FramePtr rogue::protocols::rssi::Controller::applicationTx ( )

Gets next frame to transmit from the application side.

Frame transmit at application interface.

Returns
Frame ready for transmit, or null when none is available.

Definition at line 337 of file Controller.cpp.

◆ create()

rogue::protocols::rssi::ControllerPtr rogue::protocols::rssi::Controller::create ( uint32_t  segSize,
std::shared_ptr< rogue::protocols::rssi::Transport tran,
std::shared_ptr< rogue::protocols::rssi::Application app,
bool  server 
)
static

Factory method to create an RSSI controller.

Class creation.

Parameter semantics are identical to the constructor; see Controller() for endpoint wiring 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
segSizeInitial local maximum segment size.
tranTransport endpoint used for link traffic.
appApplication endpoint used for payload traffic.
serverTrue to run server-side handshake behavior.
Returns
Shared pointer to the created controller.

Company : SLAC National Accelerator Laboratory

Description:

RSSI Controller

This file is part of the rogue software platform. It is subject to the license terms in the LICENSE.txt file found in the top-level directory of this distribution and at: https://confluence.slac.stanford.edu/display/ppareg/LICENSE.html. No part of the rogue software platform, including this file, may be copied, modified, propagated, or distributed except according to the terms

contained in the LICENSE.txt file.

Definition at line 45 of file Controller.cpp.

◆ curCumAckTout()

uint16_t rogue::protocols::rssi::Controller::curCumAckTout ( )

Gets negotiated cumulative ACK timeout.

Returns
Negotiated timeout in protocol time units.

Definition at line 562 of file Controller.cpp.

◆ curMaxBuffers()

uint8_t rogue::protocols::rssi::Controller::curMaxBuffers ( )

Gets negotiated max outstanding buffers.

Returns
Negotiated max outstanding buffers.

Definition at line 554 of file Controller.cpp.

◆ curMaxCumAck()

uint8_t rogue::protocols::rssi::Controller::curMaxCumAck ( )

Gets negotiated max cumulative ACK interval.

Returns
Negotiated packets between cumulative ACKs.

Definition at line 578 of file Controller.cpp.

◆ curMaxRetran()

uint8_t rogue::protocols::rssi::Controller::curMaxRetran ( )

Gets negotiated max retransmit count.

Returns
Negotiated max retransmit attempts.

Definition at line 574 of file Controller.cpp.

◆ curMaxSegment()

uint16_t rogue::protocols::rssi::Controller::curMaxSegment ( )

Gets negotiated max segment size.

Returns
Negotiated segment size in bytes.

Definition at line 558 of file Controller.cpp.

◆ curNullTout()

uint16_t rogue::protocols::rssi::Controller::curNullTout ( )

Gets negotiated null-segment timeout.

Returns
Negotiated timeout in protocol time units.

Definition at line 570 of file Controller.cpp.

◆ curRetranTout()

uint16_t rogue::protocols::rssi::Controller::curRetranTout ( )

Gets negotiated retransmit timeout.

Returns
Negotiated timeout in protocol time units.

Definition at line 566 of file Controller.cpp.

◆ getDownCount()

uint32_t rogue::protocols::rssi::Controller::getDownCount ( )

Returns link down transition counter.

Get Down Count.

Returns
Number of times link entered down/closed state.

Definition at line 420 of file Controller.cpp.

◆ getDropCount()

uint32_t rogue::protocols::rssi::Controller::getDropCount ( )

Returns dropped-frame counter.

Get Drop Count.

Returns
Number of dropped received frames.

Definition at line 425 of file Controller.cpp.

◆ getLocBusy()

bool rogue::protocols::rssi::Controller::getLocBusy ( )

Returns local busy state.

Get locBusy.

Returns
True when local endpoint is currently busy.

Definition at line 435 of file Controller.cpp.

◆ getLocBusyCnt()

uint32_t rogue::protocols::rssi::Controller::getLocBusyCnt ( )

Returns local busy event counter.

Get locBusyCnt.

Returns
Number of local busy assertions.

Definition at line 443 of file Controller.cpp.

◆ getLocCumAckTout()

uint16_t rogue::protocols::rssi::Controller::getLocCumAckTout ( )

Gets local cumulative ACK timeout.

Returns
Timeout in protocol time units.

Definition at line 504 of file Controller.cpp.

◆ getLocMaxBuffers()

uint8_t rogue::protocols::rssi::Controller::getLocMaxBuffers ( )

Gets local max outstanding buffers parameter.

Returns
Maximum outstanding buffers.

Definition at line 480 of file Controller.cpp.

◆ getLocMaxCumAck()

uint8_t rogue::protocols::rssi::Controller::getLocMaxCumAck ( )

Gets local max cumulative ACK interval.

Returns
Maximum number of packets before cumulative ACK.

Definition at line 550 of file Controller.cpp.

◆ getLocMaxRetran()

uint8_t rogue::protocols::rssi::Controller::getLocMaxRetran ( )

Gets local max retransmit count.

Returns
Maximum retransmit attempts.

Definition at line 540 of file Controller.cpp.

◆ getLocMaxSegment()

uint16_t rogue::protocols::rssi::Controller::getLocMaxSegment ( )

Gets local max segment size.

Returns
Segment size in bytes.

Definition at line 492 of file Controller.cpp.

◆ getLocNullTout()

uint16_t rogue::protocols::rssi::Controller::getLocNullTout ( )

Gets local null-segment timeout.

Returns
Timeout in protocol time units.

Definition at line 528 of file Controller.cpp.

◆ getLocRetranTout()

uint16_t rogue::protocols::rssi::Controller::getLocRetranTout ( )

Gets local retransmit timeout.

Returns
Timeout in protocol time units.

Definition at line 516 of file Controller.cpp.

◆ getLocTryPeriod()

uint32_t rogue::protocols::rssi::Controller::getLocTryPeriod ( )

Gets local connection retry period.

Returns
Retry period in microseconds.

Definition at line 467 of file Controller.cpp.

◆ getOpen()

bool rogue::protocols::rssi::Controller::getOpen ( )

Returns whether the RSSI link is in open state.

Get state.

Returns
True when connection state is open.

Definition at line 415 of file Controller.cpp.

◆ getRemBusy()

bool rogue::protocols::rssi::Controller::getRemBusy ( )

Returns remote busy state.

Get remBusy.

Returns
True when remote endpoint reports busy.

Definition at line 448 of file Controller.cpp.

◆ getRemBusyCnt()

uint32_t rogue::protocols::rssi::Controller::getRemBusyCnt ( )

Returns remote busy event counter.

Get remBusyCnt.

Returns
Number of remote busy indications seen.

Definition at line 453 of file Controller.cpp.

◆ getRetranCount()

uint32_t rogue::protocols::rssi::Controller::getRetranCount ( )

Returns retransmit counter.

Get Retransmit Count.

Returns
Number of retransmitted frames.

Definition at line 430 of file Controller.cpp.

◆ reqFrame()

rogue::interfaces::stream::FramePtr rogue::protocols::rssi::Controller::reqFrame ( uint32_t  size)

Allocates a frame for transport-path transmission.

Transport frame allocation request.

Parameters
sizeMinimum payload size in bytes.
Returns
Allocated frame.

Definition at line 158 of file Controller.cpp.

◆ resetCounters()

void rogue::protocols::rssi::Controller::resetCounters ( )

Resets runtime counters.

Definition at line 582 of file Controller.cpp.

◆ setLocCumAckTout()

void rogue::protocols::rssi::Controller::setLocCumAckTout ( uint16_t  val)

Sets local cumulative ACK timeout.

Parameters
valTimeout in protocol time units.

Definition at line 496 of file Controller.cpp.

◆ setLocMaxBuffers()

void rogue::protocols::rssi::Controller::setLocMaxBuffers ( uint8_t  val)

Sets local max outstanding buffers parameter.

Parameters
valMaximum outstanding buffers.

Definition at line 471 of file Controller.cpp.

◆ setLocMaxCumAck()

void rogue::protocols::rssi::Controller::setLocMaxCumAck ( uint8_t  val)

Sets local max cumulative ACK interval.

Parameters
valMaximum number of packets before cumulative ACK.

Definition at line 544 of file Controller.cpp.

◆ setLocMaxRetran()

void rogue::protocols::rssi::Controller::setLocMaxRetran ( uint8_t  val)

Sets local max retransmit count.

Parameters
valMaximum retransmit attempts.

Definition at line 532 of file Controller.cpp.

◆ setLocMaxSegment()

void rogue::protocols::rssi::Controller::setLocMaxSegment ( uint16_t  val)

Sets local max segment size.

Parameters
valSegment size in bytes.

Definition at line 484 of file Controller.cpp.

◆ setLocNullTout()

void rogue::protocols::rssi::Controller::setLocNullTout ( uint16_t  val)

Sets local null-segment timeout.

Parameters
valTimeout in protocol time units.

Definition at line 520 of file Controller.cpp.

◆ setLocRetranTout()

void rogue::protocols::rssi::Controller::setLocRetranTout ( uint16_t  val)

Sets local retransmit timeout.

Parameters
valTimeout in protocol time units.

Definition at line 508 of file Controller.cpp.

◆ setLocTryPeriod()

void rogue::protocols::rssi::Controller::setLocTryPeriod ( uint32_t  val)

Sets local connection retry period.

Parameters
valRetry period in microseconds.

Definition at line 457 of file Controller.cpp.

◆ setTimeout()

void rogue::protocols::rssi::Controller::setTimeout ( uint32_t  timeout)

Sets timeout in microseconds for frame transmits.

Set timeout for frame transmits in microseconds.

Parameters
timeoutTimeout in microseconds.

Definition at line 980 of file Controller.cpp.

◆ start()

void rogue::protocols::rssi::Controller::start ( )

Starts or restarts RSSI connection establishment.

Start.

Definition at line 144 of file Controller.cpp.

◆ stop()

void rogue::protocols::rssi::Controller::stop ( )

Stops the RSSI connection and worker thread.

Close.

Definition at line 132 of file Controller.cpp.

◆ stopQueue()

void rogue::protocols::rssi::Controller::stopQueue ( )

Stops internal queues used by controller worker paths.

Stop queues.

Definition at line 127 of file Controller.cpp.

◆ transportRx()

void rogue::protocols::rssi::Controller::transportRx ( std::shared_ptr< rogue::interfaces::stream::Frame frame)

Processes a frame received from transport.

Frame received at transport interface.

Parameters
frameInput frame from transport endpoint.

Definition at line 193 of file Controller.cpp.


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