aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Gt06ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-12-08 04:47:26 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2017-12-08 04:47:26 +1300
commitf839ca4c24d80dcd78b5ad1d65f10cdf534d94d8 (patch)
treebfd49d986a21fea69460948e114dfb0f018f0d2e /src/org/traccar/protocol/Gt06ProtocolDecoder.java
parentaf8875896e06ac3ac034c493b5a355d32cffb026 (diff)
downloadtrackermap-server-f839ca4c24d80dcd78b5ad1d65f10cdf534d94d8.tar.gz
trackermap-server-f839ca4c24d80dcd78b5ad1d65f10cdf534d94d8.tar.bz2
trackermap-server-f839ca4c24d80dcd78b5ad1d65f10cdf534d94d8.zip
Extend GK310 message format support
Diffstat (limited to 'src/org/traccar/protocol/Gt06ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Gt06ProtocolDecoder.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/org/traccar/protocol/Gt06ProtocolDecoder.java b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
index 2018fb6a6..bff04b36d 100644
--- a/src/org/traccar/protocol/Gt06ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Gt06ProtocolDecoder.java
@@ -236,8 +236,11 @@ public class Gt06ProtocolDecoder extends BaseProtocolDecoder {
}
}
+ int mcc = buf.readUnsignedShort();
+ int mnc = BitUtil.check(mcc, 15) ? buf.readUnsignedShort() : buf.readUnsignedByte();
+
position.setNetwork(new Network(CellTower.from(
- buf.readUnsignedShort(), buf.readUnsignedByte(), buf.readUnsignedShort(), buf.readUnsignedMedium())));
+ BitUtil.to(mcc, 15), mnc, buf.readUnsignedShort(), buf.readUnsignedMedium())));
if (length > 0) {
buf.skipBytes(length - (hasLength ? 9 : 8));