lanyard.flight.VehicleState.2.0

Consolidated vehicle state, published by the flight controller at 50 Hz.

Full name lanyard.flight.VehicleState
Version 2.0
Kind Message
Fixed port ID 6211
Least supported transport CAN FD

Wire layout

Section Extent (bytes) Max serialized (bytes)
Message 192 57

A sealed type reports its extent as its exact serialised size; a delimited type reports the declared @extent, which bounds what a reader must be prepared to receive.

Definition

# Consolidated vehicle state, published by the flight controller at 50
# Hz.
#
# LEAST SUPPORTED TRANSPORT: CAN FD.
#
# VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
#
# Every difference from VehicleState.1.1 below is individually
# sufficient to require a major bump:
#
#   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
#      length.WideScalar (float64). Same name, same position, different
#      wire width: a 1.x reader would decode garbage from that offset
#      onward. Retyping a field is always breaking, even when the new
#      type is strictly more precise.
#   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
#      several booleans into one field. Removing or repurposing a field
#      is breaking.
#   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
#      receive buffer from the extent it was compiled against, so a
#      larger message can overrun it.
#
# Because major versions are not interchangeable, this definition takes
# a new fixed port identifier (6211). A subject carries exactly one
# major version; nodes migrate by switching subscriptions, and a bridge
# node may publish both during a transition.

uavcan.time.SynchronizedTimestamp.1.0 timestamp
# The network-synchronized moment this state estimate is valid for.

lanyard.flight.FlightMode.1.0 mode
# The active flight mode.

uavcan.si.unit.angle.Quaternion.1.0 orientation_ned
# Vehicle attitude as a unit quaternion in the North-East-Down reference
# frame.

uavcan.si.unit.angular_velocity.Vector3.1.0 angular_velocity
# Body-frame roll, pitch, and yaw rates in radians per second.

uavcan.si.unit.velocity.Vector3.1.0 velocity_ned
# Velocity over ground in the North-East-Down frame, in meters per
# second.

uavcan.si.unit.length.WideScalar.1.0 height_above_takeoff
# Height above the recorded takeoff elevation, in meters. Widened from
# float32 to float64 in 2.0 so that the integrated altitude solution
# stops accumulating rounding error over long survey flights.

uint8 status_flags
# Bit mask replacing the standalone `armed` boolean of 1.x.
#   bit 0 - propulsion armed
#   bit 1 - navigation solution valid
#   bit 2 - geofence breached
#   bit 3 - low battery threshold crossed
#   bits 4..7 - reserved, transmitted as zero

@extent 192 * 8
# Grown from 128 bytes to accommodate the wider velocity field and leave
# a growth budget for 2.x.

Generated code

Declaration excerpts only -- the serialisation bodies are omitted for length. Build the showroom target for the complete output in every language and profile.

C

/* Consolidated vehicle state, published by the flight controller at 50 */
/* Hz. */
/*  */
/* LEAST SUPPORTED TRANSPORT: CAN FD. */
/*  */
/* VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE. */
/*  */
/* Every difference from VehicleState.1.1 below is individually */
/* sufficient to require a major bump: */
/*  */
/*   1. `height_above_takeoff` is retyped from length.Scalar (float32) to */
/*      length.WideScalar (float64). Same name, same position, different */
/*      wire width: a 1.x reader would decode garbage from that offset */
/*      onward. Retyping a field is always breaking, even when the new */
/*      type is strictly more precise. */
/*   2. `armed` (bool) is replaced by `status_flags` (uint8), folding */
/*      several booleans into one field. Removing or repurposing a field */
/*      is breaking. */
/*   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its */
/*      receive buffer from the extent it was compiled against, so a */
/*      larger message can overrun it. */
/*  */
/* Because major versions are not interchangeable, this definition takes */
/* a new fixed port identifier (6211). A subject carries exactly one */
/* major version; nodes migrate by switching subscriptions, and a bridge */
/* node may publish both during a transition. */
typedef struct lanyard__flight__VehicleState_2_0 {
  /* The network-synchronized moment this state estimate is valid for. */
  struct uavcan__time__SynchronizedTimestamp_1_0 timestamp;
  /* The active flight mode. */
  struct lanyard__flight__FlightMode_1_0 mode;
  /* Vehicle attitude as a unit quaternion in the North-East-Down reference */
  /* frame. */
  struct uavcan__si__unit__angle__Quaternion_1_0 orientation_ned;
  /* Body-frame roll, pitch, and yaw rates in radians per second. */
  struct uavcan__si__unit__angular_velocity__Vector3_1_0 angular_velocity;
  /* Velocity over ground in the North-East-Down frame, in meters per */
  /* second. */
  struct uavcan__si__unit__velocity__Vector3_1_0 velocity_ned;
  /* Height above the recorded takeoff elevation, in meters. Widened from */
  /* float32 to float64 in 2.0 so that the integrated altitude solution */
  /* stops accumulating rounding error over long survey flights. */
  struct uavcan__si__unit__length__WideScalar_1_0 height_above_takeoff;
  /* Bit mask replacing the standalone `armed` boolean of 1.x. */
  /*   bit 0 - propulsion armed */
  /*   bit 1 - navigation solution valid */
  /*   bit 2 - geofence breached */
  /*   bit 3 - low battery threshold crossed */
  /*   bits 4..7 - reserved, transmitted as zero */
  uint8_t status_flags;
} lanyard__flight__VehicleState_2_0;

