17#ifndef __ROGUE_PROTOCOLS_PACKETIZER_CONTROLLER_H__
18#define __ROGUE_PROTOCOLS_PACKETIZER_CONTROLLER_H__
63 std::shared_ptr<rogue::Logging>
log_;
65 std::shared_ptr<rogue::interfaces::stream::Frame>
tranFrame_[256];
70 std::shared_ptr<rogue::protocols::packetizer::Transport>
tran_;
71 std::shared_ptr<rogue::protocols::packetizer::Application>*
app_;
85 Controller(std::shared_ptr<rogue::protocols::packetizer::Transport> tran,
86 std::shared_ptr<rogue::protocols::packetizer::Application>* app,
100 std::shared_ptr<rogue::interfaces::stream::Frame>
reqFrame(uint32_t size);
106 virtual void transportRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
118 std::shared_ptr<rogue::interfaces::stream::Frame>
transportTx();
125 virtual void applicationRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame, uint8_t
id);
141typedef std::shared_ptr<rogue::protocols::packetizer::Controller>
ControllerPtr;
Thread-safe bounded queue with optional busy threshold.
Packetizer base controller.
rogue::Queue< std::shared_ptr< rogue::interfaces::stream::Frame > > tranQueue_
std::atomic< uint32_t > dropCount_
std::shared_ptr< rogue::interfaces::stream::Frame > tranFrame_[256]
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.
~Controller()
Destroys the packetizer controller base.
virtual void applicationRx(std::shared_ptr< rogue::interfaces::stream::Frame > frame, uint8_t id)
Processes a frame received from an application endpoint.
std::shared_ptr< rogue::protocols::packetizer::Application > * app_
std::shared_ptr< rogue::protocols::packetizer::Transport > tran_
std::shared_ptr< rogue::interfaces::stream::Frame > transportTx()
Returns the next frame for transport transmission.
std::shared_ptr< rogue::interfaces::stream::Frame > reqFrame(uint32_t size)
Allocates a transport-path frame.
uint32_t getDropCount()
Returns dropped-frame counter.
void setTimeout(uint32_t timeout)
Sets timeout in microseconds for frame transmits.
std::shared_ptr< rogue::Logging > log_
std::shared_ptr< rogue::protocols::packetizer::Controller > ControllerPtr