diff options
Diffstat (limited to 'src/org/traccar/protocol/EelinkProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/EelinkProtocol.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/EelinkProtocol.java b/src/org/traccar/protocol/EelinkProtocol.java index 4da051159..5900f0059 100644 --- a/src/org/traccar/protocol/EelinkProtocol.java +++ b/src/org/traccar/protocol/EelinkProtocol.java @@ -1,5 +1,5 @@ /* - * Copyright 2015 Anton Tananaev (anton.tananaev@gmail.com) + * Copyright 2015 - 2016 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. @@ -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 EelinkProtocol extends BaseProtocol { public EelinkProtocol() { super("eelink"); + setSupportedCommands( + Command.TYPE_CUSTOM, + Command.TYPE_ENGINE_STOP, + Command.TYPE_ENGINE_RESUME, + Command.TYPE_REBOOT_DEVICE); } @Override @@ -35,6 +41,7 @@ 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("objectDecoder", new EelinkProtocolDecoder(EelinkProtocol.this)); } }); |