aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/org/traccar/ExtendedObjectDecoder.java25
-rw-r--r--src/org/traccar/FilterHandler.java7
-rw-r--r--src/org/traccar/RemoteAddressHandler.java13
-rw-r--r--src/org/traccar/ReverseGeocoderHandler.java8
-rw-r--r--src/org/traccar/protocol/ApelProtocolDecoder.java8
-rw-r--r--src/org/traccar/protocol/AplicomProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/Ardi01ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/AtrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/AutoFon45ProtocolDecoder.java17
-rw-r--r--src/org/traccar/protocol/AutoFonProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/Avl301ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/BceProtocolDecoder.java4
-rw-r--r--src/org/traccar/protocol/BoxProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/CalAmpProtocolDecoder.java24
-rw-r--r--src/org/traccar/protocol/CarTrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/CarscopProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/CastelProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/CellocatorProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/EasyTrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/EelinkProtocolDecoder.java6
-rw-r--r--src/org/traccar/protocol/EnforaProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Ev603ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/FreedomProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GalileoProtocolDecoder.java14
-rw-r--r--src/org/traccar/protocol/GatorProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gl100ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gl200ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GlobalSatProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GoSafeProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/GotopProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gps103ProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/GpsGateProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gt02ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/H02ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/HaicomProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/IntellitracProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Jt600ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/KhdProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/LaipacProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/M2mProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/ManPowerProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MaxonProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MegastekProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MeiligaoProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MeitrackProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MiniFinderProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Mta6ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MtxProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/MxtProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/NavigilProtocolDecoder.java7
-rw-r--r--src/org/traccar/protocol/NavisProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/NoranProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/OrionProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/OsmAndProtocolDecoder.java6
-rw-r--r--src/org/traccar/protocol/PiligrimProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/ProgressProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Pt3000ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/RitiProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/RuptelaProtocolDecoder.java7
-rw-r--r--src/org/traccar/protocol/SanavProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/SkypatrolProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Stl060ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/SuntechProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/T55ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TaipProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TelikProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TeltonikaProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tk102ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tk103ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tlt2hProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TopflytechProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TotemProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tr20ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Tr900ProtocolDecoder.java3
-rw-r--r--src/org/traccar/protocol/TrackboxProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TramigoProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/TytanProtocolDecoder.java10
-rw-r--r--src/org/traccar/protocol/UlbotechProtocolDecoder.java7
-rw-r--r--src/org/traccar/protocol/V680ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/VisiontekProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/WialonProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/WondexProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/XexunProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/XirgoProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Xt013ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/Xt7ProtocolDecoder.java5
-rw-r--r--src/org/traccar/protocol/YwtProtocolDecoder.java5
-rw-r--r--test/org/traccar/protocol/AtrackProtocolDecoderTest.java15
-rw-r--r--test/org/traccar/protocol/CalAmpProtocolDecoderTest.java14
-rw-r--r--test/org/traccar/protocol/CastelProtocolDecoderTest.java20
-rw-r--r--test/org/traccar/protocol/Gl200ProtocolDecoderTest.java80
-rw-r--r--test/org/traccar/protocol/GoSafeProtocolDecoderTest.java7
-rw-r--r--test/org/traccar/protocol/Gps103ProtocolDecoderTest.java72
-rw-r--r--test/org/traccar/protocol/NoranProtocolDecoderTest.java12
-rw-r--r--test/org/traccar/protocol/Tr900ProtocolDecoderTest.java6
-rw-r--r--test/org/traccar/protocol/TytanProtocolDecoderTest.java22
-rw-r--r--test/org/traccar/protocol/XirgoProtocolDecoderTest.java9
99 files changed, 399 insertions, 402 deletions
diff --git a/src/org/traccar/ExtendedObjectDecoder.java b/src/org/traccar/ExtendedObjectDecoder.java
index 55a75bb67..ad0210934 100644
--- a/src/org/traccar/ExtendedObjectDecoder.java
+++ b/src/org/traccar/ExtendedObjectDecoder.java
@@ -15,17 +15,15 @@
*/
package org.traccar;
+import java.net.SocketAddress;
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelEvent;
import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.channel.MessageEvent;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
-
-import java.net.SocketAddress;
-
+import org.jboss.netty.channel.ChannelUpstreamHandler;
import static org.jboss.netty.channel.Channels.fireMessageReceived;
+import org.jboss.netty.channel.MessageEvent;
-public abstract class ExtendedObjectDecoder extends OneToOneDecoder {
+public abstract class ExtendedObjectDecoder implements ChannelUpstreamHandler {
@Override
public void handleUpstream(
@@ -37,7 +35,7 @@ public abstract class ExtendedObjectDecoder extends OneToOneDecoder {
MessageEvent e = (MessageEvent) evt;
Object originalMessage = e.getMessage();
- Object decodedMessage = decode(ctx, e.getChannel(), e.getRemoteAddress(), originalMessage);
+ Object decodedMessage = decode(e.getChannel(), e.getRemoteAddress(), originalMessage);
if (originalMessage == decodedMessage) {
ctx.sendUpstream(evt);
} else if (decodedMessage != null) {
@@ -45,17 +43,6 @@ public abstract class ExtendedObjectDecoder extends OneToOneDecoder {
}
}
- protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
-
- return decode(ctx, channel, msg);
- }
-
- @Override
- protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
-
- return null; // default implementation
- }
+ protected abstract Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception;
}
diff --git a/src/org/traccar/FilterHandler.java b/src/org/traccar/FilterHandler.java
index 9b80afec5..e5a06579c 100644
--- a/src/org/traccar/FilterHandler.java
+++ b/src/org/traccar/FilterHandler.java
@@ -15,17 +15,16 @@
*/
package org.traccar;
+import java.net.SocketAddress;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
import org.traccar.helper.DistanceCalculator;
import org.traccar.helper.Log;
import org.traccar.model.Position;
-public class FilterHandler extends OneToOneDecoder {
+public class FilterHandler extends ExtendedObjectDecoder {
private boolean filterInvalid;
private boolean filterZero;
@@ -146,7 +145,7 @@ public class FilterHandler extends OneToOneDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
if (msg instanceof Position) {
diff --git a/src/org/traccar/RemoteAddressHandler.java b/src/org/traccar/RemoteAddressHandler.java
index 3aa28daf7..d9522020d 100644
--- a/src/org/traccar/RemoteAddressHandler.java
+++ b/src/org/traccar/RemoteAddressHandler.java
@@ -15,23 +15,18 @@
*/
package org.traccar;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
-import org.traccar.geocode.AddressFormat;
-import org.traccar.geocode.ReverseGeocoder;
-import org.traccar.model.Event;
-import org.traccar.model.Position;
-
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import java.util.List;
+import org.jboss.netty.channel.Channel;
+import org.traccar.model.Event;
+import org.traccar.model.Position;
public class RemoteAddressHandler extends ExtendedObjectDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String hostAddress = ((InetSocketAddress) remoteAddress).getAddress().getHostAddress();
diff --git a/src/org/traccar/ReverseGeocoderHandler.java b/src/org/traccar/ReverseGeocoderHandler.java
index 73254673c..aaa491ae7 100644
--- a/src/org/traccar/ReverseGeocoderHandler.java
+++ b/src/org/traccar/ReverseGeocoderHandler.java
@@ -15,16 +15,14 @@
*/
package org.traccar;
+import java.net.SocketAddress;
import java.util.List;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.oneone.OneToOneDecoder;
import org.traccar.geocode.AddressFormat;
import org.traccar.geocode.ReverseGeocoder;
-import org.traccar.model.Event;
import org.traccar.model.Position;
-public class ReverseGeocoderHandler extends OneToOneDecoder {
+public class ReverseGeocoderHandler extends ExtendedObjectDecoder {
private final ReverseGeocoder geocoder;
private final boolean processInvalidPositions;
@@ -38,7 +36,7 @@ public class ReverseGeocoderHandler extends OneToOneDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
if (geocoder != null) {
diff --git a/src/org/traccar/protocol/ApelProtocolDecoder.java b/src/org/traccar/protocol/ApelProtocolDecoder.java
index 85a4e771a..9a25a4fff 100644
--- a/src/org/traccar/protocol/ApelProtocolDecoder.java
+++ b/src/org/traccar/protocol/ApelProtocolDecoder.java
@@ -17,16 +17,14 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
import org.traccar.helper.Log;
@@ -97,7 +95,7 @@ public class ApelProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/AplicomProtocolDecoder.java b/src/org/traccar/protocol/AplicomProtocolDecoder.java
index 573cccecf..ff8858744 100644
--- a/src/org/traccar/protocol/AplicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/AplicomProtocolDecoder.java
@@ -15,17 +15,11 @@
*/
package org.traccar.protocol;
-import java.util.ArrayList;
+import java.net.SocketAddress;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
-import org.traccar.Context;
-import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.Crc;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -82,7 +76,7 @@ public class AplicomProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Ardi01ProtocolDecoder.java b/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
index dcc342b97..0a0ef0bca 100644
--- a/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Ardi01ProtocolDecoder.java
@@ -22,7 +22,8 @@ import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class Ardi01ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/AtrackProtocolDecoder.java b/src/org/traccar/protocol/AtrackProtocolDecoder.java
index 6a346f946..1f8ec9a1f 100644
--- a/src/org/traccar/protocol/AtrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/AtrackProtocolDecoder.java
@@ -20,12 +20,9 @@ import java.nio.charset.Charset;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -67,7 +64,7 @@ public class AtrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java b/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java
index 4fbf05c94..762cb4d8d 100644
--- a/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoFon45ProtocolDecoder.java
@@ -15,19 +15,19 @@
*/
package org.traccar.protocol;
-import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOGIN;
-import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOCATION;
-
+import java.net.SocketAddress;
+import java.util.Arrays;
+import java.util.Calendar;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.model.Event;
import org.traccar.model.Position;
-
-import java.util.*;
+import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOCATION;
+import static org.traccar.protocol.AutoFon45FrameDecoder.MSG_LOGIN;
public class AutoFon45ProtocolDecoder extends BaseProtocolDecoder {
@@ -41,7 +41,10 @@ public class AutoFon45ProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
+ throws Exception {
+
ChannelBuffer buf = (ChannelBuffer) msg;
int type = buf.getUnsignedByte(0);
diff --git a/src/org/traccar/protocol/AutoFonProtocolDecoder.java b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
index b23f7a562..810d666dd 100644
--- a/src/org/traccar/protocol/AutoFonProtocolDecoder.java
+++ b/src/org/traccar/protocol/AutoFonProtocolDecoder.java
@@ -15,17 +15,19 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
+import java.util.Calendar;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.*;
-
public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
public AutoFonProtocolDecoder(AutoFonProtocol protocol) {
@@ -108,7 +110,7 @@ public class AutoFonProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Avl301ProtocolDecoder.java b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
index c4ce150c2..6359ba80d 100644
--- a/src/org/traccar/protocol/Avl301ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Avl301ProtocolDecoder.java
@@ -23,7 +23,8 @@ import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
@@ -61,7 +62,7 @@ public class Avl301ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/BceProtocolDecoder.java b/src/org/traccar/protocol/BceProtocolDecoder.java
index 763f35d0c..4255ebde2 100644
--- a/src/org/traccar/protocol/BceProtocolDecoder.java
+++ b/src/org/traccar/protocol/BceProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.util.Date;
import java.util.LinkedList;
@@ -22,7 +23,6 @@ import java.util.List;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
import org.traccar.model.Event;
@@ -44,7 +44,7 @@ public class BceProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/BoxProtocolDecoder.java b/src/org/traccar/protocol/BoxProtocolDecoder.java
index 77e546cda..ffc9f9bd0 100644
--- a/src/org/traccar/protocol/BoxProtocolDecoder.java
+++ b/src/org/traccar/protocol/BoxProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class BoxProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/CalAmpProtocolDecoder.java b/src/org/traccar/protocol/CalAmpProtocolDecoder.java
index 99d8651de..51a2025b8 100644
--- a/src/org/traccar/protocol/CalAmpProtocolDecoder.java
+++ b/src/org/traccar/protocol/CalAmpProtocolDecoder.java
@@ -17,14 +17,9 @@ package org.traccar.protocol;
import java.net.SocketAddress;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelEvent;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.channel.Channels;
-import org.jboss.netty.channel.MessageEvent;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -53,23 +48,6 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder {
private static final int SERVICE_ACKNOWLEDGED = 1;
private static final int SERVICE_RESPONSE = 2;
- @Override
- public void handleUpstream(
- ChannelHandlerContext ctx, ChannelEvent evt)
- throws Exception {
-
- if (!(evt instanceof MessageEvent)) {
- ctx.sendUpstream(evt);
- return;
- }
-
- MessageEvent e = (MessageEvent) evt;
- Object decodedMessage = decode(ctx, e.getChannel(), e.getMessage(), e.getRemoteAddress());
- if (decodedMessage != null) {
- Channels.fireMessageReceived(ctx, decodedMessage, e.getRemoteAddress());
- }
- }
-
private void sendResponse(Channel channel, SocketAddress remoteAddress, int type, int index, int result) {
if (channel != null) {
ChannelBuffer response = ChannelBuffers.directBuffer(10);
@@ -85,7 +63,7 @@ public class CalAmpProtocolDecoder extends BaseProtocolDecoder {
}
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg, SocketAddress remoteAddress)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/CarTrackProtocolDecoder.java b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
index fea4f6a5e..fc14b4668 100644
--- a/src/org/traccar/protocol/CarTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarTrackProtocolDecoder.java
@@ -16,7 +16,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,7 +58,7 @@ public class CarTrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/CarscopProtocolDecoder.java b/src/org/traccar/protocol/CarscopProtocolDecoder.java
index d9c18d0b5..08ab10528 100644
--- a/src/org/traccar/protocol/CarscopProtocolDecoder.java
+++ b/src/org/traccar/protocol/CarscopProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class CarscopProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/CastelProtocolDecoder.java b/src/org/traccar/protocol/CastelProtocolDecoder.java
index e67f5ca39..3a09822b3 100644
--- a/src/org/traccar/protocol/CastelProtocolDecoder.java
+++ b/src/org/traccar/protocol/CastelProtocolDecoder.java
@@ -18,12 +18,14 @@ package org.traccar.protocol;
import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.*;
-
+import java.util.Calendar;
+import java.util.Date;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
import org.traccar.helper.UnitsConverter;
@@ -74,7 +76,7 @@ public class CastelProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/CellocatorProtocolDecoder.java b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
index 6c3343224..af148c1eb 100644
--- a/src/org/traccar/protocol/CellocatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/CellocatorProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.ByteOrder;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -84,7 +85,7 @@ public class CellocatorProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
index 0a08d6394..5292e90a7 100644
--- a/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/EasyTrackProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -60,7 +61,7 @@ public class EasyTrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/EelinkProtocolDecoder.java b/src/org/traccar/protocol/EelinkProtocolDecoder.java
index 3cdf3977e..8bcc70c19 100644
--- a/src/org/traccar/protocol/EelinkProtocolDecoder.java
+++ b/src/org/traccar/protocol/EelinkProtocolDecoder.java
@@ -15,13 +15,11 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.UnitsConverter;
@@ -69,7 +67,7 @@ public class EelinkProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/EnforaProtocolDecoder.java b/src/org/traccar/protocol/EnforaProtocolDecoder.java
index 13148641a..353547aef 100644
--- a/src/org/traccar/protocol/EnforaProtocolDecoder.java
+++ b/src/org/traccar/protocol/EnforaProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class EnforaProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Ev603ProtocolDecoder.java b/src/org/traccar/protocol/Ev603ProtocolDecoder.java
index 8686088cb..898e5802d 100644
--- a/src/org/traccar/protocol/Ev603ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Ev603ProtocolDecoder.java
@@ -16,7 +16,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -45,7 +46,7 @@ public class Ev603ProtocolDecoder extends BaseProtocolDecoder{
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/FreedomProtocolDecoder.java b/src/org/traccar/protocol/FreedomProtocolDecoder.java
index d6e641bb1..b095b9a39 100644
--- a/src/org/traccar/protocol/FreedomProtocolDecoder.java
+++ b/src/org/traccar/protocol/FreedomProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -44,7 +45,7 @@ public class FreedomProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/GalileoProtocolDecoder.java b/src/org/traccar/protocol/GalileoProtocolDecoder.java
index acf95a552..66eb1f2cc 100644
--- a/src/org/traccar/protocol/GalileoProtocolDecoder.java
+++ b/src/org/traccar/protocol/GalileoProtocolDecoder.java
@@ -15,15 +15,19 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.*;
-
+import java.util.Date;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Log;
import org.traccar.model.Event;
@@ -79,7 +83,7 @@ public class GalileoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/GatorProtocolDecoder.java b/src/org/traccar/protocol/GatorProtocolDecoder.java
index 6a3434c8a..635362f48 100644
--- a/src/org/traccar/protocol/GatorProtocolDecoder.java
+++ b/src/org/traccar/protocol/GatorProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -48,7 +49,7 @@ public class GatorProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Gl100ProtocolDecoder.java b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
index 7746395a1..ffb4605a0 100644
--- a/src/org/traccar/protocol/Gl100ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl100ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -52,7 +53,7 @@ public class Gl100ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Gl200ProtocolDecoder.java b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
index a3fb8ee4b..b71ace1a1 100644
--- a/src/org/traccar/protocol/Gl200ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gl200ProtocolDecoder.java
@@ -20,10 +20,7 @@ import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.Context;
import org.traccar.helper.UnitsConverter;
@@ -67,7 +64,7 @@ public class Gl200ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
index e427def3a..c411b4c25 100644
--- a/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
+++ b/src/org/traccar/protocol/GlobalSatProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Properties;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -264,7 +265,7 @@ public class GlobalSatProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GoSafeProtocolDecoder.java b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
index 0a24e7029..758d9a71d 100644
--- a/src/org/traccar/protocol/GoSafeProtocolDecoder.java
+++ b/src/org/traccar/protocol/GoSafeProtocolDecoder.java
@@ -20,10 +20,7 @@ import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -52,7 +49,7 @@ public class GoSafeProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GotopProtocolDecoder.java b/src/org/traccar/protocol/GotopProtocolDecoder.java
index 81b17b29f..f113afad5 100644
--- a/src/org/traccar/protocol/GotopProtocolDecoder.java
+++ b/src/org/traccar/protocol/GotopProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class GotopProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/Gps103ProtocolDecoder.java b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
index fcfcb3dbb..570ebe8c0 100644
--- a/src/org/traccar/protocol/Gps103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gps103ProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -63,7 +62,7 @@ public class Gps103ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/GpsGateProtocolDecoder.java b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
index 011ec1219..5a69d6621 100644
--- a/src/org/traccar/protocol/GpsGateProtocolDecoder.java
+++ b/src/org/traccar/protocol/GpsGateProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class GpsGateProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Gt02ProtocolDecoder.java b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
index 8d775a2bb..b542cec22 100644
--- a/src/org/traccar/protocol/Gt02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt02ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -50,7 +51,7 @@ public class Gt02ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index f5a8dc307..5e527dd9c 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -26,7 +26,8 @@ import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Properties;
import java.util.TimeZone;
@@ -92,7 +93,7 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/H02ProtocolDecoder.java b/src/org/traccar/protocol/H02ProtocolDecoder.java
index 95d80edb5..e3130305b 100644
--- a/src/org/traccar/protocol/H02ProtocolDecoder.java
+++ b/src/org/traccar/protocol/H02ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -181,7 +182,7 @@ public class H02ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/HaicomProtocolDecoder.java b/src/org/traccar/protocol/HaicomProtocolDecoder.java
index 27fb05d34..b7cc29ddf 100644
--- a/src/org/traccar/protocol/HaicomProtocolDecoder.java
+++ b/src/org/traccar/protocol/HaicomProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class HaicomProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/IntellitracProtocolDecoder.java b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
index 9b99fc408..b34753f1d 100644
--- a/src/org/traccar/protocol/IntellitracProtocolDecoder.java
+++ b/src/org/traccar/protocol/IntellitracProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -63,7 +64,7 @@ public class IntellitracProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Jt600ProtocolDecoder.java b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
index eaf9ff9c6..45eeb5c4d 100644
--- a/src/org/traccar/protocol/Jt600ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Jt600ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -201,7 +202,7 @@ public class Jt600ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/KhdProtocolDecoder.java b/src/org/traccar/protocol/KhdProtocolDecoder.java
index 335e84697..bff7568a7 100644
--- a/src/org/traccar/protocol/KhdProtocolDecoder.java
+++ b/src/org/traccar/protocol/KhdProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -56,7 +57,7 @@ public class KhdProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/LaipacProtocolDecoder.java b/src/org/traccar/protocol/LaipacProtocolDecoder.java
index e5838387a..8d111b05c 100644
--- a/src/org/traccar/protocol/LaipacProtocolDecoder.java
+++ b/src/org/traccar/protocol/LaipacProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class LaipacProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/M2mProtocolDecoder.java b/src/org/traccar/protocol/M2mProtocolDecoder.java
index 10df475b3..ac1d8b7dc 100644
--- a/src/org/traccar/protocol/M2mProtocolDecoder.java
+++ b/src/org/traccar/protocol/M2mProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -36,7 +37,7 @@ public class M2mProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/ManPowerProtocolDecoder.java b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
index 7070e8e39..aef64d69e 100644
--- a/src/org/traccar/protocol/ManPowerProtocolDecoder.java
+++ b/src/org/traccar/protocol/ManPowerProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class ManPowerProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MaxonProtocolDecoder.java b/src/org/traccar/protocol/MaxonProtocolDecoder.java
index c65476590..1ab37dc7d 100644
--- a/src/org/traccar/protocol/MaxonProtocolDecoder.java
+++ b/src/org/traccar/protocol/MaxonProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,7 +58,7 @@ public class MaxonProtocolDecoder extends BaseProtocolDecoder {
static private Pattern gpfidPattern = Pattern.compile("\\$GPFID,(\\d+)$");
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MegastekProtocolDecoder.java b/src/org/traccar/protocol/MegastekProtocolDecoder.java
index 5b9f0408c..e35b75869 100644
--- a/src/org/traccar/protocol/MegastekProtocolDecoder.java
+++ b/src/org/traccar/protocol/MegastekProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -129,7 +130,7 @@ public class MegastekProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
index faa2f122e..f0b3ee9e6 100644
--- a/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeiligaoProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Properties;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -128,7 +129,7 @@ public class MeiligaoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/MeitrackProtocolDecoder.java b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
index 4e6927e56..adbaa6e58 100644
--- a/src/org/traccar/protocol/MeitrackProtocolDecoder.java
+++ b/src/org/traccar/protocol/MeitrackProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@@ -260,7 +261,7 @@ public class MeitrackProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
index cd1cc4eec..cd9da419a 100644
--- a/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
+++ b/src/org/traccar/protocol/MiniFinderProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -50,7 +51,7 @@ public class MiniFinderProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Mta6ProtocolDecoder.java b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
index 8872ba76a..e83c84583 100644
--- a/src/org/traccar/protocol/Mta6ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Mta6ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
@@ -278,7 +279,7 @@ public class Mta6ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
HttpRequest request = (HttpRequest) msg;
diff --git a/src/org/traccar/protocol/MtxProtocolDecoder.java b/src/org/traccar/protocol/MtxProtocolDecoder.java
index 860f3a5a0..1203313f9 100644
--- a/src/org/traccar/protocol/MtxProtocolDecoder.java
+++ b/src/org/traccar/protocol/MtxProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class MtxProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/MxtProtocolDecoder.java b/src/org/traccar/protocol/MxtProtocolDecoder.java
index b6d9a2f9e..7f5ccabb2 100644
--- a/src/org/traccar/protocol/MxtProtocolDecoder.java
+++ b/src/org/traccar/protocol/MxtProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
@@ -39,7 +40,7 @@ public class MxtProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/NavigilProtocolDecoder.java b/src/org/traccar/protocol/NavigilProtocolDecoder.java
index 711a51047..2b75e7840 100644
--- a/src/org/traccar/protocol/NavigilProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavigilProtocolDecoder.java
@@ -15,14 +15,12 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.ByteOrder;
import java.util.Date;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.Crc;
import org.traccar.helper.UnitsConverter;
@@ -264,7 +262,8 @@ public class NavigilProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/NavisProtocolDecoder.java b/src/org/traccar/protocol/NavisProtocolDecoder.java
index 94dcec1a4..02d408575 100644
--- a/src/org/traccar/protocol/NavisProtocolDecoder.java
+++ b/src/org/traccar/protocol/NavisProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -282,7 +283,7 @@ public class NavisProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/NoranProtocolDecoder.java b/src/org/traccar/protocol/NoranProtocolDecoder.java
index f7eb26e97..66116be0a 100644
--- a/src/org/traccar/protocol/NoranProtocolDecoder.java
+++ b/src/org/traccar/protocol/NoranProtocolDecoder.java
@@ -22,12 +22,9 @@ import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.TimeZone;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -50,7 +47,7 @@ public class NoranProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/OrionProtocolDecoder.java b/src/org/traccar/protocol/OrionProtocolDecoder.java
index e43ced8a5..daf52750b 100644
--- a/src/org/traccar/protocol/OrionProtocolDecoder.java
+++ b/src/org/traccar/protocol/OrionProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -56,7 +57,7 @@ public class OrionProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/OsmAndProtocolDecoder.java b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
index 91f15e098..f89406a00 100644
--- a/src/org/traccar/protocol/OsmAndProtocolDecoder.java
+++ b/src/org/traccar/protocol/OsmAndProtocolDecoder.java
@@ -15,23 +15,21 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.charset.Charset;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;
-
import org.jboss.netty.channel.Channel;
import org.jboss.netty.channel.ChannelFutureListener;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.jboss.netty.handler.codec.http.DefaultHttpResponse;
import org.jboss.netty.handler.codec.http.HttpRequest;
import org.jboss.netty.handler.codec.http.HttpResponse;
import org.jboss.netty.handler.codec.http.HttpResponseStatus;
import org.jboss.netty.handler.codec.http.HttpVersion;
import org.jboss.netty.handler.codec.http.QueryStringDecoder;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -44,7 +42,7 @@ public class OsmAndProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
HttpRequest request = (HttpRequest) msg;
diff --git a/src/org/traccar/protocol/PiligrimProtocolDecoder.java b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
index f3c9056af..7f6d9463e 100644
--- a/src/org/traccar/protocol/PiligrimProtocolDecoder.java
+++ b/src/org/traccar/protocol/PiligrimProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -59,7 +60,7 @@ public class PiligrimProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
HttpRequest request = (HttpRequest) msg;
diff --git a/src/org/traccar/protocol/ProgressProtocolDecoder.java b/src/org/traccar/protocol/ProgressProtocolDecoder.java
index 4c3e58ddc..bb29532bf 100644
--- a/src/org/traccar/protocol/ProgressProtocolDecoder.java
+++ b/src/org/traccar/protocol/ProgressProtocolDecoder.java
@@ -17,7 +17,8 @@ package org.traccar.protocol;
import java.nio.ByteOrder;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -66,7 +67,7 @@ public class ProgressProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg) throws Exception {
+ protected Object decode(Channel channel, SocketAddress remoteAddress, Object msg) throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
int type = buf.readUnsignedShort();
diff --git a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
index ebfded3d5..e226a8fb2 100644
--- a/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt3000ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -48,7 +49,7 @@ public class Pt3000ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
index 145d3d42d..310c345b0 100644
--- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
@@ -16,7 +16,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -58,7 +59,7 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/RitiProtocolDecoder.java b/src/org/traccar/protocol/RitiProtocolDecoder.java
index b684ad2e7..98003bbcf 100644
--- a/src/org/traccar/protocol/RitiProtocolDecoder.java
+++ b/src/org/traccar/protocol/RitiProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class RitiProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/RuptelaProtocolDecoder.java b/src/org/traccar/protocol/RuptelaProtocolDecoder.java
index 7938026e8..b81b5b248 100644
--- a/src/org/traccar/protocol/RuptelaProtocolDecoder.java
+++ b/src/org/traccar/protocol/RuptelaProtocolDecoder.java
@@ -15,15 +15,13 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.util.Date;
import java.util.LinkedList;
import java.util.List;
-
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -38,7 +36,8 @@ public class RuptelaProtocolDecoder extends BaseProtocolDecoder {
private static final int COMMAND_RECORDS = 0x01;
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/SanavProtocolDecoder.java b/src/org/traccar/protocol/SanavProtocolDecoder.java
index d8c3bd65b..729ed9793 100644
--- a/src/org/traccar/protocol/SanavProtocolDecoder.java
+++ b/src/org/traccar/protocol/SanavProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -49,7 +50,7 @@ public class SanavProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
index a23ebc1e6..55efc48c6 100644
--- a/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
+++ b/src/org/traccar/protocol/SkypatrolProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
@@ -48,7 +49,7 @@ public class SkypatrolProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Stl060ProtocolDecoder.java b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
index d9c21b441..c082ed479 100644
--- a/src/org/traccar/protocol/Stl060ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Stl060ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -69,7 +70,7 @@ public class Stl060ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/SuntechProtocolDecoder.java b/src/org/traccar/protocol/SuntechProtocolDecoder.java
index f7b109cb0..aade44e4f 100644
--- a/src/org/traccar/protocol/SuntechProtocolDecoder.java
+++ b/src/org/traccar/protocol/SuntechProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class SuntechProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/T55ProtocolDecoder.java b/src/org/traccar/protocol/T55ProtocolDecoder.java
index ce9f98f2d..63444ccd4 100644
--- a/src/org/traccar/protocol/T55ProtocolDecoder.java
+++ b/src/org/traccar/protocol/T55ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -81,7 +82,7 @@ public class T55ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TaipProtocolDecoder.java b/src/org/traccar/protocol/TaipProtocolDecoder.java
index 518efac0d..b21eb5f5a 100644
--- a/src/org/traccar/protocol/TaipProtocolDecoder.java
+++ b/src/org/traccar/protocol/TaipProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;
import java.util.regex.Matcher;
@@ -89,7 +90,7 @@ public class TaipProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TelikProtocolDecoder.java b/src/org/traccar/protocol/TelikProtocolDecoder.java
index ece134c83..9a7a1652a 100644
--- a/src/org/traccar/protocol/TelikProtocolDecoder.java
+++ b/src/org/traccar/protocol/TelikProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -51,7 +52,7 @@ public class TelikProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
index 37168ce22..eff04f7cf 100644
--- a/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
+++ b/src/org/traccar/protocol/TeltonikaProtocolDecoder.java
@@ -15,6 +15,7 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
import java.nio.charset.Charset;
import java.util.Date;
import java.util.LinkedList;
@@ -22,7 +23,6 @@ import java.util.List;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.BitUtil;
import org.traccar.helper.UnitsConverter;
@@ -197,7 +197,8 @@ public class TeltonikaProtocolDecoder extends BaseProtocolDecoder {
}
@Override
- protected Object decode(ChannelHandlerContext ctx, Channel channel, Object msg)
+ protected Object decode(
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/Tk102ProtocolDecoder.java b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
index 2a752f16f..a278d65df 100644
--- a/src/org/traccar/protocol/Tk102ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk102ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -46,7 +47,7 @@ public class Tk102ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tk103ProtocolDecoder.java b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
index fb83c59d8..1b34f3f81 100644
--- a/src/org/traccar/protocol/Tk103ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tk103ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class Tk103ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
index fed224937..b242a2232 100644
--- a/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tlt2hProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -58,7 +59,7 @@ public class Tlt2hProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TopflytechProtocolDecoder.java b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
index c2aafdea3..4a3eb533e 100644
--- a/src/org/traccar/protocol/TopflytechProtocolDecoder.java
+++ b/src/org/traccar/protocol/TopflytechProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -48,7 +49,7 @@ public class TopflytechProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TotemProtocolDecoder.java b/src/org/traccar/protocol/TotemProtocolDecoder.java
index b348089ff..ef4c6e5eb 100644
--- a/src/org/traccar/protocol/TotemProtocolDecoder.java
+++ b/src/org/traccar/protocol/TotemProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -128,7 +129,7 @@ public class TotemProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tr20ProtocolDecoder.java b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
index c278fef73..3a05fadd8 100644
--- a/src/org/traccar/protocol/Tr20ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr20ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -52,7 +53,7 @@ public class Tr20ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Tr900ProtocolDecoder.java b/src/org/traccar/protocol/Tr900ProtocolDecoder.java
index ff99a8e8a..0af0a8e24 100644
--- a/src/org/traccar/protocol/Tr900ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Tr900ProtocolDecoder.java
@@ -21,7 +21,6 @@ import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.model.Event;
import org.traccar.model.Position;
@@ -56,7 +55,7 @@ public class Tr900ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TrackboxProtocolDecoder.java b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
index 800fa16bd..51743c2ba 100644
--- a/src/org/traccar/protocol/TrackboxProtocolDecoder.java
+++ b/src/org/traccar/protocol/TrackboxProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class TrackboxProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/TramigoProtocolDecoder.java b/src/org/traccar/protocol/TramigoProtocolDecoder.java
index 7694d1dcb..3035c8f29 100644
--- a/src/org/traccar/protocol/TramigoProtocolDecoder.java
+++ b/src/org/traccar/protocol/TramigoProtocolDecoder.java
@@ -27,7 +27,8 @@ import org.traccar.model.Position;
import java.nio.charset.Charset;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
import java.util.regex.Matcher;
@@ -44,7 +45,7 @@ public class TramigoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/TytanProtocolDecoder.java b/src/org/traccar/protocol/TytanProtocolDecoder.java
index 5296d23a0..432fa213e 100644
--- a/src/org/traccar/protocol/TytanProtocolDecoder.java
+++ b/src/org/traccar/protocol/TytanProtocolDecoder.java
@@ -17,12 +17,14 @@ package org.traccar.protocol;
import java.net.SocketAddress;
import java.nio.charset.Charset;
-import java.util.*;
-
+import java.util.Date;
+import java.util.LinkedHashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Set;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.buffer.ChannelBuffers;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.UnitsConverter;
@@ -37,7 +39,7 @@ public class TytanProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/UlbotechProtocolDecoder.java b/src/org/traccar/protocol/UlbotechProtocolDecoder.java
index e6ccfe2c5..1de3b50b9 100644
--- a/src/org/traccar/protocol/UlbotechProtocolDecoder.java
+++ b/src/org/traccar/protocol/UlbotechProtocolDecoder.java
@@ -15,17 +15,16 @@
*/
package org.traccar.protocol;
+import java.net.SocketAddress;
+import java.util.Date;
import org.jboss.netty.buffer.ChannelBuffer;
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.ChannelBufferTools;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
import org.traccar.model.Position;
-import java.util.Date;
-
public class UlbotechProtocolDecoder extends BaseProtocolDecoder {
public UlbotechProtocolDecoder(UlbotechProtocol protocol) {
@@ -46,7 +45,7 @@ public class UlbotechProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/V680ProtocolDecoder.java b/src/org/traccar/protocol/V680ProtocolDecoder.java
index 7fbbe400b..6b8557a5a 100644
--- a/src/org/traccar/protocol/V680ProtocolDecoder.java
+++ b/src/org/traccar/protocol/V680ProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -54,7 +55,7 @@ public class V680ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/VisiontekProtocolDecoder.java b/src/org/traccar/protocol/VisiontekProtocolDecoder.java
index abb94ea3a..49be11d6d 100644
--- a/src/org/traccar/protocol/VisiontekProtocolDecoder.java
+++ b/src/org/traccar/protocol/VisiontekProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -57,7 +58,7 @@ public class VisiontekProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/WialonProtocolDecoder.java b/src/org/traccar/protocol/WialonProtocolDecoder.java
index d85a64d31..5cf6cdab5 100644
--- a/src/org/traccar/protocol/WialonProtocolDecoder.java
+++ b/src/org/traccar/protocol/WialonProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.LinkedList;
import java.util.List;
import java.util.TimeZone;
@@ -166,7 +167,7 @@ public class WialonProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/WondexProtocolDecoder.java b/src/org/traccar/protocol/WondexProtocolDecoder.java
index 25d58d17b..5771df043 100644
--- a/src/org/traccar/protocol/WondexProtocolDecoder.java
+++ b/src/org/traccar/protocol/WondexProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -55,7 +56,7 @@ public class WondexProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/XexunProtocolDecoder.java b/src/org/traccar/protocol/XexunProtocolDecoder.java
index 2f5628a9d..1bd155a56 100644
--- a/src/org/traccar/protocol/XexunProtocolDecoder.java
+++ b/src/org/traccar/protocol/XexunProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -66,7 +67,7 @@ public class XexunProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/XirgoProtocolDecoder.java b/src/org/traccar/protocol/XirgoProtocolDecoder.java
index a08986f71..81a3ac4c5 100644
--- a/src/org/traccar/protocol/XirgoProtocolDecoder.java
+++ b/src/org/traccar/protocol/XirgoProtocolDecoder.java
@@ -20,10 +20,7 @@ import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-
import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-
import org.traccar.BaseProtocolDecoder;
import org.traccar.helper.UnitsConverter;
import org.traccar.model.Event;
@@ -56,7 +53,7 @@ public class XirgoProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, SocketAddress remoteAddress, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/src/org/traccar/protocol/Xt013ProtocolDecoder.java b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
index c64869aa1..11ae14d22 100644
--- a/src/org/traccar/protocol/Xt013ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xt013ProtocolDecoder.java
@@ -23,7 +23,8 @@ import org.traccar.model.Event;
import org.traccar.model.Position;
import java.text.ParseException;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -59,7 +60,7 @@ public class Xt013ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
// Parse message
diff --git a/src/org/traccar/protocol/Xt7ProtocolDecoder.java b/src/org/traccar/protocol/Xt7ProtocolDecoder.java
index d6f82e453..1e7ab0aac 100644
--- a/src/org/traccar/protocol/Xt7ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Xt7ProtocolDecoder.java
@@ -16,7 +16,8 @@
package org.traccar.protocol;
import java.nio.charset.Charset;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -58,7 +59,7 @@ public class Xt7ProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
ChannelBuffer buf = (ChannelBuffer) msg;
diff --git a/src/org/traccar/protocol/YwtProtocolDecoder.java b/src/org/traccar/protocol/YwtProtocolDecoder.java
index c0b814349..67ea13817 100644
--- a/src/org/traccar/protocol/YwtProtocolDecoder.java
+++ b/src/org/traccar/protocol/YwtProtocolDecoder.java
@@ -15,7 +15,8 @@
*/
package org.traccar.protocol;
-import java.util.Calendar;
+import java.net.SocketAddress;
+import java.util.Calendar;
import java.util.TimeZone;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
@@ -53,7 +54,7 @@ public class YwtProtocolDecoder extends BaseProtocolDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, Object msg)
+ Channel channel, SocketAddress remoteAddress, Object msg)
throws Exception {
String sentence = (String) msg;
diff --git a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
index f455fa25a..d404213f5 100644
--- a/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/AtrackProtocolDecoderTest.java
@@ -1,11 +1,10 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
import org.jboss.netty.buffer.ChannelBuffers;
-import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
+import static org.traccar.helper.DecoderVerifier.verify;
public class AtrackProtocolDecoderTest extends ProtocolDecoderTest {
@@ -14,23 +13,23 @@ public class AtrackProtocolDecoderTest extends ProtocolDecoderTest {
AtrackProtocolDecoder decoder = new AtrackProtocolDecoder(new AtrackProtocol());
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"fe0200014104d8f196820001"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"4050993f005c000200014104d8f19682525666c252568c3c52568c63ffc8338402698885000002000009cf03de0100000000000007d007d000525666c252568c5a52568c63ffc8338402698885000002000009cf03de0100000000000007d007d000"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"40501e58003301e000014104d8f19682525ecd5d525ee344525ee35effc88815026ab4d70000020000104403de01000b0000000007d007d000"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"40501e58003301e000014104d8f19682525ecd5d525ee344525ee35effc88815026ab4d70000020000104403de01000b0000000007d007d000000000000000"))));
// 7-byte date
- //verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
// "0203b494003c00eb00014104d8dd3a3e07de011b0b1f0307de011b0b1f0307de011b0b1f0300307f28030574d30000020000000600160100020000000007d007d000"))));
- //verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ //verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
// "4050d2c500da055200014104d8f19682530755515307555053075581ffbba66a0231295c001902000000da000a0100830000000007d007d000000000001200080e090085530755605307555f53075582ffbbb04102313b4b001802000000e0000c0100850000000007d007d000000000001200080d0000865307556f5307556e53075582ffbbbbea02314b49002402000000e5000a01007b0000000007d007d000000000001200080d0200855307557e5307557d53075582ffbbc98702315982002502000000ea000901007a0000000007d007d000000000001300180d08007b"))));
}
diff --git a/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java b/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java
index 95c0d5472..42ebda072 100644
--- a/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CalAmpProtocolDecoderTest.java
@@ -1,11 +1,9 @@
package org.traccar.protocol;
import org.jboss.netty.buffer.ChannelBuffers;
+import static org.junit.Assert.assertNull;
import org.junit.Test;
import org.traccar.helper.ChannelBufferTools;
-import org.traccar.helper.TestIdentityManager;
-
-import static org.junit.Assert.assertNull;
import static org.traccar.helper.DecoderVerifier.verify;
public class CalAmpProtocolDecoderTest extends ProtocolDecoderTest {
@@ -16,19 +14,19 @@ public class CalAmpProtocolDecoderTest extends ProtocolDecoderTest {
CalAmpProtocolDecoder decoder = new CalAmpProtocolDecoder(new CalAmpProtocol());
assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "830545321041830101010300010000333862000023c301000000004532104183ffffff353816051610691f420040163953294fffffffffffffffff8996604211639032949f4f54413a317c303b302c317c343b302c34004f5441535441543a302c302c302c302c302c222200564255533a342c322e302e302c343533323130343138332c5630312e30332e30312e34302c5630312e30332e30312e33312c2c0056494e2d494e464f3a56494e3d31464d5a5537324539355a4137303032362c4445562d5245474e3d55532c535256522d5245474e3d555300")), null));
+ "830545321041830101010300010000333862000023c301000000004532104183ffffff353816051610691f420040163953294fffffffffffffffff8996604211639032949f4f54413a317c303b302c317c343b302c34004f5441535441543a302c302c302c302c302c222200564255533a342c322e302e302c343533323130343138332c5630312e30332e30312e34302c5630312e30332e30312e33312c2c0056494e2d494e464f3a56494e3d31464d5a5537324539355a4137303032362c4445562d5245474e3d55532c535256522d5245474e3d555300"))));
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "8308353301059723580f01020102088952d994c352d994c4134fa767c4c482e20000c12700000d29006e1002019affc90f061d00060c0000")), null));
+ "8308353301059723580f01020102088952d994c352d994c4134fa767c4c482e20000c12700000d29006e1002019affc90f061d00060c0000"))));
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "8308355233050116134f01020102445652d993e152d993e1124c728cc68f0647000023c00000000000000e02019affc90f071c0015020000")), null));
+ "8308355233050116134f01020102445652d993e152d993e1124c728cc68f0647000023c00000000000000e02019affc90f071c0015020000"))));
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "830545420185450101010200075517fb335516c5c40fb1aea4cf4cbf250000000000000000008900260015ffb10f001108110a0000")), null));
+ "830545420185450101010200075517fb335516c5c40fb1aea4cf4cbf250000000000000000008900260015ffb10f001108110a0000"))));
verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
- "830543321494750101010A00085492798A0EC4F9E71BDA3B81005600040F1F33050000030000000076000000000000000000000000")), null));
+ "830543321494750101010A00085492798A0EC4F9E71BDA3B81005600040F1F33050000030000000076000000000000000000000000"))));
}
diff --git a/test/org/traccar/protocol/CastelProtocolDecoderTest.java b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
index a28078ef4..38e76d4b7 100644
--- a/test/org/traccar/protocol/CastelProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/CastelProtocolDecoderTest.java
@@ -14,34 +14,34 @@ public class CastelProtocolDecoderTest extends ProtocolDecoderTest {
CastelProtocolDecoder decoder = new CastelProtocolDecoder(new CastelProtocol());
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"4040450004323132474c31313433303035303033000000000040082ca89b55a6a99b555c57000000000000c40200000b0000001400036401111f000302f5533bd653f10d0a"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40404d0004323132474c3131343330303530303300000000004007120000002ca89b55cba99b555c57000000000000c40200000b0000000000036401111f000102000101170000000068850d0a"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"4040420004323132474c31313433303035303033000000000010022ca89b55cca99b555c57000000000000cf0200000b0000000000036401111f0000020013be0d0a"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"4040870004323132474c31313433303035303033000000000040052ca89b55e3a89b555c57000000000000c4020000040000001400036401111f0003000012042105210b210c210d210f211021112113211c2121212321242133213421422146214f212b50663603003ce9030dff060000600dffffc25865ffff9e02b43624000000003cbc0d0a"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"4040d00004323132474c31313433303035303033000000000010013ec09b5596c29b555c57000000000000de0200000f0000000000036401111f000000004944445f3231334730325f532056322e322e36004944445f3231334730325f482056322e322e360032000110021003100410051006100710081009100a100b100c100d100e1011100111021103110411051106110711011202120312041201130213031301160216011701180218011b011c011d011e011f021f031f041f051f061f071f012102210126012701288a690d0a"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40404d0004323132474c3131343330303530303300000000004007050000003ec09b5564c29b555c57000000000000de0200000f0000002000036401111f0000020001010e00000000237e0d0a"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40401F00043130303131313235323939383700000000000000100303320D0A"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40407F000431303031313132353239393837000000000000001001C1F06952FDF069529C91110000000000698300000C0000000000036401014C00030001190A0D04121A1480D60488C5721800000000AF4944445F3231364730325F532056312E322E31004944445F3231364730325F482056312E322E31000000DF640D0A"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40405900043130303131313235323939383700000000000000400101C1F06952E7F069529C9111000000000069830000070000000400036401014C00030001190A0D0412041480D60488C57218000000009F01E803ED9A0D0A"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"40405900043335343034333035303834343134330000000000400100f61a7355c11b7355710000000b00000000000000000000000400000000240e0200020106060f100b2d5a78a7076ec0fb1d00008c065f010000ac220d0a"))));
}
diff --git a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
index 638e9e9dc..6eeb9c13b 100644
--- a/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gl200ProtocolDecoderTest.java
@@ -1,8 +1,8 @@
package org.traccar.protocol;
-import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
+import static org.traccar.helper.DecoderVerifier.verify;
public class Gl200ProtocolDecoderTest extends ProtocolDecoderTest {
@@ -11,121 +11,121 @@ public class Gl200ProtocolDecoderTest extends ProtocolDecoderTest {
Gl200ProtocolDecoder decoder = new Gl200ProtocolDecoder(new Gl200Protocol());
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTSTT,1A0401,860599000508846,,41,0,0.0,84,107.5,-76.657998,39.497203,20150623160622,0310,0260,B435,3B81,,20150623160622,0F54$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,1A0401,860599000508846,,0,0,1,1,134.8,154,278.7,-76.671089,39.778885,20150623154301,0310,0260,043F,7761,,99,20150623154314,0F24$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,1A0200,860599000165464,CRI001,0,0,1,2,,41,,-71.153137,42.301634,20150328020301,,,,,280.3,55,20150327220351,320C"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,02010D,867844001675407,,0,0,1,2,0.0,0,28.9,8.591011,56.476397,20140915213209,0238,0001,03CB,2871,,97,20140915213459,009A"));
- assertNull(decoder.decode(null, null, null,
+ assertNull(decoder.decode(null, null,
"+RESP:GTINF,359464030073766,8938003990320469804f,18,99,100,1,0,+2.00,0,20131018084015,00EE,0103090402"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,04040C,359231038939904,,,10,1,2,0.0,117,346.0,8.924243,50.798077,20130618122040,0262,0002,0299,109C,00,0.0,,,,,,,,,20130618122045,00F6"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTSTT,04040C,359231038939904,,42,0,0.0,117,346.0,8.924243,50.798077,20130618125152,0262,0002,0299,109C,00,20130618125154,017A"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,020102,000035988863964,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,,20090214093254,11F0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,020102,135790246811220,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,,20090214093254,11F0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,020102,135790246811220,,0,0,2,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,0,4.3,92,70.0,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,,20090214093254,11F0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTDOG,020102,135790246811220,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTLBC,020102,135790246811220,,+8613800000000,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,,20090214093254,11F0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTGCR,020102,135790246811220,,3,50,180,2,0.4,296,-5.4,121.391055,31.164473,20100714104934,0460,0000,1878,0873,00,,20100714104934,000C"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,07000D,868487001005941,,0,0,1,1,0.0,0,46.3,-77.039627,38.907573,20120731175232,0310,0260,B44B,EBC9,0015e96913a7,-58,,100,20120731175244,0114"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTTOW,0F0100,135790246811220,,,10,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTDIS,0F0100,135790246811220,,,20,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTIOB,0F0100,135790246811220,,,10,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTGEO,0F0100,135790246811220,,,00,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTSPD,0F0100,135790246811220,,,00,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTSOS,0F0100,135790246811220,,,00,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTRTL,0F0100,135790246811220,,,00,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTDOG,0F0100,135790246811220,,,01,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTIGL,0F0100,135790246811220,,,00,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTHBM,0F0100,135790246811220,,,10,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTHBM,0F0100,135790246811220,,,11,1,1,24.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,02010C,867844001274144,,0,0,1,1,18.0,233,118.1,7.615551,51.515600,20140106130516,0262,0007,79E6,B956,,72,20140106140524,09CE$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,02010C,867844001274649,,0,0,1,1,0.0,0,122.5,7.684216,51.524512,20140106233722,0262,0007,79EE,1D22,,93,20140107003805,03C4$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+BUFF:GTFRI,210101,863286020016706,,,10,1,1,,,,49.903915,40.391669,20140818105815,,,,,,,,,,,210100,,,,,000C$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,240100,135790246811220,,,10,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,2000.0,12345:12:34,,80,,,,,,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTFRI,240100,135790246811220,,,10,2,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,00,0,4.3,92,70.0,121.354335,31.222073,20090101000000,0460,0000,18d8,6141,00,2000.0,12345:12:34,,,80,,,,,,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"\u0000\u0004,005F,0,GTFRI,020100,135790246811220,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,90,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"\u0000\u0004,005F,0,GTGEO,020100,135790246811220,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,90,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"\u0000\u0004,005F,0,GTNMR,020100,135790246811220,,0,0,1,1,4.3,92,70.0,121.354335,31.222073,20090214013254,0460,0000,18d8,6141,90,20090214093254,11F0$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"\u0000\u0004,0017,0,GTNMR,,867844000400914,,0,41,1,2,0.0,0,1504.2,-75.569202,6.242850,20150404162835,,,,,97,20150404162836,05EF$"));
- assertNull(decoder.decode(null, null, null,
+ assertNull(decoder.decode(null, null,
"\u0000\u0004,0017,0,GTPNA,,867844000400914,,0,0,1,0,,,,0,0,,,,,,99,20150404190153,0601$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"\u0000\u0004,0017,0,GTEPN,,867844000400914,,0,0,1,0,0.0,0,1717.4,-75.598445,6.278578,20150405003116,,,,,95,20150405003358,0607$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTSTT,280100,A1000043D20139,,42,0,0.1,321,228.6,-76.660884,39.832552,20150615120628,0310,0484,00600019,0A52,,20150615085741,0320$"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"+RESP:GTRTL,280100,A1000043D20139,,0,0,1,1,0.1,321,239.1,-76.661047,39.832501,20150615114455,0310,0484,00600019,0A52,,87,20150615074456,031E$"));
- assertNull(decoder.decode(null, null, null,
+ assertNull(decoder.decode(null, null,
"+ACK:GTHBD,1A0401,135790246811220,,20100214093254,11F0"));
}
diff --git a/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java b/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
index 7c63c0b56..c1a204b3c 100644
--- a/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/GoSafeProtocolDecoderTest.java
@@ -1,9 +1,8 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
-import static org.traccar.helper.DecoderVerifier.verify;
import static org.junit.Assert.assertNull;
import org.junit.Test;
+import static org.traccar.helper.DecoderVerifier.verify;
public class GoSafeProtocolDecoderTest extends ProtocolDecoderTest {
@@ -12,10 +11,10 @@ public class GoSafeProtocolDecoderTest extends ProtocolDecoderTest {
GoSafeProtocolDecoder decoder = new GoSafeProtocolDecoder(new GoSafeProtocol());
- assertNull(decoder.decode(null, null, null,
+ assertNull(decoder.decode(null, null,
"*GS16,351535058709775"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"*GS16,351535058709775,100356130215,,SYS:G79W;V1.06;V1.0.2,GPS:A;6;N24.802700;E46.616828;0;0;684;1.35,COT:60,ADC:4.31;0.10,DTT:20000;;0;0;0;1"));
}
diff --git a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
index 9a10d9932..96078b509 100644
--- a/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Gps103ProtocolDecoderTest.java
@@ -12,116 +12,116 @@ public class Gps103ProtocolDecoderTest extends ProtocolDecoderTest {
Gps103ProtocolDecoder decoder = new Gps103ProtocolDecoder(new Gps103Protocol());
// Log on request
- assertNull(decoder.decode(null, null, null, "##,imei:359586015829802,A"));
+ assertNull(decoder.decode(null, null, "##,imei:359586015829802,A"));
// Heartbeat package
- assertNull(decoder.decode(null, null, null, "359586015829802"));
+ assertNull(decoder.decode(null, null, "359586015829802"));
// No GPS signal
- assertNull(decoder.decode(null, null, null, "imei:359586015829802,tracker,000000000,13554900601,L,;"));
+ assertNull(decoder.decode(null, null, "imei:359586015829802,tracker,000000000,13554900601,L,;"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:869039001186913,tracker,1308282156,0,F,215630.000,A,5602.11015,N,9246.30767,E,1.4,,175.9,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359710040656622,tracker,13/02/27 23:40,,F,125952.000,A,3450.9430,S,13828.6753,E,0.00,0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359710040565419,tracker,13/05/25 14:23,,F,062209.000,A,0626.0411,N,10149.3904,E,0.00,0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353451047570260,tracker,1302110948,,F,144807.000,A,0805.6615,S,07859.9763,W,0.00,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359587016817564,tracker,1301251602,,F,080251.000,A,3223.5832,N,11058.9449,W,0.03,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359587016817564,tracker,1301251602,,F,080251.000,A,3223.5832,N,11058.9449,W,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:012497000208821,tracker,1301080525,,F,212511.000,A,2228.5279,S,06855.6328,W,18.62,268.98,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:012497000208821,tracker,1301072224,,F,142411.077,A,2227.0739,S,06855.2912,,0,0,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:012497000431811,tracker,1210260609,,F,220925.000,A,0845.5500,N,07024.7673,W,0.00,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:100000000000000,help me,1004171910,,F,010203.000,A,0102.0003,N,00102.0003,E,1.02,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353451040164707,tracker,1105182344,+36304665439,F,214418.000,A,4804.2222,N,01916.7593,E,0.37,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353451042861763,tracker,1106132241,,F,144114.000,A,2301.9052,S,04909.3676,W,0.13,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359587010124900,tracker,0809231929,13554900601,F,112909.397,A,2234.4669,N,11354.3287,E,0.11,321.53,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353451049926460,tracker,1208042043,123456 99008026,F,124336.000,A,3509.8668,N,03322.7636,E,0.00,,"));
// SOS alarm
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359586015829802,help me,0809231429,13554900601,F,062947.294,A,2234.4026,N,11354.3277,E,0.00,"));
// Low battery alarm
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359586015829802,low battery,0809231429,13554900601,F,062947.294,A,2234.4026,N,11354.3277,E,0.00,"));
// Geo-fence alarm
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359586015829802,stockade,0809231429,13554900601,F,062947.294,A,2234.4026,N,11354.3277,E,0.00,"));
// Move alarm
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359586015829802,move,0809231429,13554900601,F,062947.294,A,2234.4026,N,11354.3277,E,0.00,"));
// Over speed alarm
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359586015829802,speed,0809231429,13554900601,F,062947.294,A,2234.4026,N,11354.3277,E,0.00,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:863070010423167,tracker,1211051840,,F,104000.000,A,2220.6483,N,11407.6377,,0,0,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:863070010423167,tracker,1211051951,63360926,F,115123.000,A,2220.6322,N,11407.5313,E,0.00,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:863070010423167,tracker,1211060621,,F,062152.000,A,2220.6914,N,11407.5506,E,15.85,347.84,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:863070012698733,tracker,1303092334,,F,193427.000,A,5139.0369,N,03907.2791,E,0.00,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:869039001186913,tracker,130925065533,0,F,065533.000,A,5604.11015,N,9232.12238,E,0.0,,329.0,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359710041641581,acc alarm,1402231159,,F,065907.000,A,2456.2591,N,06708.8335,E,7.53,76.10,,1,0,0.03%,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359710041641581,acc alarm,1402231159,,F,065907.000,A,2456.2591,N,06708.8335,E,7.53,76.10,,1,0,0.03%,,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:313009071131684,tracker,1403211928,,F,112817.000,A,0610.1133,N,00116.5840,E,0.00,,,0,0,0.0,0.0,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:866989771979791,tracker,140527055653,,F,215653.00,A,5050.33113,N,00336.98783,E,0.066,0"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353552045375005,tracker,150401165832,61.0,F,31.0,A,1050.73696,N,10636.49489,E,8.0,,22.0,"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353552045403597,tracker,150420050648,53.0,F,0.0,A,N,5306.64155,E,00700.77848,0.0,,1.0,;"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:353552045403597,tracker,150420051153,53.0,F,0.0,A,5306.64155,N,00700.77848,E,0.0,,1.0,;"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:359710047424644,tracker,150506224036,,F,154037.000,A,0335.2785,N,09841.1543,E,3.03,337.54,,0,0,45.16%,,;"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"imei:865328023776874,acc off,150619152221,,F,072218.000,A,5439.8489,N,02518.5945,E,0.00,,,1,1,0.0,0.0,23.0,;"));
}
diff --git a/test/org/traccar/protocol/NoranProtocolDecoderTest.java b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
index 8b1e5d2b2..4a767398d 100644
--- a/test/org/traccar/protocol/NoranProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/NoranProtocolDecoderTest.java
@@ -14,22 +14,22 @@ public class NoranProtocolDecoderTest extends ProtocolDecoderTest {
NoranProtocolDecoder decoder = new NoranProtocolDecoder(new NoranProtocol());
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"3400080001090000000000001D43A29BE842E62520424E523039423036363932000031322D30332D30352031313A34373A343300"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"34000800010c000000000080a3438e20944149bd07c24e523039423139323832000031352d30342d32362030383a34333a353300"))));
- assertNull(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ assertNull(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"0f0000004e52303946303431353500"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"22000800010c008a007e9daa42317bdd41a7f3e2384e523039463034313535000000"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"34000800010c0000000000001c4291251143388d17c24e523039423131303930000031342d31322d32352030303a33333a303700"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ByteOrder.LITTLE_ENDIAN, ChannelBufferTools.convertHexString(
"34000800010c00000000000000006520944141bd07c24e523039423139323832000031352d30342d32352030303a30333a323200"))));
}
diff --git a/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java b/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java
index 57044a778..784d5b74e 100644
--- a/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/Tr900ProtocolDecoderTest.java
@@ -10,13 +10,13 @@ public class Tr900ProtocolDecoderTest extends ProtocolDecoderTest {
Tr900ProtocolDecoder decoder = new Tr900ProtocolDecoder(new Tr900Protocol());
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
">00001001,4,1,150626,131252,W05830.2978,S3137.2783,,00,348,18,00,003-000,0,3,11111011*3b!"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
">12345678,1,1,070201,144111,W05829.2613,S3435.2313,,00,034,25,00,126-000,0,3,11111111*2d!"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
">00001001,4,1,150626,131252,W05830.2978,S3137.2783,,00,348,18,00,003-000,0,3,11111011*3b!\r\n"));
}
diff --git a/test/org/traccar/protocol/TytanProtocolDecoderTest.java b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
index b99f2a6eb..8a2f3c80b 100644
--- a/test/org/traccar/protocol/TytanProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/TytanProtocolDecoderTest.java
@@ -12,37 +12,37 @@ public class TytanProtocolDecoderTest extends ProtocolDecoderTest {
TytanProtocolDecoder decoder = new TytanProtocolDecoder(new TytanProtocol());
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"d5300000689d65556877fbd437a09d8ea89360005a23124e410201213704000907000009ffffffffffffffff0affffffffffffffff18ff63ff7f7fff65ff66ff67ff68ff69ff6b00ff6cffffffff6dff7fffffffff81ffffffff82ffff83ffffffffffffffff88ffff9600"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"d7700000689d205544713bd3378f2c8e9fe181005affdf9041020000000602a1b7563b0700002055447159d3378f2d8e9fe281005affdf9041020000000602a1b7563b0700002055447177d3378f2e8e9fe181005a861a9141020000000602a1b7563b0700002055447195f3378f2d8e9fe281005a1ce78d41020000000602a1b7563b07000020554471b3d3378f2b8e9fe281005a58d88b41020000000602a1b7563b07000020554471d1f3378f2b8e9fe281005a58d88b41020000000602a1b7563b07000020554471efd3378f2a8e9fe381005a94ac8d41020000000602a1b7563b070000205544720df3378f2c8e9fe281005a1ce78d41020000000602a1b7563b070000205544722bd3378f2d8e9fe281005a48638b41020000000602a1b7563b0700002055447249f3378f308e9fe181005adf128c41020000000602a1b7563b070000"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D5F0FF00001032552F9121D5325FCB8D11AFA0000205396504004C0602FB5B434118001765006603676B68006B80426C02E2C8206D2F9600"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D56000000AF20E4FA7C77AFF3282C68D2F890800"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D56000000AF20e552e248007375bee8c02b3c002"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D5C0FF00013D21552F9148D3325E8F8D11A80800060228816541061245FF674107C0001810130D21552F9148D3325E8F8D11A8080006022881654106121C46694107C0001810130D21552F9182D3325E8F8D11A8080006022881654106121C46694107C0001810140C"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D56000000AF221552e31f4d3325e908d11a7c8000602d60e68410612cd74694107c00018100f0b"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D56000000AF232552e0322d332603f8d1199a1100204bda204004c06024dea454118000e6515661b677068626b80486c02e2ae586d319600"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D56000000AF20e552e259707375bee8c02b3c002"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"D56000000AF20e552e259707375bee8c02b3c002"))));
- verify(decoder.decode(null, null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
+ verify(decoder.decode(null, null, ChannelBuffers.wrappedBuffer(ChannelBufferTools.convertHexString(
"d7680000689d2055447267d3378f308e9fe181005ad1808f41020000000602a1b7563b0700002055447285f3378f308e9fe281005aee878c41020000000602a1b7563b07000020554472a3f3378f2e8e9fe381005ab3968e41020000000602a1b7563b07000020554472c1f3378f308e9fe281005ab3968e41020000000602a1b7563b07000020554472dff3378f2e8e9fe481005adf128c41020000000602a1b7563b07000020554472fdd3378f2e8e9fe481005a84548941020000000602a1b7563b070000205544731bd3378f2e8e9fe481005a49468f41020000000602a1b7563b0700002055447339f3378f2e8e9fe481005a3ad18e41020000000602a1b7563b0700002055447358f3378f308e9fe381005ab3968e41020000000602b909a13b0700002055447376f3378f308e9fe481005ac20b8f41020000000602b909a13b070000"))));
}
diff --git a/test/org/traccar/protocol/XirgoProtocolDecoderTest.java b/test/org/traccar/protocol/XirgoProtocolDecoderTest.java
index 9ba066753..29648d024 100644
--- a/test/org/traccar/protocol/XirgoProtocolDecoderTest.java
+++ b/test/org/traccar/protocol/XirgoProtocolDecoderTest.java
@@ -1,8 +1,7 @@
package org.traccar.protocol;
-import org.traccar.helper.TestIdentityManager;
-import static org.traccar.helper.DecoderVerifier.verify;
import org.junit.Test;
+import static org.traccar.helper.DecoderVerifier.verify;
public class XirgoProtocolDecoderTest extends ProtocolDecoderTest {
@@ -11,13 +10,13 @@ public class XirgoProtocolDecoderTest extends ProtocolDecoderTest {
XirgoProtocolDecoder decoder = new XirgoProtocolDecoder(new XirgoProtocol());
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"$$357207059646786,4003,2015/05/19,15:54:56,-20.21422,-70.14927,37.5,1.8,0.0,11,0.8,12.9,31,297,1,0,0.0,0.0,0,1,1,1##"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"$$354898045650537,6031,2015/02/26,15:47:26,33.42552,-112.30308,287.8,0,0,0,0,0.0,7,1.2,2,0.0,12.2,22,1,0,82.3"));
- verify(decoder.decode(null, null, null,
+ verify(decoder.decode(null, null,
"$$357207059646786,4003,2015/05/19,15:55:27,-20.21421,-70.14920,33.6,0.4,0.0,11,0.8,12.9,31,297,1,0,0.0,0.0,0,1,1,1##"));
}