AlarmInfo Structure

Callback functions which must process alarm information also take a pointer to an AlarmInfo structure:

struct AlarmInfo {

   TCHAR systemName[RTR_SYSNAME_SIZE+1];

   TCHAR classId[CLASS_ID_LEN+1];

   TCHAR frId[FR_ID_LEN+1];

   TCHAR alarmId[ALARM_ID_LEN+1];

   TCHAR refId[ AM_REF_ID_LEN+1 ];

   COR_STAMP genTime;

   TCHAR durationTime[COR_ASCII_TIME_LEN+1];

   int numComments;

   int numStacked;

   TCHAR message[ALARM_MSG_LEN+1];

   TCHAR action[2+1];

   int state;

   TCHAR stateStr[19+1];

   TCHAR ackState[4+1];

   COR_U1 fgColor;

   COR_U1 bgColor;

   int classOrder;

   long *alarmRecord;

   TCHAR del_opt[DEL_OPT_LEN+1];

   TCHAR manual_clear_allowed;

   COR_I4 seq_num ;

   COR_I4 generated_time ;

   COR_I4 cleared_time ;

   COR_BOOLEAN ConcedAlarm ;

   COR_I4 amrp_sync ;

   COR_I4 max_stacked ;

   TCHAR systemResId[FR_ID_LEN+1] ;

.

.

.

#if AI_PTRS

    AM_STACKED_INFO  *pstacked_info ;

#else

    AM_STACKED_INFO     pstacked_info[AM_MAX_STACKED] ;

#endif

    COR_BOOLEAN       info_inited ;

#if AI_PTRS

    AM_COMMENT2_INFO *pstacked_com ;

#else

    //AM_COMMENT2_INFO  pstacked_com[AM_MAX_ALARM_COMMENTS] ;

#endif

    COR_BOOLEAN       comnt_inited ;

.

.

.

};

Please note that this structure has some methods, and cannot be treated simply as a series of bytes; it must be constructed and destructed appropriately.

The following table summarizes the fields on the AlarmInfo structure and their meaning:

Field

Description

SystemName

Name of the project the alarm is from

ClassID

The alarm's class ID

FrId

The alarm's resource ID

AlarmId

The alarm's ID

RefId

The alarm's reference ID

GenTime

The time the alarm was generated in COR_STAMP format

DurationTime

The alarm's duration time, presented as an ASCII string

NumComments

The number of comments on the alarm

NumStacked

The number of stacked alarm instances

Message

The alarm message

Action

Pending actions on the alarm

State

The numeric state of the alarm: AM_GENERATED, AM_ACKNOWLEDGED, AM_CLEARED

StateStr

The string representing the current state of the alarm: "Alarm" or "Normal"

AckState

Has the alarm been acknowledged? "Y" or "N"

FgColor

Foreground color for the current alarm state

BgColor

Background color for the current alarm state

ClassOrder

The priority of the alarm

AlarmRecord

Reserved for GE Fanuc use

Del_opt

Deletion requirements for the alarm

Manual_clear_allowed

Can alarm be manually cleared

Seq_num

Reserved for GE Fanuc use

Generated_time

The time the alarm was generated

Cleared_time

The time the alarm was cleared

ConcedAlarm

Reserved for GE Fanuc use

Amrp_sync

Time the AMRP sent the alarm to the Alarm Viewer

Max_stacked

The maximum number of instances of an alarm that can be stacked

SystemResId

Reserved for GE Fanuc use

Pstacked_info

Pointer to an array of alarm data.

Pstacked_com

Pointer to an array of comment data.

Info_inited

Reserved for GE Fanuc use

Comnt_inited

Reserved for GE Fanuc use

More information

CAmvConn Syntax.