XML_EventNotificationAlert_TFS

XML message about alarm details of traffic enforcement

<EventNotificationAlert version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema"><!--required, xs:object, alarm details of traffic enforcement-->
  <ipAddress><!--required, xs:string, IPv4 address of the device that triggers the alarm--></ipAddress>
  <ipv6Address><!--optional, xs:string, IPv6 address of the device that triggers the alarm--></ipv6Address>
  <portNo><!--optional, xs:integer, port No. of the device that triggers the alarm--></portNo>
  <protocol><!--required, xs:string, transmission communication protocol type: HTTP, HTTPS, EHome. The value should be HTTP when ISAPI protocol is transmitted via EZVIZ protocol. The value should be EHome when ISAPI protocol is transmitted via ISUP--></protocol>
  <macAddress><!--optional, xs:string, MAC address--></macAddress>
  <channelID><!--optional, xs:string, channel (video channel) number of the device that triggers the alarm--></channelID>
  <dateTime>
    <!--required, xs:datetime, alarm triggering time, e.g., 2017-04-22T15:39:01+08:00-->
  </dateTime>
  <activePostCount><!--required, xs:integer, times that the same alarm has been uploaded--></activePostCount>
  <eventType><!--required, xs:string, event types, here it should be "TFS" (traffic enforcement)--></eventType>
  <eventState><!--required, xs:string, continuous event's status: active (valid event), inactive (invalid event)--></eventState>
  <eventDescription><!--required, xs:string, event description--></eventDescription>
  <channelName><!--optional, xs:string, channel name--></channelName>
  <deviceID><!--optional, xs:string, device ID, which should be returned when the alarm is uploaded via ISUP--></deviceID>
  <TFS><!--optional, object, event information of traffic enforcement-->
    <illegalTrafficEvent>
      <!--required, xs:string, traffic violation event: abandonedObject,checkPoint,conflagration,congestion,construction,crossLane,edfManual,fogDetection,gasser,group,illegalParking,intersectionStranded,laneChange,objectDroppedDown,occupyOvertakingLaneparallelParking,pedestrian,polyJam,prohibitionMarkViolation,roadBlock,slowMoving,smoke,speed,suddenSpeedDrop,trafficAccident,trafficConflict,turnRound,unknown,vehicleexist,wrongDirection,blackSmokeVehicle,occupyDedicatedLane,notDriveInDedicatedLane,nonZipperMerge,jamCrossLine,SSharpDriving,notKeepDistance,notSlowZebraCrossing,overtakeRightSide,lowSpeed,dragRacing,changeLaneContinuously,largeVehicleOccupyLine-->
    </illegalTrafficEvent>
    <illegalType><!--required, xs:string, violation types--></illegalType>
    <VehicleInfo><!--optional, vehicle information-->
      <vehicleType><!--optional, xs:string, vehicle type: "SUVMPV" (SUV/MPV), "buggy" (small-sized truck), "bus", "concreteMixer" (concrete mixer), "containerTruck" (container truck), "coupe", "crane", "hatchback", "largeBus" (large-sized bus), "lightTruck" (light truck), "mediumBus" (middle-sized bus), "mediumHeavyTruck" (medium and heavy truck), "miniCar" (mini sedan (transformed to "vehicle")), "minibus", "minitruck", "motorVehicle" (motor vehicle (transformed to "vehicle")), "nonmotorVehicle" (non-motor vehicle (transformed to "threeWheelVehicle")), "oilTankTruck" (oil tank truck), "pedestrian", "pickupTruck" (pickup truck (transformed to "buggy")), "platformTrailer" (platform trailer), "saloon", "slagTruck" (dump truck), "smallCar" (small sedan (transformed to "vehicle")), "threeWheelVehicle" (tricycle), "truck", "twoWheelVehicle" (two wheeler), "unknown", "van", "vehicle" (sedan)--></vehicleType>
      <vehicleColor><!--optional, xs:string, vehicle color: "unknown", "white", "silver"-silvery, "gray", "blacks"-black, "red", "deepBlue"-dark blue, "blue", "yellow", "green", "brown", "pink", "purple", "deepGray"-dark gray, "cyan", "orange"--></vehicleColor>
      <vehicleSpeed><!--optional, xs:integer, vehicle speed, which is between 0 and 255, unit: km/h--></vehicleSpeed>
      <vehicleEnterState><!--optional, xs:string, vehicle entering status: vehicleEnter (vehicle entered), vehicleExit (vehicle exited)-->vehicleEnter</vehicleEnterState>
      <vehicleConfidence><!--optional, xs:float, vehicle picture confidence, which is between 0 and 100.0--></vehicleConfidence>	
      <vehicleLogo><!--optional, xs:integer, vehicle main brand. For details, refer to Main Vehicle Brand Reference--></vehicleLogo>			
    </VehicleInfo>	
    <PlateInfo><!--optional, license plate information-->
      <plate><!--required, xs:string, license plate number: noPlate (vehicle without license plate), unknown (no license plate recognized), XXXXXX (recognized license plate number)--></plate>
      <plateType>
        <!--required, xs:string, license plate type: "92FarmVehicle"-civil vehicle two-line license plate, "arm"-police vehicle, "upDownMilitay"-military vehicle (up/down format), "92TypeArm"-92 armed police vehicle, "leftRightMilitay"-military vehicle (left/right format), "02TypePersonalized"-02 personalized vehicle, "yellowTwoLine"-yellow two-line license plate, "04NewMilitay"-04 new military vehicle, "embassy"-embassy car, "oneLineArm"-new armed police vehicle with one-line structure, "twoLineArm"-new armed police vehicle with two-line structure, "yellow1225FarmVehicle"-yellow agricultural vehicle with 1225 structure, "green1325FarmVehicle"-green agricultural vehicle with 1325 structure, "yellow1325FarmVehicle"-yellow agricultural vehicle with 1325 structure, "motorola"-motorcycle, "newEnergy"-new energy vehicle license plate, "civilAviation"-civil aviation license plate, "coach"-driver-training car, "tempTravl"-temporary license plate car, "trailer", "consulate"-consulate car, "hongKongMacao"-vehicle entering and exiting Hong Kong and Macao, "tempEntry"-temporary entry car, "emergency"-emergency license plate, "oneLineArmHeadquarters"-armed police headquarter license plate (one-line), "twoLineArmHeadquarters"-armed police headquarter license plate (two-line)-->
      </plateType>
      <plateColor>
	<!--required, xs:string, license plate color: "black", "blue", "golden", "orange", "red", "yellow", "white", "unknow", "other", "newEnergyYellowGreen" (new energy green and yellow), "civilAviationBlack" (civil aviation black), "civilAviationGreen" (civil aviation green), "green", "mixedColor" (mixed color), "newEnergyGreen" (new energy green)-->
      </plateColor>
      <licenseBright><!--optional, xs:integer, brightness of license plate picture, which is between 0 and 255--></licenseBright>
      <confidence><!--optional, xs:float, confidence of license plate picture, which is between 0 and 100.0--></confidence>
    </PlateInfo>
    <SceneInfo><!--optional, scene information-->
      <scenesID><!--required, xs:string, scene ID, which is between 1 and 16--></scenesID>
      <sceneName><!--required, xs:string, scene name, up to 32 characters can be contained in the name--></sceneName>	
      <PTZPos><!--optional, PTZ postion-->
	<elevation><!--optional, xs:integer, range: [-900,2700]--></elevation> 
	<azimuth><!--optional, xs:integer, range: [0,3600]--></azimuth> 
	<absoluteZoom><!--optional, xs:integer, range: [0, 1000]---></absoluteZoom>
      </PTZPos>
      <relatedAreaNo><!--optional, string, linked area number, value range: [1,8]. The number is generated by calling /ISAPI/Traffic/channels/<channelID>/eventRule/<SID> (related node: <ruleId>). The related URI for configuring congestion detection event is /ISAPI/Traffic/channels/<channelID>/AID/<SID>/ployCongestion (the linked area number is specified by relatedAreaNo)-->1</relatedAreaNo>
      <RelatedRegionCoordinatesList><!--optional, array, list of coordinates of linked areas. The number of areas that can be linked is between 3 and 10. This node contains the coordinates of areas in the node <relatedAreaNo>-->
        <RegionCoordinates><!--optional, object, coordinate of the area. The origin is the upper-left corner of the screen-->
        <positionX><!--required, float, X-coordinate, value range:[0.000,1.000]-->0.000</positionX>
        <positionY><!--required, float, Y-coordinate, value range:[0.000,1.000]-->0.000</positionY>
        </RegionCoordinates>
      </RelatedRegionCoordinatesList>
    </SceneInfo>	
    <relatedLaneNo><!--required, xs:integer, linked lane No., which is between 1 and 6--></relatedLaneNo>		
    <region><!--optional, xs:integer, region. For details, refer to Region Code--></region>
    <country><!--optional, xs:integer, country/region. For details, refer to Country/Region Code--></country>
    <parkingSerialNo>
      <!--dependent, xs:integer, parking ID, which consists of up to 16 characters with numerics and letters, this node is valid when <illegalTrafficEvent> is "parallelParking"-->
    </parkingSerialNo>
    <crossLane>
      <!--dependent, xs:boolean, whether the driving on lane line event occurred during parallel parking, this node is valid when <illegalTrafficEvent> is "parallelParking"-->
    </crossLane>
    <crossSpaces>
      <!--dependent, xs:boolean, whether the parking space crossing event occurred during parallel parking, this node is valid when <illegalTrafficEvent> is "parallelParking"-->
    </crossSpaces>
    <angledParking>
      <!--dependent, xs:boolean, whether the inclined parking event occurred during parallel parking, this node is valid when <illegalTrafficEvent> is "parallelParking"-->
    </angledParking>
    <alarmValidity>
      <!--dependent, xs:integer, alarm validity, which is between 0 and 100, this node is valid when <illegalTrafficEvent> is "parallelParking"-->
    </alarmValidity>
    <CRIndex><!--optional, xs:integer, country/region index. For details, refer to Country/Region Code--></CRIndex>
    <illegalTrafficSubEvent><!--optional, xs:string, sub-event of vehicle violation actions: normal, crossLane (parking on the line), crossBerth (parking over two spaces), crossLaneBerth (parking on the line and over two spaces), illegalParking (illegal parking). This node is returned only when the value of illegalTrafficEvent is parallelParking-->normal</illegalTrafficSubEvent>
    <TFSGPSInfo><!--optional, GPS information of the TFS event-->
      <longitudeType><!--required, xs:string, longitude, "E,W"--></longitudeType>
      <latitudeType><!--required, xs:string, latitude, "S,N"--></latitudeType>
      <Longitude><!--required, longitude information-->
        <degree><!--required, xs:integer--></degree>
        <minute><!--required, xs:integer--></minute>
        <sec><!--required, xs:float, accurate to 6 decimal places--></sec>
      </Longitude>
      <Latitude><!--required, latitude information-->
        <degree><!--required, xs:integer--></degree>
        <minute><!--required, xs:integer--></minute>
        <sec><!--required, xs:float, accurate to 6 decimal places--></sec>
      </Latitude>
    </TFSGPSInfo>
  </TFS>
  <detectionPictureTransType><!--optional, xs:string, picture transmission mode: "url, binary"--></detectionPicture>
  <detectionPicturesNumber>
    <!--optional, xs:string, number of alarm pictures, this node will be returned only when the pictures exist in the alarm information-->
  </detectionPicturesNumber>
  <PictureURLInfoList><!--dependent, picture URL list, this node is valid when <detectionPictureTransType> is "url"-->
    <PictureURLInfo><!--optional-->
      <pictureName><!--required, xs:string, "compositePicture,licensePlatePicture,vehiclePicture"--><pictureName>
      <pictureURL><!--required, xs:string, picture URL--></pictureURL>
    </PictureURLInfo>
  </PictureURLInfoList>
  <UUID><!--optional, xs:string, UUID (general unique identification code), it is used to link the same capture across servers--></UUID>
  <monitoringSiteID><!--optional, string, camera number-->test</monitoringSiteID>
  <monitorDescription><!--optional, string, camera information-->test</monitorDescription>
  <monitoringSiteID><!--optional, xs:string, camera No.--></monitoringSiteID>
  <monitorDescription><!--optional, xs:string, camera information--></monitorDescription>
  <IllegalInfo><!--optional, violation information-->
    <illegalCode><!--required, xs:string, violation code--></illegalCode>
    <illegalName><!--required, xs:string, violation name--></illegalName>
    <illegalDescription><!--optional, xs:string, violation description--></illegalDescription>
  </IllegalInfo>
  <isAlert><!--optional, xs:boolean, whether to enable TFS pre-alarm. When the value is true, it refers to the TFS pre-alarm. If this node is not returned, it refers to the TFS alarm by default. If the pre-alarm is enable in the enforcement rule configuration (e.g., the value of alertEnabld is true in the illegal parking detection), when the violation action of the vehicle at the very beginning, the TFS pre-alarm information will be uploaded. After the violation action completes, the TFS alarm information will be uploaded-->true</isAlert>
