aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-11 05:49:35 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-11 05:49:35 +1200
commit9cbd8fafc312996b9b5dae68b6c3ecf68d8facf0 (patch)
tree0c8c863e145d688b7885235aeb27b170f4644617 /test/org/traccar
parent77f5a12b9c50cdf317528a8e1569c3cf47b251f4 (diff)
downloadtrackermap-server-9cbd8fafc312996b9b5dae68b6c3ecf68d8facf0.tar.gz
trackermap-server-9cbd8fafc312996b9b5dae68b6c3ecf68d8facf0.tar.bz2
trackermap-server-9cbd8fafc312996b9b5dae68b6c3ecf68d8facf0.zip
Implement Atlanta OBD protocol
Diffstat (limited to 'test/org/traccar')
-rw-r--r--test/org/traccar/protocol/L100FrameDecoderTest.java4
-rw-r--r--test/org/traccar/protocol/L100ProtocolDecoderTest.java6
2 files changed, 10 insertions, 0 deletions
diff --git a/test/org/traccar/protocol/L100FrameDecoderTest.java b/test/org/traccar/protocol/L100FrameDecoderTest.java
index 7cb385d3e..a94f2eb0d 100644
--- a/test/org/traccar/protocol/L100FrameDecoderTest.java
+++ b/test/org/traccar/protocol/L100FrameDecoderTest.java
@@ -11,6 +11,10 @@ public class L100FrameDecoderTest extends ProtocolTest {
L100FrameDecoder decoder = new L100FrameDecoder();
verifyFrame(
+ binary("4c2c41544c2c3836363739353033303437373935322c30312c303033352c"),
+ decoder.decode(null, null, binary("4c2c41544c2c3836363739353033303437373935322c30312c303033352c2a28")));
+
+ verifyFrame(
binary("41544c3335363839353033373533333734352c244750524d432c3131313731392e3030302c412c323833382e303034352c4e2c30373731332e333730372c452c302e30302c2c3132303831302c2c2c412a3735242c2330313130303131313030313031302c4e2e432c4e2e432c4e2e432c31323334352e36372c33312e342c342e322c32312c4d43432c4d4e432c4c41432c43656c6c494441544c"),
decoder.decode(null, null, binary("200141544c3335363839353033373533333734352c244750524d432c3131313731392e3030302c412c323833382e303034352c4e2c30373731332e333730372c452c302e30302c2c3132303831302c2c2c412a3735242c2330313130303131313030313031302c4e2e432c4e2e432c4e2e432c31323334352e36372c33312e342c342e322c32312c4d43432c4d4e432c4c41432c43656c6c494441544c027a")));
diff --git a/test/org/traccar/protocol/L100ProtocolDecoderTest.java b/test/org/traccar/protocol/L100ProtocolDecoderTest.java
index 1e48ecef5..65a5a1afe 100644
--- a/test/org/traccar/protocol/L100ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/L100ProtocolDecoderTest.java
@@ -11,6 +11,12 @@ public class L100ProtocolDecoderTest extends ProtocolTest {
L100ProtocolDecoder decoder = new L100ProtocolDecoder(new L100Protocol());
verifyPosition(decoder, text(
+ "H,ATL,866795030478513,02,0981,054448,230318,A,28.633486;N,77.222595;E,0,154,1.14,4.2,18,404,4,88,ad7b,#1031,0,ATL,"));
+
+ verifyNull(decoder, text(
+ "L,ATL,866795030477952,01,0035,"));
+
+ verifyPosition(decoder, text(
"ATL861693039769518,$GPRMC,074930.000,A,2838.0112,N,07713.3602,E,0000,223.36,290518,,,A*7E,#01111011000100,0.012689,0,0,2.572415,0,4.015,22,404,4,88,3ad5,0,0.01,1.4_800F_VTS3D3_gen_peri_myn,,internet,00000000,ATL"));
verifyPosition(decoder, text(