Data64.parse constructor

Data64.parse(
  1. ByteData data_
)

Implementation

factory Data64.parse(ByteData data_) {
  if (data_.lengthInBytes < Data64.mavlinkEncodedLength) {
    var len = Data64.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var type = data_.getUint8(0);
  var len = data_.getUint8(1);
  var data = MavlinkMessage.asUint8List(data_, 2, 64);

  return Data64(type: type, len: len, data: data);
}