diff options
Diffstat (limited to 'src/org/traccar/protocol/Jt600Protocol.java')
-rw-r--r-- | src/org/traccar/protocol/Jt600Protocol.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Jt600Protocol.java b/src/org/traccar/protocol/Jt600Protocol.java index 2df792b47..8a73cbbe9 100644 --- a/src/org/traccar/protocol/Jt600Protocol.java +++ b/src/org/traccar/protocol/Jt600Protocol.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,11 @@ public class Jt600Protocol extends BaseProtocol { public Jt600Protocol() { super("jt600"); + setSupportedCommands( + Command.TYPE_ENGINE_RESUME, + Command.TYPE_ENGINE_STOP, + Command.TYPE_SET_TIMEZONE, + Command.TYPE_REBOOT_DEVICE); } @Override @@ -34,6 +41,8 @@ public class Jt600Protocol extends BaseProtocol { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new Jt600FrameDecoder()); + pipeline.addLast("stringEncoder", new StringEncoder()); + pipeline.addLast("objectEncoder", new Jt600ProtocolEncoder()); pipeline.addLast("objectDecoder", new Jt600ProtocolDecoder(Jt600Protocol.this)); } }); |