rogue
Loading...
Searching...
No Matches
CoreV2.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_PROTOCOLS_PACKETIZER_CORE_V2_H__
18#define __ROGUE_PROTOCOLS_PACKETIZER_CORE_V2_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 ControllerV2;
33
41class CoreV2 {
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::ControllerV2> cntl_;
50
51 public:
67 static std::shared_ptr<rogue::protocols::packetizer::CoreV2> create(bool enIbCrc, bool enObCrc, bool enSsi);
68
70 static void setup_python();
71
83 CoreV2(bool enIbCrc, bool enObCrc, bool enSsi);
84
86 ~CoreV2();
87
92 std::shared_ptr<rogue::protocols::packetizer::Transport> transport();
93
99 std::shared_ptr<rogue::protocols::packetizer::Application> application(uint8_t dest);
100
105 uint32_t getDropCount();
106
111 void setTimeout(uint32_t timeout);
112};
113
114// Convenience
115typedef std::shared_ptr<rogue::protocols::packetizer::CoreV2> CoreV2Ptr;
116
117} // namespace packetizer
118} // namespace protocols
119}; // namespace rogue
120
121#endif
Packetizer v2 core wiring object.
Definition CoreV2.h:41
std::shared_ptr< rogue::protocols::packetizer::Application > application(uint8_t dest)
Returns an application endpoint by destination ID.
Definition CoreV2.cpp:77
void setTimeout(uint32_t timeout)
Sets transmit timeout for internal controller operations.
Definition CoreV2.cpp:90
~CoreV2()
Destroys the packetizer v2 core.
Definition CoreV2.cpp:62
std::shared_ptr< rogue::protocols::packetizer::Transport > transport()
Returns the transport-facing endpoint.
Definition CoreV2.cpp:72
static std::shared_ptr< rogue::protocols::packetizer::CoreV2 > create(bool enIbCrc, bool enObCrc, bool enSsi)
Creates a packetizer v2 core.
Definition CoreV2.cpp:38
static void setup_python()
Registers Python bindings for this class.
Definition CoreV2.cpp:43
uint32_t getDropCount()
Returns total dropped-frame count reported by the controller.
Definition CoreV2.cpp:86
std::shared_ptr< rogue::protocols::packetizer::CoreV2 > CoreV2Ptr
Definition CoreV2.h:115