diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-28 00:12:55 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-11-28 00:12:55 +1300 |
commit | 371edced45683da9a3b7195d48787b9f7a40b232 (patch) | |
tree | 87da4c3fc8facb491d439e4af511feef5123f6a1 /src/org/traccar/protocol/EelinkProtocol.java | |
parent | b149a7b71283f1a8481c9e3954d636afcff6169e (diff) | |
download | trackermap-server-371edced45683da9a3b7195d48787b9f7a40b232.tar.gz trackermap-server-371edced45683da9a3b7195d48787b9f7a40b232.tar.bz2 trackermap-server-371edced45683da9a3b7195d48787b9f7a40b232.zip |
Implement new eeLink commands
Diffstat (limited to 'src/org/traccar/protocol/EelinkProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/EelinkProtocol.java | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocol.java b/src/org/traccar/protocol/EelinkProtocol.java index 3c3424cd4..3d0a006de 100644 --- a/src/org/traccar/protocol/EelinkProtocol.java +++ b/src/org/traccar/protocol/EelinkProtocol.java @@ -31,6 +31,7 @@ public class EelinkProtocol extends BaseProtocol { super("eelink"); setSupportedDataCommands( Command.TYPE_CUSTOM, + Command.TYPE_POSITION_SINGLE, Command.TYPE_ENGINE_STOP, Command.TYPE_ENGINE_RESUME, Command.TYPE_REBOOT_DEVICE); @@ -42,14 +43,14 @@ public class EelinkProtocol extends BaseProtocol { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 3, 2)); - pipeline.addLast("objectEncoder", new EelinkProtocolEncoder()); + pipeline.addLast("objectEncoder", new EelinkProtocolEncoder(false)); pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(EelinkProtocol.this)); } }); serverList.add(new TrackerServer(new ConnectionlessBootstrap(), getName()) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { - pipeline.addLast("objectEncoder", new EelinkProtocolEncoder()); + pipeline.addLast("objectEncoder", new EelinkProtocolEncoder(true)); pipeline.addLast("objectDecoder", new EelinkProtocolDecoder(EelinkProtocol.this)); } }); |