日期:2014-05-17 浏览次数:20803 次
void CALLBACK MessageCallback(LONG lCommand, NET_DVR_ALARMER *pAlarmer, char *pAlarmInfo, DWORD dwBufLen, void* pUser)
{
int i;
switch(lCommand)
{
case COMM_ALARM:
{
NET_DVR_ALARMINFO struAlarmInfo;
memcpy(&struAlarmInfo, pAlarmInfo, sizeof(NET_DVR_ALARMINFO));
switch (struAlarmInfo.dwAlarmType)
{
case 3: //移动侦测报警
for (i=0; i<16; i++) //#define MAX_CHANNUM 16 //最大通道数
{
if (struAlarmInfo.dwChannel[i] == 1)
{
printf("发生移动侦测报警的通道号 %d\n", i+1);
}
}
break;
default:
break;
}
}
break;
default:
break;
}
}