Activates the given alarms if the flag is set and deactivates it when the flag is cleared.
More...
#include <Imt.Base.Lib.Alarms/FlagAlarm.h>
Activates the given alarms if the flag is set and deactivates it when the flag is cleared.
Does send the activation/deactivation message only when the condition changes. Initially the alarm is deactivated.
◆ FlagAlarm()
Constructor.
- Parameters
-
alarmSender | The interface to the actual alarm sender. |
alarmId | The ID of the alarm that shall be sent. |
◆ ~FlagAlarm()
virtual imt::base::lib::alarms::FlagAlarm::~FlagAlarm |
( |
void |
| ) |
|
|
virtual |
◆ clearFlag()
void imt::base::lib::alarms::FlagAlarm::clearFlag |
( |
void |
| ) |
|
Clears the flag and disables the alarm.
◆ isAlarmActive()
bool imt::base::lib::alarms::FlagAlarm::isAlarmActive |
( |
void |
| ) |
const |
Returns if any alarm is currently activated.
- Returns
- true if the alarm is active, false otherwise.
◆ reset()
void imt::base::lib::alarms::FlagAlarm::reset |
( |
void |
| ) |
|
Resets the flag without sending a disable alarm message.
◆ setFlag()
void imt::base::lib::alarms::FlagAlarm::setFlag |
( |
void |
| ) |
|
Sets the flag and activates the alarm.
◆ updateValue()
void imt::base::lib::alarms::FlagAlarm::updateValue |
( |
const bool |
flag | ) |
|
Updates the flag.
- Parameters
-
flag | The new value for the flag. |
The documentation for this class was generated from the following file: