aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Mavlink2Protocol.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/org/traccar/protocol/Mavlink2Protocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/Mavlink2Protocol.java23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/main/java/org/traccar/protocol/Mavlink2Protocol.java b/src/main/java/org/traccar/protocol/Mavlink2Protocol.java
new file mode 100644
index 000000000..ba051a854
--- /dev/null
+++ b/src/main/java/org/traccar/protocol/Mavlink2Protocol.java
@@ -0,0 +1,23 @@
+package org.traccar.protocol;
+
+import org.traccar.BaseProtocol;
+import org.traccar.PipelineBuilder;
+import org.traccar.TrackerServer;
+
+import io.netty.handler.codec.bytes.ByteArrayDecoder;
+import io.netty.handler.codec.bytes.ByteArrayEncoder;
+
+public class Mavlink2Protocol extends BaseProtocol {
+
+ public Mavlink2Protocol() {
+ addServer(new TrackerServer(true, getName()) {
+ @Override
+ protected void addProtocolHandlers(PipelineBuilder pipeline) {
+ pipeline.addLast(new ByteArrayEncoder());
+ pipeline.addLast(new ByteArrayDecoder());
+ pipeline.addLast(new Mavlink2ProtocolDecoder(Mavlink2Protocol.this));
+ }
+ });
+ }
+
+}