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:
68 static std::shared_ptr<rogue::protocols::packetizer::ControllerV2>
69 create(bool enIbCrc, bool enObCrc, bool enSsi, std::shared_ptr<rogue::protocols::packetizer::Transport> tran);
70
83 ControllerV2(bool enIbCrc, bool enObCrc, bool enSsi, std::shared_ptr<rogue::protocols::packetizer::Transport> tran);
84
87
92 void transportRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
93
99 void applicationRx(std::shared_ptr<rogue::interfaces::stream::Frame> frame, uint8_t id);
100};
101
102// Convenience
103typedef std::shared_ptr<rogue::protocols::packetizer::ControllerV2> ControllerV2Ptr;
104
105} // namespace packetizer
106} // namespace protocols
107}; // namespace rogue
108
109#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)
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:46
std::shared_ptr< rogue::protocols::packetizer::ControllerV2 > ControllerV2Ptr