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

Packetizer controller implementation for protocol v1. More...

#include <ControllerV1.h>

Inheritance diagram for rogue::protocols::packetizer::ControllerV1:
rogue::protocols::packetizer::Controller rogue::EnableSharedFromThis< rogue::protocols::packetizer::ControllerV1 > rogue::EnableSharedFromThisBase

Public Member Functions

 ControllerV1 (bool enSsi, std::shared_ptr< rogue::protocols::packetizer::Transport > tran, std::shared_ptr< rogue::protocols::packetizer::Application > *app)
 Constructs a packetizer v1 controller.
 
 ~ControllerV1 ()
 Destroys the controller instance.
 
void transportRx (std::shared_ptr< rogue::interfaces::stream::Frame > frame)
 Processes a frame received at the transport interface.
 
void applicationRx (std::shared_ptr< rogue::interfaces::stream::Frame > frame, uint8_t id)
 Processes a frame received from one application endpoint.
 
- Public Member Functions inherited from rogue::protocols::packetizer::Controller
 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)
 Constructs a packetizer controller base.
 
 ~Controller ()
 Destroys the packetizer controller base.
 
std::shared_ptr< rogue::interfaces::stream::FramereqFrame (uint32_t size)
 Allocates a transport-path frame.
 
void stopQueue ()
 Stops the internal transmit queue.
 
void stop ()
 Stops controller processing.
 
std::shared_ptr< rogue::interfaces::stream::FrametransportTx ()
 Returns the next frame for transport transmission.
 
uint32_t getDropCount ()
 Returns dropped-frame counter.
 
void setTimeout (uint32_t timeout)
 Sets timeout in microseconds for frame transmits.
 
- Public Member Functions inherited from rogue::EnableSharedFromThis< rogue::protocols::packetizer::ControllerV1 >
std::shared_ptr< rogue::protocols::packetizer::ControllerV1shared_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::packetizer::ControllerV1create (bool enSsi, std::shared_ptr< rogue::protocols::packetizer::Transport > tran, std::shared_ptr< rogue::protocols::packetizer::Application > *app)
 Creates a packetizer v1 controller.
 

Additional Inherited Members

- Protected Attributes inherited from rogue::protocols::packetizer::Controller
bool enSsi_
 
uint32_t appIndex_
 
uint32_t tranIndex_
 
bool transSof_ [256]
 
uint32_t tranCount_ [256]
 
uint32_t crc_ [256]
 
uint8_t tranDest_
 
uint32_t dropCount_
 
uint32_t headSize_
 
uint32_t tailSize_
 
uint32_t alignSize_
 
struct timeval timeout_
 
std::shared_ptr< rogue::Logginglog_
 
std::shared_ptr< rogue::interfaces::stream::FrametranFrame_ [256]
 
std::mutex appMtx_
 
std::mutex tranMtx_
 
std::shared_ptr< rogue::protocols::packetizer::Transporttran_
 
std::shared_ptr< rogue::protocols::packetizer::Application > * app_
 
rogue::Queue< std::shared_ptr< rogue::interfaces::stream::Frame > > tranQueue_
 

Detailed Description

Packetizer controller implementation for protocol v1.

Implements packetizer v1 frame parsing and assembly between the transport endpoint and per-destination application endpoints.

Definition at line 47 of file ControllerV1.h.

Constructor & Destructor Documentation

◆ ControllerV1()

rogue::protocols::packetizer::ControllerV1::ControllerV1 ( bool  enSsi,
std::shared_ptr< rogue::protocols::packetizer::Transport tran,
std::shared_ptr< rogue::protocols::packetizer::Application > *  app 
)

Constructs a packetizer v1 controller.

Creator.

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

Parameters
enSsiEnable SSI framing behavior.
tranTransport endpoint attached to this controller.
appPointer to array of application endpoints indexed by destination.

Definition at line 45 of file ControllerV1.cpp.

◆ ~ControllerV1()

rogue::protocols::packetizer::ControllerV1::~ControllerV1 ( )

Destroys the controller instance.

Destructor.

Definition at line 49 of file ControllerV1.cpp.

Member Function Documentation

◆ applicationRx()

void rogue::protocols::packetizer::ControllerV1::applicationRx ( std::shared_ptr< rogue::interfaces::stream::Frame frame,
uint8_t  id 
)
virtual

Processes a frame received from one application endpoint.

Frame received at application interface.

Parameters
frameApplication frame to packetize.
idApplication/destination identifier.

Reimplemented from rogue::protocols::packetizer::Controller.

Definition at line 181 of file ControllerV1.cpp.

◆ create()

rogue::protocols::packetizer::ControllerV1Ptr rogue::protocols::packetizer::ControllerV1::create ( bool  enSsi,
std::shared_ptr< rogue::protocols::packetizer::Transport tran,
std::shared_ptr< rogue::protocols::packetizer::Application > *  app 
)
static

Creates a packetizer v1 controller.

Class creation.

Parameter semantics are identical to the constructor; see ControllerV1() for construction-path 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
enSsiEnable SSI framing behavior.
tranTransport endpoint attached to this controller.
appPointer to array of application endpoints indexed by destination.
Returns
Shared pointer to a new controller instance.

Company : SLAC National Accelerator Laboratory

Description:

Packetizer Controller V1

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 39 of file ControllerV1.cpp.

◆ transportRx()

void rogue::protocols::packetizer::ControllerV1::transportRx ( std::shared_ptr< rogue::interfaces::stream::Frame frame)
virtual

Processes a frame received at the transport interface.

Frame received at transport interface.

Parameters
frameTransport frame to decode and route.

Reimplemented from rogue::protocols::packetizer::Controller.

Definition at line 52 of file ControllerV1.cpp.


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