aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/H02Protocol.java
diff options
context:
space:
mode:
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));
}
});
}
-
}