ADTF  3.18.3
periodic_trigger.h
Go to the documentation of this file.
1 
14 #ifndef PERIODIC_TRIGGER_HEADER
15 #define PERIODIC_TRIGGER_HEADER
16 
17 #include <a_util/result.h>
19 
20 namespace ddl {
21 namespace mapping {
22 namespace rt {
25 public:
32  PeriodicTrigger(IMappingEnvironment& env, const std::string& trigger_name, double period);
33 
38 
43 
51 
58 
59 private: // IPeriodicListener
61  void onTimer(timestamp_t now);
62 
63 private:
64  IMappingEnvironment& _env;
65  std::string _name;
66  double _period;
67  bool _running;
69 };
70 
71 } // namespace rt
72 } // namespace mapping
73 } // namespace ddl
74 #endif // PERIODIC_TRIGGER_HEADER
A common result class usable as return value throughout.
Mapping environment interface class This in combination with ISignalListener forms the functionality ...
virtual void onTimer(timestamp_t now)=0
onTimer is to be called by the mapping environment periodically.
PeriodicTrigger implements a concrete periodic trigger in the runtime.
a_util::result::Result create()
Creates and initializes the periodic trigger.
a_util::result::Result start()
Method to start trigger.
PeriodicTrigger(IMappingEnvironment &env, const std::string &trigger_name, double period)
CTOR.
a_util::result::Result stop()
Method to stop trigger.
base class representing a trigger
Definition: trigger.h:24
std::int64_t timestamp_t
Type of a timestamp value. If not otherwise stated, always in microseconds.
Common include for component a_util::result.