Alarm Protocol Information

The alarm functions permit an application to queue an alarm for any time into the future and to get information on the most current pending alarm of a given type. The system alarm queue size is set to 5. Although an application may queue more than one alarm by specifying a different type (na_special), this practice is discouraged.

If an application supports alarm queueing, it must make sure upon initialization that the System Manager's alarm queue is synchronized with its version of pending alarms. To do this, the application must remove all pending alarms set by that application by issuing the m_xalarm call with the type field set for each possible alarm type. Next, the application must queue up the most current alarm of each type m_nalarm.

After the alarm has been shown to the user or audible-only completed, the owing application is invoked and receives an E_ALARM_EXP event type. The application determines which alarm went off by examining a field passed in the event structure, e_alm_special. If other alarms are pending, the application can then queue the next alarm with m_nalarm, thus beginning a new cycle.