Meminfo.parse constructor
Meminfo.parse(
- ByteData data_
Implementation
factory Meminfo.parse(ByteData data_) {
if (data_.lengthInBytes < Meminfo.mavlinkEncodedLength) {
var len = Meminfo.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var brkval = data_.getUint16(0, Endian.little);
var freemem = data_.getUint16(2, Endian.little);
var freemem32 = data_.getUint32(4, Endian.little);
return Meminfo(brkval: brkval, freemem: freemem, freemem32: freemem32);
}