run
Short summary
This method updates and manages all the active events. It checks if an event is pending (needs to be confirmed by the operator) and confirmed. The confirmed events are removed from the active event list and cleared.
Parameters
none
Code
Declaration
METHOD run
VAR
alarm :CNM_MessageInterfaces.IAlarm;
object :CNM_AbstractObject.IObject;
END_VAR
Implementation
THIS^.activeAlarmsIterator.reset();
WHILE THIS^.activeAlarmsIterator.moveNext() DO
IF __QUERYINTERFACE(THIS^.activeAlarmsIterator.current, alarm)
AND_THEN
alarm.isPending
AND_THEN
(alarm.dto.state = CNM_MessageInterfaces.MessageConfirmationState.Confirmed)
THEN
THIS^.clearAlarmList.append(alarm);
END_IF
END_WHILE
WHILE(THIS^.clearAlarmList.hasElement)DO
object := THIS^.clearAlarmList.dequeue();
IF(__QUERYINTERFACE(object, alarm))THEN
alarm.clear();
END_IF
END_WHILE