aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2014-01-29 00:29:57 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2014-01-29 00:29:57 +1300
commit47a66c075cd296de40097a8b5288095729c3db57 (patch)
tree7077be4b5e058cbf34986a7778188c7650f26d63
parent0d4b99dbf74775efa67d12fa34edbf4bb8c357ad (diff)
downloadtrackermap-server-47a66c075cd296de40097a8b5288095729c3db57.tar.gz
trackermap-server-47a66c075cd296de40097a8b5288095729c3db57.tar.bz2
trackermap-server-47a66c075cd296de40097a8b5288095729c3db57.zip
Add Atrack test case
-rw-r--r--src/org/traccar/protocol/AtrackProtocolDecoder.java3
-rw-r--r--test/org/traccar/protocol/AtrackProtocolDecoderTest.java4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/AtrackProtocolDecoder.java b/src/org/traccar/protocol/AtrackProtocolDecoder.java
index 8af89ff75..7b1b24d9d 100644
--- a/src/org/traccar/protocol/AtrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/AtrackProtocolDecoder.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013 Anton Tananaev (anton.tananaev@gmail.com)
+ * Copyright 2013 - 2014 Anton Tananaev (anton.tananaev@gmail.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,7 +23,6 @@ import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.ServerManager;
-import org.traccar.helper.Crc;
import org.traccar.helper.Log;
import org.traccar.model.ExtendedInfoFormatter;
import org.traccar.model.Position;
diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
index 4856de6dc..62cec4516 100644
--- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -23,6 +23,10 @@ public class AtrackProtocolDecoderTest {
int[] buf3 = {0x40,0x50,0x1e,0x58,0x00,0x33,0x01,0xe0,0x00,0x01,0x41,0x04,0xd8,0xf1,0x96,0x82,0x52,0x5e,0xcd,0x5d,0x52,0x5e,0xe3,0x44,0x52,0x5e,0xe3,0x5e,0xff,0xc8,0x88,0x15,0x02,0x6a,0xb4,0xd7,0x00,0x00,0x02,0x00,0x00,0x10,0x44,0x03,0xde,0x01,0x00,0x0b,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00};
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf3))));
+
+ // 7-byte date
+ //int[] buf4 = {0x02,0x03,0xb4,0x94,0x00,0x3c,0x00,0xeb,0x00,0x01,0x41,0x04,0xd8,0xdd,0x3a,0x3e,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x07,0xde,0x01,0x1b,0x0b,0x1f,0x03,0x00,0x30,0x7f,0x28,0x03,0x05,0x74,0xd3,0x00,0x00,0x02,0x00,0x00,0x00,0x06,0x00,0x16,0x01,0x00,0x02,0x00,0x00,0x00,0x00,0x07,0xd0,0x07,0xd0,0x00};
+ //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertArray(buf4))));
}