aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-03-26 09:55:07 -0700
committerAnton Tananaev <anton@traccar.org>2023-03-26 09:55:07 -0700
commitac60477392048413d97a6d54a4456647aaaf7d22 (patch)
treea0925104faecdff894959141c68f36969c3befbf /src/test/java/org/traccar
parent7c67b6f9b46a350ae111eff2caea5981dc0e1bff (diff)
downloadtrackermap-server-ac60477392048413d97a6d54a4456647aaaf7d22.tar.gz
trackermap-server-ac60477392048413d97a6d54a4456647aaaf7d22.tar.bz2
trackermap-server-ac60477392048413d97a6d54a4456647aaaf7d22.zip
Implement VLT protocol
Diffstat (limited to 'src/test/java/org/traccar')
-rw-r--r--src/test/java/org/traccar/protocol/VltProtocolDecoderTest.java22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/test/java/org/traccar/protocol/VltProtocolDecoderTest.java b/src/test/java/org/traccar/protocol/VltProtocolDecoderTest.java
new file mode 100644
index 000000000..e0e88b324
--- /dev/null
+++ b/src/test/java/org/traccar/protocol/VltProtocolDecoderTest.java
@@ -0,0 +1,22 @@
+package org.traccar.protocol;
+
+import io.netty.handler.codec.http.HttpMethod;
+import org.junit.jupiter.api.Test;
+import org.traccar.ProtocolTest;
+
+public class VltProtocolDecoderTest extends ProtocolTest {
+
+ @Test
+ public void testDecode() throws Exception {
+
+ var decoder = inject(new VltProtocolDecoder(null));
+
+ verifyPosition(decoder, request(HttpMethod.POST, "/",
+ buffer("vltdata=NRM12345678901234501L1060418102230023.125503N080.068033E4041231234123456789070.48120.5025273011M")));
+
+ verifyPositions(decoder, request(HttpMethod.POST, "/",
+ buffer("vltdata=BTH86123004167306301301L1240323181909009.226018N076.794980E404x19601d000037596000.00198.7013011401S02H1240323181807009.226018N076.794980E404x72090a000000000000.00198.7013011101S02H1240323181707009.226018N076.794980E404x72090a000014598000.00198.7013011101S02H1240323181605009.226018N076.794982E404x72090a000014596000.00198.7013011101S02H1240323181504009.226018N076.794982E404x72090a000014596000.00198.7013010901S02H1240323181402009.226018N076.794980E404x72090a000014596001.67198.0013021301S02H1240323181306009.226010N076.794980E404x72090a000014596000.00174.0013021401S02H1240323181155009.226010N076.794980E404x72090a088511008000.00174.0013011201S02H1240323181057009.226010N076.794980E404x72090a000014596000.00174.0013011201S02H1240323180958009.226010N076.794980E404x72090a000014596000.00174.0013021401S02H1240323180858009.226010N076.794980E404x72090a000014596001.48174.0013021201S02H1240323180755009.226005N076.794982E404x72090a000014598000.00164.4013011301S02H1240323180652009.226005N076.794982E404x72090a000014598000.00164.4013021101S")));
+
+ }
+
+}