Skip to content

Commit

Permalink
Release version 2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
tananaev committed Jan 11, 2013
1 parent 900cbdd commit 36c030f
Show file tree
Hide file tree
Showing 10 changed files with 260 additions and 212 deletions.
4 changes: 0 additions & 4 deletions default.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@
power - Double (NULL for some protocols)
extended_info - String (XML)
<-->
<!-->
H2 - SCOPE_IDENTITY()
MySQL - LAST_INSERT_ID()
<-->
<entry key="database.insertPosition">
INSERT INTO positions (device_id, time, valid, latitude, longitude, altitude, speed, course, power)
VALUES (:device_id, :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :power);
Expand Down
49 changes: 30 additions & 19 deletions opengts.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,6 @@
SELECT imeiNumber AS id, imeiNumber AS imei FROM Device WHERE imeiNumber &lt;&gt; '';
</entry>

<entry key="database.insertDevice">
DO 0;
</entry>

<entry key="database.updateDevice">
DO 0;
</entry>

<entry key="database.deleteDevice">
DO 0;
</entry>

<entry key="database.selectPosition">
DO 0;
</entry>

<entry key="database.insertPosition">
START TRANSACTION;
UPDATE Device SET lastValidLatitude = :latitude, lastValidLongitude = :longitude, lastGPSTimestamp = UNIX_TIMESTAMP(:time), lastUpdateTime = UNIX_TIMESTAMP(NOW()) WHERE imeiNumber = :device_id;
Expand All @@ -42,9 +26,12 @@
COMMIT;
</entry>

<entry key="database.updateLatestPosition">
DO 0;
</entry>

<!-- Web interface port -->
<entry key="http.enable">true</entry>
<entry key="http.port">8082</entry>
<entry key="http.enable">false</entry>

<!-- Geocoder options -->
<entry key="geocoder.enable">true</entry>
Expand Down Expand Up @@ -124,5 +111,29 @@
<!-- PT502 server configuration -->
<entry key="pt502.enable">true</entry>
<entry key="pt502.port">5017</entry>


<!-- TR20 server configuration -->
<entry key="tr20.enable">true</entry>
<entry key="tr20.port">5018</entry>

<!-- Navis server configuration -->
<entry key="navis.enable">true</entry>
<entry key="navis.port">5019</entry>

<!-- Meitrack server configuration -->
<entry key="meitrack.enable">true</entry>
<entry key="meitrack.port">5020</entry>

<!-- Skypatrol server configuration -->
<entry key="skypatrol.enable">true</entry>
<entry key="skypatrol.port">5021</entry>

<!-- GT02 server configuration -->
<entry key="gt02.enable">true</entry>
<entry key="gt02.port">5022</entry>

<!-- GT06 server configuration -->
<entry key="gt06.enable">true</entry>
<entry key="gt06.port">5023</entry>

</properties>
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.traccar</groupId>
<artifactId>traccar</artifactId>
<version>1.4-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>

<name>traccar</name>
<url>http://www.traccar.org</url>
Expand All @@ -12,22 +12,22 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<version>4.11</version>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.168</version>
<version>1.3.170</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.21</version>
<version>5.1.22</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty</artifactId>
<version>3.5.9.Final</version>
<version>3.6.1.Final</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand All @@ -37,7 +37,7 @@
<dependency>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all-server</artifactId>
<version>8.1.7.v20120910</version>
<version>8.1.8.v20121106</version>
</dependency>
</dependencies>

Expand Down
88 changes: 40 additions & 48 deletions setup/linux/linux.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,66 +6,25 @@

<!-- Global confiduration -->
<entry key="database.driver">org.h2.Driver</entry>
<entry key="database.dataSource">org.h2.jdbcx.JdbcDataSource</entry>
<entry key="database.url">jdbc:h2:/opt/traccar/data/database</entry>
<entry key="database.user">sa</entry>
<entry key="database.password"></entry>

<!-- Database refresh delay in seconds -->
<entry key="database.refreshDelay">300</entry>

<!-- Create database schema -->
<entry key="database.initialize">
CREATE TABLE IF NOT EXISTS devices (id INT IDENTITY, imei VARCHAR(16));
CREATE TABLE IF NOT EXISTS positions (device_id INT, time TIMESTAMP, valid BOOLEAN, latitude DOUBLE, longitude DOUBLE, speed DOUBLE, course DOUBLE, power DOUBLE);
</entry>

<!-->
id - Integer
id - Long
imei - String
<-->
<entry key="database.selectDevice">
SELECT id, imei
SELECT id, uniqueId as imei
FROM devices;
</entry>

<!-->
imei - String
<-->
<entry key="database.insertDevice">
INSERT INTO devices (imei)
VALUES (:imei);
</entry>

<!-->
id - Integer
imei - String
<-->
<entry key="database.updateDevice">
UPDATE devices
SET imei = :imei
WHERE id = :id;
</entry>

<!-->
id - Integer
<-->
<entry key="database.deleteDevice">
DELETE FROM devices
WHERE id = :id;
</entry>

<!-->
device_id - Integer
<-->
<entry key="database.selectPosition">
SELECT *
FROM positions
WHERE device_id = :device_id
ORDER by time DESC;
</entry>

<!-->
device_id - Integer
device_id - Long
time - Date
valid - Boolean
latitude - Double
Expand All @@ -76,13 +35,22 @@
extended_info - String (XML)
<-->
<entry key="database.insertPosition">
INSERT INTO positions (device_id, time, valid, latitude, longitude, speed, course, power)
VALUES (:device_id, :time, :valid, :latitude, :longitude, :speed, :course, :power);
INSERT INTO positions (device_id, time, valid, latitude, longitude, altitude, speed, course, power)
VALUES (:device_id, :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :power);
</entry>

<!-->
device_id - Long
id - Long
<-->
<entry key="database.updateLatestPosition">
UPDATE devices SET latestPosition_id = :id WHERE id = :device_id;
</entry>

<!-- Web interface port -->
<entry key="http.enable">true</entry>
<entry key="http.port">8082</entry>
<entry key="http.application">/opt/traccar/traccar-web.war</entry>

<!-- Logging options -->
<entry key="logger.enable">true</entry>
Expand Down Expand Up @@ -183,5 +151,29 @@
<!-- GT06 server configuration -->
<entry key="gt06.enable">true</entry>
<entry key="gt06.port">5023</entry>


<!-- TR20 server configuration -->
<entry key="tr20.enable">true</entry>
<entry key="tr20.port">5018</entry>

<!-- Navis server configuration -->
<entry key="navis.enable">true</entry>
<entry key="navis.port">5019</entry>

<!-- Meitrack server configuration -->
<entry key="meitrack.enable">true</entry>
<entry key="meitrack.port">5020</entry>

<!-- Skypatrol server configuration -->
<entry key="skypatrol.enable">true</entry>
<entry key="skypatrol.port">5021</entry>

<!-- GT02 server configuration -->
<entry key="gt02.enable">true</entry>
<entry key="gt02.port">5022</entry>

<!-- GT06 server configuration -->
<entry key="gt06.enable">true</entry>
<entry key="gt06.port">5023</entry>

</properties>
56 changes: 0 additions & 56 deletions setup/linux/traccar.sh

This file was deleted.

Loading

0 comments on commit 36c030f

Please sign in to comment.