rogue
Loading...
Searching...
No Matches
Application.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_PROTOCOLS_RSSI_APPLICATION_H__
18#define __ROGUE_PROTOCOLS_RSSI_APPLICATION_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <atomic>
24#include <memory>
25
28
29namespace rogue {
30namespace protocols {
31namespace rssi {
32
33class Controller;
34
52 // RSSI controller backend.
53 std::shared_ptr<rogue::protocols::rssi::Controller> cntl_;
54
56 protected:
57 std::thread* thread_ = nullptr;
58 std::atomic<bool> threadEn_{false};
60
61 private:
62 // Worker thread entry point.
63 void runThread();
64
65 public:
76 static std::shared_ptr<rogue::protocols::rssi::Application> create();
77
79 static void setup_python();
80
89
92
101 void setController(std::shared_ptr<rogue::protocols::rssi::Controller> cntl);
102
113 std::shared_ptr<rogue::interfaces::stream::Frame> acceptReq(uint32_t size, bool zeroCopyEn);
114
119 void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
120};
121
122// Convienence
123typedef std::shared_ptr<rogue::protocols::rssi::Application> ApplicationPtr;
124
125} // namespace rssi
126} // namespace protocols
127}; // namespace rogue
128
129#endif
Stream master endpoint.
Definition Master.h:65
Stream slave endpoint and default frame pool.
Definition Slave.h:72
RSSI application-side endpoint.
Definition Application.h:51
static void setup_python()
Registers Python bindings for this class.
void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Accepts a frame from upstream application logic.
~Application()
Destroys the application endpoint.
void setController(std::shared_ptr< rogue::protocols::rssi::Controller > cntl)
Attaches the RSSI controller.
std::shared_ptr< rogue::interfaces::stream::Frame > acceptReq(uint32_t size, bool zeroCopyEn)
Allocates a frame for upstream writers.
static std::shared_ptr< rogue::protocols::rssi::Application > create()
Creates an RSSI application endpoint.
Application()
Constructs an RSSI application endpoint.
RSSI protocol controller.
Definition Controller.h:64
std::shared_ptr< rogue::protocols::rssi::Application > ApplicationPtr