JSON_EventNotificationAlert_TrafficStatisticsAlarmMsg

Message about details of the traffic data collection alarm in JSON format.

{
  "ipAddress":"",
/*required, string, IPv4 address of the alarm device, the maximum size is 32 bytes*/
  "ipv6Address":"",
/*optional, string, IPv6 address of the alarm device, the maximum size is 128 bytes*/
  "portNo": ,
/*optional, integer32, port No. of the alarm device*/
  "protocol": "",
/*optional, string, protocol type: "HTTP" or "HTTPS", the maximum size is 32 bytes*/
  "macAddress": "",
/*optional, string, MAC address, the maximum size is 32 bytes*/
  "channelID": ,
/*optional, integer32, device channel No. that triggers alarm*/
  "dateTime": "",
/*required, string, time in ISO8601 time format when the alarm is triggered, the maximum size is 32 bytes*/
  "activePostCount": ,
/*required, integer32, times of the same alarm being uploaded*/
  "eventType": "",
/*required, string, event type that triggers alarm, the maximum size is 128 bytes. Here it should be set to "TPS" (traffic statistics)*/
  "eventState": "",
/*required, string, event status: "active"-triggered, "inactive"-not triggered (heartbeat data), the maximum size is 32 bytes*/
  "eventDescription": "",
/*required, string, event description: "traffic statistics" (passing vehicle statistics), the maximum size is 128 bytes*/
  "deviceID": "",
/*optional, PUID, which should be returned in ISUP alarm*/
  "Target": [{
    "recognitionType": "",
/*required, recognition type in traffic statistics*/
    "TargetInfo": {
/*required, target information*/
      "recognition": "",
/*required, specific recognition target*/
      "startTime": "",
/*required, statistics start time*/
      "samplePeriod": ,
/*required, statistics period, unit: second*/
      "totalLaneNum": ,
/*required, integer, number of valid lanes, the value ranges from 1 to 18*/
      "LaneInfo": [{
/*required, lane information*/
        "laneNo": ,
/*required, integer, lane No., the value ranges from 1 to 18*/
        "aversgeSpeed": ,
/*required, integer, average speed of vehicles traveling on the lane, unit: km/h*/
        "smallCarNum": ,
/*required, integer, number of small-sized vehicles*/
        "midsizeCarNum": ,
/*required, integer, number of medium-sized vehicles*/
        "heavyVehicleNum": ,
/*required, integer, number of heavy vehicles*/
        "headTimeInterval": ,
/*required, integer, time headway, unit: second*/
        "headInterval": ,
/*required, integer, space headway, unit: meter*/
        "spaceOccupyRation": ,
/*required, float, lane space occupancy, which is between 0% and 100.000%, and it is accurate to three decimal places*/
        "timeOccupyRation": ,
/*required, float, lane time occupancy, which is between 0% and 100.000%, and it is accurate to three decimal places*/
        "channelizationLaneNo": ,
/*optional, integer, channelized lane No.*/
        "averageParkingTime": ,
/*optional, integer, average parking times*/
        "averageDelay": ,
/*optional, integer, average delay time, unit: second*/
        "averageQueueLen": 
/*optional, integer, average queuing length, unit: meter*/
      }],
      "totalCoilNum": ,
/*optional, integer, number of valid coils, the value ranges from 1 to 40*/
      "CoilInfo": [{
/*optional, coil information*/
        "coilNo": ,
/*required, integer, coil No.*/
        "laneNo": ,
/*required, integer, lane No., the value ranges from 1 to 18*/
        "aversgeSpeed": ,
/*required, integer, average speed of vehicles passing by the lane, unit: km/h*/
        "smallCarNum": ,
/*required, integer, number of small-sized vehicles*/
        "midsizeCarNum": ,
/*required, integer, number of medium-sized vehicles*/
        "heavyVehicleNum": ,
/*required, integer, number of heavy vehicles*/
        "headTimeInterval": ,
/*required, integer, time headway, unit: second*/
        "headInterval": ,
/*required, integer, space headway, unit: meter*/
        "spaceOccupyRation": ,
/*required, float, lane space occupancy, which is between 0% and 100.000%, and it is accurate to three decimal places*/
        "timeOccupyRation": ,
/*required, float, lane time occupancy, which is between 0% and 100.000%, and it is accurate to three decimal places*/
        "channelizationLaneNo": ,
/*optional, integer, channelized lane No.*/
        "nonmotorVehicleNum": 
/*optional, integer, number of non-motor vehicles*/
      }]
    }
  }],
  "Location":{
/*optional, device location*/       
    "lng": ,
/*required, float, longitude*/   
    "lat": 
/*optional, float, latitude*/   
  },
  "algorithmInfo":{
/*algorithm version information, this field is required for secondary analysis*/
    "algorithmId":"", 
/*optional, string, algorithm package ID*/
    "algoVendorId":"",
/*optional, string, manufacturer ID*/ 
    "algoVersionId":"",
/*optional, string, algorithm version ID*/ 
    "algoChipType":"", 
/*optional, string, chip type*/
    "algoModelVersion":""
/*optional, string, model version*/
  }
}

