⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 warning.c

📁 CBS(小区广播)程序实现手稿
💻 C
字号:
#include "..\sys\Include.h"

/* 发送告警给OMP */
void SendWarningToOmp(unsigned char cAlarmtype,unsigned char cAlarmcode,char *LpDescription  )
{
	WARNING_STRUCT_t s_Warning;

#ifdef DEBUG_PRINT
	printf("Send Warning To Omp,type=%d,code=%d\n",cAlarmtype,cAlarmcode);
#endif

	memset(&s_Warning,0,sizeof(WARNING_STRUCT_t));

	s_Warning.len=sizeof(WARNING_STRUCT_t)-sizeof(short);

	s_Warning.s_MessageHead.iMessageAreaId=C;
	s_Warning.s_MessageHead.iMessageType=WARNING_REPORT;

	s_Warning.s_MessageHead.iMessageLength=s_Warning.len-sizeof(MESSAGE_HEAD_t);

	s_Warning.cAlarmtype=cAlarmtype;

	s_Warning.cAlarmcode=cAlarmcode;

	if(strlen(LpDescription)<WARNING_DESC_LEN)
	{
    	memcpy(s_Warning.description,LpDescription,strlen(LpDescription));
	}

#ifdef  OPEN_STATISTIC			
	s_CBSECount.AlarmType[cAlarmtype-1].s_AlarmCode[cAlarmcode-1]++;
#endif

	AppendCBESendMessage((CBEMESSAGE_t *)&s_Warning);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -