aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/Mavlink2Protocol.java
blob: ba051a854d53133aa572eacb5a1dbeda4cbb5f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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));
            }
        });
    }

}