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
ENDFOR
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);
ENDFOR
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);
break;
CASE modify:
Call NotifyAlmMod(context, AlarmInfo, action);
break;
CASE delete:
Call NotifyAlmDel(context, AlarmInfo);
break
ENDSWITCH
ENDIF
Alarm Viewer API getting started. |