GsmLinkStatus.parse constructor
GsmLinkStatus.parse(
- ByteData data_
Implementation
factory GsmLinkStatus.parse(ByteData data_) {
if (data_.lengthInBytes < GsmLinkStatus.mavlinkEncodedLength) {
var len = GsmLinkStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var timestamp = data_.getUint64(0, Endian.little);
var gsmModemType = data_.getUint8(8);
var gsmLinkType = data_.getUint8(9);
var rssi = data_.getUint8(10);
var rsrpRscp = data_.getUint8(11);
var sinrEcio = data_.getUint8(12);
var rsrq = data_.getUint8(13);
return GsmLinkStatus(
timestamp: timestamp,
gsmModemType: gsmModemType,
gsmLinkType: gsmLinkType,
rssi: rssi,
rsrpRscp: rsrpRscp,
sinrEcio: sinrEcio,
rsrq: rsrq);
}