Controller
TODO
Controller objects in C++ are referenced by the following shared pointer typedef:
-
typedef std::shared_ptr<rogue::protocols::packetizer::Controller> rogue::protocols::packetizer::ControllerPtr
The class description is shown below:
-
class Controller
Packetizer base controller.
Shared controller logic for packetizer variants that route data between one transport endpoint and multiple application endpoints.
Subclassed by rogue::protocols::packetizer::ControllerV1, rogue::protocols::packetizer::ControllerV2
Public Functions
Constructs a packetizer controller base.
- Parameters:
tran – Transport endpoint associated with this controller.
app – Pointer to application endpoint array indexed by destination.
headSize – Header bytes inserted per packet.
tailSize – Trailer bytes inserted per packet.
alignSize – Payload alignment requirement in bytes.
enSsi – Enable SSI framing behavior.
-
~Controller()
Destroys the packetizer controller base.
-
std::shared_ptr<rogue::interfaces::stream::Frame> reqFrame(uint32_t size)
Allocates a transport-path frame.
- Parameters:
size – Minimum payload size in bytes.
- Returns:
Allocated frame.
Processes a frame received from transport.
- Parameters:
frame – Input transport frame.
-
void stopQueue()
Stops the internal transmit queue.
-
void stop()
Stops controller processing.
-
std::shared_ptr<rogue::interfaces::stream::Frame> transportTx()
Returns the next frame for transport transmission.
- Returns:
Frame ready for transport transmit, or null when none is available.
Processes a frame received from an application endpoint.
- Parameters:
frame – Input application frame.
id – Application destination identifier.
-
uint32_t getDropCount()
Returns dropped-frame counter.
- Returns:
Number of dropped frames.
-
void setTimeout(uint32_t timeout)
Sets timeout in microseconds for frame transmits.
- Parameters:
timeout – Timeout value in microseconds.