diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-07 15:53:12 +1200 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-07 15:53:12 +1200 |
commit | a9be10be1cf3709a6f6eb5d612c2f5485f12749e (patch) | |
tree | 8ec498f994dc16855093f8ef575ceeb12cb400a3 /src/org/traccar/protocol/Gl100ProtocolDecoder.java | |
parent | 6520327938582d5e4928d78fc70f95c60e9ac909 (diff) | |
download | trackermap-server-a9be10be1cf3709a6f6eb5d612c2f5485f12749e.tar.gz trackermap-server-a9be10be1cf3709a6f6eb5d612c2f5485f12749e.tar.bz2 trackermap-server-a9be10be1cf3709a6f6eb5d612c2f5485f12749e.zip |
Migrate G protocols
Diffstat (limited to 'src/org/traccar/protocol/Gl100ProtocolDecoder.java')
-rw-r--r-- | src/org/traccar/protocol/Gl100ProtocolDecoder.java | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/org/traccar/protocol/Gl100ProtocolDecoder.java b/src/org/traccar/protocol/Gl100ProtocolDecoder.java index 405090695..13ed7120e 100644 --- a/src/org/traccar/protocol/Gl100ProtocolDecoder.java +++ b/src/org/traccar/protocol/Gl100ProtocolDecoder.java @@ -1,5 +1,5 @@ /* - * Copyright 2012 - 2015 Anton Tananaev (anton@traccar.org) + * Copyright 2012 - 2018 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,9 +15,10 @@ */ package org.traccar.protocol; -import org.jboss.netty.channel.Channel; +import io.netty.channel.Channel; import org.traccar.BaseProtocolDecoder; import org.traccar.DeviceSession; +import org.traccar.NetworkMessage; import org.traccar.helper.Parser; import org.traccar.helper.PatternBuilder; import org.traccar.model.Position; @@ -64,7 +65,7 @@ public class Gl100ProtocolDecoder extends BaseProtocolDecoder { String response = "+RESP:GTHBD,GPRS ACTIVE,"; response += sentence.substring(9, sentence.lastIndexOf(',')); response += '\0'; - channel.write(response); // heartbeat response + channel.write(new NetworkMessage(response, remoteAddress)); // heartbeat response } Parser parser = new Parser(PATTERN, sentence); |