CellularStatus.parse constructor
CellularStatus.parse(
- ByteData data_
Implementation
factory CellularStatus.parse(ByteData data_) {
if (data_.lengthInBytes < CellularStatus.mavlinkEncodedLength) {
var len = CellularStatus.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var mcc = data_.getUint16(0, Endian.little);
var mnc = data_.getUint16(2, Endian.little);
var lac = data_.getUint16(4, Endian.little);
var status = data_.getUint8(6);
var failureReason = data_.getUint8(7);
var type = data_.getUint8(8);
var quality = data_.getUint8(9);
return CellularStatus(
mcc: mcc,
mnc: mnc,
lac: lac,
status: status,
failureReason: failureReason,
type: type,
quality: quality);
}