diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-20 06:16:52 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-01-20 06:16:53 +1300 |
commit | e5c2ec3bd7f4b0433242cda3ca9a66c3d9dd2367 (patch) | |
tree | 04d4dca44e4c8a5dbf2207e342e63812bccc6cef /src/org/traccar/protocol/HuabaoProtocol.java | |
parent | 6d40b05fc95a14e2b6b21158d809fbebcc735d33 (diff) | |
download | trackermap-server-e5c2ec3bd7f4b0433242cda3ca9a66c3d9dd2367.tar.gz trackermap-server-e5c2ec3bd7f4b0433242cda3ca9a66c3d9dd2367.tar.bz2 trackermap-server-e5c2ec3bd7f4b0433242cda3ca9a66c3d9dd2367.zip |
Implement Huabao protocol commands
Diffstat (limited to 'src/org/traccar/protocol/HuabaoProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/HuabaoProtocol.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/HuabaoProtocol.java b/src/org/traccar/protocol/HuabaoProtocol.java index 053ce59bb..d5e68e091 100644 --- a/src/org/traccar/protocol/HuabaoProtocol.java +++ b/src/org/traccar/protocol/HuabaoProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton@traccar.org) + * Copyright 2015 - 2017 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. @@ -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,9 @@ public class HuabaoProtocol extends BaseProtocol { public HuabaoProtocol() { super("huabao"); + setSupportedCommands( + Command.TYPE_ENGINE_STOP, + Command.TYPE_ENGINE_RESUME); } @Override @@ -34,6 +38,7 @@ public class HuabaoProtocol extends BaseProtocol { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new HuabaoFrameDecoder()); + pipeline.addLast("objectEncoder", new HuabaoProtocolEncoder()); pipeline.addLast("objectDecoder", new HuabaoProtocolDecoder(HuabaoProtocol.this)); } }); |