Operation Overview

Overview

Initialize communications with AMRP.

Generate alarm update information.

Send alarm information.

Terminate communications with AMRP.

Overview

Alarm Management maintains an in-memory database containing information on the current user population and the current set of outstanding alarms. This database is updated as information on the current user population is received from User Registration, as new alarms are generated, and as the status of existing alarms is updated.

The status of alarms may be updated interactively by a user through the AMAP or by an application program sending a message to the AMRP. When the status of alarms changes, new alarm counts and dates are determined for each user. If a user's information changes, the new data is sent to the user's Alarm Viewer.

Any process that wants to communicate with AMRP to update alarm statuses must do the following:

Initialize communications with AMRP

Generate alarm update information

Send alarm information

Terminate communications with AMRP

Initialize Communications with AMRP

The amaru_init procedure initializes the utilities for communication with an Alarm Manager in the current Interprocess Communications (IPC) network. An application must invoke this procedure in order to communicate with Alarm Management. Typically, initialization is done once when the application process starts up.

Generate Alarm Update Information

Application programs require the following information in order to generate or update alarms:

ALARM_ID

The identifier of the alarm to be generated or updated.

FR_ID

The identifier of the factory resource the alarm is being generated or updated for.

REF_ID

A third identifier (the Reference ID) designating the instance of the ALARM_ID/FR_ID being generated or updated.

Alarm Parameters

The value of the run time parameters to be loaded into the alarm message.

Alarm Management ID

The identifier of the AMRP servicing the specified factory resource. This information is carried in the alarm_mgr field in the fr.dat configuration file and can be checked for the factory resource for which the alarm is being generated or updated.

Together, the ALARM_ID, FR_ID, and REF_ID uniquely identify an alarm occurrence. All operations on the same ALARM_ID, FR_ID, REF_ID combination occur on the same alarm.

Two steps are necessary in order to generate or update alarms. First, the request is added to an IPC buffer. Then the request is sent to the appropriate AMRP. The appropriate AMRP can be determined once the factory resource is known.

The amaru_add_gen procedure adds alarm generation information to the specified IPC buffer. The caller is informed if the buffer is full.

The amaru_add_update procedure adds alarm update information to the specified IPC buffer. The caller is informed if the buffer is full.

The AMRP accepts messages with multiple generation and update requests. Thus, if an application program has multiple alarms to generate or update, these requests can be packed into a single IPC message and sent as a whole. The Alarm Management routines support and favor this mode of operation as it reduces network message traffic.

Send Alarm Information

The amaru_send_msg procedure sends an IPC message to the specified AMRP. The procedure handles the redundancy aspects of the AMRP. If the specified AMRP is not available, an appropriate status is returned to the caller.

Alarm Management receives static information on the legal set of alarms from system configuration files at initialization. This configuration information specifies the user roles configured to see each alarm. Alarms are generated with respect to factory resources. When an alarm is generated, all users who have a view of the specified factory resource, and whose Role matches one of the roles the alarm is configured to be routed to, are informed of the new alarm occurrence.

Terminate Communications with AMRP

When an application no longer needs to communicate with Alarm Management, the amaru_terminate procedure is called to end communication with the AMRP.

More information

Alarm Management API overview.