diff options
author | Anatoliy Golubev <darth.naihil@gmail.com> | 2017-09-09 22:52:18 +0300 |
---|---|---|
committer | Anatoliy Golubev <darth.naihil@gmail.com> | 2017-09-09 22:52:18 +0300 |
commit | 03844cbfc53d676f41b8c9fb18b74b86a08e95f0 (patch) | |
tree | 44b484e8a3408395fadb40350b5dee0855fbdb01 /src/org/traccar/protocol/AdmProtocol.java | |
parent | 5ab6ae8d6217f3d7565a9d1073e50c1d479c5625 (diff) | |
download | trackermap-server-03844cbfc53d676f41b8c9fb18b74b86a08e95f0.tar.gz trackermap-server-03844cbfc53d676f41b8c9fb18b74b86a08e95f0.tar.bz2 trackermap-server-03844cbfc53d676f41b8c9fb18b74b86a08e95f0.zip |
Implement ADM protocol commands
Diffstat (limited to 'src/org/traccar/protocol/AdmProtocol.java')
-rw-r--r-- | src/org/traccar/protocol/AdmProtocol.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/org/traccar/protocol/AdmProtocol.java b/src/org/traccar/protocol/AdmProtocol.java index 442121f0a..db2adfeaa 100644 --- a/src/org/traccar/protocol/AdmProtocol.java +++ b/src/org/traccar/protocol/AdmProtocol.java @@ -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.nio.ByteOrder; import java.util.List; @@ -28,6 +29,9 @@ public class AdmProtocol extends BaseProtocol { public AdmProtocol() { super("adm"); + setSupportedDataCommands( + Command.TYPE_GET_DEVICE_STATUS, + Command.TYPE_CUSTOM); } @Override @@ -36,6 +40,7 @@ public class AdmProtocol extends BaseProtocol { @Override protected void addSpecificHandlers(ChannelPipeline pipeline) { pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 2, 1, -3, 0)); + pipeline.addLast("objectEncoder", new AdmProtocolEncoder()); pipeline.addLast("objectDecoder", new AdmProtocolDecoder(AdmProtocol.this)); } }; |