From 95ea36d99ff7686b36f1bfb11ec784d7a24e0205 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 18 Jan 2019 16:06:15 -0800 Subject: Change protocol to UDP --- src/org/traccar/protocol/NeosProtocol.java | 4 +--- src/org/traccar/protocol/NeosProtocolDecoder.java | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'src/org/traccar/protocol') diff --git a/src/org/traccar/protocol/NeosProtocol.java b/src/org/traccar/protocol/NeosProtocol.java index 61bdc6048..e545a9969 100644 --- a/src/org/traccar/protocol/NeosProtocol.java +++ b/src/org/traccar/protocol/NeosProtocol.java @@ -18,17 +18,15 @@ package org.traccar.protocol; import io.netty.handler.codec.string.StringDecoder; import io.netty.handler.codec.string.StringEncoder; import org.traccar.BaseProtocol; -import org.traccar.CharacterDelimiterFrameDecoder; import org.traccar.PipelineBuilder; import org.traccar.TrackerServer; public class NeosProtocol extends BaseProtocol { public NeosProtocol() { - addServer(new TrackerServer(false, getName()) { + addServer(new TrackerServer(true, getName()) { @Override protected void addProtocolHandlers(PipelineBuilder pipeline) { - pipeline.addLast(new CharacterDelimiterFrameDecoder(1024, '!')); pipeline.addLast(new StringEncoder()); pipeline.addLast(new StringDecoder()); pipeline.addLast(new NeosProtocolDecoder(NeosProtocol.this)); diff --git a/src/org/traccar/protocol/NeosProtocolDecoder.java b/src/org/traccar/protocol/NeosProtocolDecoder.java index f5d28ba0c..f88f454a1 100644 --- a/src/org/traccar/protocol/NeosProtocolDecoder.java +++ b/src/org/traccar/protocol/NeosProtocolDecoder.java @@ -55,7 +55,7 @@ public class NeosProtocolDecoder extends BaseProtocolDecoder { .number("d,") .number("([01]{8})") // input .text("*") - .number("xx") + .number("xx!") .compile(); @Override -- cgit v1.2.3