ADTF  3.18.2
DataTrigger

DataTrigger implements a concrete periodic trigger in the runtime. More...

Inheritance diagram for DataTrigger:
[legend]

Public Member Functions

 DataTrigger (IMappingEnvironment &env, const std::string &trigger_name, const std::string &variable_name, const std::string &comp_operator, const double &value)
 CTOR. More...
 
 ~DataTrigger ()
 DTOR.
 
a_util::result::Result start ()
 Method to start trigger. More...
 
a_util::result::Result stop ()
 Method to stop trigger. More...
 
a_util::result::Result transmit ()
 Method to transmit targets. More...
 
bool compare (double value)
 Method to make the comparison. More...
 
const std::string & getVariable () const
 Returns the period of the trigger in ms.
 
- Public Member Functions inherited from TriggerBase
virtual ~TriggerBase ()
 Virtual DTOR.
 
TargetSetgetTargetList ()
 Getter for the list of registered targets. More...
 
a_util::result::Result addTarget (Target *target)
 Method to register a new target. More...
 
a_util::result::Result removeTarget (Target *target)
 Method to deregister a target. More...
 

Private Attributes

IMappingEnvironment_env
 
std::string _name
 
std::string _variable_name
 
Operator _operator
 
double _value
 
bool _is_running
 

Additional Inherited Members

- Protected Attributes inherited from TriggerBase
TargetSet _targets
 nodoc
 

Detailed Description

DataTrigger implements a concrete periodic trigger in the runtime.

Definition at line 42 of file data_trigger.h.

Constructor & Destructor Documentation

◆ DataTrigger()

DataTrigger ( IMappingEnvironment env,
const std::string &  trigger_name,
const std::string &  variable_name,
const std::string &  comp_operator,
const double &  value 
)

CTOR.

Parameters
[in]envThe mapping environment
[in]trigger_nameThe name of the trigger
[in]variable_nameThe value name for the operator
[in]comp_operatoroperator
[in]valuevalue for the operator

Member Function Documentation

◆ compare()

bool compare ( double  value)

Method to make the comparison.

Return values
a_util::result::SUCCESSEverything went fine

◆ start()

a_util::result::Result start ( )
virtual

Method to start trigger.

Return values
a_util::result::SUCCESSEverything went fine
ERR_FAILEDError during runtime

Implements TriggerBase.

◆ stop()

a_util::result::Result stop ( )
virtual

Method to stop trigger.

Return values
a_util::result::SUCCESSEverything went fine

Implements TriggerBase.

◆ transmit()

a_util::result::Result transmit ( )

Method to transmit targets.

Return values
a_util::result::SUCCESSEverything went fine