ADTF  3.18.2
data_trigger.h
Go to the documentation of this file.
1 
14 #ifndef DATA_TRIGGER_HEADER
15 #define DATA_TRIGGER_HEADER
16 
18 
19 namespace ddl {
20 namespace mapping {
21 namespace rt {
26 enum Operator {
28  e_equal = 1,
39 };
40 
42 class DataTrigger : public TriggerBase {
43 public:
53  const std::string& trigger_name,
54  const std::string& variable_name,
55  const std::string& comp_operator,
56  const double& value);
57 
62 
70 
77 
84 
90  bool compare(double value);
91 
95  const std::string& getVariable() const;
96 
97 private:
98  IMappingEnvironment& _env;
99  std::string _name;
100  std::string _variable_name;
101  Operator _operator;
102  double _value;
103  bool _is_running;
104 };
105 
106 } // namespace rt
107 } // namespace mapping
108 } // namespace ddl
109 #endif // DATA_TRIGGER_HEADER
A common result class usable as return value throughout.
DataTrigger implements a concrete periodic trigger in the runtime.
Definition: data_trigger.h:42
bool compare(double value)
Method to make the comparison.
const std::string & getVariable() const
Returns the period of the trigger in ms.
a_util::result::Result transmit()
Method to transmit targets.
DataTrigger(IMappingEnvironment &env, const std::string &trigger_name, const std::string &variable_name, const std::string &comp_operator, const double &value)
CTOR.
a_util::result::Result start()
Method to start trigger.
a_util::result::Result stop()
Method to stop trigger.
Mapping environment interface class This in combination with ISignalListener forms the functionality ...
base class representing a trigger
Definition: trigger.h:24
Operator
the operator set within the config
Definition: data_trigger.h:26
@ e_equal
equal op
Definition: data_trigger.h:28
@ e_less_than
less op
Definition: data_trigger.h:32
@ e_greater_than
greater op
Definition: data_trigger.h:34
@ e_greater_than_equal
greater or equal op
Definition: data_trigger.h:38
@ e_not_equal
not equal op
Definition: data_trigger.h:30
@ e_less_than_equal
less or equal op
Definition: data_trigger.h:36