Controller
Controller is the core RSSI protocol engine. It implements handshake/state
transitions, negotiated-parameter management, retransmission behavior, and
flow-control decisions while bridging Transport and Application paths.
For conceptual guidance, see RSSI Protocol.
Threading and Lifecycle
Controllerowns protocol-state progression and internal worker behavior.Implements Managed Interface Lifecycle: Example: Runtime Work In _start() And _stop()
Controller objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::protocols::rssi::Controller> rogue::protocols::rssi::ControllerPtr
[header]
The class description is shown below:
-
class Controller : public rogue::EnableSharedFromThis<rogue::protocols::rssi::Controller>
[header] 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:Client/Server: convenience wrappers that construct and wire the RSSI stack for endpoint role.Transport: stream-facing link side for RSSI frames to/from the lower transport (for example UDP-based links).Application: stream-facing payload side used by upper protocol layers.Header: codec/container for RSSI header fields on stream frames.Controller(this class): central state machine and policy engine connectingTransportandApplication.
Operationally, frames received from
Transportare decoded and processed for ACK/SYN/state transitions and delivery, whileApplicationframes are segmented/tracked for reliable delivery according to negotiated parameters.Public Functions
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:
segSize – Initial local max segment size.
tran – Transport endpoint used for link traffic.
app – Application endpoint used for payload traffic.
server – True to run the server-side handshake behavior.
-
void stopQueue()
[header] [impl] Stops internal queues used by controller worker paths.
Stop queues.
-
std::shared_ptr<rogue::interfaces::stream::Frame> reqFrame(uint32_t size)
[header] [impl] Allocates a frame for transport-path transmission.
Transport frame allocation request.
- Parameters:
size – Minimum payload size in bytes.
- Returns:
Allocated frame.
Processes a frame received from transport.
Frame received at transport interface.
- Parameters:
frame – Input frame from transport endpoint.
-
std::shared_ptr<rogue::interfaces::stream::Frame> applicationTx()
[header] [impl] 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.
Processes a frame received from the application side.
Frame received at application interface.
- Parameters:
frame – Input frame from application endpoint.
-
bool getOpen()
[header] [impl] Returns whether the RSSI link is in open state.
Get state.
- Returns:
True when connection state is open.
-
uint32_t getDownCount()
[header] [impl] Returns link down transition counter.
Get Down Count.
- Returns:
Number of times link entered down/closed state.
-
uint32_t getDropCount()
[header] [impl] Returns dropped-frame counter.
Get Drop Count.
- Returns:
Number of dropped received frames.
-
uint32_t getRetranCount()
[header] [impl] Returns retransmit counter.
Get Retransmit Count.
- Returns:
Number of retransmitted frames.
-
bool getLocBusy()
[header] [impl] Returns local busy state.
Get locBusy.
- Returns:
True when local endpoint is currently busy.
-
uint32_t getLocBusyCnt()
[header] [impl] Returns local busy event counter.
Get locBusyCnt.
- Returns:
Number of local busy assertions.
-
bool getRemBusy()
[header] [impl] Returns remote busy state.
Get remBusy.
- Returns:
True when remote endpoint reports busy.
-
uint32_t getRemBusyCnt()
[header] [impl] Returns remote busy event counter.
Get remBusyCnt.
- Returns:
Number of remote busy indications seen.
-
void setLocTryPeriod(uint32_t val)
[header] [impl] Sets local connection retry period.
- Parameters:
val – Retry period in microseconds.
-
uint32_t getLocTryPeriod()
[header] [impl] Gets local connection retry period.
- Returns:
Retry period in microseconds.
-
void setLocMaxBuffers(uint8_t val)
[header] [impl] Sets local max outstanding buffers parameter.
- Parameters:
val – Maximum outstanding buffers.
-
uint8_t getLocMaxBuffers()
[header] [impl] Gets local max outstanding buffers parameter.
- Returns:
Maximum outstanding buffers.
-
void setLocMaxSegment(uint16_t val)
[header] [impl] Sets local max segment size.
- Parameters:
val – Segment size in bytes.
-
uint16_t getLocMaxSegment()
[header] [impl] Gets local max segment size.
- Returns:
Segment size in bytes.
-
void setLocCumAckTout(uint16_t val)
[header] [impl] Sets local cumulative ACK timeout.
- Parameters:
val – Timeout in protocol time units.
-
uint16_t getLocCumAckTout()
[header] [impl] Gets local cumulative ACK timeout.
- Returns:
Timeout in protocol time units.
-
void setLocRetranTout(uint16_t val)
[header] [impl] Sets local retransmit timeout.
- Parameters:
val – Timeout in protocol time units.
-
uint16_t getLocRetranTout()
[header] [impl] Gets local retransmit timeout.
- Returns:
Timeout in protocol time units.
-
void setLocNullTout(uint16_t val)
[header] [impl] Sets local null-segment timeout.
- Parameters:
val – Timeout in protocol time units.
-
uint16_t getLocNullTout()
[header] [impl] Gets local null-segment timeout.
- Returns:
Timeout in protocol time units.
-
void setLocMaxRetran(uint8_t val)
[header] [impl] Sets local max retransmit count.
- Parameters:
val – Maximum retransmit attempts.
-
uint8_t getLocMaxRetran()
[header] [impl] Gets local max retransmit count.
- Returns:
Maximum retransmit attempts.
-
void setLocMaxCumAck(uint8_t val)
[header] [impl] Sets local max cumulative ACK interval.
- Parameters:
val – Maximum number of packets before cumulative ACK.
-
uint8_t getLocMaxCumAck()
[header] [impl] Gets local max cumulative ACK interval.
- Returns:
Maximum number of packets before cumulative ACK.
-
uint8_t curMaxBuffers()
[header] [impl] Gets negotiated max outstanding buffers.
- Returns:
Negotiated max outstanding buffers.
-
uint16_t curMaxSegment()
[header] [impl] Gets negotiated max segment size.
- Returns:
Negotiated segment size in bytes.
-
uint16_t curCumAckTout()
[header] [impl] Gets negotiated cumulative ACK timeout.
- Returns:
Negotiated timeout in protocol time units.
-
uint16_t curRetranTout()
[header] [impl] Gets negotiated retransmit timeout.
- Returns:
Negotiated timeout in protocol time units.
-
uint16_t curNullTout()
[header] [impl] Gets negotiated null-segment timeout.
- Returns:
Negotiated timeout in protocol time units.
-
uint8_t curMaxRetran()
[header] [impl] Gets negotiated max retransmit count.
- Returns:
Negotiated max retransmit attempts.
-
uint8_t curMaxCumAck()
[header] [impl] Gets negotiated max cumulative ACK interval.
- Returns:
Negotiated packets between cumulative ACKs.
Public Static Functions
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 returnsstd::shared_ptrownership compatible with Rogue pointer typedefs.Company : SLAC National Accelerator Laboratory
Description: RSSI
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.
- Parameters:
segSize – Initial local maximum segment size.
tran – Transport endpoint used for link traffic.
app – Application endpoint used for payload traffic.
server – True to run server-side handshake behavior.
- Returns:
Shared pointer to the created controller.