CanFilterModify.parse constructor

CanFilterModify.parse(
  1. ByteData data_
)

Implementation

factory CanFilterModify.parse(ByteData data_) {
  if (data_.lengthInBytes < CanFilterModify.mavlinkEncodedLength) {
    var len = CanFilterModify.mavlinkEncodedLength - data_.lengthInBytes;
    var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
    data_ = Uint8List.fromList(d).buffer.asByteData();
  }
  var ids = MavlinkMessage.asUint16List(data_, 0, 16);
  var targetSystem = data_.getUint8(32);
  var targetComponent = data_.getUint8(33);
  var bus = data_.getUint8(34);
  var operation = data_.getUint8(35);
  var numIds = data_.getUint8(36);

  return CanFilterModify(
      ids: ids,
      targetSystem: targetSystem,
      targetComponent: targetComponent,
      bus: bus,
      operation: operation,
      numIds: numIds);
}