aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Xexun2Protocol.java
diff options
context:
space:
mode:
authorStefan Clark <stefanclark@gmail.com>2022-07-25 06:50:59 +0000
committerStefan Clark <stefanclark@gmail.com>2022-07-25 07:18:00 +0000
commit032d02b584553f4374c4bc6ae9f7c8e819595c42 (patch)
tree3481d2bf106fe29455687ee8a5f60c3e844703c3 /src/main/java/org/traccar/protocol/Xexun2Protocol.java
parent14dafcb4191ec25fa22494956cd509708a9e1b5c (diff)
downloadtrackermap-server-032d02b584553f4374c4bc6ae9f7c8e819595c42.tar.gz
trackermap-server-032d02b584553f4374c4bc6ae9f7c8e819595c42.tar.bz2
trackermap-server-032d02b584553f4374c4bc6ae9f7c8e819595c42.zip
Xexun2 Encoder - Initial Code
Diffstat (limited to 'src/main/java/org/traccar/protocol/Xexun2Protocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/Xexun2Protocol.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Xexun2Protocol.java b/src/main/java/org/traccar/protocol/Xexun2Protocol.java
index 4630a69e0..1d5038a22 100644
--- a/src/main/java/org/traccar/protocol/Xexun2Protocol.java
+++ b/src/main/java/org/traccar/protocol/Xexun2Protocol.java
@@ -19,6 +19,7 @@ import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
import org.traccar.config.Config;
+import org.traccar.model.Command;
import javax.inject.Inject;
@@ -26,11 +27,17 @@ public class Xexun2Protocol extends BaseProtocol {
@Inject
public Xexun2Protocol(Config config) {
+ setSupportedDataCommands(
+ Command.TYPE_CUSTOM,
+ Command.TYPE_POSITION_PERIODIC,
+ Command.TYPE_POWER_OFF,
+ Command.TYPE_REBOOT_DEVICE);
addServer(new TrackerServer(config, getName(), false) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline, Config config) {
pipeline.addLast(new Xexun2FrameDecoder());
pipeline.addLast(new Xexun2ProtocolDecoder(Xexun2Protocol.this));
+ pipeline.addLast(new Xexun2ProtocolEncoder(Xexun2Protocol.this));
}
});
}