|
rogue
|
Packetizer base controller. More...
#include <Controller.h>
Public Member 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) | |
| Constructs a packetizer controller base. | |
| ~Controller () | |
| Destroys the packetizer controller base. | |
| std::shared_ptr< rogue::interfaces::stream::Frame > | reqFrame (uint32_t size) |
| Allocates a transport-path frame. | |
| virtual void | transportRx (std::shared_ptr< rogue::interfaces::stream::Frame > frame) |
| Processes a frame received from transport. | |
| 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. | |
| virtual void | applicationRx (std::shared_ptr< rogue::interfaces::stream::Frame > frame, uint8_t id) |
| Processes a frame received from an application endpoint. | |
| uint32_t | getDropCount () |
| Returns dropped-frame counter. | |
| void | setTimeout (uint32_t timeout) |
| Sets timeout in microseconds for frame transmits. | |
Protected Attributes | |
| 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::Logging > | log_ |
| std::shared_ptr< rogue::interfaces::stream::Frame > | tranFrame_ [256] |
| std::mutex | appMtx_ |
| std::mutex | tranMtx_ |
| std::shared_ptr< rogue::protocols::packetizer::Transport > | tran_ |
| std::shared_ptr< rogue::protocols::packetizer::Application > * | app_ |
| rogue::Queue< std::shared_ptr< rogue::interfaces::stream::Frame > > | tranQueue_ |
Packetizer base controller.
Shared controller logic for packetizer variants that route data between one transport endpoint and multiple application endpoints.
Definition at line 45 of file Controller.h.
| 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.
Creator.
| 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. |
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 37 of file Controller.cpp.
| rogue::protocols::packetizer::Controller::~Controller | ( | ) |
|
virtual |
Processes a frame received from an application endpoint.
Frame received at application interface.
| frame | Input application frame. |
| id | Application destination identifier. |
Reimplemented in rogue::protocols::packetizer::ControllerV1, and rogue::protocols::packetizer::ControllerV2.
Definition at line 138 of file Controller.cpp.
| uint32_t rogue::protocols::packetizer::Controller::getDropCount | ( | ) |
Returns dropped-frame counter.
Get drop count.
Definition at line 141 of file Controller.cpp.
| rogue::interfaces::stream::FramePtr rogue::protocols::packetizer::Controller::reqFrame | ( | uint32_t | size | ) |
Allocates a transport-path frame.
Transport frame allocation request.
| size | Minimum payload size in bytes. |
Definition at line 81 of file Controller.cpp.
| void rogue::protocols::packetizer::Controller::setTimeout | ( | uint32_t | timeout | ) |
Sets timeout in microseconds for frame transmits.
Set timeout for frame transmits in microseconds.
| timeout | Timeout value in microseconds. |
Definition at line 146 of file Controller.cpp.
| void rogue::protocols::packetizer::Controller::stop | ( | ) |
Stops controller processing.
| void rogue::protocols::packetizer::Controller::stopQueue | ( | ) |
|
virtual |
Processes a frame received from transport.
Frame received at transport interface.
| frame | Input transport frame. |
Reimplemented in rogue::protocols::packetizer::ControllerV1, and rogue::protocols::packetizer::ControllerV2.
Definition at line 127 of file Controller.cpp.
| rogue::interfaces::stream::FramePtr rogue::protocols::packetizer::Controller::transportTx | ( | ) |
Returns the next frame for transport transmission.
Frame transmit at transport interface.
Definition at line 131 of file Controller.cpp.
|
protected |
Definition at line 58 of file Controller.h.
|
protected |
Definition at line 70 of file Controller.h.
|
protected |
Definition at line 49 of file Controller.h.
|
protected |
Definition at line 66 of file Controller.h.
|
protected |
Definition at line 53 of file Controller.h.
|
protected |
Definition at line 55 of file Controller.h.
|
protected |
Definition at line 48 of file Controller.h.
|
protected |
Definition at line 56 of file Controller.h.
|
protected |
Definition at line 62 of file Controller.h.
|
protected |
Definition at line 57 of file Controller.h.
|
protected |
Definition at line 60 of file Controller.h.
|
protected |
Definition at line 69 of file Controller.h.
|
protected |
Definition at line 52 of file Controller.h.
|
protected |
Definition at line 54 of file Controller.h.
|
protected |
Definition at line 64 of file Controller.h.
|
protected |
Definition at line 50 of file Controller.h.
|
protected |
Definition at line 67 of file Controller.h.
|
protected |
Definition at line 72 of file Controller.h.
|
protected |
Definition at line 51 of file Controller.h.