Class CAmvTest
{
public:
CAmvTest();
~CAmvTest();
// Operators
void RunTest();
void PrintClassFilters();
void PrintResourceFilters();
private:
//CALLBACKS
static void DispFunc(struct testContext *pContext,
AlarmInfo *pBuf);
static void ClearDisp(struct testContext *pContext);
static void LostAM(struct testContext *pContext);
static int MaxAlarms(struct testContext *pContext);
static void SetDisplayRedraw(
struct testContext *pContext,
int nVal);
static void UpdateCount(
struct testContext *pContext,
RCM_ALARM_DATA* pAlramData);
static void DoRCMError(struct testContext *pContext,
int nState);
static void DoConnectionFormed(
struct testContext *pContext);
static void NotifyAlmGen(
struct testContext *pContext,
AlarmInfo *pAlarmInfo);
static void NotifyAlmMod(struct testContext *pContext,
AlarmInfo *pAlarmInfo,
int nAlmModeAction);
static void NotifyAlmDel(struct testContext *pContext,
AlarmInfo *pAlarmInfo);
//Data
public:
CAlarmList m_listAlarms;
protected:
CAmvConn *m_pAmvConn;
static BOOL m_bConnected;
BOOL m_bDynamic;
static void InitWait();
static BOOL ShallExit();
static BOOL Exit();
};
The data members of the CAmvTest class are:
Member |
Description |
m_listAlarms |
The list of current alarms |
m_pAmvConn |
The connection to the alarm manager |
m_bConnected |
A flag indicating if there is a connection |
m_bDynamic |
A flag indicating if the connection is in dynamic mode |
The CAmvTest constructor is responsible for initializing m_pAmvConn by allocating and initializing an instance of the CAmvConn class from the API. The static member functions in the second section are the AMV API callbacks. The CAmvTest constructor uses them when constructing a new CAmvConn.
The CAmvTest destructor deletes this instance when the CAmvTest is deleted.
The other CAmvTest methods are:
Method |
Description |
RunTest |
The "main program" for the class. It forms a connection, prints the class and resource filters, requests alarms, prints current alarms, and, for dynamic mode, sits waiting for alarm updates from AMRP. |
PrintClassFilters |
Prints the class filters for the current connection. |
PrintResourceFilters |
Prints the resource filters for the current connection. |
amvtest.h. |