diff options
Diffstat (limited to 'src/org/traccar/protocol/Jt600Protocol.java')
-rw-r--r-- | src/org/traccar/protocol/Jt600Protocol.java | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Jt600Protocol.java b/src/org/traccar/protocol/Jt600Protocol.java index 2df792b47..132770511 100644 --- a/src/org/traccar/protocol/Jt600Protocol.java +++ b/src/org/traccar/protocol/Jt600Protocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 Anton Tananaev (anton@traccar.org) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -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)); } }); |