C++ (std)

// Consolidated vehicle state, published by the flight controller at 50
// Hz.
//
// LEAST SUPPORTED TRANSPORT: CAN FD.
//
// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
//
// Every difference from VehicleState.1.1 below is individually
// sufficient to require a major bump:
//
//   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
//      length.WideScalar (float64). Same name, same position, different
//      wire width: a 1.x reader would decode garbage from that offset
//      onward. Retyping a field is always breaking, even when the new
//      type is strictly more precise.
//   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
//      several booleans into one field. Removing or repurposing a field
//      is breaking.
//   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
//      receive buffer from the extent it was compiled against, so a
//      larger message can overrun it.
//
// Because major versions are not interchangeable, this definition takes
// a new fixed port identifier (6211). A subject carries exactly one
// major version; nodes migrate by switching subscriptions, and a bridge
// node may publish both during a transition.
struct VehicleState_2_0 {
  // The network-synchronized moment this state estimate is valid for.
  ::uavcan::time::SynchronizedTimestamp_1_0 timestamp{};
  // The active flight mode.
  ::lanyard::flight::FlightMode_1_0 mode{};
  // Vehicle attitude as a unit quaternion in the North-East-Down reference
  // frame.
  ::uavcan::si::unit::angle::Quaternion_1_0 orientation_ned{};
  // Body-frame roll, pitch, and yaw rates in radians per second.
  ::uavcan::si::unit::angular_velocity::Vector3_1_0 angular_velocity{};
  // Velocity over ground in the North-East-Down frame, in meters per
  // second.
  ::uavcan::si::unit::velocity::Vector3_1_0 velocity_ned{};
  // Height above the recorded takeoff elevation, in meters. Widened from
  // float32 to float64 in 2.0 so that the integrated altitude solution
  // stops accumulating rounding error over long survey flights.
  ::uavcan::si::unit::length::WideScalar_1_0 height_above_takeoff{};
  // Bit mask replacing the standalone `armed` boolean of 1.x.
  //   bit 0 - propulsion armed
  //   bit 1 - navigation solution valid
  //   bit 2 - geofence breached
  //   bit 3 - low battery threshold crossed
  //   bits 4..7 - reserved, transmitted as zero
  std::uint8_t status_flags{};
  static constexpr const char* FULL_NAME = "lanyard.flight.VehicleState";
  static constexpr bool IS_DEPRECATED = false;
  static constexpr const char* FULL_NAME_AND_VERSION = "lanyard.flight.VehicleState.2.0";
  static constexpr std::size_t EXTENT_BYTES = 192U;
  static constexpr std::size_t SERIALIZATION_BUFFER_SIZE_BYTES = 57U;
  static constexpr bool WIRE_FLAT = false;
  static constexpr const char* WIRE_FLAT_REASON = "not-sealed";
  static constexpr bool HOST_IMAGE = false;
  static constexpr const char* HOST_IMAGE_REASON = "not-sealed";
  static constexpr bool HAS_FIXED_PORT_ID = true;
  static constexpr std::uint16_t FIXED_PORT_ID = 6211U;
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) const {
    return VehicleState_2_0_serialize_(this, buffer, inout_buffer_size_bytes);
  }
  LLVMDSDL_NODISCARD inline std::int8_t deserialize(const std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) {
    return VehicleState_2_0_deserialize_(this, buffer, inout_buffer_size_bytes);
  }
};

