rogue
Loading...
Searching...
No Matches
Transport.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_PROTOCOLS_RSSI_TRANSPORT_H__
18#define __ROGUE_PROTOCOLS_RSSI_TRANSPORT_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24
25#include "rogue/Queue.h"
28
29namespace rogue {
30namespace protocols {
31namespace rssi {
32
33class Controller;
34
47 // RSSI controller backend. Weak to avoid a cycle with Controller::tran_.
48 std::weak_ptr<rogue::protocols::rssi::Controller> cntl_;
49
50 public:
61 static std::shared_ptr<rogue::protocols::rssi::Transport> create();
62
64 static void setup_python();
65
73 Transport();
74
76 ~Transport();
77
82 void setController(std::shared_ptr<rogue::protocols::rssi::Controller> cntl);
83
88 void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
89};
90
91// Convienence
92typedef std::shared_ptr<rogue::protocols::rssi::Transport> TransportPtr;
93
94} // namespace rssi
95} // namespace protocols
96}; // namespace rogue
97
98#endif
Stream master endpoint.
Definition Master.h:65
Stream slave endpoint and default frame pool.
Definition Slave.h:72
RSSI transport endpoint.
Definition Transport.h:46
void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Accepts a frame from the upstream stream interface.
Definition Transport.cpp:67
static std::shared_ptr< rogue::protocols::rssi::Transport > create()
Creates a new transport endpoint instance.
Definition Transport.cpp:39
Transport()
Constructs a transport endpoint.
Definition Transport.cpp:56
static void setup_python()
Registers Python bindings for this class.
Definition Transport.cpp:44
~Transport()
Destroys the transport endpoint.
Definition Transport.cpp:59
void setController(std::shared_ptr< rogue::protocols::rssi::Controller > cntl)
Attaches the RSSI controller.
Definition Transport.cpp:62
std::shared_ptr< rogue::protocols::rssi::Transport > TransportPtr
Definition Transport.h:92