设备网络SDK开发使用手册 |
字符编码为UTF-8。
设备上传的报警信息包含图片数据,图片数据有二进制传输方式和URL传输方式两种:如果是二进制传输方式,从Json数据里面解析数图片数据可以直接保存成文件;如果使用URL方式传输,则上传的为图片的存储URL,HTTP协议。如果设备同时支持二进制和URL传输方式,可以在调用NET_DVR_SetupAlarmChan_V41布防时选择当前使用的类型(NET_DVR_SETUPALARM_PARAM中的byAlarmTypeURL参数)。
Content-Type: multipart/form-data; boundary=MIME_boundary
--MIME_boundary Content-Type: application/json Content-Length: 480 { "time": "2004-05-03T17:30:08.000Z", "ipV4": "172.6.64.7", "ipV6": "fe80::4080:c199:f513:3ebf%13", "port": 80, "macAddress": "01:17:24:45:D9:F4", "channel": 9, //监控点通道号 "channelName": "", //监控点名称, string类型, 最大长度为64 "cameraIndexCode": "", //IndexCode是唯一的, 平台里面使用这个作为标识, string类型, 最大长度为64, 可选 "Target": [{ "recognitionType": "human", //识别类型:human-人体识别 "TargetInfo": { "recognition": "personDensityDetection", //识别目标类型:personDensityDetection-人员密度 "dataSource": "timing", //检测数据来源: timing-定时, trigger-触发(超过设置的等级限制) "framesPeopleCounting_number": 23, //单帧画面人数统计 "densityLevel": 3, //密度等级值, 取值范围:[1,3]; 在定时统计的模式下, 如果统计的结果没有达到设置的等级限制, 该字段不上传 "personCnt": 3, //密度等级中的统计人数限制, integer32类型; 在定时统计的模式下, 如果统计的结果没有达到设置的等级限制, 该字段不上传 "customName": "高", //密度等级配置自定义信息; 在定时统计的模式下, 如果统计的结果没有达到设置的等级限制, 该字段不上传 "contentID": "person_density_image" //人员密度图 } }], "contentID": "background_image" //可见光图 } --MIME_boundary Content-Type: image/jpeg Content-Length: 516876 Content-ID: background_image fefefwageegfqaeg… --MIME_boundary Content-Type: image/jpeg Content-Length: 516876 Content-ID: person_density_image fefefwageegfqaeg… --MIME_boundary-- |
Content-Type: multipart/form-data; boundary=MIME_boundary
--MIME_boundary Content-Type: application/json Content-Length: 480 { "time": "2004-05-03T17:30:08.000Z", "ipV4": "172.6.64.7", "ipV6": "fe80::4080:c199:f513:3ebf%13", "port": 80, "macAddress": "01:17:24:45:D9:F4", "channel": 9, //监控点通道号 "channelName": "", //监控点名称 string len64 "cameraIndexCode": "", //IndexCode是唯一的,系统公司平台里面使用这个作为标识 string len64 可选 "Target": [{ "recognitionType": "human", //识别类型:human-人体识别 "TargetInfo": { "recognition": "personDensityDetection", //识别目标类型:personDensityDetection-人员密度 "dataSource": "timing", //检测数据来源: timing-定时, trigger-触发(超过设置的等级限制) "framesPeopleCounting_number": 23, //单帧画面人数统计 "densityLevel": 3, //密度等级值, 取值范围:[1,3]; 在定时统计的模式下, 如果统计的结果没有达到设置的等级限制, 该字段不上传 "personCnt": 3, //密度等级中的统计人数限制, integer32类型; 在定时统计的模式下, 如果统计的结果没有达到设置的等级限制, 该字段不上传 "customName": "高", //密度等级配置自定义信息; 在定时统计的模式下, 如果统计的结果没有达到设置的等级限制, 该字段不上传 "personDensityImageURL": "" //人员密度图URL } }], "imageURL": "" //可见光图 } --MIME_boundary-- |