C++ (pmr)

Polymorphic-allocator profile: variable-length fields route through std::pmr.

// Consolidated vehicle state, published by the flight controller at 50
// Hz.
//
// LEAST SUPPORTED TRANSPORT: CAN FD.
//
// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
//
// Every difference from VehicleState.1.1 below is individually
// sufficient to require a major bump:
//
//   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
//      length.WideScalar (float64). Same name, same position, different
//      wire width: a 1.x reader would decode garbage from that offset
//      onward. Retyping a field is always breaking, even when the new
//      type is strictly more precise.
//   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
//      several booleans into one field. Removing or repurposing a field
//      is breaking.
//   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
//      receive buffer from the extent it was compiled against, so a
//      larger message can overrun it.
//
// Because major versions are not interchangeable, this definition takes
// a new fixed port identifier (6211). A subject carries exactly one
// major version; nodes migrate by switching subscriptions, and a bridge
// node may publish both during a transition.
struct VehicleState_2_0 {
  // The network-synchronized moment this state estimate is valid for.
  ::uavcan::time::SynchronizedTimestamp_1_0 timestamp{};
  // The active flight mode.
  ::lanyard::flight::FlightMode_1_0 mode{};
  // Vehicle attitude as a unit quaternion in the North-East-Down reference
  // frame.
  ::uavcan::si::unit::angle::Quaternion_1_0 orientation_ned{};
  // Body-frame roll, pitch, and yaw rates in radians per second.
  ::uavcan::si::unit::angular_velocity::Vector3_1_0 angular_velocity{};
  // Velocity over ground in the North-East-Down frame, in meters per
  // second.
  ::uavcan::si::unit::velocity::Vector3_1_0 velocity_ned{};
  // Height above the recorded takeoff elevation, in meters. Widened from
  // float32 to float64 in 2.0 so that the integrated altitude solution
  // stops accumulating rounding error over long survey flights.
  ::uavcan::si::unit::length::WideScalar_1_0 height_above_takeoff{};
  // Bit mask replacing the standalone `armed` boolean of 1.x.
  //   bit 0 - propulsion armed
  //   bit 1 - navigation solution valid
  //   bit 2 - geofence breached
  //   bit 3 - low battery threshold crossed
  //   bits 4..7 - reserved, transmitted as zero
  std::uint8_t status_flags{};
  ::llvmdsdl::cpp::MemoryResource* _memory_resource{::llvmdsdl::cpp::default_memory_resource()};
  VehicleState_2_0() = default;
  explicit VehicleState_2_0(::llvmdsdl::cpp::MemoryResource* memory_resource) { set_memory_resource(memory_resource); }
  void set_memory_resource(::llvmdsdl::cpp::MemoryResource* memory_resource) {
    _memory_resource = (memory_resource != nullptr) ? memory_resource : ::llvmdsdl::cpp::default_memory_resource();
    timestamp.set_memory_resource(_memory_resource);
    mode.set_memory_resource(_memory_resource);
    orientation_ned.set_memory_resource(_memory_resource);
    angular_velocity.set_memory_resource(_memory_resource);
    velocity_ned.set_memory_resource(_memory_resource);
    height_above_takeoff.set_memory_resource(_memory_resource);
  }
  static constexpr const char* FULL_NAME = "lanyard.flight.VehicleState";
  static constexpr bool IS_DEPRECATED = false;
  static constexpr const char* FULL_NAME_AND_VERSION = "lanyard.flight.VehicleState.2.0";
  static constexpr std::size_t EXTENT_BYTES = 192U;
  static constexpr std::size_t SERIALIZATION_BUFFER_SIZE_BYTES = 57U;
  static constexpr bool WIRE_FLAT = false;
  static constexpr const char* WIRE_FLAT_REASON = "not-sealed";
  static constexpr bool HOST_IMAGE = false;
  static constexpr const char* HOST_IMAGE_REASON = "not-sealed";
  static constexpr bool HAS_FIXED_PORT_ID = true;
  static constexpr std::uint16_t FIXED_PORT_ID = 6211U;
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) const {
    return VehicleState_2_0_serialize_(this, buffer, inout_buffer_size_bytes, _memory_resource);
  }
  LLVMDSDL_NODISCARD inline std::int8_t deserialize(const std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) {
    return VehicleState_2_0_deserialize_(this, buffer, inout_buffer_size_bytes, _memory_resource);
  }
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes, ::llvmdsdl::cpp::MemoryResource* memory_resource) const {
    return VehicleState_2_0_serialize_(this, buffer, inout_buffer_size_bytes, memory_resource);
  }
  LLVMDSDL_NODISCARD inline std::int8_t deserialize(const std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes, ::llvmdsdl::cpp::MemoryResource* memory_resource) {
    return VehicleState_2_0_deserialize_(this, buffer, inout_buffer_size_bytes, memory_resource);
  }
};

