Dataflow Runtime API  3.0.3.0
Public Member Functions | List of all members
imt::base::lib::alarms::RangeAlarm< ValueType > Class Template Reference

Activates the given alarms if the value is outside a defined range. More...

#include <Imt.Base.Lib.Alarms/RangeAlarm.h>

Inheritance diagram for imt::base::lib::alarms::RangeAlarm< ValueType >:
imt::base::lib::alarms::RangeAlarmWithDelay< ValueType >

Public Member Functions

 RangeAlarm (AlarmSenderIfc &alarmSender, const imt::base::core::util::Range< ValueType > &range, const AlarmIdentifier lowerAlarmId, const AlarmIdentifier upperAlarmId)
 Constructor. More...
 
virtual ~RangeAlarm (void)
 Destructor. More...
 
- Public Member Functions inherited from imt::base::lib::alarms::RangeAlarmWithDelay< ValueType >
 RangeAlarmWithDelay (AlarmSenderIfc &alarmSender, const imt::base::core::util::Range< ValueType > &range, const AlarmIdentifier lowerAlarmId, const DelayThicks lowerAlarmDelayTicks, const AlarmIdentifier upperAlarmId, const DelayThicks upperAlarmDelayTicks)
 Constructor. More...
 
 RangeAlarmWithDelay (AlarmSenderIfc &alarmSender, const imt::base::core::util::Range< ValueType > &range, const AlarmIdentifier lowerAlarmId, const DelayThicks lowerAlarmActivationDelayTicks, const DelayThicks lowerAlarmDeactivationDelayTicks, const AlarmIdentifier upperAlarmId, const DelayThicks upperAlarmActivationDelayTicks, const DelayThicks upperAlarmDeactivationDelayTicks)
 Constructor. More...
 
virtual ~RangeAlarmWithDelay (void)
 Destructor. More...
 
void updateValue (const ValueType &value)
 Updates the value and checks for the alarm condition. More...
 
void forceValue (const ValueType &value)
 Updates the value and checks for the alarm condition. More...
 
void deactivateAlarms (void)
 Deactivates both alarms. More...
 
bool isAlarmActive (void) const
 Returns if any alarm is currently activated. More...
 
bool isLowerAlarmActive (void) const
 Returns whether the lower alarm is currently activated. More...
 
bool isUpperAlarmActive (void) const
 Returns whether the upper alarm is currently activated. More...
 

Additional Inherited Members

- Public Types inherited from imt::base::lib::alarms::RangeAlarmWithDelay< ValueType >
typedef uint32_t DelayThicks
 The delay in thicks. More...
 
- Static Public Attributes inherited from imt::base::lib::alarms::RangeAlarmWithDelay< ValueType >
static const DelayThicks NULL_DELAY = 0U
 A delay of 0 thicks. More...
 

Detailed Description

template<typename ValueType>
class imt::base::lib::alarms::RangeAlarm< ValueType >

Activates the given alarms if the value is outside a defined range.

A lower and an upper alarm can be defined.

This alarm is implemented as special case of a RangeAlarmWithDelay with delay of 0.

Constructor & Destructor Documentation

◆ RangeAlarm()

template<typename ValueType >
imt::base::lib::alarms::RangeAlarm< ValueType >::RangeAlarm ( AlarmSenderIfc alarmSender,
const imt::base::core::util::Range< ValueType > &  range,
const AlarmIdentifier  lowerAlarmId,
const AlarmIdentifier  upperAlarmId 
)
explicit

Constructor.

Defines the alarms to be activated for the lower and upper threshold. If an alarm id is set to NO_ALARM there will be no alarm activated when that threshold is reached. This can be used to define a single low or high alarm.

Parameters
alarmSenderThe interface to the actual alarm sender.
rangeThe range below which the lower alarm and above which the upper alarm is activated.
lowerAlarmIdThe alarm ID that is sent when the lower alarm is activated/deactivated.
upperAlarmIdThe alarm ID that is sent when the upper alarm is activated/deactivated.

◆ ~RangeAlarm()

template<typename ValueType >
imt::base::lib::alarms::RangeAlarm< ValueType >::~RangeAlarm ( void  )
virtual

Destructor.


The documentation for this class was generated from the following file: