rogue
Loading...
Searching...
No Matches
ControllerV2.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_PROTOCOLS_PACKETIZER_CONTROLLER_V2_H__
18#define __ROGUE_PROTOCOLS_PACKETIZER_CONTROLLER_V2_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24
26#include "rogue/Logging.h"
27#include "rogue/Queue.h"
31
32namespace rogue {
33namespace protocols {
34namespace packetizer {
35
36class Application;
37class Transport;
38class Header;
39
47class ControllerV2 : public Controller, public rogue::EnableSharedFromThis<rogue::protocols::packetizer::ControllerV2> {
48 bool enIbCrc_;
49 bool enObCrc_;
50
51 public:
69 static std::shared_ptr<rogue::protocols::packetizer::ControllerV2> create(
70 bool enIbCrc,
71 bool enObCrc,
72 bool enSsi,
73 std::shared_ptr<rogue::protocols::packetizer::Transport> tran,
74 std::shared_ptr<rogue::protocols::packetizer::Application>* app);
75
89 ControllerV2(bool enIbCrc,
90 bool enObCrc,
91 bool enSsi,
92 std::shared_ptr<rogue::protocols::packetizer::Transport> tran,
93 std::shared_ptr<rogue::protocols::packetizer::Application>* app);
94
97
102 void transportRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
103
109 void applicationRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame, uint8_t id);
110};
111
112// Convenience
113typedef std::shared_ptr<rogue::protocols::packetizer::ControllerV2> ControllerV2Ptr;
114
115} // namespace packetizer
116} // namespace protocols
117}; // namespace rogue
118
119#endif
Typed shared-from-this helper for Rogue classes.
Packetizer controller implementation for protocol v2.
void transportRx(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Processes a frame received at the transport interface.
~ControllerV2()
Destroys the controller instance.
static std::shared_ptr< rogue::protocols::packetizer::ControllerV2 > create(bool enIbCrc, bool enObCrc, bool enSsi, std::shared_ptr< rogue::protocols::packetizer::Transport > tran, std::shared_ptr< rogue::protocols::packetizer::Application > *app)
Creates a packetizer v2 controller.
void applicationRx(std::shared_ptr< rogue::interfaces::stream::Frame > frame, uint8_t id)
Processes a frame received from one application endpoint.
Packetizer base controller.
Definition Controller.h:45
std::shared_ptr< rogue::protocols::packetizer::ControllerV2 > ControllerV2Ptr