![]() |
Imt.Base C++ API V4.1.1.0
|
Activates the given alarms if the value is outside a defined range. More...
#include <Imt.Base.Lib.Alarms/inc/Imt.Base.Lib.Alarms/RangeAlarm.h>
Public Member Functions | |
| RangeAlarm (AlarmSenderIfc &alarmSender, ::imt::base::core::util::Range< ValueType > const &range, AlarmIdentifier const lowerAlarmId, AlarmIdentifier const upperAlarmId) noexcept | |
| Constructor. | |
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, DelayTicks const lowerAlarmDelayTicks, AlarmIdentifier const upperAlarmId, DelayTicks const upperAlarmDelayTicks) noexcept | |
| Constructor. | |
| RangeAlarmWithDelay (AlarmSenderIfc &alarmSender, ::imt::base::core::util::Range< ValueType > const &range, AlarmIdentifier const lowerAlarmId, DelayTicks const lowerAlarmActivationDelayTicks, DelayTicks const lowerAlarmDeactivationDelayTicks, AlarmIdentifier const upperAlarmId, DelayTicks const upperAlarmActivationDelayTicks, DelayTicks const upperAlarmDeactivationDelayTicks) noexcept | |
| Constructor. | |
| void | updateValue (ValueType const &value) |
| Updates the value and checks for the alarm condition. | |
| void | forceValue (ValueType const &value) |
| Updates the value and checks for the alarm condition. | |
| void | deactivateAlarms () |
| Deactivates both alarms. | |
| bool | isAlarmActive () const |
| Returns if any alarm is currently activated. | |
| bool | isLowerAlarmActive () const |
| Returns whether the lower alarm is currently activated. | |
| bool | isUpperAlarmActive () const |
| Returns whether the upper alarm is currently activated. | |
| bool | isInRange (ValueType const &value) const |
| Returns true if the given value is inside the range. | |
| void | updateRange (::imt::base::core::util::Range< ValueType > const &range) |
| Changes the range of the alarm. | |
Additional Inherited Members | |
Public Types inherited from imt::base::lib::alarms::RangeAlarmWithDelay< ValueType > | |
| using | DelayTicks = uint32_t |
| The delay in ticks. | |
Static Public Attributes inherited from imt::base::lib::alarms::RangeAlarmWithDelay< ValueType > | |
| static constexpr DelayTicks | NULL_DELAY {0U} |
| A delay of 0 ticks. | |
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.
Definition at line 21 of file RangeAlarm.h.
|
noexcept |
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.
| alarmSender | The interface to the actual alarm sender. |
| range | The range below which the lower alarm and above which the upper alarm is activated. |
| lowerAlarmId | The alarm ID that is sent when the lower alarm is activated/deactivated. |
| upperAlarmId | The alarm ID that is sent when the upper alarm is activated/deactivated. |
Definition at line 39 of file RangeAlarm.h.