diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-26 21:28:52 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2016-03-26 21:28:52 +1300 |
commit | 8d33847edb8975535991e7453100404068bcfacf (patch) | |
tree | fea3988dfb2d5d946769016e497d53b4327fb3b2 /src/org/traccar/protocol/NoranProtocol.java | |
parent | b83870c88c50c532c068eed92fff8f7ef8cf5ffa (diff) | |
download | trackermap-server-8d33847edb8975535991e7453100404068bcfacf.tar.gz trackermap-server-8d33847edb8975535991e7453100404068bcfacf.tar.bz2 trackermap-server-8d33847edb8975535991e7453100404068bcfacf.zip |
Implement commands support for Noran
Diffstat (limited to 'src/org/traccar/protocol/NoranProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/NoranProtocol.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/NoranProtocol.java b/src/org/traccar/protocol/NoranProtocol.java index 6c16fe6bc..6bc15296e 100644 --- a/src/org/traccar/protocol/NoranProtocol.java +++ b/src/org/traccar/protocol/NoranProtocol.java @@ -19,6 +19,7 @@ import org.jboss.netty.bootstrap.ConnectionlessBootstrap; import org.jboss.netty.channel.ChannelPipeline; import org.traccar.BaseProtocol; import org.traccar.TrackerServer; +import org.traccar.model.Command; import java.nio.ByteOrder; import java.util.List; @@ -27,6 +28,12 @@ public class NoranProtocol extends BaseProtocol { public NoranProtocol() { super("noran"); + setSupportedCommands( + Command.TYPE_POSITION_SINGLE, + Command.TYPE_POSITION_PERIODIC, + Command.TYPE_POSITION_STOP, + Command.TYPE_ENGINE_STOP, + Command.TYPE_ENGINE_RESUME); } @Override @@ -34,6 +41,7 @@ public class NoranProtocol extends BaseProtocol { TrackerServer server = new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("objectEncoder", new NoranProtocolEncoder()); pipeline.addLast("objectDecoder", new NoranProtocolDecoder(NoranProtocol.this)); } }; |