/********************************************************/
/*Title:	alarmagent.c                                   */
/*Descr:	Alarm Agent                              */
/*          --MIB(WXC2-ALARM)                   */
/*Author:	Yi zheng                                 */
/*Create:	2006-6-1                                   */
/********************************************************/

#ifndef __ALARM_AGENT_FILE
#define __ALARM_AGENT_FILE
#endif	

//#define __RUN_SELF
#define WXC2_R8								1
#define ALARM_SNMP_PORT							4961 
#define  OMCD_CONF_FILE  "./conf/omcd.conf"

#ifndef _LINUX_ES
	#include "mysql.h"
//	#define ALARM_TABLE_FILE 				"/usr/local/mysql-3.23.52-pc-linux-gnu-i686/data/OMC_PUB/sysAlarmLog.MYD"
	#define ALARM_TABLE_FILE 				"/var/lib/mysql/OMC_PUB/sysAlarmLog.MYD"
#else
	#include "/usr/include/mysql/mysql.h"
	#define ALARM_TABLE_FILE 				"/var/lib/mysql/OMC_PUB/sysAlarmLog.MYD"
#endif	

#include "../../../omcLib/c_program/omcLib/omcLib.h"
#include "../../../../plat/snmp/src/include/snmp.h"
#include "../../../../plat/debug/src/include/debug.h"

int alarm_SnmpInit(void);
void alarm_Agent_timer(void);

typedef struct alarm_set 
{
	DWORD		sq_Num;						//			alarmSequenceNumber			Counter32,		
	char		mag_ObjName[64];		//			alarmManagedObjName			OCTET STRING,	
	WORD		mag_ObjIns;					//			alarmManagedObjInstance		INTEGER,
	char		mag_ComName[64];		//			alarmComponentName			OCTET STRING,
	WORD		mag_ComIns;				//			alarmComponentInstance		INTEGER,
	char		date_Time[64];			//			alarmDateAndTime			TimeTicks,
	char		ip_Addr[64];				//			alarmEventEngineAddress		IpAddress,
	WORD		event_Code;				//			alarmEventCode				INTEGER,
	WORD		severity_ID;				//			alarmSeverity				INTEGER,
	char		active_Desc[128];			//			alarmActiveDescription		OCTET STRING,
	WORD		notifiy_ID;					//			alarmNotificationID			OBJECT IDENTIFIER
	
	
	WORD		sysTypeNo;					//		
	WORD		compCode;					//			
	BYTE		alarmCode;					//		
} alarm_set;



