diff options
Diffstat (limited to 'src/org/traccar/protocol/SuntechProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/SuntechProtocol.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/SuntechProtocol.java b/src/org/traccar/protocol/SuntechProtocol.java index 630cab971..d3f5d6009 100644 --- a/src/org/traccar/protocol/SuntechProtocol.java +++ b/src/org/traccar/protocol/SuntechProtocol.java @@ -18,9 +18,11 @@ package org.traccar.protocol; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.handler.codec.string.StringDecoder; +import org.jboss.netty.handler.codec.string.StringEncoder; import org.traccar.BaseProtocol; import org.traccar.CharacterDelimiterFrameDecoder; import org.traccar.TrackerServer; +import org.traccar.model.Command; import java.util.List; @@ -28,6 +30,9 @@ public class SuntechProtocol extends BaseProtocol { public SuntechProtocol() { super("suntech"); + setSupportedCommands( + Command.TYPE_ENGINE_STOP, + Command.TYPE_ENGINE_STOP); } @Override @@ -37,7 +42,9 @@ public class SuntechProtocol extends BaseProtocol { protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, '\r')); pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("objectDecoder", new SuntechProtocolDecoder(SuntechProtocol.this)); + pipeline.addLast("objectEncoder", new SuntechProtocolEncoder()); } }); } |