diff options
Diffstat (limited to 'src/org/traccar/protocol')
-rw-r--r-- | src/org/traccar/protocol/TotemProtocolDecoder.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java index a22bbf71e..358c5cb67 100644 --- a/src/org/traccar/protocol/TotemProtocolDecoder.java +++ b/src/org/traccar/protocol/TotemProtocolDecoder.java @@ -20,10 +20,7 @@ import java.util.Calendar; import java.util.TimeZone; import java.util.regex.Matcher; import java.util.regex.Pattern; - import org.jboss.netty.channel.Channel; -import org.jboss.netty.channel.ChannelHandlerContext; - import org.traccar.BaseProtocolDecoder; import org.traccar.model.Event; import org.traccar.model.Position; @@ -59,7 +56,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { "(\\d{3})" + // Battery "(\\d{4})\\|" + // External Power "(?:(\\d+)\\|)?" + // ADC - "(\\p{XDigit}{8})\\|" + // Location Code + "(\\p{XDigit}+)\\|" + // Location Code "(\\d+)\\|" + // Temperature "(\\d+.\\d+)\\|" + // Odometer "\\d+\\|" + // Serial Number @@ -315,6 +312,10 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder { position.setLongitude(longitude); } + + if (channel != null) { + channel.write("ACK OK\r\n"); + } return position; } |