aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/H02Protocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-04-24 01:38:14 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-04-24 01:38:14 +1200
commit037b1401975751f8b70338eae781e28bda676972 (patch)
tree7a09163c265ba5378c5c59b03db73e295addecf8 /src/org/traccar/protocol/H02Protocol.java
parent32f5c3ce86ed63ec880c31f337821285be52a94f (diff)
parent45f1471fc612834128d4ce3751905060fda04042 (diff)
downloadtrackermap-server-037b1401975751f8b70338eae781e28bda676972.tar.gz
trackermap-server-037b1401975751f8b70338eae781e28bda676972.tar.bz2
trackermap-server-037b1401975751f8b70338eae781e28bda676972.zip
Merge pull request #1898 from gaborgsomogyi/h02-arm-disarm-commands
H02 protocol arm and disarm commands
Diffstat (limited to 'src/org/traccar/protocol/H02Protocol.java')
-rw-r--r--src/org/traccar/protocol/H02Protocol.java9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/H02Protocol.java b/src/org/traccar/protocol/H02Protocol.java
index 739b8a562..2574666fe 100644
--- a/src/org/traccar/protocol/H02Protocol.java
+++ b/src/org/traccar/protocol/H02Protocol.java
@@ -17,8 +17,10 @@ package org.traccar.protocol;
import org.jboss.netty.bootstrap.ServerBootstrap;
import org.jboss.netty.channel.ChannelPipeline;
+import org.jboss.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.TrackerServer;
+import org.traccar.model.Command;
import java.util.List;
@@ -26,6 +28,10 @@ public class H02Protocol extends BaseProtocol {
public H02Protocol() {
super("h02");
+ setSupportedCommands(
+ Command.TYPE_ALARM_ARM,
+ Command.TYPE_ALARM_DISARM
+ );
}
@Override
@@ -34,9 +40,10 @@ public class H02Protocol extends BaseProtocol {
@Override
protected void addSpecificHandlers(ChannelPipeline pipeline) {
pipeline.addLast("frameDecoder", new H02FrameDecoder());
+ pipeline.addLast("stringEncoder", new StringEncoder());
+ pipeline.addLast("objectEncoder", new H02ProtocolEncoder());
pipeline.addLast("objectDecoder", new H02ProtocolDecoder(H02Protocol.this));
}
});
}
-
}