diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-23 12:12:42 +1000 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-08-23 17:18:10 +1000 |
commit | 5536fbe00c022c151007ad077d911b5162201cd4 (patch) | |
tree | 63d42882d44668f9120ffb43a4fa9e2ab9a3c554 /src/org/traccar/protocol/MiniFinderProtocol.java | |
parent | 083dc5075b005e42022eb995e4dce303fbfb38c6 (diff) | |
download | trackermap-server-5536fbe00c022c151007ad077d911b5162201cd4.tar.gz trackermap-server-5536fbe00c022c151007ad077d911b5162201cd4.tar.bz2 trackermap-server-5536fbe00c022c151007ad077d911b5162201cd4.zip |
Add commands to Mini Finder protocol
Diffstat (limited to 'src/org/traccar/protocol/MiniFinderProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/MiniFinderProtocol.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/MiniFinderProtocol.java b/src/org/traccar/protocol/MiniFinderProtocol.java index d237fe0aa..bdd3337ed 100644 --- a/src/org/traccar/protocol/MiniFinderProtocol.java +++ b/src/org/traccar/protocol/MiniFinderProtocol.java @@ -22,12 +22,23 @@ import org.jboss.netty.handler.codec.string.StringEncoder; import org.traccar.BaseProtocol; import org.traccar.CharacterDelimiterFrameDecoder; import org.traccar.TrackerServer; +import org.traccar.model.Command; + import java.util.List; public class MiniFinderProtocol extends BaseProtocol { public MiniFinderProtocol() { super("minifinder"); + setSupportedCommands( + Command.TYPE_SET_TIMEZONE, + Command.TYPE_VOICE_MONITORING, + Command.TYPE_ALARM_SPEED, + Command.TYPE_ALARM_GEOFENCE, + Command.TYPE_SET_AGPS, + Command.TYPE_ALARM_FALL, + Command.TYPE_MODE_POWER_SAVING, + Command.TYPE_MODE_DEEP_SLEEP); } @Override @@ -38,6 +49,7 @@ public class MiniFinderProtocol extends BaseProtocol { pipeline.addLast("frameDecoder", new CharacterDelimiterFrameDecoder(1024, ';')); pipeline.addLast("stringEncoder", new StringEncoder()); pipeline.addLast("stringDecoder", new StringDecoder()); + pipeline.addLast("objectEncoder", new MiniFinderProtocolEncoder()); pipeline.addLast("objectDecoder", new MiniFinderProtocolDecoder(MiniFinderProtocol.this)); } }); |