diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-04 11:16:32 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-11-04 11:16:32 +1300 |
commit | 88e4230624ee5c2de9806751ed433c57a56f4856 (patch) | |
tree | d1082a3e736a2f2427058b9cf3c123c3a322543f /test/org | |
parent | 93fd4f3618b2a9f5b83cf8ba5b8312bf411969db (diff) | |
download | trackermap-server-88e4230624ee5c2de9806751ed433c57a56f4856.tar.gz trackermap-server-88e4230624ee5c2de9806751ed433c57a56f4856.tar.bz2 trackermap-server-88e4230624ee5c2de9806751ed433c57a56f4856.zip |
Modify T55 to support Maxon devices (fix #40)
Diffstat (limited to 'test/org')
-rw-r--r-- | test/org/traccar/protocol/T55ProtocolDecoderTest.java | 27 |
1 files changed, 23 insertions, 4 deletions
diff --git a/test/org/traccar/protocol/T55ProtocolDecoderTest.java b/test/org/traccar/protocol/T55ProtocolDecoderTest.java index ddabc8ee4..b7adee89b 100644 --- a/test/org/traccar/protocol/T55ProtocolDecoderTest.java +++ b/test/org/traccar/protocol/T55ProtocolDecoderTest.java @@ -10,13 +10,17 @@ public class T55ProtocolDecoderTest extends ProtocolDecoderTest { T55ProtocolDecoder decoder = new T55ProtocolDecoder(new T55Protocol()); - verifyNothing(decoder, text( "$GPFID,ID123456ABC")); + verifyNothing(decoder, text( + "$GPFID,ID123456ABC")); - verifyNothing(decoder, text( "$PGID,359853000144328*0F")); + verifyNothing(decoder, text( + "$PGID,359853000144328*0F")); - verifyNothing(decoder, text( "$PCPTI,CradlePoint Test,184453,184453.0,6F*57")); + verifyNothing(decoder, text( + "$PCPTI,CradlePoint Test,184453,184453.0,6F*57")); - verifyNothing(decoder, text( "IMEI 351467108700000")); + verifyNothing(decoder, text( + "IMEI 351467108700000")); verifyPosition(decoder, text( "$GPRMC,012006,A,4828.10,N,1353.52,E,0.00,0.00,180915,020.3,E*42")); @@ -68,4 +72,19 @@ public class T55ProtocolDecoderTest extends ProtocolDecoderTest { } + @Test + public void testMaxonDecode() throws Exception { + + // Maxon devices can send NMEA before identification + + T55ProtocolDecoder decoder = new T55ProtocolDecoder(new T55Protocol()); + + verifyNothing(decoder, text( + "$GPRMC,012006,A,4828.10,N,1353.52,E,0.00,0.00,180915,020.3,E*42")); + + verifyPosition(decoder, text( + "$GPFID,ID123456ABC")); + + } + } |