open interface - archicom.info · 4 the result answer is between tags, 1-1 tag belongs for each...

16
1 OPEN INTERFACE Function description

Upload: others

Post on 20-Mar-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

1

OPEN INTERFACE Function description

Page 2: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

2

Table of contents

1. WebEye Open Interface .................................................................................................................. 3

1.1 Vehicle list ............................................................................................................................... 3

1.2 Vehicle list in xml format ......................................................................................................... 3

1.3 List of Drivers ........................................................................................................................... 4

1.4 List of user's POIs ..................................................................................................................... 4

1.5 Create New POI ....................................................................................................................... 5

1.6 Modify a POI ............................................................................................................................ 5

1.7 Delete a POI ............................................................................................................................. 6

1.8 Grouping vehicles .................................................................................................................... 6

1.9 Sharing vehicles ....................................................................................................................... 6

1.10 Get Waypoints of a Vehicle ..................................................................................................... 7

1.11 Get All Data Messages of Vehicle (Route) ............................................................................... 8

1.12 Raw Messages from Database ................................................................................................ 9

1.13 Text messages ......................................................................................................................... 9

Sending messages............................................................................................................................ 9

Delete Trip (Freight task) ............................................................................................................... 10

Listing text messages ..................................................................................................................... 10

1.14 CAN-BUS values ..................................................................................................................... 11

1.15 Working time all .................................................................................................................... 11

1.16 Current positions in xml format ............................................................................................ 11

1.17 List MDT status messages...................................................................................................... 12

1.18 MDT status extension ............................................................................................................ 13

1.19 Sending transport order ........................................................................................................ 13

2. WebEye online interface dll .......................................................................................................... 15

Page 3: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

3

1. WebEye Open Interface We can give data from WebEye server throught http / https GET interface in content type text/plain or xml. The WebEye user name and password are given by ’Gr’ and ’Pw’ parameters. Low and high date&time limit given by ’SLo’ and ’SHi’ parameter in format YYYY-MM-DD hh:mm:ss. The default value of time is 00:00:00. All the data are samples in this document.

1.1 Vehicle list

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/carlist.txt&Gr=username&Pw=password Result is one car per row: http://openinterface.webeye.eu/exec.cgi?Xlat=txt/carlist.txt&Gr=demo/gps&Pw=demo 15892|FKS-128|Mercedes|-6|Eurotrade --- Tátra Trans Kft.|Ignition||||||300| 10332|FLM-734 DT|Volvo FH 12|-6|Lochner 05W1223/2--- Dancsi és Társa Kft|Ignition||||||1180| 15322|HOS-218|Scania 420|-6|V-Sped||||||1100| 18046|JZP-197|Ford Fusion|-6|Patent Plusz Kft. --- Asdeka Kft.|Ignition||||||0| The fields are: 1. WebEye-identifier of vehicle 2. Licence plate 3. Make of vehicle 4. Daily data-downloading time of vehicle (-6 for GPRS boxes) 5. Owner of car 6. Digital sensor (0); always ignition 7. Digital sensor (1); empty if this sensor is unconnected 8. Digital sensor (2); empty if this sensor is unconnected 9. Digital sensor (3); empty if this sensor is unconnected 10. Digital sensor (4); empty if this sensor is unconnected 11. Digital sensor (5); empty if this sensor is unconnected 12. Fuel tank capacity, 0 if there is no WebEye fuel-sensor 13. Other data of the vehicle (eg.colour) 14. Driver’s name 15. Vehicle groups (subgoups); the Roman numbers I,II, III, IV, etc.. are showen as 1,2,3,4..16 bits.

1.2 Vehicle list in xml format

http://openinterface.webeye.eu/exec.cgi?Xlat=xml/cars.xml&Gr=username&Pw=password

Page 4: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

4

The result answer is between <cars> tags, 1-1 <car1> tag belongs for each vehicle. The

<car1> tag has two attributes, the ’id’ is the WebEye CarID, the ’lpl’ is the number plate. Inside

the <car1> tag there are the fields of the CarID.

1.3 List of Drivers

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/drvlist.txt&Gr=username&Pw=password

The result is 1 driver per row: Grp|Drv|Nam|

7|7536649|Gk.vez. 1| 7|7536689|Gk.vez. 2| 7|7471370|Kiss Alajos|

The fields are:

