I am trying to create an icon on an overview screen that depicts if an alarm group has active alarms, active acknowledged alarms, or inactive unacknowledged alarms (waiting for confirmation). I've attempted to set up Notification Actions in the Alarm Class to set variables based on state changes but have been unable to find a clean and effective way to do this. Because an action on any alarm will trigger the variable to be set as instructed, I'm struggling to find a way to configure it for what I need (ie if two alarms activate, then one deactivates, the variable for indicating an alarm is active would be cleared after the single deactivation). I've been pointed toward the Alarm Manager example project but I'm finding it too complicated to understand how to implement it in my own project. Has anyone come up with another good way to indicate the states of alarms or a simpler usage of the Alarm Manager functions?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
thank you for pointing me to this "bug"!! I haven't recognized, the bit is reset after the first alarm is gone.
I use this only for warnings, so it's not a drama, but was not correct in the past.
I solved it now simply stupid by counting up a variable every time an alarm appears and decreasing it if an alarm is gone.
The "warning lamp" is activated by checking the counter is > 0
The nice side effect, i'm able to show the number of active alarms in the state line now.
I am trying to create an icon on an overview screen that depicts if an alarm group has active alarms, active acknowledged alarms, or inactive unacknowledged alarms (waiting for confirmation). I've attempted to set up Notification Actions in the Alarm Class to set variables based on state changes but have been unable to find a clean and effective way to do this. Because an action on any alarm will trigger the variable to be set as instructed, I'm struggling to find a way to configure it for what I need (ie if two alarms activate, then one deactivates, the variable for indicating an alarm is active would be cleared after the single deactivation). I've been pointed toward the Alarm Manager example project but I'm finding it too complicated to understand how to implement it in my own project. Has anyone come up with another good way to indicate the states of alarms or a simpler usage of the Alarm Manager functions?
thank you for pointing me to this "bug"!! I haven't recognized, the bit is reset after the first alarm is gone.
I use this only for warnings, so it's not a drama, but was not correct in the past.
I solved it now simply stupid by counting up a variable every time an alarm appears and decreasing it if an alarm is gone.
The "warning lamp" is activated by checking the counter is > 0
The nice side effect, i'm able to show the number of active alarms in the state line now.
Last edit: dkugler 2024-04-24