C++ (autosar)

AUTOSAR C++14 subset profile.

// Consolidated vehicle state, published by the flight controller at 50
// Hz.
//
// LEAST SUPPORTED TRANSPORT: CAN FD.
//
// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
//
// Every difference from VehicleState.1.1 below is individually
// sufficient to require a major bump:
//
//   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
//      length.WideScalar (float64). Same name, same position, different
//      wire width: a 1.x reader would decode garbage from that offset
//      onward. Retyping a field is always breaking, even when the new
//      type is strictly more precise.
//   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
//      several booleans into one field. Removing or repurposing a field
//      is breaking.
//   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
//      receive buffer from the extent it was compiled against, so a
//      larger message can overrun it.
//
// Because major versions are not interchangeable, this definition takes
// a new fixed port identifier (6211). A subject carries exactly one
// major version; nodes migrate by switching subscriptions, and a bridge
// node may publish both during a transition.
struct VehicleState_2_0 {
  // The network-synchronized moment this state estimate is valid for.
  ::uavcan::time::SynchronizedTimestamp_1_0 timestamp{};
  // The active flight mode.
  ::lanyard::flight::FlightMode_1_0 mode{};
  // Vehicle attitude as a unit quaternion in the North-East-Down reference
  // frame.
  ::uavcan::si::unit::angle::Quaternion_1_0 orientation_ned{};
  // Body-frame roll, pitch, and yaw rates in radians per second.
  ::uavcan::si::unit::angular_velocity::Vector3_1_0 angular_velocity{};
  // Velocity over ground in the North-East-Down frame, in meters per
  // second.
  ::uavcan::si::unit::velocity::Vector3_1_0 velocity_ned{};
  // Height above the recorded takeoff elevation, in meters. Widened from
  // float32 to float64 in 2.0 so that the integrated altitude solution
  // stops accumulating rounding error over long survey flights.
  ::uavcan::si::unit::length::WideScalar_1_0 height_above_takeoff{};
  // Bit mask replacing the standalone `armed` boolean of 1.x.
  //   bit 0 - propulsion armed
  //   bit 1 - navigation solution valid
  //   bit 2 - geofence breached
  //   bit 3 - low battery threshold crossed
  //   bits 4..7 - reserved, transmitted as zero
  std::uint8_t status_flags{};
  static constexpr const char* FULL_NAME = "lanyard.flight.VehicleState";
  static constexpr bool IS_DEPRECATED = false;
  static constexpr const char* FULL_NAME_AND_VERSION = "lanyard.flight.VehicleState.2.0";
  static constexpr std::size_t EXTENT_BYTES = 192U;
  static constexpr std::size_t SERIALIZATION_BUFFER_SIZE_BYTES = 57U;
  static constexpr bool WIRE_FLAT = false;
  static constexpr const char* WIRE_FLAT_REASON = "not-sealed";
  static constexpr bool HOST_IMAGE = false;
  static constexpr const char* HOST_IMAGE_REASON = "not-sealed";
  static constexpr bool HAS_FIXED_PORT_ID = true;
  static constexpr std::uint16_t FIXED_PORT_ID = 6211U;
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) const {
    return VehicleState_2_0_serialize_(this, buffer, inout_buffer_size_bytes);
  }
  LLVMDSDL_NODISCARD inline std::int8_t deserialize(const std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) {
    return VehicleState_2_0_deserialize_(this, buffer, inout_buffer_size_bytes);
  }
};

