rogue
Loading...
Searching...
No Matches
Core.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_PROTOCOLS_PACKETIZER_CORE_H__
18#define __ROGUE_PROTOCOLS_PACKETIZER_CORE_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24#include <thread>
25
26namespace rogue {
27namespace protocols {
28namespace packetizer {
29
30class Transport;
31class Application;
32class Controller;
33
41class Core {
42 // Transport module
43 std::shared_ptr<rogue::protocols::packetizer::Transport> tran_;
44
45 // Application modules
46 std::shared_ptr<rogue::protocols::packetizer::Application> app_[256];
47
48 // Core module
49 std::shared_ptr<rogue::protocols::packetizer::Controller> cntl_;
50
51 public:
65 static std::shared_ptr<rogue::protocols::packetizer::Core> create(bool enSsi);
66
68 static void setup_python();
69
79 explicit Core(bool enSsi);
80
82 ~Core();
83
88 std::shared_ptr<rogue::protocols::packetizer::Transport> transport();
89
95 std::shared_ptr<rogue::protocols::packetizer::Application> application(uint8_t dest);
96
101 uint32_t getDropCount();
102
107 void setTimeout(uint32_t timeout);
108};
109
110// Convenience
111typedef std::shared_ptr<rogue::protocols::packetizer::Core> CorePtr;
112
113} // namespace packetizer
114} // namespace protocols
115}; // namespace rogue
116
117#endif
Packetizer core wiring object.
Definition Core.h:41
static void setup_python()
Registers Python bindings for this class.
Definition Core.cpp:43
void setTimeout(uint32_t timeout)
Sets transmit timeout for internal controller operations.
Definition Core.cpp:90
~Core()
Destroys the packetizer core.
Definition Core.cpp:62
std::shared_ptr< rogue::protocols::packetizer::Transport > transport()
Returns the transport-facing endpoint.
Definition Core.cpp:72
std::shared_ptr< rogue::protocols::packetizer::Application > application(uint8_t dest)
Returns an application endpoint by destination ID.
Definition Core.cpp:77
uint32_t getDropCount()
Returns total dropped-frame count reported by the controller.
Definition Core.cpp:86
static std::shared_ptr< rogue::protocols::packetizer::Core > create(bool enSsi)
Creates a packetizer core.
Definition Core.cpp:38
std::shared_ptr< rogue::protocols::packetizer::Core > CorePtr
Definition Core.h:111