Example of Receiving Traffic Statistics Alarm in Arming Mode

GET /ISAPI/Event/notification/alertStream HTTP/1.1
Accept: text/html, application/xhtml+json, */*
Accept-Language: en-US
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko
Accept-Encoding: gzip, deflate
Host: 10.17.133.46
DNT: 1
Connection: Keep-Alive
Cookie: language=zh; sdMarkMenu=8%3Avehicle; sdMarkTab_1_0=0%3AsettingBasic; sdMarkTab_6_0=5%3AeventException; sdMarkTab_6_1=6%3AsmartLoiterDetection; sdMarkTab_7_0=1%3AplanCapture; sdMarkTab_7_1=0%3AstorageManageHarddisk; sdMarkTab_8=0%3AvehicleParam; WebSession=f81610c130711300cf30

HTTP/1.1 200 OK
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary=boundary

--boundary
Content-Type: application/json

{
  "ipAddress":"172.6.64.7",
  "portNo": 80,
  "protocol": "HTTP",
  "macAddress": "01:17:24:45:D9:F4",
  "channelID": 1,
  "dateTime": "2009-11-14T15:27+08:00",
  "activePostCount": 1,
  "eventType": "TPS",
  "eventState": "active",
  "eventDescription": "traffic statistics",
  "deviceID": "test0123",
  "Target": [{
    "recognitionType": "vehicle",
    "TargetInfo": {
      "recognition": "TPS",
      "startTime": "2004-05-03T17:30:08.000+080:00",
      "samplePeriod": 3600,
      "totalLaneNum": 18,
      "LaneInfo": [{
        "laneNo": 18,
        "aversgeSpeed": 60,
        "smallCarNum": 20,
        "midsizeCarNum": 20,
        "heavyVehicleNum": 20,
        "headTimeInterval": 20,
        "headInterval": 20,
        "spaceOccupyRation": 20.000,
        "timeOccupyRation": 20.000,
        "channelizationLaneNo": 2,
        "averageParkingTime": 2,
        "averageDelay": 2,
        "averageQueueLen": 2
      }],
      "totalCoilNum": 40,
      "CoilInfo": [{
        "coilNo": 18,
        "laneNo": 18,
        "aversgeSpeed": 60,
        "smallCarNum": 20,
        "midsizeCarNum": 20,
        "heavyVehicleNum": 20,
        "headTimeInterval": 20,
        "headInterval": 20,
        "spaceOccupyRation": 20.000,
        "timeOccupyRation": 20.000,
        "channelizationLaneNo": 2,
        "nonmotorVehicleNum": 20
      }]
    }
  }]
  "Location": {         
    "lng": "116.46",
    "lat": "39.92"
  },
}
--boundary

Example of Receiving Traffic Statistics Alarm in Listening Mode

POST /test HTTP/1.1
Accept: text/html, application/xhtml+json, */*
Accept-Language: en-US
Content-Type: multipart/form-data; boundary=---------------------------7e13971310878
User-Agent: Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0)
Accept-Encoding: gzip, deflate
Host: 10.10.36.29:8080
Content-Length: 9907
Connection: Keep-Alive
Cache-Control: no-cache

--boundary
Content-Disposition: form-data; name="tps.json";filename="tps.json";
Content-Type: text/json
Content-Length: 150


<EVENT_JSON>
--boundary--
HTTP/1.1 200 OK
test: mime
Connection: Keep-Alive
Content-Length: 183 
Cache-Control: no-store