Rust (std)

/// Consolidated vehicle state, published by the flight controller at 50
/// Hz.
///
/// LEAST SUPPORTED TRANSPORT: CAN FD.
///
/// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
///
/// Every difference from VehicleState.1.1 below is individually
/// sufficient to require a major bump:
///
///   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
///      length.WideScalar (float64). Same name, same position, different
///      wire width: a 1.x reader would decode garbage from that offset
///      onward. Retyping a field is always breaking, even when the new
///      type is strictly more precise.
///   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
///      several booleans into one field. Removing or repurposing a field
///      is breaking.
///   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
///      receive buffer from the extent it was compiled against, so a
///      larger message can overrun it.
///
/// Because major versions are not interchangeable, this definition takes
/// a new fixed port identifier (6211). A subject carries exactly one
/// major version; nodes migrate by switching subscriptions, and a bridge
/// node may publish both during a transition.
#[derive(Clone, Debug, PartialEq)]
pub struct lanyard_flight_VehicleState_2_0 {
    /// The network-synchronized moment this state estimate is valid for.
    pub timestamp: uavcan_time_SynchronizedTimestamp_1_0,
    /// The active flight mode.
    pub mode: lanyard_flight_FlightMode_1_0,
    /// Vehicle attitude as a unit quaternion in the North-East-Down reference
    /// frame.
    pub orientation_ned: uavcan_si_unit_angle_Quaternion_1_0,
    /// Body-frame roll, pitch, and yaw rates in radians per second.
    pub angular_velocity: uavcan_si_unit_angular_velocity_Vector3_1_0,
    /// Velocity over ground in the North-East-Down frame, in meters per
    /// second.
    pub velocity_ned: uavcan_si_unit_velocity_Vector3_1_0,
    /// Height above the recorded takeoff elevation, in meters. Widened from
    /// float32 to float64 in 2.0 so that the integrated altitude solution
    /// stops accumulating rounding error over long survey flights.
    pub height_above_takeoff: uavcan_si_unit_length_WideScalar_1_0,
    /// Bit mask replacing the standalone `armed` boolean of 1.x.
    ///   bit 0 - propulsion armed
    ///   bit 1 - navigation solution valid
    ///   bit 2 - geofence breached
    ///   bit 3 - low battery threshold crossed
    ///   bits 4..7 - reserved, transmitted as zero
    pub status_flags: u8,
}

Rust (no-std)

no_std + alloc profile, as a flight-controller firmware build would use.

/// Consolidated vehicle state, published by the flight controller at 50
/// Hz.
///
/// LEAST SUPPORTED TRANSPORT: CAN FD.
///
/// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
///
/// Every difference from VehicleState.1.1 below is individually
/// sufficient to require a major bump:
///
///   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
///      length.WideScalar (float64). Same name, same position, different
///      wire width: a 1.x reader would decode garbage from that offset
///      onward. Retyping a field is always breaking, even when the new
///      type is strictly more precise.
///   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
///      several booleans into one field. Removing or repurposing a field
///      is breaking.
///   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
///      receive buffer from the extent it was compiled against, so a
///      larger message can overrun it.
///
/// Because major versions are not interchangeable, this definition takes
/// a new fixed port identifier (6211). A subject carries exactly one
/// major version; nodes migrate by switching subscriptions, and a bridge
/// node may publish both during a transition.
#[derive(Clone, Debug, PartialEq)]
pub struct lanyard_flight_VehicleState_2_0 {
    /// The network-synchronized moment this state estimate is valid for.
    pub timestamp: uavcan_time_SynchronizedTimestamp_1_0,
    /// The active flight mode.
    pub mode: lanyard_flight_FlightMode_1_0,
    /// Vehicle attitude as a unit quaternion in the North-East-Down reference
    /// frame.
    pub orientation_ned: uavcan_si_unit_angle_Quaternion_1_0,
    /// Body-frame roll, pitch, and yaw rates in radians per second.
    pub angular_velocity: uavcan_si_unit_angular_velocity_Vector3_1_0,
    /// Velocity over ground in the North-East-Down frame, in meters per
    /// second.
    pub velocity_ned: uavcan_si_unit_velocity_Vector3_1_0,
    /// Height above the recorded takeoff elevation, in meters. Widened from
    /// float32 to float64 in 2.0 so that the integrated altitude solution
    /// stops accumulating rounding error over long survey flights.
    pub height_above_takeoff: uavcan_si_unit_length_WideScalar_1_0,
    /// Bit mask replacing the standalone `armed` boolean of 1.x.
    ///   bit 0 - propulsion armed
    ///   bit 1 - navigation solution valid
    ///   bit 2 - geofence breached
    ///   bit 3 - low battery threshold crossed
    ///   bits 4..7 - reserved, transmitted as zero
    pub status_flags: u8,
}