1. (Grp) WebEye user's internal ID 2. (Drv) Number of driver's card 3. (Nam) Driver's name 4. (Phn) Driver’s phone number 5. (Sta) Status (0; working 1; inactive) 6. (Dam) Driver’s business unit 7. (Mai) Driver’s mail address 8. (Car) ID of the current/last car driven by the driver 9. (Drc) Number of Driver’s card

1.4 List of user's POIs http://openinterface.webeye.eu/exec.cgi?Xlat=txt/poilist.txt&Gr=username&Pw=password The result is: Grp|Txt|Lat|Lon|Crc|Nam|Cla|

7|1116|47363497|19069082|200|Auchan|0| 7|1581|48011090|20036263|20|METRO M3|0| 7|1586|47335214|19047647|40|Shell Petrol Station|0| 7|1573|47331213|19082578|100|AGIP Petrol Station|0| 7|1575|47393362|19095262|100|Shell 2/A|0| 7|1576|47331868|19055392|50|Shell Pozsonyi street|0| 7|1577|47334901|19045877|50|Shell Vaci street|0| 7|1566|47333672|19049935|200|WebEye Service Center|0|

The fields are:

Page 5: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

5

1. (Grp) WebEye user's internal ID 2. (Txt) POI identifier in WebEye database 3. (Lat) Latitude (100 0000 * degre + 10000 * minute) 4. (Lon) Longitude (100 0000 * degre + 10000 * minute) 5. (Crc) Radius of POI, negative values mean square 6. (Nam) Name of POI 7. (Cla) Classification of POI – number of POI category (the A…O categories are represented as 0,1,2..15 numbers) 8. (Typ) Type of the object: 0 = lane, 1 = polygon, 2 = circle 9. (Phn) Phone number 10. (Dsc) Description 11. (Cod) user code 12. (Poi) coordinate-chain in case of poligon or lane

1.5 Create New POI

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/poi.txt&Op=Add&Gr=username&Pw=password&Lat=latitude&Lon=longitude&Nam=POIname Parameters:

1. Gr User's login name. 2. Pw User's password. 3. Op=Add Function of append a new POI. 4. Txt Identifier of new point, if empty, WebEye will generate a new key. 5. Lat Lon Latitude and longitude (degree*1000000 + minute*10000) 6. Nam Name of POI. 7. Crc Radius of POI, negative values mean square, default value is 100 meters. 8. Cod Code of the POI

1.6 Modify a POI

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/poi.txt&Op=Mod&Gr=username&Pw=password&Txt=poiID Parameters:

1. Gr User's login name. 2. Pw User's password. 3. Op=Mod Function of modify a point. 4. Txt Identifier of point (see in List of POIs). 5. Lat Lon Latitude and longitude (degree*1000000 + minute*10000) Don't change if empty. 6. Nam Name of POI. Don't change if empty. 7. Crc Radius of POI, negative values mean square. Don't change if empty. 8. Cod Code of the POI. Don’t change if empty.

Page 6: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

6

1.7 Delete a POI

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/poi.txt&Op=Del&Gr=username&Pw=password&Txt=poiID Parameters:

1. Gr User's login name. 2. Pw User's password. 3. Op=Del Function of delete a point. 4. Txt Identifier of point (see in List of POIs).

The result is a text file, the first row is the opcode: *Op=Add, *Op=Mod or *Op=Del. The second is the record of POI like in list of POIs.

1.8 Grouping vehicles We can assign the vehicles to different so-called subgroups. One vehicle can belong to two or more different subgroups. The assignment can be adjusted by the following link:

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/CarTool.sql&Gr=username&Pw=password&

Parameters: only one of the main parameters must be defined – either the license plate (Lpl) or the vehicle id (C). If we do not define any of them the transaction will affect the whole fleet.

1. Gr user ID – user name. 2. Pw user’s password. 3. Op Code of the completed transaction. Op=DelGrp Erase the vehicle from the subgroup. Op=SetGrp Add the vahicke to the subgroup 4. C Vehicle ID 5. Lpl license plate of the vehicle 6. G Number of subgroup (1-30, Arabic numerals)

1.9 Sharing vehicles

The users are able to define individual user accounts, sharing the data of one truck. These accounts are non-extendable accounts – contain only the selected vehicle.

http://openinterface.webeye.eu/exec.cgi?Xlat=txt/CarTool.sql&Op=Public&Gr=username&Pw=password& Parameters: Only one of the License plate(Lpl), or Vehicle ID (C) parameters should be defined.

Page 7: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

7

