aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-02-11 00:10:31 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-02-11 00:10:31 +1300
commit2c0360abc0801db0d81dd16d540485671a473a00 (patch)
treee6892d34f368290a640ae6af8f28f10602e4fc2d /src/org/traccar
parent5ea4bf51645c37ab7046c7c8d4b5d090e02d5da4 (diff)
downloadtraccar-server-2c0360abc0801db0d81dd16d540485671a473a00.tar.gz
traccar-server-2c0360abc0801db0d81dd16d540485671a473a00.tar.bz2
traccar-server-2c0360abc0801db0d81dd16d540485671a473a00.zip
Implement Pricol acknowledgement
Diffstat (limited to 'src/org/traccar')
-rw-r--r--src/org/traccar/protocol/PricolProtocolDecoder.java5
1 files changed, 5 insertions, 0 deletions
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;
}