Go

// Consolidated vehicle state, published by the flight controller at 50
// Hz.
//
// LEAST SUPPORTED TRANSPORT: CAN FD.
//
// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
//
// Every difference from VehicleState.1.1 below is individually
// sufficient to require a major bump:
//
//  1. `height_above_takeoff` is retyped from length.Scalar (float32) to
//     length.WideScalar (float64). Same name, same position, different
//     wire width: a 1.x reader would decode garbage from that offset
//     onward. Retyping a field is always breaking, even when the new
//     type is strictly more precise.
//  2. `armed` (bool) is replaced by `status_flags` (uint8), folding
//     several booleans into one field. Removing or repurposing a field
//     is breaking.
//  3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
//     receive buffer from the extent it was compiled against, so a
//     larger message can overrun it.
//
// Because major versions are not interchangeable, this definition takes
// a new fixed port identifier (6211). A subject carries exactly one
// major version; nodes migrate by switching subscriptions, and a bridge
// node may publish both during a transition.
type VehicleState_2_0 struct {
    // The network-synchronized moment this state estimate is valid for.
    Timestamp pkg_uavcan_time.SynchronizedTimestamp_1_0
    // The active flight mode.
    Mode FlightMode_1_0
    // Vehicle attitude as a unit quaternion in the North-East-Down reference
    // frame.
    OrientationNed pkg_uavcan_si_unit_angle.Quaternion_1_0
    // Body-frame roll, pitch, and yaw rates in radians per second.
    AngularVelocity pkg_uavcan_si_unit_angular_velocity.Vector3_1_0
    // Velocity over ground in the North-East-Down frame, in meters per
    // second.
    VelocityNed pkg_uavcan_si_unit_velocity.Vector3_1_0
    // Height above the recorded takeoff elevation, in meters. Widened from
    // float32 to float64 in 2.0 so that the integrated altitude solution
    // stops accumulating rounding error over long survey flights.
    HeightAboveTakeoff pkg_uavcan_si_unit_length.WideScalar_1_0
    // Bit mask replacing the standalone `armed` boolean of 1.x.
    //
    //  bit 0 - propulsion armed
    //  bit 1 - navigation solution valid
    //  bit 2 - geofence breached
    //  bit 3 - low battery threshold crossed
    //  bits 4..7 - reserved, transmitted as zero
    StatusFlags uint8
}

TypeScript

