You can retrieve read and hit data from the Genetec Patroller™ Simple Host service using predefined functions. You can also push New Wanted entries and raise hits.
- GetReadData
- GetReadIds
- GetLatestXGuidAndPlateNumber
- GetHitData
- AddNewWanted
- RaiseHit
The definition of each XML tags returned by the function calls is explained in XML tag descriptions for Patroller Simple Host.
Simple Host functions description
- GetReadData
- The method GetReadData will return all relevant information required about a plate read. The following is an example of the XML returned by a call to this function.
- GetReadIds
- The method GetReadIds will return the unique identifiers (GUID) of all reads between the 'from' and 'to' parameters.
<AutoVuReturn>
<Vehicle>
<PlateNumber>ABC123</PlateNumber>
<TimeStamp>12/3/2013 8:15:08 AM</TimeStamp>
<UnitName>Unit 1</UnitName>
<UserName>Default user</UserName>
<Attributes
State="QC" CameraOrientation="3" ReadType="1" />
</Vehicle>
</AutoVuReturn>
- GetLatestXGuidAndPlateNumber
- The method GetLatestXGuidAndPlateNumber will return an XML string listing the last number of hits that were raised. The following is an example of the XML returned by a call to this function.
<AutoVuReturn>
<Hit>
<HitID>B117F607-8367-40BD-BB18-99230A4F0569</HitID>
<Vehicle>
<PlateNumber>YUI765</PlateNumber>
</Vehicle>
</Hit>
<Hit>
<HitID>BB5B4B67-5080-4E0A-AB0B-0159CF646459</HitID>
<Vehicle>
<PlateNumber>420RFA</PlateNumber>
</Vehicle>
</Hit>
<Hit>
<HitID>E86DFD41-BA15-446A-B902-83A51EF872E6</HitID>
<Vehicle>
<PlateNumber>9476073</PlateNumber>
</Vehicle>
</Hit>
<Hit>
<HitID>FE8B1F23-B8D6-4025-A9CE-6030F34FE097</HitID>
<Vehicle>
<PlateNumber>6549330</PlateNumber>
</Vehicle>
</Hit>
</AutoVuReturn>
- GetHitData
- The function GetHitData returns all the data related to
a hit, including the 64-bit encoded images that are associated to the hit.
The function needs the GUID of the hit to retrieve the hit data. The GUID is
retrieved using the function GetLatestXGuidAndPlateNumber. The following
examples show the XML returned by this function.
XML example for a hotlist hit
<AutoVuReturn>
<Hit>
<HitID>7A17CA80-79CC-46FF-8480-AEE4C71E0F2F</HitID>
<HitCategory>Scofflaw</HitCategory>
<HotlistPlateState>QC</HotlistPlateState>
<Vehicle>
<PlateNumber>QAZWSX</PlateNumber>
<TimeStamp>4/4/2020 3:13:28 PM</TimeStamp>
<UnitName>Unit 1</UnitName>
<UserName>Default user</UserName>
<Location>
<Latitude>-73.6065188673537</Latitude>
<Longitude>45.5278538806699</Longitude>
<Heading>18.3796565908587</Heading>
<Address>Av Viaduc Rosemont-Van Horne</Address>
<ToStreet>Rue St-Urbain</ToStreet>
<FromStreet>Rue Viaduc Rosemont-Van Horne</FromStreet>
</Location>
<Image>
<Purpose>LPR</Purpose>
<CameraName>Left LPR</CameraName>
<Data>*</Data>
</Image>
<Image>
<Purpose>Context</Purpose>
<CameraName>Left context</CameraName>
<Data>*</Data>
</Image>
<Attributes ReadType="1" />
</Vehicle>
<Attributes HitType="Hotlist" />
</Hit>
</AutoVuReturn>
XML example for an overtime hit.
An overtime hit contains a second vehicle since we need two ALPR reads to initiate an overtime hit.
<AutoVuReturn>
<Hit>
<HitID>E20AB636-C516-4CAD-BD91-72FFF07582B4</HitID>
<Vehicle>
<PlateNumber>123456</PlateNumber>
<TimeStamp>4/4/2020 3:07:52 PM</TimeStamp>
<UnitName>Unit 1</UnitName>
<UserName>Default user</UserName>
<Location>
<Latitude>-73.6189690674709</Latitude>
<Longitude>45.5159273241462</Longitude>
<Heading>57.7012353085265</Heading>
<Address>1726, Av Van Horne</Address>
<ToStreet>Av Hartland</ToStreet>
<FromStreet>Av Antonine Maillet</FromStreet>
</Location>
<Image>
<Purpose>LPR</Purpose>
<CameraName>Left LPR</CameraName>
<Data>*</Data>
</Image>
<Image>
<Purpose>Context</Purpose>
<CameraName>Left context</CameraName>
<Data>*</Data>
</Image>
<Attributes ReadType="5"
ZoneName="Zone A BF always 2 mins"
ZoneColor="-32640" NumberOfViolation="1" />
</Vehicle>
<Vehicle2>
<PlateNumber>123456</PlateNumber>
<TimeStamp>4/4/2020 3:03:08 PM</TimeStamp>
<UnitName>Unit 1</UnitName>
<UserName>Default user</UserName>
<Location>
<Latitude>-73.6189097563445</Latitude>
<Longitude>45.5159931789884</Longitude>
<Heading>57.7012655931207</Heading>
<Address>1722, Av Van Horne</Address>
<ToStreet>Av Hartland</ToStreet>
<FromStreet>Av Antonine Maillet</FromStreet>
</Location>
<Image>
<Purpose>LPR</Purpose>
<CameraName>Left LPR</CameraName>
<Data>*</Data>
</Image>
<Image>
<Purpose>Context</Purpose>
<CameraName>Left context</CameraName>
<Data>*</Data>
</Image>
<Attributes ReadType="5"
ZoneName="Zone A BF always 2 mins"
ZoneColor="-32640" />
</Vehicle2>
<Attributes HitType="Overtime"
VehicleOvertimeGUID=
"56cef816-2025-4053-a0d1-341f8346b445" />
</Hit>
</AutoVuReturn>
XML example for a permit hit
<AutoVuReturn>
<Hit>
<HitID>5F20ACE3-192A-4D3B-BD82-F89B1A995E2A</HitID>
<Vehicle>
<PlateNumber>JHJ</PlateNumber>
<TimeStamp>4/4/2020 2:18:04 PM</TimeStamp>
<UnitName>Unit 1</UnitName>
<UserName>Default user</UserName>
<Location>
<Latitude>-87.6554201136705</Latitude>
<Longitude>41.7224790875399</Longitude>
<Heading>-88.0852803934929</Heading>
<Address>9438, S Throop St</Address>
<ToStreet>W 95th St</ToStreet>
<FromStreet>W 94th St</FromStreet>
</Location>
<Image>
<Purpose>LPR</Purpose>
<CameraName>Left LPR</CameraName>
<Data>*</Data>
</Image>
<Image>
<Purpose>Context</Purpose>
<CameraName>Left context</CameraName>
<Data>*</Data>
</Image>
<Attributes ZoneColor="0" ReadType="3"
ZoneName="Zone1" PolygonName="Zone1" />
</Vehicle>
<Attributes HitType="Permit" />
</Hit>
</AutoVuReturn>
- AddNewWanted
- The AddNewWanted function allows to push a New Wanted
entry to the patrol vehicle. The plate number must not be empty and have
less than 10 characters. The expiration duration must be greater than zero.
The following example would add to Patroller a New Wanted plate number ABC123 from the Quebec province, valid for 10 days.
service.AddNewWanted("ABC123", "QC", 10);
- RaiseHit
- This function is used to push a Hit to the patrol vehicle. This is used when
the logic that determines if a Read event should generate a Hit is executed
by an application outside of Patroller.
The function requires the following input parameters:
- readGuid
- GUID corresponding to a Read guid already existing in Patroller. This value can be obtained by using the GetReadIDs and GetReadData Simple Host functions.
- hitPlateNumber
- Plate number that has triggered the hit. For example, if the external application supports fuzzy matching, the Read can be ABC123 and the hitPlateNumber can be AB8123.
- hitPlateState
- State, country or province associated to the hit. This parameter can be empty.
- category
- Hit category determined by the third party application doing the matching.
- hitColor
- The hit color. The value must be among the predefined colors of the Simple Host interface.
- attributeKeyValuePairs
- This parameter allows to associate different attributes, with
their value, to a Hit. These attributes and values (key value
pairs) must be presented in the JSON (JavaScript Object
Notation) format.
The following example shows different possible attributes with values in the JSON format:
{"Model":"Honda", "Year":"2020", "Name":"Doe", "Surname":"John", "License No.":"123456789"}