1. Gr - User’s (account) ID = username 2. Pw - User’s password 3. Op - Code of the completed transaction (Public) 4. C - Vahicle ID 5. Lpl – License plate 6. Nam – Username for the vehilce’s group / Must be used in vehicle’s group/username format (e.g. vehicle1/webeye) 7. Pwd – password for vehicle’s group 8. Tm1 – Beginning or Start date of the time limit 9. Tm2 – End date of the time limit -> if not defined, the grup is valid till terminating

1.10 Get Waypoints of a Vehicle http://openinterface.webeye.eu/avlw.cgi?L=0&Xlat=txt/waypath.txt&Gr=username&Pw=password&C=carid&SLo=low time&SHi=high time The car id is given in List of Cars. The format of time limits (low: from, high: to) is YYYY-MM-DD hh:mm:ss. The result is one stop-point per row: http://openinterface.webeye.eu/avlw.cgi?L=0&Xlat=txt/waypath.txt&Gr=username&Pw=password&C=18046&SLo=&SHi= 2015-07-06 10:09:54;2015-07-06 11:45:05;1:35;26.3;62;H, Pest, Aszód 2170, Kossuth Lajos út 78;;;47391080;19291535;;0; 2015-07-06 12:37:44;2015-07-06 12:45:59;0:08;65.3;62;H, Budapest, Budapest 1152, Városkapu utca 4;;;47339487;19089747;;0; *** Total km 127.7 *** Total fuel 1 *** Total flow 9 *** Avg fuel 0.5 *** Dep fuel 62 *** Arr fuel 61 ..&txthead=1 shows the header in the following form: Arrival;Departure;Stayingtime;km;Fuel;Address;Poi;Sensor;Lat;Lon;Drv;Pid .. &Sum=0 hides the summary Fields separated by:

1. (Érk) Arrival time (empty for 1st point of way) 2. (Ind) Departure time (empty for last point of way) 3. (Vár) Wainting time in format hh:mm (empty for 1st and last point) 4. (km) km from beginning of way 5. (Üa) Fuel level at arrival (empty if there is no fuel level) 6. (Cím) Address of point (country, county, city zip-code, street, house) 7. (Poi) Name of user's POI, if position is in user's POI else empty 8. (Sns) Active digital sensors 9. (Lat) Latitude

Page 8: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

8

10. (Lon) Longitude 11. (Drv) Driver’s name 12. (Pid) POI id – if the vehicle is staying at a POI

If we define also the Wgs=1 parameter, then we will get also the GPS co-ordinates of the waypoints after the digital sensors. If one co-ordinate marks more than one POIs, then the Route list will contain all the user POIs with the same arrival and departure time. If we define the Midnight=1 parameter, all the waypoints which contain the midnight timestap will go to two pieces with the midnight word in the arrival time and in the departure time fields. Thus we can recognize he last waypoint of each days. If we define the L=13 parameter instead of L=0, we get the list of the refuellings. In case of a vehicle equipped with CANBUS, but we If we define also the ’LenM1=1’ parameter, the km data will be shown based on GPS.

Sum=1 parameter results a summarizing list:

*** Total km total mileage in km *** Total fuel total fuel consumption in liters *** Avg fuel average consumption *** Dep km initial kms from CAN-BUS *** Arr km closing kms from CAN-BUS (arrival) *** Dep fuel initial fuel level *** Arr fuel closing fuel level (arrival)

1.11 Get All Data Messages of Vehicle (Route) http://openinterface.webeye.eu/avlw.cgi?L=9&Xlat=txt/MsgList.sql&Gr=username&Pw=password&C=carid&SLo=from&SHi=to The result is: http://openinterface.webeye.eu/avlw.cgi?L=9&Xlat=txt/MsgList.sql&Gr=username&Pw=password&C=10332&SLo=&SHi= FLM-734 DT|2006-11-26 00:36:22|47228100|19005000|0.0|0|4000000|24.9|620.0|205.1|H, Pest megye, Szigetszentmiklós The fields are:

1. Licence plate 2. Timestamp of message YYYY-MM-DD hh:mm:ss 3. Latitude 4. Longitude 5. km from beginning of way 6. Speed [km/h] 7. Hexa value of bitvector of digital sensors

Page 9: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

9

8. Analog sensors 9. Address of position or name of user's POI

In case of defining the parameter: NoAddr=1, the last column (address) will be empty, and will not cause a heavy load for the servers. In case of defining the parameter: Eov=1, the EOV co-ordinates will be displayed in an extra column, next to the geo-coordinates. 0,0 EOV coordinate will indicate the ’abroad’ positions. In case of defining the parameter: MsgCanB=1, only the CAN-BUS data will be transmitted.

