#ifndef __EV_H__
#define __EV_H__
#define ALARM_LOG_BUFFER_COUNT 10
#define WARNING_LOG_BUFFER_COUNT 10

#include"public.h"
using namespace std;
class CEV{
	private:
		char alarmLog[ALARM_LOG_BUFFER_COUNT][MAX_CONTEXT_LEN];
		int alarmLogIndex=-1;
		int alarmBufferIndex=-1;
		char warningLog[WARNING_LOG_BUFFER_COUNT][MAX_CONTEXT_LEN];
		int warningLogIndex=-1;
		int warningBufferIndex=-1;
		
	public:
		PMCBOOL hasAlarm = FALSE;
		void postAlarmLog(const char* message);
		void postAlarmLog(const char* errCode,const char* envFormat,...);
		void postWarningLog(const char* message);
		void postWarningLog(const char* errCode, const char* envFormat,...);
		void postInfoLog(const char* message,...);
		void clear();
		char* parseErrCode(const char* errCode, const char* envFormat,...);
		char* parseErrCodeV(const char* errCode, const char* envString);
};
extern CEV* EV;
#endif
