rogue
Loading...
Searching...
No Matches
Transport.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_PROTOCOLS_PACKETIZER_TRANSPORT_H__
18#define __ROGUE_PROTOCOLS_PACKETIZER_TRANSPORT_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24
27
28namespace rogue {
29namespace protocols {
30namespace packetizer {
31
32class Controller;
33
52 // Packetizer controller endpoint.
53 std::shared_ptr<rogue::protocols::packetizer::Controller> cntl_;
54
55 // Outbound transport worker thread.
56 std::thread* thread_;
57 bool threadEn_;
58
59 // Worker thread entry point.
60 void runThread();
61
62 public:
73 static std::shared_ptr<rogue::protocols::packetizer::Transport> create();
74
76 static void setup_python();
77
85 Transport();
86
88 ~Transport();
89
99 void setController(std::shared_ptr<rogue::protocols::packetizer::Controller> cntl);
100
105 void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
106};
107
108// Convenience
109typedef std::shared_ptr<rogue::protocols::packetizer::Transport> TransportPtr;
110
111} // namespace packetizer
112} // namespace protocols
113}; // namespace rogue
114
115#endif
Stream master endpoint.
Definition Master.h:65
Stream slave endpoint and default frame pool.
Definition Slave.h:72
Packetizer transport endpoint.
Definition Transport.h:51
~Transport()
Destroys the packetizer transport endpoint.
Definition Transport.cpp:59
static std::shared_ptr< rogue::protocols::packetizer::Transport > create()
Creates a packetizer transport endpoint.
Definition Transport.cpp:39
void setController(std::shared_ptr< rogue::protocols::packetizer::Controller > cntl)
Attaches the packetizer controller.
Definition Transport.cpp:66
static void setup_python()
Registers Python bindings for this class.
Definition Transport.cpp:44
void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Accepts a frame from the upstream stream interface.
Definition Transport.cpp:80
Transport()
Constructs a packetizer transport endpoint.
Definition Transport.cpp:56
std::shared_ptr< rogue::protocols::packetizer::Transport > TransportPtr
Definition Transport.h:109