Logo
ApraPipes 1.0
Loading...
Searching...
No Matches
ValveModule.h
1#pragma once
2#include "Module.h"
3
5{
6public:
8 {
9
10 }
11
12 ValveModuleProps(uint64 _noOfFramesToCapture)
13 {
14 noOfFramesToCapture = _noOfFramesToCapture;
15 }
18 {
20 }
21
22private:
24
25 template <class Archive>
26 void serialize(Archive& ar, const unsigned int version)
27 {
28 ar& boost::serialization::base_object<ModuleProps>(*this);
30 }
31};
32
33class ValveModule : public Module
34{
35public:
38 bool init();
39 bool term();
40 /* We can set the number of frames property by passing as
41 arguement to allowFrames else module props value is taken */
42 bool allowFrames(int numframes);
43 void setProps(ValveModuleProps& props);
45 bool setNext(boost::shared_ptr<Module> next, bool open = true, bool sieve = false);
46protected:
47 bool process(frame_container& frames);
48 bool processSOS(frame_sp& frame);
49 bool validateInputPins();
50 bool validateOutputPins();
52 void addInputPin(framemetadata_sp& metadata, string& pinId);
53 bool handleCommand(Command::CommandType type, frame_sp& frame);
54 bool handlePropsChange(frame_sp& frame);
55
56private:
57 void setMetadata(framemetadata_sp& metadata);
58 class Detail;
59 boost::shared_ptr<Detail> mDetail;
60};
CommandType
Definition Command.h:9
Definition Module.h:33
virtual size_t getSerializeSize()
Definition Module.h:101
Definition Module.h:151
Definition ValveModule.h:5
size_t getSerializeSize()
Definition ValveModule.h:17
void serialize(Archive &ar, const unsigned int version)
Definition ValveModule.h:26
ValveModuleProps(uint64 _noOfFramesToCapture)
Definition ValveModule.h:12
uint64 noOfFramesToCapture
Definition ValveModule.h:16
friend class boost::serialization::access
Definition ValveModule.h:23
ValveModuleProps()
Definition ValveModule.h:7
Definition ValveModule.cpp:15
Definition ValveModule.h:34
bool handlePropsChange(frame_sp &frame)
Definition ValveModule.cpp:140
boost::shared_ptr< Detail > mDetail
Definition ValveModule.h:59
bool allowFrames(int numframes)
Definition ValveModule.cpp:208
void addInputPin(framemetadata_sp &metadata, string &pinId)
Definition ValveModule.cpp:123
ValveModule(ValveModuleProps _props)
Definition ValveModule.cpp:94
bool processSOS(frame_sp &frame)
Definition ValveModule.cpp:190
ValveModuleProps getProps()
Definition ValveModule.cpp:165
void setMetadata(framemetadata_sp &metadata)
Definition ValveModule.cpp:197
bool validateInputOutputPins()
Definition ValveModule.cpp:112
bool validateOutputPins()
Definition ValveModule.cpp:107
void setProps(ValveModuleProps &props)
Definition ValveModule.cpp:171
bool validateInputPins()
Definition ValveModule.cpp:102
bool process(frame_container &frames)
Definition ValveModule.cpp:176
bool init()
Definition ValveModule.cpp:151
~ValveModule()
Definition ValveModule.cpp:100
bool handleCommand(Command::CommandType type, frame_sp &frame)
Definition ValveModule.cpp:128
bool term()
Definition ValveModule.cpp:160
bool setNext(boost::shared_ptr< Module > next, bool open=true, bool sieve=false)
Definition ValveModule.cpp:118