1.12 Raw Messages from Database http://openinterface.webeye.eu/exec.cgi?Xlat=txt/MsgDB.sql&Gr=username&Pw=password&C=carid&SLo=from&SHi=to #|#RecNo|5852 Car|Tim|Msg|Lat|Lon|Dir|Spd|Sta|Sns|Par|An0|An1|An2|An3|An4|An5|An6|An7| 10332|1164930448|2|51021800|9293400|358|0|0|67108864|0|773|305|1|801|1023|1023|0|0| 10332|1164934054|2|51021800|9293400|334|0|0|67108864|0|779|306|1|803|1023|1023|0|0| The first row contains the number of selected records; the 2nd row is the field names from the FMsg table, then the data records. The fields are:

1. (Car) Vehicle identifier. 2. (Tim) Timestamp of message (time_t) 3. (Msg) Message type (2: routing message, 1: answer of position request, -1: position request SMS) 4. (Lat) Latitude 5. (Lon) Longitude 6. (Dir) Heading (degree) (North: 0, East 90) 7. (Spd) Speed (km/h) 8. (Sta) GPS validity (1: valid GPS, 0: invalid GPS) 9. (Sns) Value of digital sensors bitvector 10. (Par) Parameters of message (eg: driver's identifier) 11. (An0..An7) Analog sensors data.

1.13 Text messages

1.13.1 Sending messages

Page 10: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

10

We can send messages to MDT program running on PDA/PNA/Laptop connected to the truck’s box, with the help of this URL: http://openinterface.webeye.eu/exec.cgi?Xlat=txt/MdtSend.sql&Gr=username&Pw=password&Lpl=licenceplate&Txt=message

The answer is a simple text-file,that contains the identification number, the license plate of the vehicle and the message itself. If the license plate is unknown, we receive a *** Lpl Error rendszám error message. The length of the Txt parameter can be not more than 211 characters, if it seems to be short, then we can send under the name Txt1 Txt2... Txt15 so-called continuing-files that can be not more than 211 characters long.

1.13.3 Delete Trip (Freight task)

The following code should be given to the Txt parameter:

Central closing of the trip (delete): #JOB;JOB:trip ID;STA:DONE# Central delete of the trip (false trips): #JOB;JOB:trip ID;STA:DELETE#

1.13.4 Listing text messages

The folowing URL can be used in order to list of the messages of a vehicle ( or the messages of all the vehicles if we do not give the license plate ) : http://openinterface.webeye.eu/exec.cgi?Xlat=txt/MdtList.sql&Gr=username&Pw=password

Xlat=txt/MdtList.sql: name of the running script

Gr: user’s name

Pw: password

Lpl: license plate of the requested vehicle, it is optional, if we do not give it, w eget the messages of all teh vehicles

TLo: the lower time-limit of getting the messages, in YYYY-MM-DD hh:mm:ss format, if we do not give this information, it lists the messages of the last 48 hours.

THi: the lower time-limit of getting the messages, in YYYY-MM-DD hh:mm:ss format, if we do not give this information, it lists till the current moment.

The result is a simple text-file, per line with one message, separated by | characters and includes the following columns: 1. license plate: licens plate of the vehicle 2. date: date and time of sending message 3. direction of message:

MRX: message coming from vehichel to teh dispatcher.

MTX: message sent by dispatcher to the vehicle.

Page 11: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

11

mtx: message sent by dispatcher to the vehicle, but it has not yet been delivered on MDT of the driver.

4. text of the message

1.14 CAN-BUS values If there are vehicles in the fleet whose CAN-BUS system has been connected to the WebEye unit you can list the CAN values. As a result of the below visible query you will get the CAN-BUS data (operational time, mileage, flow) of first and the last measurement concerning the defined period. http://openinterface.webeye.eu/exec.cgi?Xlat=CanPos.htm&Con=text/plain&Gr=username&Pw=password&SLo=YYYY-MM-DD&&SHi=YYYY-MM-DD The result contains a vehicle per line with the time and data of first and last CAN measurement.

1.15 Working time all

http://openinterface.webeye.eu/avlw.cgi?Gr=user&Pw=pwd&L=4&SLo=from&SHi=to Other parameters:

Con=htm HTML file.

Con=txt CSV file.

Par0=Work:Car one vehicles working time

Par0=Work:All working time all.

1.16 Current positions in xml format You can get the last position of the whole fleet by clicking on the following link: http://openinterface.webeye.eu/exec.cgi?Xlat=xml/last.xml&Gr=username&Pw=password The result is an xml file. The file lists all the last messages of all vehicles between <marker> markers. The tags inside the markers <an0>…<an7> will not be visible if the incoming message does not contain such information.

Ign=1 parameter: only vehicles with ignition on (default 0) MinSpd parameter: only faster vehicles (= defined value included) will be listed

(default 0) MaxSpd parameter: only slower vehicles (= defined value included)will be listed

(default c)

Result (tags)

Page 12: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

12

<id> WebEye ID of the vehilce

<name> License plate

<date> Date of the message in YYYY-MM-DD format.

<time> Timestamp of the message in hh:mm:ss format.

<lat> Latitude, in decimal fraction format

<lon> Longitude, in decimal fraction format

<spd> Speed of the vehicle, km/h

<dir> direction of the veehicle, degree

<ign> 1=ignition; 0 = no ignition

<an0> Raw value of the power (Analogue0 sensor = Power supply)

<an1>..<an7> Raw values of Analogue1..Analogue7 sensors <can1> Raw value of CAN-operational time, real value in hour format: 0.0166*value

<can2> Fuel level

<can3> Cooling water temperature in Co

<can4> RPM value [rpm/min]

<can5> Axial pressure [kg]

<can6> Odometer [100 meter]

<can7> Amount of injected (flown) fuel [liter]

<land> Country code, where the vehicle currently stays

1.17 List MDT status messages http://openinterface.webeye.eu/avlw.cgi?Gr=username&Pw=password&Lpl=licenseplate&Xlat=Txt/MdtAddr.htm&Con=text/plain&SLo=YYYY-MM-DD&SHi=YYYY-MM-DD&FUNC=function Possible FUNC function parameters:

EXP List of costs

TNK List of refuellings

KON List of activities

TRL List of Trailer attach / detach

Page 13: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

13

1.18 MDT status extension

http://openinterface.webeye.eu/avlw.cgi?Gr=username&Pw=password&Xlat=Txt/MdtAddr.htm&Con=txt&SLo=YYYY-MM-DD&SHi=YYYY-MM-DD&FUNC=function

Possible values of Con function parameter:

txt text format: save in CSV file htm HTML format xml generates an Excel table

1.19 Sending transport order http://openinterface.webeye.eu/exec.cgi? Parameters:

Xlat=Txt/MdtJobF.sql scriptfile, which must be run

Gr=user’s name user name

Pw=password users’ password

C=vehicle ID ID of the recipient vehicle

Jid=transport order ID transport order ID [max. 32 characters]

JName=oreder_name name of the transport order to be displayed

Vehicle ID

JText=remark comment concerning the whole transport order (optional) [max. 64 characters]

JTime=date date of the transport order (period, from-, till)

Sn=number of activities number of activities of the transport order, the data of the transport order – explained as below- are indicated from one to this value

Data fields of activities: (the index runs form 1 to Sn)

Ord= POI order F or V (F Fix: driver can not adjust the order, V Variable: Driver can modify the POI order)

Activity

Type1= type of the first activity: 1=loading place, 2=unloading place, 4=load container, 8= unload container, 10=attach trailer, 20=detach trailer, 40=ferry start, 80=ferry end, 100=rola start, 200=rola end, 400=customs, 800=buying , 1000=maintainance

Text1=remark remark belonging to the first activity (optinal)

Time1=time_window planned time frame for the first activity (optional). [max. 16 characters]

Task

Task1=task number – ID of the task to be executed [40 characters]

Page 14: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

14

TNam1=name of the task – the name of the task to be displayed

TTxt1=remark – remark belonging to the firts task Address

Name1= name of the place of the first activity [*]

PoiI1=POI ID – the ID of the place of the first activity

City1=Address of the firts activity (country, city, postcode) [*]

Addr1= Address of the firts activity (street, house number) [*]

PTxt1=remark - Comment to the first activity address (optional). [*]([*] total 180 characters)

PTim1=time window – the time period when the activity can be executed

PWgs1= destination coordinate (LAT LON, with 6 decimal accuracy, decimal point, grade, decimal grade , space between latitude and longitude)

WayP1= intermediate POIs (with 6 decimal accuracy, decimal point, grade, decimal grade , space between latitude and longitude, comma between the corrdinates)

Cargo

CrId1= Load ID (optional). [max. 32 characters]

Carg1= Load ID (optional). [max. 32 characters]

CrTx1=remark – remark related to the cargo [80 characters]

Page 15: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

15

2. WebEye online interface dll The online interface will be distributed in form of a dll., the dll belonging interface’s pas module is the following: unit wetrki; {***** WebEye live fleet interface. *****} interface {*** Initialising and closing of the module ***} procedure TrkInit(aSrv, aUsr, aPwd: string); { Initialising. } Sign-in to the WebEye-server, aSrv is the name and port of WebEye-server (or IP-address),e.g.: 'robot.mywebeye.com:65002' The module builds up a TCP-connection to the given point of server (in like manner as the AvlG program). The aUsr és az aPwd parameters give the user’s name and the password. This procedure must be invited at starting of the program. 15/17

procedure TrkDone; { Disconnecting. } Disconnection of connection bult up by A TrkInit procedure (it must be invited before logoff from the program). {*** Status of TCP-connection. ***} type TTrkStat = ( { Status of connection. } trkDisc, { No connection. } trkDial, { Connecting in process. } trkConn, { Connection ok. } trkDrop { Disconnection in process . } ); function TrkStat: TTrkStat; { Status-query. } Query of the actual status of connection, under normal functioning we must get trkConn status, should the TCP-connection be interrupted,the module tries to build it up automatically, during the building-up procession we get the trkDial status. {*** Records of messages coming from the vehicles. ***} type TAvlMsg = record {***** A message of the vehicle.*****} msgMsg: integer; { Type of message. } msgTim: integer; { Time of message. (time_t) } msgLat: integer; { Degree of latitude. } msgLon: integer; { Degree of longitude. } msgSpd: integer; { Speed. [km/h] } msgDir: integer; { Direction. [degree] } msgSta: integer; { GPS-status (1,0). } msgSns: integer; { Digital sensors. } msgPar: integer; { Parameter of the message. } msgAna: array [0..7] of integer; { Analog sensors. [mV] } 16/17

Page 16: OPEN INTERFACE - archicom.info · 4 The result answer is between  tags, 1-1  tag belongs for each vehicle. The  tag has two attributes, the ’id’

16

end; type PAvlMsg = ^TAvlMsg; { Indicator to a message-record. } The procedures that provide the co-ordinates,give the position of the vehicle in such a structure. We identify the vehicles with their license plates, but the program watches only the letters and numbers, it filters the other characters (space, hyphen...) . The msgMsg is the type of the message ( in 99.99% of the cases is 2, it means the normal tracking message , the 1 means the answer coming upon the status SMS, the larger numbers mean the receipts of the configuration commands. The msgTim is the time of message in time_t time, with winter/summer shifting The msgLat and msgLon mean the degree of latitude and longitude, the numerals mean the degree (2-3 figures), the minute (2 figures) and the ten-thousandth minutes (4 figures) . The western longitudes and the southern latitudes have negative signs. E.g. a Bp East Railwaystation 47300000, 19050000. {*** Query of the last known position of the vehicle. ***} procedure TrkLast(aLpl: string; var rMsg: TAvlMsg); It gives the last position of the vehicle which is known by the communication module,

when we do not receive message from the vehicle, it fills up the record with 0-s. {*** Type of procedures that report the positions coming from the vehicles. ***} type TrkTrackProc = procedure(sLpl: string; rMsg: TAvlMsg; iCar: integer) of object; procedure TrkSetTrackCB(cb: TrkTrackProc); If we receive a message from the vehicle, this proceduer will be invited by the module. The sLpl is the license plate of the vehicle (only letters and numbers, without hyphen, space...), the rMsg record includes the vehicle-position, iCar is the WebEye identification number of the vehicle. We can give the address of the notice procedure with a TrkSetTrackCB procedure,this must be invited at the beginning of the program, after the TrkInit, as well. 17/17

{ Frequency of sending of he vehicle’s co-ordinate, it gives so frequently } { the msg track message . if 0, we receive all the messages. } { The default value is 15 minutes. } { If the license plate is nil, the setting refers to all vehicles. } procedure _pos_freq(sLpl: PCHAR; iSec: integer); cdecl external 'WeTrkDll.dll'; It influences the rareness of the received co-ordinates,in base setting the interface does not swamp the application with messages coming from vehicles in every 15 seconds, if we would like to get all the co-ordinates, in that case we must invite the procedure with (nil,0) parameter implementation {********************************************************} *** end of document ***