// Consolidated vehicle state, published by the flight controller at 50
// Hz.
//
// LEAST SUPPORTED TRANSPORT: CAN FD.
//
// VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
//
// Every difference from VehicleState.1.1 below is individually
// sufficient to require a major bump:
//
//   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
//      length.WideScalar (float64). Same name, same position, different
//      wire width: a 1.x reader would decode garbage from that offset
//      onward. Retyping a field is always breaking, even when the new
//      type is strictly more precise.
//   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
//      several booleans into one field. Removing or repurposing a field
//      is breaking.
//   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
//      receive buffer from the extent it was compiled against, so a
//      larger message can overrun it.
//
// Because major versions are not interchangeable, this definition takes
// a new fixed port identifier (6211). A subject carries exactly one
// major version; nodes migrate by switching subscriptions, and a bridge
// node may publish both during a transition.
export interface VehicleState_2_0 {
  // The network-synchronized moment this state estimate is valid for.
  timestamp: SynchronizedTimestamp_1_0;
  // The active flight mode.
  mode: FlightMode_1_0;
  // Vehicle attitude as a unit quaternion in the North-East-Down reference
  // frame.
  orientation_ned: Quaternion_1_0;
  // Body-frame roll, pitch, and yaw rates in radians per second.
  angular_velocity: Vector3_1_0__uavcan_si_unit_angular_velocity;
  // Velocity over ground in the North-East-Down frame, in meters per
  // second.
  velocity_ned: Vector3_1_0__uavcan_si_unit_velocity;
  // Height above the recorded takeoff elevation, in meters. Widened from
  // float32 to float64 in 2.0 so that the integrated altitude solution
  // stops accumulating rounding error over long survey flights.
  height_above_takeoff: WideScalar_1_0;
  // Bit mask replacing the standalone `armed` boolean of 1.x.
  //   bit 0 - propulsion armed
  //   bit 1 - navigation solution valid
  //   bit 2 - geofence breached
  //   bit 3 - low battery threshold crossed
  //   bits 4..7 - reserved, transmitted as zero
  status_flags: number;
}

Python

# Consolidated vehicle state, published by the flight controller at 50
# Hz.
#
# LEAST SUPPORTED TRANSPORT: CAN FD.
#
# VERSIONING -- THIS IS THE BREAKING CHANGE EXAMPLE.
#
# Every difference from VehicleState.1.1 below is individually
# sufficient to require a major bump:
#
#   1. `height_above_takeoff` is retyped from length.Scalar (float32) to
#      length.WideScalar (float64). Same name, same position, different
#      wire width: a 1.x reader would decode garbage from that offset
#      onward. Retyping a field is always breaking, even when the new
#      type is strictly more precise.
#   2. `armed` (bool) is replaced by `status_flags` (uint8), folding
#      several booleans into one field. Removing or repurposing a field
#      is breaking.
#   3. The extent grows from 128 to 192 bytes. A 1.x reader sizes its
#      receive buffer from the extent it was compiled against, so a
#      larger message can overrun it.
#
# Because major versions are not interchangeable, this definition takes
# a new fixed port identifier (6211). A subject carries exactly one
# major version; nodes migrate by switching subscriptions, and a bridge
# node may publish both during a transition.
@dataclass(slots=True)
class VehicleState_2_0:
    # The network-synchronized moment this state estimate is valid for.
    timestamp: SynchronizedTimestamp_1_0 = field(default_factory=lambda: SynchronizedTimestamp_1_0())
    # The active flight mode.
    mode: FlightMode_1_0 = field(default_factory=lambda: FlightMode_1_0())
    # Vehicle attitude as a unit quaternion in the North-East-Down reference
    # frame.
    orientation_ned: Quaternion_1_0 = field(default_factory=lambda: Quaternion_1_0())
    # Body-frame roll, pitch, and yaw rates in radians per second.
    angular_velocity: Vector3_1_0 = field(default_factory=lambda: Vector3_1_0())
    # Velocity over ground in the North-East-Down frame, in meters per
    # second.
    velocity_ned: Vector3_1_0 = field(default_factory=lambda: Vector3_1_0())
    # Height above the recorded takeoff elevation, in meters. Widened from
    # float32 to float64 in 2.0 so that the integrated altitude solution
    # stops accumulating rounding error over long survey flights.
    height_above_takeoff: WideScalar_1_0 = field(default_factory=lambda: WideScalar_1_0())
    # Bit mask replacing the standalone `armed` boolean of 1.x.
    #   bit 0 - propulsion armed
    #   bit 1 - navigation solution valid
    #   bit 2 - geofence breached
    #   bit 3 - low battery threshold crossed
    #   bits 4..7 - reserved, transmitted as zero
    status_flags: int = 0

Every build recipe compiles this definition along with the rest of the namespace.