ParamValueArray.parse constructor
ParamValueArray.parse(
- ByteData data_
Implementation
factory ParamValueArray.parse(ByteData data_) {
if (data_.lengthInBytes < ParamValueArray.mavlinkEncodedLength) {
var len = ParamValueArray.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var paramCount = data_.getUint16(0, Endian.little);
var paramIndexFirst = data_.getUint16(2, Endian.little);
var flags = data_.getUint16(4, Endian.little);
var paramArrayLen = data_.getUint8(6);
var packetBuf = MavlinkMessage.asUint8List(data_, 7, 248);
return ParamValueArray(
paramCount: paramCount,
paramIndexFirst: paramIndexFirst,
flags: flags,
paramArrayLen: paramArrayLen,
packetBuf: packetBuf);
}