RemoteLogDataBlock.parse constructor
RemoteLogDataBlock.parse(
- ByteData data_
Implementation
factory RemoteLogDataBlock.parse(ByteData data_) {
if (data_.lengthInBytes < RemoteLogDataBlock.mavlinkEncodedLength) {
var len = RemoteLogDataBlock.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var seqno = data_.getUint32(0, Endian.little);
var targetSystem = data_.getUint8(4);
var targetComponent = data_.getUint8(5);
var data = MavlinkMessage.asUint8List(data_, 6, 200);
return RemoteLogDataBlock(
seqno: seqno,
targetSystem: targetSystem,
targetComponent: targetComponent,
data: data);
}