diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-03 13:35:18 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2015-12-03 13:35:18 +1300 |
commit | aa7f0f856ebe5dee7e6d6639db468e3095a5b84b (patch) | |
tree | 50bbecfb22f2fcf5db67a0b67cc87a344226e365 /src/org/traccar/protocol/MeiligaoProtocol.java | |
parent | 3249d852b5427a57e4f930c9f415f632fe367894 (diff) | |
download | trackermap-server-aa7f0f856ebe5dee7e6d6639db468e3095a5b84b.tar.gz trackermap-server-aa7f0f856ebe5dee7e6d6639db468e3095a5b84b.tar.bz2 trackermap-server-aa7f0f856ebe5dee7e6d6639db468e3095a5b84b.zip |
Implement command support for Meiligao
Diffstat (limited to 'src/org/traccar/protocol/MeiligaoProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/MeiligaoProtocol.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/MeiligaoProtocol.java b/src/org/traccar/protocol/MeiligaoProtocol.java index 9e8da7dc2..627e75948 100644 --- a/src/org/traccar/protocol/MeiligaoProtocol.java +++ b/src/org/traccar/protocol/MeiligaoProtocol.java @@ -21,11 +21,14 @@ 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; public class MeiligaoProtocol extends BaseProtocol { public MeiligaoProtocol() { super("meiligao"); + setSupportedCommands( + Command.TYPE_POSITION_SINGLE); } @Override @@ -35,12 +38,14 @@ public class MeiligaoProtocol extends BaseProtocol { protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new MeiligaoFrameDecoder()); pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(MeiligaoProtocol.this)); + pipeline.addLast("objectEncoder", new MeiligaoProtocolEncoder()); } }); serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("objectDecoder", new MeiligaoProtocolDecoder(MeiligaoProtocol.this)); + pipeline.addLast("objectEncoder", new MeiligaoProtocolEncoder()); } }); } |