diff options
author | Vitaly Litvak <vitavaque@gmail.com> | 2016-10-01 09:58:59 +0300 |
---|---|---|
committer | Vitaly Litvak <vitavaque@gmail.com> | 2016-10-01 09:58:59 +0300 |
commit | 2c9c5540cb9c8edace64daba4b60957436d12e76 (patch) | |
tree | c13cb9dc160b93890713bd470ca6ce9300c3ff40 /src/org/traccar/protocol/Jt600Protocol.java | |
parent | 82909a81eb01cfd76f38fec7cccff5a5c87b5232 (diff) | |
download | trackermap-server-2c9c5540cb9c8edace64daba4b60957436d12e76.tar.gz trackermap-server-2c9c5540cb9c8edace64daba4b60957436d12e76.tar.bz2 trackermap-server-2c9c5540cb9c8edace64daba4b60957436d12e76.zip |
For JT600c - added engine start/stop, set timezone and reboot commands implementation with tests
Diffstat (limited to 'src/org/traccar/protocol/Jt600Protocol.java')
-rw-r--r-- | src/org/traccar/protocol/Jt600Protocol.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/Jt600Protocol.java b/src/org/traccar/protocol/Jt600Protocol.java index 2df792b47..78be088c1 100644 --- a/src/org/traccar/protocol/Jt600Protocol.java +++ b/src/org/traccar/protocol/Jt600Protocol.java @@ -19,6 +19,7 @@ import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelPipeline; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; +import org.traccar.model.Command; import java.util.List; @@ -26,6 +27,10 @@ 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 +39,7 @@ public class Jt600Protocol extends BaseProtocol { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new Jt600FrameDecoder()); + pipeline.addLast("objectEncoder", new Jt600ProtocolEncoder()); pipeline.addLast("objectDecoder", new Jt600ProtocolDecoder(Jt600Protocol.this)); } }); |