diff options
Diffstat (limited to 'src/include/MESA/asmis_log.h')
| -rw-r--r-- | src/include/MESA/asmis_log.h | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/src/include/MESA/asmis_log.h b/src/include/MESA/asmis_log.h new file mode 100644 index 0000000..b04dc89 --- /dev/null +++ b/src/include/MESA/asmis_log.h @@ -0,0 +1,73 @@ +#ifndef __ASMIS_LOG_H +#define __ASMIS_LOG_H +#ifndef __cplusplus +#error("This file should be compiled with C++ compiler") +#endif +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <time.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <unistd.h> + + +//#include <support/thread_safe.h> + +#define ASMIS_KEY 0x01 +#define ASMIS_ALARM 0x02 +#define ASMIS_OTHER 0x03 + +#define ASMIS_LOGMSG_TIMEOUT 300 //second +#define ASMIS_LOGMSG_LENGTH 40000 //bytes + +//ϵͳʹ�ö˿���Ϣ�ṹ�� +struct info_port_used { + unsigned short nPort; + unsigned char nProtocolType; + unsigned char nPortType; + char sPortDesc[128]; +}; + +//ϵͳʵʱ������Ϣ�ṹ�� +struct info_rtd_flow { + char sValType[32]; + char sBDType[32]; + time_t nRTTS; + int nDuration; + unsigned long long nValue; +}; + +//ϵͳ���Ը�����Ϣ�ṹ�� +struct info_policy_update { + char sName[128]; + char sDesc[256]; + time_t nUpdateTime; + char sVersion[33]; + int nTotal; + int nNew; + int nDelete; + int nUpdate; + int nSize; +}; + +//NetLog��ʼ�� +void* asmis_log_Init(const char *pProcName); +//�Ǽdz���汾��Ϣ +int asmis_log_AppVer(void* netlog_handle,const char *pVersionTime, const char *pVersionNO, const char *pVersionDesc); +//ϵͳ������־ +int asmis_log_LogMsg(void* netlog_handle,const char *pMsg, const char *pNo, int nAlarmType); +//�Ǽ�ϵͳʹ�ö˿� +int asmis_log_PortUsed(void* netlog_handle,struct info_port_used *info, int nPort); +//�Ǽ�ϵͳʵʱ������Ϣ +int asmis_log_RtdFlow(void* netlog_handle,time_t nStartTime, int nDuration, struct info_rtd_flow *info, int nFlow); +//�Ǽ�ϵͳ��ʼ���� +int asmis_log_RunStart(void* netlog_handle,int nContiRun); +//�Ǽ�ϵͳֹͣ��Ϣ +int asmis_log_RunStop(void* netlog_handle,int nContiRun); +//������Ϣ +int asmis_log_HeartBeat(void* netlog_handle,const char *pMsg); +//���Ը�����Ϣ +int asmis_log_Policy(void* netlog_handle,struct info_policy_update *info, int nPolicy); + +#endif |
