aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/H02Protocol.java
diff options
context:
space:
mode:
authorGábor Somogyi <gabor.g.somogyi@gmail.com>2016-04-22 23:15:39 +0200
committerGábor Somogyi <gabor.g.somogyi@gmail.com>2016-04-23 12:10:24 +0200
commit40620ab3f10c686499ae2b25c8019280b1c82c1f (patch)
tree08e23e921744ae4fe0132d87df8f9e6d4c4e3b09 /src/org/traccar/protocol/H02Protocol.java
parenta427f3f6644a62366e4c2ed6c69f2f4479b2bed5 (diff)
downloadtrackermap-server-40620ab3f10c686499ae2b25c8019280b1c82c1f.tar.gz
trackermap-server-40620ab3f10c686499ae2b25c8019280b1c82c1f.tar.bz2
trackermap-server-40620ab3f10c686499ae2b25c8019280b1c82c1f.zip
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));
}
});
}
-
}