</EventNotificationAlert>

Interaction Example of Receiving Violation Enforcement Alarm in Arming Mode

GET /ISAPI/Event/notification/alertStream HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
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/xml; charset="UTF-8"
Content-Length: 480

<EventNotificationAlert version="2.0" xmlns="http://www.isapi.org/ver20/XMLSchema">
  <ipAddress>172.6.64.7</ipAddress>
  <ipv6Address>fe80::4080:c199:f513:3ebf%13</ipv6Address>
  <portNo>8000</portNo>
  <macAddress>01:17:24:45:D9:F4</macAddress>
  <channelID>1</channelID>
  <dateTime>2017-04-22T15:39:01+08:00</dateTime>
  <activePostCount>1</activePostCount>
  <eventType>TFS</eventType>
  <eventState>active</eventState>
  <eventDescription>automatic incident detection</eventDescription>
  <channelName>Camera1</channelName>
  <deviceID>test0123</deviceID>
  <TFS>
    <illegalTrafficEvent>laneChange</illegalTrafficEvent>
    <illegalType>1625</illegalType>
    <VehicleInfo>
      <vehicleType>vehicle</vehicleType>
      <vehicleColor>white</vehicleColor>
      <vehicleSpeed>60</vehicleSpeed>
      <vehicleEnterState>vehicleEnter</vehicleEnterState>
      <vehicleConfidence>99.9</vehicleConfidence>
      <vehicleLogo>1028</vehicleLogo>
    </VehicleInfo>	
    <PlateInfo>
      <plate>ZA12345</plate>
      <plateType>92TypeCivil</plateType>
      <plateColor>blue</plateColor>
      <licenseBright>100</licenseBright>
      <confidence>99.9</confidence>
    </PlateInfo>
    <SceneInfo>
      <scenesID>1</scenesID>
      <sceneName>scene1</sceneName>	
      <PTZPos> 
	<elevation>-899</elevation> 
	<azimuth>3599</azimuth> 
	<absoluteZoom>999</absoluteZoom> 
      </PTZPos>
    </SceneInfo>	
    <relatedLaneNo>1</relatedLaneNo>		
    <region>1</region>
    <country>1</country>		
  </TFS>
  <detectionPictureTransType>binary</detectionPicture>
  <detectionPicturesNumber>3</detectionPicturesNumber>
  <PictureURLInfoList>
    <PictureURLInfo>
      <pictureName>compositePicture<pictureName>
      <pictureURL></pictureURL>
    </PictureURLInfo>
    <PictureURLInfo>
      <pictureName>licensePlatePicture<pictureName>
      <pictureURL></pictureURL>
    </PictureURLInfo>
    <PictureURLInfo>
      <pictureName>vehiclePicture<pictureName>
      <pictureURL></pictureURL>
    </PictureURLInfo>
  </PictureURLInfoList>
