17#ifndef __ROGUE_PROTOCOLS_PACKETIZER_CONTROLLER_H__
18#define __ROGUE_PROTOCOLS_PACKETIZER_CONTROLLER_H__
62 std::shared_ptr<rogue::Logging>
log_;
64 std::shared_ptr<rogue::interfaces::stream::Frame>
tranFrame_[256];
69 std::shared_ptr<rogue::protocols::packetizer::Transport>
tran_;
70 std::shared_ptr<rogue::protocols::packetizer::Application>*
app_;
84 Controller(std::shared_ptr<rogue::protocols::packetizer::Transport> tran,
85 std::shared_ptr<rogue::protocols::packetizer::Application>* app,
99 std::shared_ptr<rogue::interfaces::stream::Frame>
reqFrame(uint32_t size);
105 virtual void transportRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
117 std::shared_ptr<rogue::interfaces::stream::Frame>
transportTx();
124 virtual void applicationRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame, uint8_t
id);
140typedef 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::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