aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/EgtsFrameDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-06 21:56:37 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-06 21:56:37 +1200
commit681b8f42633d7c6741e6fbac4308ba25c4aff9fa (patch)
tree488c6d1d43399899243adebcb565edd0cf294374 /src/org/traccar/protocol/EgtsFrameDecoder.java
parent35bef1115f73da97b15ae3c1de03db1cd6d733c5 (diff)
downloadtrackermap-server-681b8f42633d7c6741e6fbac4308ba25c4aff9fa.tar.gz
trackermap-server-681b8f42633d7c6741e6fbac4308ba25c4aff9fa.tar.bz2
trackermap-server-681b8f42633d7c6741e6fbac4308ba25c4aff9fa.zip
Migrate D, E, F protocols
Diffstat (limited to 'src/org/traccar/protocol/EgtsFrameDecoder.java')
-rw-r--r--src/org/traccar/protocol/EgtsFrameDecoder.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/org/traccar/protocol/EgtsFrameDecoder.java b/src/org/traccar/protocol/EgtsFrameDecoder.java
index 71ffc1811..c85eeff00 100644
--- a/src/org/traccar/protocol/EgtsFrameDecoder.java
+++ b/src/org/traccar/protocol/EgtsFrameDecoder.java
@@ -15,23 +15,23 @@
*/
package org.traccar.protocol;
-import org.jboss.netty.buffer.ChannelBuffer;
-import org.jboss.netty.channel.Channel;
-import org.jboss.netty.channel.ChannelHandlerContext;
-import org.jboss.netty.handler.codec.frame.FrameDecoder;
+import io.netty.buffer.ByteBuf;
+import io.netty.channel.Channel;
+import io.netty.channel.ChannelHandlerContext;
+import org.traccar.BaseFrameDecoder;
-public class EgtsFrameDecoder extends FrameDecoder {
+public class EgtsFrameDecoder extends BaseFrameDecoder {
@Override
protected Object decode(
- ChannelHandlerContext ctx, Channel channel, ChannelBuffer buf) throws Exception {
+ ChannelHandlerContext ctx, Channel channel, ByteBuf buf) throws Exception {
if (buf.readableBytes() < 10) {
return null;
}
int headerLength = buf.getUnsignedByte(buf.readerIndex() + 3);
- int frameLength = buf.getUnsignedShort(buf.readerIndex() + 5);
+ int frameLength = buf.getUnsignedShortLE(buf.readerIndex() + 5);
int length = headerLength + frameLength + (frameLength > 0 ? 2 : 0);