aboutsummaryrefslogtreecommitdiff
path: root/test/org
diff options
context:
space:
mode:
authorHans van den Elsen <hans.elsen@esds.nl>2016-02-13 16:13:35 +0100
committerHans van den Elsen <hans.elsen@esds.nl>2016-02-13 16:13:35 +0100
commit54f8bba338b7262ad6c938bb2284c148fee6cd62 (patch)
treed87961aa0c060f461d17f9ac00b8122eb34be22b /test/org
parent8622ba6e081b987a96e3b1885209576f3c389266 (diff)
parent9b11013c2376ad0401c194d5cfa0014e0a08502e (diff)
downloadtraccar-server-54f8bba338b7262ad6c938bb2284c148fee6cd62.tar.gz
traccar-server-54f8bba338b7262ad6c938bb2284c148fee6cd62.tar.bz2
traccar-server-54f8bba338b7262ad6c938bb2284c148fee6cd62.zip
Merge branch 'master' of https://github.com/tananaev/traccar
Diffstat (limited to 'test/org')
-rw-r--r--test/org/traccar/protocol/CastelProtocolDecoderTest.java6
-rw-r--r--test/org/traccar/protocol/Gl200ProtocolDecoderTest.java6
-rw-r--r--test/org/traccar/protocol/Gps103ProtocolDecoderTest.java9
-rw-r--r--test/org/traccar/protocol/MxtProtocolDecoderTest.java3
-rw-r--r--test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java4
-rw-r--r--test/org/traccar/protocol/TrvProtocolDecoderTest.java9
-rw-r--r--test/org/traccar/protocol/XexunProtocolDecoderTest.java3
7 files changed, 40 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/CastelProtocolDecoderTest.java b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
index b8795e09a..eafe80748 100644
--- a/test/org/traccar/protocol/CastelProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
@@ -12,6 +12,12 @@ public class CastelProtocolDecoderTest extends ProtocolTest {
CastelProtocolDecoder decoder = new CastelProtocolDecoder(new CastelProtocol());
+ verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "24243f00676e6768656636313031313132393030313734002001840d0000d2deb556020602100b35360456cf09e6ebac0200000000030000000001abc10d0a"));
+
+ verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "24243f00676e6768656636313031313132393030313734002001840d000000dfb556020602100b36298256cf0956ebac020000990c7f0000000001b4830d0a"));
+
verifyPositions(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"4040590004313030303030303030303800000000000000000040010072f53f56c25240560000000078b00900000000009c3100000000030100011900030001090b0f080106c04fe40b4037310c0060e001ff018d01e05e0d0a"));
diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
index 61d38f7d1..b06715e29 100644
--- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
@@ -11,6 +11,12 @@ public class Gl200ProtocolDecoderTest extends ProtocolTest {
Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol());
verifyPosition(decoder, text(
+ "+RESP:GTFRI,110100,A5868800000015,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20110214013254,0460,0000,18d8,6141,00,80,20110214013254,000C"));
+
+ verifyNothing(decoder, text(
+ "+RESP:GTFRI,210102,A10000458356CE,,0,1,1,15,1.4,0,190.6,-85.765763,42.894896,20160208164505,4126,210,0,18673,00,92,20160208164507,00A6"));
+
+ verifyPosition(decoder, text(
"+BUFF:GTFRI,060402,862894021808798,,,10,1,1,0.0,349,394.3,-63.287717,-17.662410,20160116234031,0736,0003,6ABA,8305,00,3326.8,,,,94,220100,,,,20160116194035,4D83"));
verifyPosition(decoder, text(
diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
index 9f5b386cc..ae3d2fa55 100644
--- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -10,6 +10,15 @@ public class Gps103ProtocolDecoderTest extends ProtocolTest {
Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new Gps103Protocol());
+ verifyNothing(decoder, text(
+ "imei:865328021049167,OBD,141118115036,,,0.0,,000,0.0%,+,0.0%,00000,,,,,"));
+
+ verifyAttributes(decoder, text(
+ "imei:359710049032874,OBD,160208152900,13555,,,45,0,24.71%,35,13.73%,1230,14.13,U1108,,,"));
+
+ verifyAttributes(decoder, text(
+ "imei:359710049064398,OBD,160101035156,17887,0.00,17.06,0,0,0.00%,0,0.00%,16383,10.82,,,,"));
+
verifyPosition(decoder, text(
"imei:868683020235846,rfid,160202091347,49121185,F,011344.000,A,0447.7273,N,07538.9934,W,0.00,0,,0,0,0.00%,,"));
diff --git a/test/org/traccar/protocol/MxtProtocolDecoderTest.java b/test/org/traccar/protocol/MxtProtocolDecoderTest.java
index 37373c8de..014fcb287 100644
--- a/test/org/traccar/protocol/MxtProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/MxtProtocolDecoderTest.java
@@ -13,6 +13,9 @@ public class MxtProtocolDecoderTest extends ProtocolTest {
MxtProtocolDecoder decoder = new MxtProtocolDecoder(new MxtProtocol());
verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
+ "01a631144c7e0008643ad2f456fb2d49747cfe4cbe0ffd002008800000001021000fd43d3f1403000000ff300000f42760001031102445a81fda04"));
+
+ verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
"01a631361e7a00082471418b052a2c46b587ffc01ae3fd000008800000000000003345422203000000f000f00000000000ea1e04"));
verifyPosition(decoder, binary(ByteOrder.LITTLE_ENDIAN,
diff --git a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
index 438dc057c..c4fbdcdf4 100644
--- a/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tlt2hProtocolDecoderTest.java
@@ -11,6 +11,10 @@ public class Tlt2hProtocolDecoderTest extends ProtocolTest {
Tlt2hProtocolDecoder decoder = new Tlt2hProtocolDecoder(new Tlt2hProtocol());
verifyPositions(decoder, text(
+ "#357671030108689##0000#AUTO#1\r\n",
+ "#13AE2F8F$GPRMC,211452.000,A,0017.378794,S,03603.441981,E,0.000,0,060216,,,A*68\r\n"));
+
+ verifyPositions(decoder, text(
"#357671030946351#V500#0000#AUTO#1\r\n",
"#$GPRMC,223835.000,A,0615.3545,S,10708.5779,E,14.62,97.41,070313,,,D*70\r\n"),
position("2013-03-07 22:38:35.000", true, -6.25591, 107.14297));
diff --git a/test/org/traccar/protocol/TrvProtocolDecoderTest.java b/test/org/traccar/protocol/TrvProtocolDecoderTest.java
index 037254486..13ff61792 100644
--- a/test/org/traccar/protocol/TrvProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TrvProtocolDecoderTest.java
@@ -16,6 +16,15 @@ public class TrvProtocolDecoderTest extends ProtocolTest {
verifyAttributes(decoder, text(
"TRVCP01,06000908000102"));
+ verifyAttributes(decoder, text(
+ "TRVCP01,100007100000001020151060011"));
+
+ verifyPosition(decoder, text(
+ "TRVAP01160211A2544.5118N05553.7586E105.711185941.52010001010010000,424,030,3011,27003"));
+
+ verifyPosition(decoder, text(
+ "TRVAP01160209A2540.8863N05546.6125E005.6075734123.7910000810010000,424,030,3012,27323"));
+
verifyPosition(decoder, text(
"TRVAP01080524A2232.9806N11404.9355E000.1061830323.8706000908000102,460,0,9520,3671"));
diff --git a/test/org/traccar/protocol/XexunProtocolDecoderTest.java b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
index 27574ddce..76c516caf 100644
--- a/test/org/traccar/protocol/XexunProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/XexunProtocolDecoderTest.java
@@ -12,6 +12,9 @@ public class XexunProtocolDecoderTest extends ProtocolTest {
XexunProtocolDecoder decoder = new XexunProtocolDecoder(new XexunProtocol(), false);
verifyPosition(decoder, text(
+ "GPRMC,121535.000,A,5417.2666,N,04822.1264,E,1.452,30.42,031014,0.0,A*4D\r\n,L,imei:355227042011730,"));
+
+ verifyPosition(decoder, text(
"GPRMC,150120.000,A,3346.4463,S,15057.3083,E,0.0,117.4,010911,,,A*76,F,imei:351525010943661,"),
position("2011-09-01 15:01:20.000", true, -33.77411, 150.95514));