serialize method

  1. @override
ByteData serialize()
override

Implementation

@override
ByteData serialize() {
  var data_ = ByteData(mavlinkEncodedLength);
  data_.setUint32(0, mmsi, Endian.little);
  data_.setInt32(4, lat, Endian.little);
  data_.setInt32(8, lon, Endian.little);
  data_.setUint16(12, cog, Endian.little);
  data_.setUint16(14, heading, Endian.little);
  data_.setUint16(16, velocity, Endian.little);
  data_.setUint16(18, dimensionBow, Endian.little);
  data_.setUint16(20, dimensionStern, Endian.little);
  data_.setUint16(22, tslc, Endian.little);
  data_.setUint16(24, flags, Endian.little);
  data_.setInt8(26, turnRate);
  data_.setUint8(27, navigationalStatus);
  data_.setUint8(28, type);
  data_.setUint8(29, dimensionPort);
  data_.setUint8(30, dimensionStarboard);
  MavlinkMessage.setInt8List(data_, 31, callsign);
  MavlinkMessage.setInt8List(data_, 38, name);
  return data_;
}