</EventNotificationAlert>
--boundary
Content-Disposition: form-data; name="licensePlatePicture.jpg";filename="licensePlatePicture.jpg";
Content-Type: image/pjpeg
Content-Length: 200

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary
Content-Disposition: form-data; name="vehiclePicture.jpg";filename="vehiclePicture.jpg";
Content-Type: image/pjpeg
Content-Length: 9907

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary
Content-Disposition: form-data; name="compositePicture.jpg";filename="compositePicture.jpg";
Content-Type: image/pjpeg
Content-Length: 1534

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary
Content-Disposition: form-data; name="closeUpPicture.jpg";filename="closeUpPicture.jpg";
Content-Type: image/pjpeg
Content-Length: 599

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary--

Interaction Example of Receiving Violation Enforcement Alarm in Listening Mode

POST /test HTTP/1.1
Accept: text/html, application/xhtml+xml, */*
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="tfs.xml";filename="tfs.xml";
Content-Type: text/xml
Content-Length: 150

<EventNotificationAlert/>
--boundary
Content-Disposition: form-data; name="licensePlatePicture.jpg";filename="licensePlatePicture.jpg";
Content-Type: image/pjpeg
Content-Length: 200

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary
Content-Disposition: form-data; name="vehiclePicture.jpg";filename="vehiclePicture.jpg";
Content-Type: image/pjpeg
Content-Length: 9907

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary
Content-Disposition: form-data; name="compositePicture.jpg";filename="compositePicture.jpg";
Content-Type: image/pjpeg
Content-Length: 1534

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary
Content-Disposition: form-data; name="closeUpPicture.jpg";filename="closeUpPicture.jpg";
Content-Type: image/pjpeg
Content-Length: 599

......JFIF.....`.`.....C........... .
..
................. $.' ",#..(7),01444.'9=82<.342...C. ....

.2!.!22222222222222222222222222222222222222222222222222......q.<.."..................................... 
.....................}........!1A..Qa."q.2....#B...R..$3br. 
.....%&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz....................................................................................................... 
.....................w.......!1..AQ.aq."2...B.... #3R..br.
.$4.
--boundary--

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