diff options
author | Abyss777 <abyss@fox5.ru> | 2018-06-08 17:04:44 +0500 |
---|---|---|
committer | Abyss777 <abyss@fox5.ru> | 2018-06-08 17:04:44 +0500 |
commit | c176b7b4bf4eef6f71767f92ada2591ef27c1cfa (patch) | |
tree | fd7ef0e30a4644760154ffc14101749311040d85 /src/org/traccar/protocol/TotemProtocolDecoder.java | |
parent | ecb7bb33fcec52491f917dbc65a82990dcddb808 (diff) | |
download | trackermap-server-c176b7b4bf4eef6f71767f92ada2591ef27c1cfa.tar.gz trackermap-server-c176b7b4bf4eef6f71767f92ada2591ef27c1cfa.tar.bz2 trackermap-server-c176b7b4bf4eef6f71767f92ada2591ef27c1cfa.zip |
Migrate part of T protocols
Diffstat (limited to 'src/org/traccar/protocol/TotemProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index c200129d2..c1ee8bf20 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -15,9 +15,10 @@ */ package org.traccar.protocol; -import org.jboss.netty.channel.Channel; +import io.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.NetworkMessage; import org.traccar.helper.BitUtil; import org.traccar.helper.Checksum; import org.traccar.helper.DateBuilder; @@ -411,9 +412,9 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { if (pattern == PATTERN4) { String response = "$$0014AA" + sentence.substring(sentence.length() - 6, sentence.length() - 2); response += String.format("%02X", Checksum.xor(response)).toUpperCase(); - channel.write(response); + channel.writeAndFlush(new NetworkMessage(response, remoteAddress)); } else { - channel.write("ACK OK\r\n"); + channel.writeAndFlush(new NetworkMessage("ACK OK\r\n", remoteAddress)); } } |