aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-03-02 17:00:12 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-03-02 17:00:12 +1300
commit4aa952d70b186d77838682a3a906fae1a7b4157f (patch)
tree1d97f06cc7c996320450777e24dda5892366583d /test/org/traccar
parent341ef3590a7114e6ab93a5d4b52176105dd71856 (diff)
downloadtrackermap-server-4aa952d70b186d77838682a3a906fae1a7b4157f.tar.gz
trackermap-server-4aa952d70b186d77838682a3a906fae1a7b4157f.tar.bz2
trackermap-server-4aa952d70b186d77838682a3a906fae1a7b4157f.zip
Implement Siwi protocol decoder
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/SiwiProtocolDecoderTest.java33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/SiwiProtocolDecoderTest.java b/test/org/traccar/protocol/SiwiProtocolDecoderTest.java
new file mode 100644
index 000000000..c5c93b7d0
--- /dev/null
+++ b/test/org/traccar/protocol/SiwiProtocolDecoderTest.java
@@ -0,0 +1,33 @@
+package org.traccar.protocol;
+
+import org.junit.Test;
+import org.traccar.ProtocolTest;
+
+public class SiwiProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ SiwiProtocolDecoder decoder = new SiwiProtocolDecoder(new SiwiProtocol());
+
+ verifyPosition(decoder, text(
+ "$SIWI,2845,1320,Q,10,airtelgprs.com,1,1,0,0,876578,43,9,A,19.0123456,72.65347,45,0,055929,071107,22,5,1,0,3700,1210,0,2500,1230,321,0,1.1,4.0,1!"));
+
+ verifyPosition(decoder, text(
+ "$SIWI,9803849,953,R,9,,0,1,1,0,0,0,8,A,19.066145,73.002278,213,178,122738,210217,28,5,12,6,4066,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0"));
+
+ verifyPosition(decoder, text(
+ "$EIT,9803849,953,R,9,,0,1,1,0,0,0,8,A,19.066145,73.002278,213,178,122738,210217,28,5,12,6,4066,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0"));
+
+ verifyPosition(decoder, text(
+ "$SIWI,9803849,954,E,0,,0,1,1,0,0,0,0,V,0.000000,0.000000,0,0,122855,210217,29,5,12,5,4104,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0"));
+
+ verifyPosition(decoder, text(
+ "$SIWI,2845,1320,A,0,,1,1,0,0,876578,43,10,A,19.0123456,72.65347,45,0,055929,071107,22,5,1,0,3700,1210,0,2500,1230,321,0,1.1,4.0,1!"));
+
+ verifyPosition(decoder, text(
+ "$SIWI,9803849,956,E,0,,0,1,1,0,0,0,3,V,19.066935,73.003383,0,111,123037,210217,28,5,12,5,4071,1,0,2,0,0,0,1.0,3.1CHKS_4.82,0"));
+
+ }
+
+}