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

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, ::imt::base::core::util::Range< ValueType > const &range, AlarmIdentifier const lowerAlarmId, AlarmIdentifier const upperAlarmId)
 Constructor. More...
 
 RangeAlarm ()=delete
 
 RangeAlarm (RangeAlarm const &other)=delete
 
 RangeAlarm (RangeAlarm &&other)=default
 
RangeAlarmoperator= (RangeAlarm const &other)=delete
 
 ~RangeAlarm ()=default
 
- Public Member Functions inherited from imt::base::lib::alarms::RangeAlarmWithDelay< ValueType >
 RangeAlarmWithDelay (AlarmSenderIfc &alarmSender, ::imt::base::core::util::Range< ValueType > const &range, AlarmIdentifier const lowerAlarmId, DelayThicks const lowerAlarmDelayTicks, AlarmIdentifier const upperAlarmId, DelayThicks const upperAlarmDelayTicks)
 Constructor. More...
 
 RangeAlarmWithDelay (AlarmSenderIfc &alarmSender, ::imt::base::core::util::Range< ValueType > const &range, AlarmIdentifier const lowerAlarmId, DelayThicks const lowerAlarmActivationDelayTicks, DelayThicks const lowerAlarmDeactivationDelayTicks, AlarmIdentifier const upperAlarmId, DelayThicks const upperAlarmActivationDelayTicks, DelayThicks const upperAlarmDeactivationDelayTicks)
 Constructor. More...
 
void updateValue (ValueType const &value)
 Updates the value and checks for the alarm condition. More...
 
void forceValue (ValueType const &value)
 Updates the value and checks for the alarm condition. More...
 
void deactivateAlarms ()
 Deactivates both alarms. More...
 
bool isAlarmActive () const
 Returns if any alarm is currently activated. More...
 
bool isLowerAlarmActive () const
 Returns whether the lower alarm is currently activated. More...
 
bool isUpperAlarmActive () const
 Returns whether the upper alarm is currently activated. More...
 
bool isInRange (ValueType const &value) const
 Returns true if the given value is inside the range. More...
 
void updateRange (::imt::base::core::util::Range< ValueType > const &range)
 Changes the range of the alarm. More...
 
 RangeAlarmWithDelay ()=delete
 
 RangeAlarmWithDelay (RangeAlarmWithDelay const &other)=delete
 
 RangeAlarmWithDelay (RangeAlarmWithDelay &&other)=default
 
RangeAlarmWithDelayoperator= (RangeAlarmWithDelay const &other)=delete
 
 ~RangeAlarmWithDelay ()=default
 

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 constexpr 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() [1/4]

template<typename ValueType >
imt::base::lib::alarms::RangeAlarm< ValueType >::RangeAlarm ( AlarmSenderIfc alarmSender,
::imt::base::core::util::Range< ValueType > const &  range,
AlarmIdentifier const  lowerAlarmId,
AlarmIdentifier const  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() [2/4]

template<typename ValueType >
imt::base::lib::alarms::RangeAlarm< ValueType >::RangeAlarm ( )
delete

◆ RangeAlarm() [3/4]

template<typename ValueType >
imt::base::lib::alarms::RangeAlarm< ValueType >::RangeAlarm ( RangeAlarm< ValueType > const &  other)
delete

◆ RangeAlarm() [4/4]

template<typename ValueType >
imt::base::lib::alarms::RangeAlarm< ValueType >::RangeAlarm ( RangeAlarm< ValueType > &&  other)
default

◆ ~RangeAlarm()

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

Member Function Documentation

◆ operator=()

template<typename ValueType >
RangeAlarm& imt::base::lib::alarms::RangeAlarm< ValueType >::operator= ( RangeAlarm< ValueType > const &  other)
delete

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