aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Tk102ProtocolDecoder.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/traccar/protocol/Tk102ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Tk102ProtocolDecoder.java16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
index f9db1a9e7..c052f09ed 100644
--- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
@@ -49,26 +49,22 @@ public class Tk102ProtocolDecoder extends BaseProtocolDecoder {
String sentence = (String) msg;
- // Login
if (sentence.startsWith("[!")) {
+
+ // Login
if (!identify(sentence.substring(14, 14 + 15), channel)) {
return null;
}
-
if (channel != null) {
channel.write("[”0000000001" + sentence.substring(13) + "]");
}
- }
- // Quit
- else if (sentence.startsWith("[#")) {
- // TODO: Send response
- }
+ } else if (sentence.startsWith("[#")) {
- // Parse message
- else if (hasDeviceId()) {
+ // TODO: EXIT Send response
+
+ } else if (hasDeviceId()) {
- // Parse message
Matcher parser = PATTERN.matcher(sentence);
if (!parser.matches()) {
return null;