OpenDroneIdBasicId.parse constructor
OpenDroneIdBasicId.parse(
- ByteData data_
Implementation
factory OpenDroneIdBasicId.parse(ByteData data_) {
if (data_.lengthInBytes < OpenDroneIdBasicId.mavlinkEncodedLength) {
var len = OpenDroneIdBasicId.mavlinkEncodedLength - data_.lengthInBytes;
var d = data_.buffer.asUint8List() + List<int>.filled(len, 0);
data_ = Uint8List.fromList(d).buffer.asByteData();
}
var targetSystem = data_.getUint8(0);
var targetComponent = data_.getUint8(1);
var idOrMac = MavlinkMessage.asUint8List(data_, 2, 20);
var idType = data_.getUint8(22);
var uaType = data_.getUint8(23);
var uasId = MavlinkMessage.asUint8List(data_, 24, 20);
return OpenDroneIdBasicId(
targetSystem: targetSystem,
targetComponent: targetComponent,
idOrMac: idOrMac,
idType: idType,
uaType: uaType,
uasId: uasId);
}