| | |
| | | String url = "";//事件图片 |
| | | Boolean isSnapPic=true; |
| | | //lCommand是传的报警类型 |
| | | // log.debug("报警事件类型:lCommand:" + Integer.toHexString(lCommand)); |
| | | log.debug("报警事件类型:lCommand:" + Integer.toHexString(lCommand)); |
| | | switch (lCommand) { |
| | | case HCNetSDK.COMM_ALARM_V30: |
| | | //log.debug("移动侦测、视频丢失、遮挡、IO信号量等报警信息(暂不解析)"+Integer.toHexString(lCommand)); |
| | | log.debug("移动侦测、视频丢失、遮挡、IO信号量等报警信息(暂不解析)"); |
| | | case HCNetSDK.COMM_ALARM_RULE: |
| | | log.debug("行为分析信息报警信息"+Integer.toHexString(lCommand)); |
| | | log.debug("行为分析信息报警信息上报"); |
| | | //region 行为分析信息 |
| | | ArdCameras ardCameras = new ArdCameras(); |
| | | ardCameras.setIp(sDeviceIP); |
| | |
| | | if(isSnapPic) { |
| | | url = savePicture(info); |
| | | info.setPicUrl(url); |
| | | publishMqtt(info); |
| | | } |
| | | publishMqtt(info); |
| | | |
| | | break; |
| | | case HCNetSDK.COMM_UPLOAD_FACESNAP_RESULT: |
| | | log.debug("人脸检测事件上报(暂不解析)"+Integer.toHexString(lCommand)); |
| | | log.debug("人脸检测事件上报(暂不解析)"); |
| | | break; |
| | | case HCNetSDK.COMM_GISINFO_UPLOAD: |
| | | log.debug("GPS报警信息上报(暂不解析)"+Integer.toHexString(lCommand)); |
| | | log.debug("GPS报警信息上报(暂不解析)"); |
| | | break; |
| | | case HCNetSDK.COMM_ALARMHOST_CID_ALARM: |
| | | log.debug("报警主机 CID 报告报警上传"+Integer.toHexString(lCommand)); |
| | | log.debug("报警主机CID报告报警上报"); |
| | | //region 报警主机报警处理 |
| | | ArdEquipExternal ardEquipExternal = new ArdEquipExternal(); |
| | | ardEquipExternal.setIp(sDeviceIP); |
| | |
| | | acsInfo.write(0, pAlarmInfo.getByteArray(0, strACSInfo.size()), 0, strACSInfo.size()); |
| | | strACSInfo.read(); |
| | | int dwMajor = strACSInfo.dwMajor; |
| | | |
| | | if (dwMajor != 5) { |
| | | //只获取事件 |
| | | log.debug("非事件报警数据上报(暂不解析)"); |
| | | break; |
| | | } |
| | | int dwMinor = strACSInfo.dwMinor; |
| | |
| | | //endregion |
| | | break; |
| | | default: |
| | | log.info("未知报警事件类型:lCommand:" + Integer.toHexString(lCommand)); |
| | | log.debug("未知报警事件类型:lCommand:" + Integer.toHexString(lCommand)); |
| | | break; |
| | | |
| | | } |