diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-08 04:47:26 +1300 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2017-12-08 04:47:26 +1300 |
commit | f839ca4c24d80dcd78b5ad1d65f10cdf534d94d8 (patch) | |
tree | bfd49d986a21fea69460948e114dfb0f018f0d2e /src/org/traccar/protocol/Gt06ProtocolDecoder.java | |
parent | af8875896e06ac3ac034c493b5a355d32cffb026 (diff) | |
download | trackermap-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.java | 5 |
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)); |