aboutsummaryrefslogtreecommitdiff
path: root/setup/windows
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-06-01 15:28:54 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-06-01 15:28:54 +1200
commit3db183a5535a986b015566c6df929da8c6ca9630 (patch)
tree3183f44e2b9b8ccfa2c460221b1d04fa74f0e9e9 /setup/windows
parentcce427a783cbe0c2eca6a278d7327294002847e5 (diff)
parent41c46575a92f746622c61b07004b7a0832712a54 (diff)
downloadtrackermap-server-3db183a5535a986b015566c6df929da8c6ca9630.tar.gz
trackermap-server-3db183a5535a986b015566c6df929da8c6ca9630.tar.bz2
trackermap-server-3db183a5535a986b015566c6df929da8c6ca9630.zip
Merge pull request #1981 from Abyss777/master
Implement events subsystem
Diffstat (limited to 'setup/windows')
-rw-r--r--setup/windows/traccar.xml22
1 files changed, 21 insertions, 1 deletions
diff --git a/setup/windows/traccar.xml b/setup/windows/traccar.xml
index bf1b216af..5748f3993 100644
--- a/setup/windows/traccar.xml
+++ b/setup/windows/traccar.xml
@@ -17,6 +17,13 @@
<entry key='logger.level'>all</entry>
<entry key='logger.file'>[LOG]</entry>
+ <entry key='event.suppressRepeated'>60</entry>
+
+ <entry key='event.overspeedHandler'>true</entry>
+ <entry key='event.globalSpeedLimit'>90</entry>
+
+ <entry key='event.motionHandler'>true</entry>
+
<!-- DATABASE CONFIG -->
<entry key='database.driver'>org.h2.Driver</entry>
@@ -109,7 +116,7 @@
</entry>
<entry key='database.updateDeviceStatus'>
- UPDATE devices SET status = :status, lastUpdate = :lastUpdate WHERE id = :id;
+ UPDATE devices SET status = :status, lastUpdate = :lastUpdate, motion = :motion WHERE id = :id;
</entry>
<entry key='database.deleteDevice'>
@@ -165,6 +172,19 @@
UPDATE devices SET positionId = :id WHERE id = :deviceId;
</entry>
+ <entry key='database.selectEvent'>
+ SELECT * FROM events WHERE id = :id;
+ </entry>
+
+ <entry key='database.insertEvent'>
+ INSERT INTO events (type, serverTime, deviceId, positionId, attributes)
+ VALUES (:type, :serverTime, :deviceId, :positionId, :attributes);
+ </entry>
+
+ <entry key='database.selectEvents'>
+ SELECT * FROM events WHERE deviceId = :deviceId AND type LIKE :type AND serverTime BETWEEN :from AND :to ORDER BY serverTime DESC;
+ </entry>
+
<!-- PROTOCOL CONFIG -->
<entry key='gps103.port'>5001</entry>