Controller

Controller is the shared packetizer base controller that routes traffic between one transport endpoint and multiple application endpoints. Concrete protocol behavior is provided by ControllerV1 and ControllerV2. This page is reference-only; for conceptual context see Packetizer Protocol.

Controller objects in C++ are referenced by the following shared pointer typedef:

typedef std::shared_ptr<rogue::protocols::packetizer::Controller> rogue::protocols::packetizer::ControllerPtr
[header]

The class description is shown below:

class Controller
[header]

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

Controller(std::shared_ptr<rogue::protocols::packetizer::Transport> tran, std::shared_ptr<rogue::protocols::packetizer::Application> *app, uint32_t headSize, uint32_t tailSize, uint32_t alignSize, bool enSsi)
[header] [impl]

Constructs a packetizer controller base.

Creator.

Company : SLAC National Accelerator Laboratory

Description: Packetizer

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:
  • tranTransport 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()
[header] [impl]

Destroys the packetizer controller base.

Destructor.

std::shared_ptr<rogue::interfaces::stream::Frame> reqFrame(uint32_t size)
[header] [impl]

Allocates a transport-path frame.

Transport frame allocation request.

Parameters:

size – Minimum payload size in bytes.

Returns:

Allocated frame.

virtual void transportRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame)
[header] [impl]

Processes a frame received from transport.

Frame received at transport interface.

Parameters:

frame – Input transport frame.

void stopQueue()
[header] [impl]

Stops the internal transmit queue.

Stop TX.

void stop()
[header]

Stops controller processing.

std::shared_ptr<rogue::interfaces::stream::Frame> transportTx()
[header] [impl]

Returns the next frame for transport transmission.

Frame transmit at transport interface.

Returns:

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

virtual void applicationRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame, uint8_t id)
[header] [impl]

Processes a frame received from an application endpoint.

Frame received at application interface.

Parameters:
  • frame – Input application frame.

  • idApplication destination identifier.

uint32_t getDropCount()
[header] [impl]

Returns dropped-frame counter.

Get drop count.

Returns:

Number of dropped frames.

void setTimeout(uint32_t timeout)
[header] [impl]

Sets timeout in microseconds for frame transmits.

Set timeout for frame transmits in microseconds.

Parameters:

timeout – Timeout value in microseconds.