diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2014-12-07 10:19:46 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2014-12-07 10:19:46 +1300 |
commit | dad236c8944ba4fac7e7c341b59b796e43898c1d (patch) | |
tree | e8a1163756e798cc4eafbe070b810146f0e71bd5 | |
parent | d948e0aa5514316293b85eb579606f73bee198b4 (diff) | |
download | trackermap-server-dad236c8944ba4fac7e7c341b59b796e43898c1d.tar.gz trackermap-server-dad236c8944ba4fac7e7c341b59b796e43898c1d.tar.bz2 trackermap-server-dad236c8944ba4fac7e7c341b59b796e43898c1d.zip |
Add Meitrack test case
-rw-r--r-- | src/org/traccar/protocol/MeitrackProtocolDecoder.java | 2 | ||||
-rw-r--r-- | test/org/traccar/protocol/MeitrackProtocolDecoderTest.java | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java index 9df10c8fb..62bd21a4b 100644 --- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java +++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java @@ -42,8 +42,6 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder { super(dataManager, protocol, properties); } - //$$J163,123123123123123,AFF,0004,35,58.588926,16.180473,140928192856,A,10,27,0,161,1.2,19 - //,1648894,435695,240|24|88B9|E435,0000,|||0A22|0000,00000001,,50,,,,,,,,,,,,,*70\r\n private static final Pattern pattern = Pattern.compile( "\\$\\$." + // Flag "\\d+," + // Length diff --git a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java index 17a651f38..4f73002fa 100644 --- a/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java +++ b/test/org/traccar/protocol/MeitrackProtocolDecoderTest.java @@ -16,6 +16,9 @@ public class MeitrackProtocolDecoderTest { MeitrackProtocolDecoder decoder = new MeitrackProtocolDecoder(new TestDataManager(), null, null); verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer( + "$$m140,013777008931857,AAA,1,54.739580,25.273263,141120144603,V,0,25,0,6,50.0,159,19825,13940,246|1|0065|118A,0100,0000|0000|0000|092A|0001,,*1C", Charset.defaultCharset()))); + + verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer( "$$X138,862170010187175,AAA,35,-29.960365,-51.655455,130507201625,A,8,9,0,107,0.9,7,169322,126582,724|6|0547|132B,0000,0009|000A||0278|0000,*BE", Charset.defaultCharset()))); verify(decoder.decode(null, null, ChannelBuffers.copiedBuffer( |