From 2c0360abc0801db0d81dd16d540485671a473a00 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 11 Feb 2017 00:10:31 +1300 Subject: Implement Pricol acknowledgement --- src/org/traccar/protocol/PricolProtocolDecoder.java | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src') diff --git a/src/org/traccar/protocol/PricolProtocolDecoder.java b/src/org/traccar/protocol/PricolProtocolDecoder.java index 8a84109ca..52b68cca6 100644 --- a/src/org/traccar/protocol/PricolProtocolDecoder.java +++ b/src/org/traccar/protocol/PricolProtocolDecoder.java @@ -16,6 +16,7 @@ package org.traccar.protocol; import org.jboss.netty.buffer.ChannelBuffer; +import org.jboss.netty.buffer.ChannelBuffers; import org.jboss.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; @@ -85,6 +86,10 @@ public class PricolProtocolDecoder extends BaseProtocolDecoder { position.set(Position.KEY_ODOMETER, buf.readUnsignedMedium()); position.set(Position.KEY_RPM, buf.readUnsignedShort()); + if (channel != null) { + channel.write(ChannelBuffers.copiedBuffer("ACK", StandardCharsets.US_ASCII)); + } + return position; } -- cgit v1.2.3