From 88e4230624ee5c2de9806751ed433c57a56f4856 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Wed, 4 Nov 2015 11:16:32 +1300 Subject: Modify T55 to support Maxon devices (fix #40) --- .../traccar/protocol/T55ProtocolDecoderTest.java | 27 ++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) (limited to 'test/org/traccar') 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")); + + } + } -- cgit v1.2.3