rogue
Loading...
Searching...
No Matches
Filter.h
Go to the documentation of this file.
1
17#ifndef __ROGUE_INTERFACES_STREAM_FILTER_H__
18#define __ROGUE_INTERFACES_STREAM_FILTER_H__
19#include "rogue/Directives.h"
20
21#include <stdint.h>
22
23#include <memory>
24
25#include "rogue/Logging.h"
28
29namespace rogue {
30namespace interfaces {
31namespace stream {
32
42 std::shared_ptr<rogue::Logging> log_;
43
44 // Configurations
45 bool dropErrors_;
46 uint8_t channel_;
47
48 public:
63 static std::shared_ptr<rogue::interfaces::stream::Filter> create(bool dropErrors, uint8_t channel);
64
66 static void setup_python();
67
79 Filter(bool dropErrors, uint8_t channel);
80
82 ~Filter();
83
89 void acceptFrame(std::shared_ptr<rogue::interfaces::stream::Frame> frame);
90};
91
93typedef std::shared_ptr<rogue::interfaces::stream::Filter> FilterPtr;
94} // namespace stream
95} // namespace interfaces
96} // namespace rogue
97#endif
Stream frame filter by channel and error state.
Definition Filter.h:41
static void setup_python()
Registers this type with Python bindings.
Definition Filter.cpp:45
~Filter()
Destroys the stream filter.
Definition Filter.cpp:62
void acceptFrame(std::shared_ptr< rogue::interfaces::stream::Frame > frame)
Receives a frame from upstream and applies filter rules.
Definition Filter.cpp:65
Stream master endpoint.
Definition Master.h:65
static std::shared_ptr< rogue::interfaces::stream::Master > create()
Creates a stream master.
Definition Master.cpp:40
Stream slave endpoint and default frame pool.
Definition Slave.h:72
std::shared_ptr< rogue::interfaces::stream::Filter > FilterPtr
Shared pointer alias for Filter.
Definition Filter.h:93