diff options
author | Vitaly Litvak <vitavaque@gmail.com> | 2015-02-23 20:23:35 +0300 |
---|---|---|
committer | Vitaly Litvak <vitavaque@gmail.com> | 2015-02-23 20:23:35 +0300 |
commit | d96638ab083af4134a54536abd00d3810627699d (patch) | |
tree | af48a4d62266d09d8e7f42f38eafba43d7fa8692 /src/org/traccar/ServerManager.java | |
parent | d437564381fafb807f61da0d2477e50a5d14d381 (diff) | |
download | trackermap-server-d96638ab083af4134a54536abd00d3810627699d.tar.gz trackermap-server-d96638ab083af4134a54536abd00d3810627699d.tar.bz2 trackermap-server-d96638ab083af4134a54536abd00d3810627699d.zip |
Implemented AutoFon 4.5 protocol (also works for StarLine M10/M11/M16/M17 devices)
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r-- | src/org/traccar/ServerManager.java | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java index d7bfb511b..6b46079e9 100644 --- a/src/org/traccar/ServerManager.java +++ b/src/org/traccar/ServerManager.java @@ -179,6 +179,7 @@ public class ServerManager { initXt013Server("xt013"); initAutoFonServer("autofon"); initGoSafeServer("gosafe"); + initAutoFon45Server("autofon45"); initProtocolDetector(); @@ -1310,4 +1311,15 @@ public class ServerManager { } } + private void initAutoFon45Server(final String protocol) throws SQLException { + if (isProtocolEnabled(properties, protocol)) { + serverList.add(new TrackerServer(this, new ServerBootstrap(), protocol) { + @Override + protected void addSpecificHandlers(ChannelPipeline pipeline) { + pipeline.addLast("frameDecoder", new AutoFon45FrameDecoder()); + pipeline.addLast("objectDecoder", new AutoFon45ProtocolDecoder(dataManager, protocol, properties)); + } + }); + } + } } |