ParamAckTransaction.parse constructor

ParamAckTransaction.parse(
  1. ByteData data_
)

Implementation

factory ParamAckTransaction.parse(ByteData data_) {
  if (data_.lengthInBytes < ParamAckTransaction.mavlinkEncodedLength) {
    var len = ParamAckTransaction.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var paramValue = data_.getFloat32(0, Endian.little);
  var targetSystem = data_.getUint8(4);
  var targetComponent = data_.getUint8(5);
  var paramId = MavlinkMessage.asInt8List(data_, 6, 16);
  var paramType = data_.getUint8(22);
  var paramResult = data_.getUint8(23);

  return ParamAckTransaction(
      paramValue: paramValue,
      targetSystem: targetSystem,
      targetComponent: targetComponent,
      paramId: paramId,
      paramType: paramType,
      paramResult: paramResult);
}