aboutsummaryrefslogtreecommitdiff
path: root/test/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-12-21 16:54:46 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2018-12-21 16:54:46 -0800
commit0c0df0ff62a4b14aba8ef2ebd8642d1ee3dd4148 (patch)
tree8e13ed7eca0a1e3d5492a516d1f681b6c6200b09 /test/org/traccar
parente8e73376eac069134077a5be7978d9a3619913b3 (diff)
downloadtrackermap-server-0c0df0ff62a4b14aba8ef2ebd8642d1ee3dd4148.tar.gz
trackermap-server-0c0df0ff62a4b14aba8ef2ebd8642d1ee3dd4148.tar.bz2
trackermap-server-0c0df0ff62a4b14aba8ef2ebd8642d1ee3dd4148.zip
Support PT100 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 a94f2eb0d..5ffa3d8d1 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("41544c2c4c2c3836383334353033383137313936332c4e2c3230313231382c3039333031362c412c3032352e3036373134342c4e2c3035352e3134343833332c452c3030302e302c4750532c333933392c3432342c30332c30303430352c303038383334"),
+ decoder.decode(null, null, binary("41544c2c4c2c3836383334353033383137313936332c4e2c3230313231382c3039333031362c412c3032352e3036373134342c4e2c3035352e3134343833332c452c3030302e302c4750532c333933392c3432342c30332c30303430352c30303838333440")));
+
+ verifyFrame(
binary("4c2c41544c2c3836363739353033303437373935322c30312c303033352c"),
decoder.decode(null, null, binary("4c2c41544c2c3836363739353033303437373935322c30312c303033352c2a28")));
diff --git a/test/org/traccar/protocol/L100ProtocolDecoderTest.java b/test/org/traccar/protocol/L100ProtocolDecoderTest.java
index e86ea0e81..e61e133a4 100644
--- a/test/org/traccar/protocol/L100ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/L100ProtocolDecoderTest.java
@@ -10,6 +10,12 @@ public class L100ProtocolDecoderTest extends ProtocolTest {
L100ProtocolDecoder decoder = new L100ProtocolDecoder(null);
+ verifyPosition(decoder, text(
+ "ATL,L,868345038171963,N,201218,093016,A,025.067144,N,055.144833,E,000.0,GPS,3939,424,03,00405,008834"));
+
+ verifyPosition(decoder, text(
+ "N,111116,090031,A,028.123456,N,077.123456,E,000.0,GPS,4180,404,11,00159,064753"));
+
verifyAttributes(decoder, text(
"L,ATLOBD,866795030475584,03,7429,143344,130918,CAN,0101:00076100,0103:0200,0104:3C,0105:84,010A:XX,010B:19,010C:0F98,010D:22,010E:68,010F:5A,0110:XXXX,0111:28,011C:20,011F:XXXX,0121:0000,0122:XXXX,012F:XX,0162:XX,0132:XXXX,0133:61,0143:00A8,0145:0F,0146:XX,0147:30,0148:XX,0149:31,014A:18,014B:XX,014C:92,0151:XX,0131:00BB,0144:8000,015E:XXXX,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,0902:XXXXXXXXXXXXXXX"));