How the Alarm Viewer API Works

As an aid in understanding how the CAmvConn uses the callback functions, this section gives a brief description of the order and context of execution. The order provided here represents a very high-level description of operation and includes only those details believed relevant to writing a custom alarm viewer.

WHEN constructor called

   Start trying to form connection

WHEN connection formed

   CALL DoConnectionFormed(context);

WHEN connection lost to AMRP

   Call LostAM(context);

WHEN connection lost to RCM

   Call DoRcmError(context, state);

WHEN AMRP sends count or date change

   Call UpdateCount(context, countInfo);

WHEN viewer calls RequestAlarms()

   Ask AMRP for all current alarms

WHEN viewer requests dynamic mode

   Call MaxAlarms(context);

WHEN viewer calls UpdateList()

   FOR EACH alarm with pending action

      send update to AMRP


WHEN AMRP sends current alarms (in static AND dynamic mode)

   CALL SetDisplayRedraw(context, FALSE);

  CALL ClearDisp(context);

   FOR EACH alarm from AMRP

      build AlarmInfo

      CALL dispFunc(context, AlarmInfo);


   Call SetDisplayRedraw(context, TRUE);

IF in dynamic mode

   WHEN alarm notification received from AMRP

      build AlarmInfo

      SWITCH (notification type)

         CASE generate:

             Call NotifyAlmGen(context, AlarmInfo);


         CASE modify:

             Call NotifyAlmMod(context, AlarmInfo, action);


          CASE delete:

             Call NotifyAlmDel(context, AlarmInfo);




More information

Alarm Viewer API getting started.