serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setInt32(0, currentConsumed, Endian.little);
  data_.setInt32(4, energyConsumed, Endian.little);
  data_.setInt16(8, temperature, Endian.little);
  MavlinkMessage.setUint16List(data_, 10, voltages);
  data_.setInt16(30, currentBattery, Endian.little);
  data_.setUint8(32, id);
  data_.setUint8(33, batteryFunction);
  data_.setUint8(34, type);
  data_.setInt8(35, batteryRemaining);
  data_.setInt32(36, timeRemaining, Endian.little);
  data_.setUint8(40, chargeState);
  MavlinkMessage.setUint16List(data_, 41, voltagesExt);
  data_.setUint8(49, mode);
  data_.setUint32(50, faultBitmask, Endian.little);
  return data_;
}