aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2012-09-05 22:31:16 +0400
committerAnton Tananaev <anton.tananaev@gmail.com>2012-09-05 22:31:16 +0400
commitba8ece8a5b1c784f96c306e3fcbe6c612a1e4f97 (patch)
treeadde80cb26004530788adfc6ef286b2563a58c5c
parent54927aef2dec0bb540699f9c1cfc5e2554f0abf1 (diff)
downloadtrackermap-server-ba8ece8a5b1c784f96c306e3fcbe6c612a1e4f97.tar.gz
trackermap-server-ba8ece8a5b1c784f96c306e3fcbe6c612a1e4f97.tar.bz2
trackermap-server-ba8ece8a5b1c784f96c306e3fcbe6c612a1e4f97.zip
Augment tk103 protocol
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java3
-rw-r--r--test/org/traccar/protocol/Tk103ProtocolDecoderTest.java3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index 0b3a9ef32..a0129dd5a 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -65,6 +65,9 @@ public class Tk103ProtocolDecoder extends GenericProtocolDecoder {
throws Exception {
String sentence = (String) msg;
+
+ // TODO: Send answer
+ //(090411121854AP05)
// Parse message
Matcher parser = pattern.matcher(sentence);
diff --git a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
index b30ea179f..9d77d4dc2 100644
--- a/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tk103ProtocolDecoderTest.java
@@ -1,6 +1,7 @@
package org.traccar.protocol;
import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
import org.junit.Test;
public class Tk103ProtocolDecoderTest {
@@ -10,6 +11,8 @@ public class Tk103ProtocolDecoderTest {
Tk103ProtocolDecoder decoder = new Tk103ProtocolDecoder(new TestDataManager(), 0);
+ assertNull(decoder.decode(null, null, "(090411121854BP0000001234567890HSO"));
+
assertNotNull(decoder.decode(null, null,
"(035988863964BP05000035988863964110524A4241.7977N02318.7561E000.0123536356.5100000000L000946BB"));