== Program Name == pcsCancelAlarmCont == PCS stream-state == group: TPP table: TPP state: CANCELALARM == Description == pcsCancelAlarmCont provides one of the connection points between the PCS system and the post processing [[postproc:alarm]] system. For each event found it the configured PCS stream-state, a CMS message is sent to the **alarmdec_pp** program (post-processing alarm) and to the alarmdec program on **EACH** of the real-time systems by means of the **sendcancel** program. The goal of pcsCancelAlarmCont is to cancel any actions that may have been taken by the alarm systems for this event. But pcsCancelAlarmCont has no way of telling which alarm systems have emitted notifications. So pcsCancelAlarmCont tries to send the cancellation message to ALL of the alarm systems. The program (alarmevent) which publishes the alarm cancellation messages into CMS first queries the database of the alarm system in question. If no alarm actions have been scheduled or taken by that alarm system, then no cancellation message is sent to that alarm system. This system needs to be monitored to see how it behaves when a real-time system is shut down such as for maintenance. Does it gracefully handle the inablity to connect to an alarm system database? There is the possibility that an RT system could issue alarms for an event and then become inoperable. In that case, pcsCancelAlarmCont would not be able to cancel the alarms issued by that RT system. To ensure that an event deletionmessage gets submitted to [[rtem:PDL]], pcsCancelAlarmCont run **cancelEvtPrm2PDL** for this action. pcsAlarmCont runs the basic PCS client loop: * queries for the next event in its assigned stream-state * if an event is found, run //alarmcancel // and //cancelEvtPrm2PDL // * if alarmcancel and cancelEvtPrm2PDL succeeded, set stream-state event result to 1 and repeat the loop * if alarmcancel or cancelEvtPrm2PDL failed, set stream-state event result to 100 and repeat the loop * if no event is found, sleep 30 seconds and repeat the loop == Program Location == post-proc systems: /home/ncss/ncpp/bin/ == Configuration File == none == Source of Database name == [[PostProc:masterdb]] == Cron Starter Program == 0,10,20,30,40,50 * * * * /home/ncss/ncpp/bin/startPcsTasks == Log File == /home/ncss/ncpp/logs/pcsCancelAlarmCont.log == Other Programs Called == * /home/ncss/ncpp/bin/alarmcancel: * reads config file /home/ncss/ncpp/conf/alarmcancel.cfg for list of //sendcancel// config files * for each sendcancel config file, calls //sendcancel -c -a * // * /home/ncss/run/bin/sendcancel: * Reads its config file for database and CMS connection parameters. * Queries the configured database for alarm actions for the event.a * If alarm actions are present on this system's database, publishes CMS message with subject read from its config file.