diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-06 15:58:35 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-10-06 15:58:35 +1300 |
commit | e60ecc5f2bc8bb6c53e95c4db2e68cbca79c6e54 (patch) | |
tree | ab64a642ff7a3bd66ae9cdb57d5d347bc2b47bf1 /src/org/traccar/protocol/CityeasyProtocol.java | |
parent | c8ad5cc5c45ab47abe35e3ad2e4f607d520e627d (diff) | |
download | trackermap-server-e60ecc5f2bc8bb6c53e95c4db2e68cbca79c6e54.tar.gz trackermap-server-e60ecc5f2bc8bb6c53e95c4db2e68cbca79c6e54.tar.bz2 trackermap-server-e60ecc5f2bc8bb6c53e95c4db2e68cbca79c6e54.zip |
Implement Cityeasy protocol commands
Diffstat (limited to 'src/org/traccar/protocol/CityeasyProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/CityeasyProtocol.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/CityeasyProtocol.java b/src/org/traccar/protocol/CityeasyProtocol.java index 69f7ad5ac..1049e48eb 100644 --- a/src/org/traccar/protocol/CityeasyProtocol.java +++ b/src/org/traccar/protocol/CityeasyProtocol.java @@ -20,6 +20,7 @@ import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; +import org.traccar.model.Command; import java.util.List; @@ -27,6 +28,11 @@ public class CityeasyProtocol extends BaseProtocol { public CityeasyProtocol() { super("cityeasy"); + setSupportedCommands( + Command.TYPE_POSITION_SINGLE, + Command.TYPE_POSITION_PERIODIC, + Command.TYPE_POSITION_STOP, + Command.TYPE_SET_TIMEZONE); } @Override @@ -36,6 +42,7 @@ public class CityeasyProtocol extends BaseProtocol { protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 2, -4, 0)); pipeline.addLast("objectDecoder", new CityeasyProtocolDecoder(CityeasyProtocol.this)); + pipeline.addLast("objectEncoder", new CityeasyProtocolEncoder()); } }); } |