|
rogue
|
RSSI protocol controller. More...
#include <Controller.h>
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::Frame > | reqFrame (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::Frame > | applicationTx () |
| 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::Controller > | shared_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::Controller > | create (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. | |
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 connecting Transport and Application.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.
| 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.
| 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. |
Definition at line 54 of file Controller.cpp.
| rogue::protocols::rssi::Controller::~Controller | ( | ) |
Destroys the controller and stops background processing.
Destructor.
Definition at line 122 of file Controller.cpp.
| 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.
| frame | Input frame from application endpoint. |
Definition at line 365 of file Controller.cpp.
| rogue::interfaces::stream::FramePtr rogue::protocols::rssi::Controller::applicationTx | ( | ) |
Gets next frame to transmit from the application side.
Frame transmit at application interface.
Definition at line 337 of file Controller.cpp.
|
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.
| 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. |
Description:
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
Definition at line 45 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::curCumAckTout | ( | ) |
Gets negotiated cumulative ACK timeout.
Definition at line 562 of file Controller.cpp.
| uint8_t rogue::protocols::rssi::Controller::curMaxBuffers | ( | ) |
Gets negotiated max outstanding buffers.
Definition at line 554 of file Controller.cpp.
| uint8_t rogue::protocols::rssi::Controller::curMaxCumAck | ( | ) |
Gets negotiated max cumulative ACK interval.
Definition at line 578 of file Controller.cpp.
| uint8_t rogue::protocols::rssi::Controller::curMaxRetran | ( | ) |
Gets negotiated max retransmit count.
Definition at line 574 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::curMaxSegment | ( | ) |
Gets negotiated max segment size.
Definition at line 558 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::curNullTout | ( | ) |
Gets negotiated null-segment timeout.
Definition at line 570 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::curRetranTout | ( | ) |
Gets negotiated retransmit timeout.
Definition at line 566 of file Controller.cpp.
| uint32_t rogue::protocols::rssi::Controller::getDownCount | ( | ) |
Returns link down transition counter.
Get Down Count.
Definition at line 420 of file Controller.cpp.
| uint32_t rogue::protocols::rssi::Controller::getDropCount | ( | ) |
Returns dropped-frame counter.
Get Drop Count.
Definition at line 425 of file Controller.cpp.
| bool rogue::protocols::rssi::Controller::getLocBusy | ( | ) |
Returns local busy state.
Get locBusy.
Definition at line 435 of file Controller.cpp.
| uint32_t rogue::protocols::rssi::Controller::getLocBusyCnt | ( | ) |
Returns local busy event counter.
Get locBusyCnt.
Definition at line 443 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::getLocCumAckTout | ( | ) |
Gets local cumulative ACK timeout.
Definition at line 504 of file Controller.cpp.
| uint8_t rogue::protocols::rssi::Controller::getLocMaxBuffers | ( | ) |
Gets local max outstanding buffers parameter.
Definition at line 480 of file Controller.cpp.
| uint8_t rogue::protocols::rssi::Controller::getLocMaxCumAck | ( | ) |
Gets local max cumulative ACK interval.
Definition at line 550 of file Controller.cpp.
| uint8_t rogue::protocols::rssi::Controller::getLocMaxRetran | ( | ) |
Gets local max retransmit count.
Definition at line 540 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::getLocMaxSegment | ( | ) |
Gets local max segment size.
Definition at line 492 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::getLocNullTout | ( | ) |
Gets local null-segment timeout.
Definition at line 528 of file Controller.cpp.
| uint16_t rogue::protocols::rssi::Controller::getLocRetranTout | ( | ) |
Gets local retransmit timeout.
Definition at line 516 of file Controller.cpp.
| uint32_t rogue::protocols::rssi::Controller::getLocTryPeriod | ( | ) |
Gets local connection retry period.
Definition at line 467 of file Controller.cpp.
| bool rogue::protocols::rssi::Controller::getOpen | ( | ) |
Returns whether the RSSI link is in open state.
Get state.
Definition at line 415 of file Controller.cpp.
| bool rogue::protocols::rssi::Controller::getRemBusy | ( | ) |
Returns remote busy state.
Get remBusy.
Definition at line 448 of file Controller.cpp.
| uint32_t rogue::protocols::rssi::Controller::getRemBusyCnt | ( | ) |
Returns remote busy event counter.
Get remBusyCnt.
Definition at line 453 of file Controller.cpp.
| uint32_t rogue::protocols::rssi::Controller::getRetranCount | ( | ) |
Returns retransmit counter.
Get Retransmit Count.
Definition at line 430 of file Controller.cpp.
| rogue::interfaces::stream::FramePtr rogue::protocols::rssi::Controller::reqFrame | ( | uint32_t | size | ) |
Allocates a frame for transport-path transmission.
Transport frame allocation request.
| size | Minimum payload size in bytes. |
Definition at line 158 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::resetCounters | ( | ) |
Resets runtime counters.
Definition at line 582 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocCumAckTout | ( | uint16_t | val | ) |
Sets local cumulative ACK timeout.
| val | Timeout in protocol time units. |
Definition at line 496 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocMaxBuffers | ( | uint8_t | val | ) |
Sets local max outstanding buffers parameter.
| val | Maximum outstanding buffers. |
Definition at line 471 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocMaxCumAck | ( | uint8_t | val | ) |
Sets local max cumulative ACK interval.
| val | Maximum number of packets before cumulative ACK. |
Definition at line 544 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocMaxRetran | ( | uint8_t | val | ) |
Sets local max retransmit count.
| val | Maximum retransmit attempts. |
Definition at line 532 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocMaxSegment | ( | uint16_t | val | ) |
Sets local max segment size.
| val | Segment size in bytes. |
Definition at line 484 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocNullTout | ( | uint16_t | val | ) |
Sets local null-segment timeout.
| val | Timeout in protocol time units. |
Definition at line 520 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocRetranTout | ( | uint16_t | val | ) |
Sets local retransmit timeout.
| val | Timeout in protocol time units. |
Definition at line 508 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setLocTryPeriod | ( | uint32_t | val | ) |
Sets local connection retry period.
| val | Retry period in microseconds. |
Definition at line 457 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::setTimeout | ( | uint32_t | timeout | ) |
Sets timeout in microseconds for frame transmits.
Set timeout for frame transmits in microseconds.
| timeout | Timeout in microseconds. |
Definition at line 980 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::start | ( | ) |
Starts or restarts RSSI connection establishment.
Start.
Definition at line 144 of file Controller.cpp.
| void rogue::protocols::rssi::Controller::stop | ( | ) |
| void rogue::protocols::rssi::Controller::stopQueue | ( | ) |
Stops internal queues used by controller worker paths.
Stop queues.
Definition at line 127 of file Controller.cpp.
| 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.
| frame | Input frame from transport endpoint. |
Definition at line 193 of file Controller.cpp.