aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/protocol/AdmProtocol.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2021-01-06 22:45:48 -0800
committerAnton Tananaev <anton.tananaev@gmail.com>2021-01-06 22:45:48 -0800
commitd21747209c9092e3cd693a872d38b9fac8fb1abc (patch)
tree120dfc817e6efdf5b7a15389f8eb11135e0d5f8a /src/main/java/org/traccar/protocol/AdmProtocol.java
parenta9745c6b14a0b6f48e57b9055c0977d814b46e28 (diff)
downloadtrackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.gz
trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.tar.bz2
trackermap-server-d21747209c9092e3cd693a872d38b9fac8fb1abc.zip
Satellite protocol support
Diffstat (limited to 'src/main/java/org/traccar/protocol/AdmProtocol.java')
-rw-r--r--src/main/java/org/traccar/protocol/AdmProtocol.java7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/main/java/org/traccar/protocol/AdmProtocol.java b/src/main/java/org/traccar/protocol/AdmProtocol.java
index 93b1e355a..d1d81118c 100644
--- a/src/main/java/org/traccar/protocol/AdmProtocol.java
+++ b/src/main/java/org/traccar/protocol/AdmProtocol.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015 - 2019 Anton Tananaev (anton@traccar.org)
+ * Copyright 2015 - 2021 Anton Tananaev (anton@traccar.org)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,15 +15,12 @@
*/
package org.traccar.protocol;
-import io.netty.handler.codec.LengthFieldBasedFrameDecoder;
import io.netty.handler.codec.string.StringEncoder;
import org.traccar.BaseProtocol;
import org.traccar.PipelineBuilder;
import org.traccar.TrackerServer;
import org.traccar.model.Command;
-import java.nio.ByteOrder;
-
public class AdmProtocol extends BaseProtocol {
public AdmProtocol() {
@@ -33,7 +30,7 @@ public class AdmProtocol extends BaseProtocol {
addServer(new TrackerServer(false, getName()) {
@Override
protected void addProtocolHandlers(PipelineBuilder pipeline) {
- pipeline.addLast(new LengthFieldBasedFrameDecoder(ByteOrder.LITTLE_ENDIAN, 1024, 2, 1, -3, 0, true));
+ pipeline.addLast(new AdmFrameDecoder());
pipeline.addLast(new StringEncoder());
pipeline.addLast(new AdmProtocolEncoder(AdmProtocol.this));
pipeline.addLast(new AdmProtocolDecoder(AdmProtocol.this));