5#include "declarative/PropertyMacros.h"
28 template<
typename PropsT>
31 const std::map<std::string, apra::ScalarPropertyValue>& values,
32 std::vector<std::string>& missingRequired
34 apra::applyProp(props.noOfFramesToCapture,
"noOfFramesToCapture", values,
false, missingRequired);
39 throw std::runtime_error(
"Unknown property: " + propName);
43 if (propName ==
"noOfFramesToCapture") {
46 throw std::runtime_error(
"Unknown property: " + propName);
50 return {
"noOfFramesToCapture"};
56 template <
class Archive>
57 void serialize(Archive& ar,
const unsigned int version)
59 ar& boost::serialization::base_object<ModuleProps>(*
this);
76 bool setNext(boost::shared_ptr<Module> next,
bool open =
true,
bool sieve =
false);
78 bool process(frame_container& frames);
83 void addInputPin(framemetadata_sp& metadata,
string& pinId);
CommandType
Definition Command.h:9
virtual size_t getSerializeSize()
Definition Module.h:101
Definition ValveModule.h:8
size_t getSerializeSize()
Definition ValveModule.h:20
apra::ScalarPropertyValue getProperty(const std::string &propName) const
Definition ValveModule.h:37
void serialize(Archive &ar, const unsigned int version)
Definition ValveModule.h:57
ValveModuleProps(uint64 _noOfFramesToCapture)
Definition ValveModule.h:15
bool setProperty(const std::string &propName, const apra::ScalarPropertyValue &value)
Definition ValveModule.h:42
static std::vector< std::string > dynamicPropertyNames()
Definition ValveModule.h:49
static void applyProperties(PropsT &props, const std::map< std::string, apra::ScalarPropertyValue > &values, std::vector< std::string > &missingRequired)
Definition ValveModule.h:29
uint64 noOfFramesToCapture
Definition ValveModule.h:19
friend class boost::serialization::access
Definition ValveModule.h:54
ValveModuleProps()
Definition ValveModule.h:10
Definition ValveModule.cpp:15
Definition ValveModule.h:65
bool handlePropsChange(frame_sp &frame)
Definition ValveModule.cpp:140
boost::shared_ptr< Detail > mDetail
Definition ValveModule.h:90
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
void applyProp(T &member, const char *propName, const std::map< std::string, ScalarPropertyValue > &values, bool isRequired, std::vector< std::string > &missingRequired)
Definition PropertyMacros.h:36
bool applyFromVariant(T &member, const ScalarPropertyValue &value)
Definition PropertyMacros.h:108
std::variant< int64_t, double, bool, std::string > ScalarPropertyValue
Definition ModuleRegistry.h:30