From 7a47baa3c6122ef18f174c52476dc5ca9bc8177e Mon Sep 17 00:00:00 2001 From: drecchia Date: Tue, 5 Jul 2016 16:42:14 -0300 Subject: - Added UDP support for Astra K protocol. --- src/org/traccar/protocol/AstraProtocol.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/org/traccar/protocol/AstraProtocol.java b/src/org/traccar/protocol/AstraProtocol.java index d0b1d47a5..8498a766a 100644 --- a/src/org/traccar/protocol/AstraProtocol.java +++ b/src/org/traccar/protocol/AstraProtocol.java @@ -15,6 +15,7 @@ */ package org.traccar.protocol; +import org.jboss.netty.bootstrap.ConnectionlessBootstrap; import org.jboss.netty.bootstrap.ServerBootstrap; import org.jboss.netty.channel.ChannelPipeline; import org.jboss.netty.handler.codec.frame.LengthFieldBasedFrameDecoder; @@ -38,6 +39,13 @@ public class AstraProtocol extends BaseProtocol { pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this)); } }); + serverList.add(new TrackerServer(new ConnectionlessBootstrap(), this.getName()) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("frameDecoder", new LengthFieldBasedFrameDecoder(1024, 1, 2, -3, 0)); + pipeline.addLast("objectDecoder", new AstraProtocolDecoder(AstraProtocol.this)); + } + }); } } -- cgit v1.2.3