lanyard.flight.FixedWingSurfaces.1.0

Post-mixer actuator commands for a fixed-wing airframe.

Full name lanyard.flight.FixedWingSurfaces
Version 1.0
Kind Message
Fixed port ID none (nested type)
Least supported transport unspecified

Wire layout

Section Extent (bytes) Max serialized (bytes)
Message 10 10

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

# Post-mixer actuator commands for a fixed-wing airframe.
#
# Nested type with no fixed port identifier; published as one option of
# ControlSurfaces.1.0.

float16 aileron_left
# Left aileron deflection, -1.0 (full down) to +1.0 (full up).

float16 aileron_right
# Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
# separately from the left surface rather than as a single roll command
# so that flaperon and differential-aileron mixes can be expressed
# without a second message.

float16 elevator
# Elevator deflection, -1.0 (full down) to +1.0 (full up).

float16 rudder
# Rudder deflection, -1.0 (full left) to +1.0 (full right).

float16 throttle
# Normalised thrust command, 0.0 (idle) to 1.0 (full).

@sealed

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

/* Post-mixer actuator commands for a fixed-wing airframe. */
/*  */
/* Nested type with no fixed port identifier; published as one option of */
/* ControlSurfaces.1.0. */
typedef struct lanyard__flight__FixedWingSurfaces_1_0 {
  /* Left aileron deflection, -1.0 (full down) to +1.0 (full up). */
  float aileron_left;
  /* Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried */
  /* separately from the left surface rather than as a single roll command */
  /* so that flaperon and differential-aileron mixes can be expressed */
  /* without a second message. */
  float aileron_right;
  /* Elevator deflection, -1.0 (full down) to +1.0 (full up). */
  float elevator;
  /* Rudder deflection, -1.0 (full left) to +1.0 (full right). */
  float rudder;
  /* Normalised thrust command, 0.0 (idle) to 1.0 (full). */
  float throttle;
} lanyard__flight__FixedWingSurfaces_1_0;

C++ (std)

// Post-mixer actuator commands for a fixed-wing airframe.
//
// Nested type with no fixed port identifier; published as one option of
// ControlSurfaces.1.0.
struct FixedWingSurfaces_1_0 {
  // Left aileron deflection, -1.0 (full down) to +1.0 (full up).
  float aileron_left{};
  // Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
  // separately from the left surface rather than as a single roll command
  // so that flaperon and differential-aileron mixes can be expressed
  // without a second message.
  float aileron_right{};
  // Elevator deflection, -1.0 (full down) to +1.0 (full up).
  float elevator{};
  // Rudder deflection, -1.0 (full left) to +1.0 (full right).
  float rudder{};
  // Normalised thrust command, 0.0 (idle) to 1.0 (full).
  float throttle{};
  static constexpr const char* FULL_NAME = "lanyard.flight.FixedWingSurfaces";
  static constexpr bool IS_DEPRECATED = false;
  static constexpr const char* FULL_NAME_AND_VERSION = "lanyard.flight.FixedWingSurfaces.1.0";
  static constexpr std::size_t EXTENT_BYTES = 10U;
  static constexpr std::size_t SERIALIZATION_BUFFER_SIZE_BYTES = 10U;
  static constexpr bool WIRE_FLAT = true;
  static constexpr const char* WIRE_FLAT_REASON = "flat";
  static constexpr bool HOST_IMAGE = false;
  static constexpr const char* HOST_IMAGE_REASON = "storage-width";
  static constexpr bool HAS_FIXED_PORT_ID = false;
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) const {
    return FixedWingSurfaces_1_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 FixedWingSurfaces_1_0_deserialize_(this, buffer, inout_buffer_size_bytes);
  }
  static float get_aileron_left(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(0ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_0_deser(value);
    return value_2;
  }

  static std::int8_t set_aileron_left(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 16ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_0_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(0ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_aileron_right(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(16ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_1_deser(value);
    return value_2;
  }

  static std::int8_t set_aileron_right(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 32ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_1_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(16ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_elevator(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(32ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_2_deser(value);
    return value_2;
  }

  static std::int8_t set_elevator(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 48ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_2_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(32ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_rudder(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(48ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_3_deser(value);
    return value_2;
  }

  static std::int8_t set_rudder(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 64ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_3_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(48ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_throttle(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(64ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_4_deser(value);
    return value_2;
  }

  static std::int8_t set_throttle(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 80ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_4_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(64ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

};

C++ (pmr)

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

// Post-mixer actuator commands for a fixed-wing airframe.
//
// Nested type with no fixed port identifier; published as one option of
// ControlSurfaces.1.0.
struct FixedWingSurfaces_1_0 {
  // Left aileron deflection, -1.0 (full down) to +1.0 (full up).
  float aileron_left{};
  // Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
  // separately from the left surface rather than as a single roll command
  // so that flaperon and differential-aileron mixes can be expressed
  // without a second message.
  float aileron_right{};
  // Elevator deflection, -1.0 (full down) to +1.0 (full up).
  float elevator{};
  // Rudder deflection, -1.0 (full left) to +1.0 (full right).
  float rudder{};
  // Normalised thrust command, 0.0 (idle) to 1.0 (full).
  float throttle{};
  ::llvmdsdl::cpp::MemoryResource* _memory_resource{::llvmdsdl::cpp::default_memory_resource()};
  FixedWingSurfaces_1_0() = default;
  explicit FixedWingSurfaces_1_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();
  }
  static constexpr const char* FULL_NAME = "lanyard.flight.FixedWingSurfaces";
  static constexpr bool IS_DEPRECATED = false;
  static constexpr const char* FULL_NAME_AND_VERSION = "lanyard.flight.FixedWingSurfaces.1.0";
  static constexpr std::size_t EXTENT_BYTES = 10U;
  static constexpr std::size_t SERIALIZATION_BUFFER_SIZE_BYTES = 10U;
  static constexpr bool WIRE_FLAT = true;
  static constexpr const char* WIRE_FLAT_REASON = "flat";
  static constexpr bool HOST_IMAGE = false;
  static constexpr const char* HOST_IMAGE_REASON = "storage-width";
  static constexpr bool HAS_FIXED_PORT_ID = false;
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) const {
    return FixedWingSurfaces_1_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 FixedWingSurfaces_1_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 FixedWingSurfaces_1_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 FixedWingSurfaces_1_0_deserialize_(this, buffer, inout_buffer_size_bytes, memory_resource);
  }
  static float get_aileron_left(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(0ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_0_deser(value);
    return value_2;
  }

  static std::int8_t set_aileron_left(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 16ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_0_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(0ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_aileron_right(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(16ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_1_deser(value);
    return value_2;
  }

  static std::int8_t set_aileron_right(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 32ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_1_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(16ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_elevator(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(32ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_2_deser(value);
    return value_2;
  }

  static std::int8_t set_elevator(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 48ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_2_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(32ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_rudder(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(48ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_3_deser(value);
    return value_2;
  }

  static std::int8_t set_rudder(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 64ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_3_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(48ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_throttle(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(64ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_4_deser(value);
    return value_2;
  }

  static std::int8_t set_throttle(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 80ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_4_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(64ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

};

C++ (autosar)

AUTOSAR C++14 subset profile.

// Post-mixer actuator commands for a fixed-wing airframe.
//
// Nested type with no fixed port identifier; published as one option of
// ControlSurfaces.1.0.
struct FixedWingSurfaces_1_0 {
  // Left aileron deflection, -1.0 (full down) to +1.0 (full up).
  float aileron_left{};
  // Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
  // separately from the left surface rather than as a single roll command
  // so that flaperon and differential-aileron mixes can be expressed
  // without a second message.
  float aileron_right{};
  // Elevator deflection, -1.0 (full down) to +1.0 (full up).
  float elevator{};
  // Rudder deflection, -1.0 (full left) to +1.0 (full right).
  float rudder{};
  // Normalised thrust command, 0.0 (idle) to 1.0 (full).
  float throttle{};
  static constexpr const char* FULL_NAME = "lanyard.flight.FixedWingSurfaces";
  static constexpr bool IS_DEPRECATED = false;
  static constexpr const char* FULL_NAME_AND_VERSION = "lanyard.flight.FixedWingSurfaces.1.0";
  static constexpr std::size_t EXTENT_BYTES = 10U;
  static constexpr std::size_t SERIALIZATION_BUFFER_SIZE_BYTES = 10U;
  static constexpr bool WIRE_FLAT = true;
  static constexpr const char* WIRE_FLAT_REASON = "flat";
  static constexpr bool HOST_IMAGE = false;
  static constexpr const char* HOST_IMAGE_REASON = "storage-width";
  static constexpr bool HAS_FIXED_PORT_ID = false;
  LLVMDSDL_NODISCARD inline std::int8_t serialize(std::uint8_t* buffer, std::size_t* inout_buffer_size_bytes) const {
    return FixedWingSurfaces_1_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 FixedWingSurfaces_1_0_deserialize_(this, buffer, inout_buffer_size_bytes);
  }
  static float get_aileron_left(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(0ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_0_deser(value);
    return value_2;
  }

  static std::int8_t set_aileron_left(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 16ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_0_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(0ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_aileron_right(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(16ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_1_deser(value);
    return value_2;
  }

  static std::int8_t set_aileron_right(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 32ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_1_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(16ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_elevator(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(32ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_2_deser(value);
    return value_2;
  }

  static std::int8_t set_elevator(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 48ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_2_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(32ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_rudder(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(48ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_3_deser(value);
    return value_2;
  }

  static std::int8_t set_rudder(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 64ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_3_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(48ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

  static float get_throttle(const std::uint8_t* const buffer, const std::size_t buffer_size_bytes)
  {
    const std::uint8_t* const buf = ((buffer != nullptr) ? buffer : reinterpret_cast<const std::uint8_t*>(""));
    const float value = dsdl_runtime_get_f16(buf, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(64ULL));
    const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_4_deser(value);
    return value_2;
  }

  static std::int8_t set_throttle(std::uint8_t* const buffer, const std::size_t buffer_size_bytes, const float value)
  {
    const bool is_null = (buffer == nullptr);
    const std::uint64_t v0 = (buffer_size_bytes * 8ULL);
    const bool v1 = (v0 >= 80ULL);
    const std::int8_t v2 = static_cast<std::int8_t>(v1 ? static_cast<std::int8_t>(0) : static_cast<std::int8_t>(-3));
    const std::int8_t v3 = static_cast<std::int8_t>(is_null ? static_cast<std::int8_t>(-2) : v2);
    const bool v4 = (v3 == static_cast<std::int8_t>(0));
    std::int8_t err{};
    if (v4) {
      const float value_2 = mlir_llvmdsdl_plan_scalar_float_lanyard_flight_FixedWingSurfaces_1_0_4_ser(value);
      const std::int8_t err_2 = dsdl_runtime_set_f16(buffer, static_cast<std::size_t>(buffer_size_bytes), static_cast<std::size_t>(64ULL), value_2);
      err = err_2;
    } else {
      err = v3;
    }
    return err;
  }

};

Rust (std)

/// Post-mixer actuator commands for a fixed-wing airframe.
///
/// Nested type with no fixed port identifier; published as one option of
/// ControlSurfaces.1.0.
#[derive(Clone, Debug, PartialEq)]
pub struct lanyard_flight_FixedWingSurfaces_1_0 {
    /// Left aileron deflection, -1.0 (full down) to +1.0 (full up).
    pub aileron_left: f32,
    /// Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
    /// separately from the left surface rather than as a single roll command
    /// so that flaperon and differential-aileron mixes can be expressed
    /// without a second message.
    pub aileron_right: f32,
    /// Elevator deflection, -1.0 (full down) to +1.0 (full up).
    pub elevator: f32,
    /// Rudder deflection, -1.0 (full left) to +1.0 (full right).
    pub rudder: f32,
    /// Normalised thrust command, 0.0 (idle) to 1.0 (full).
    pub throttle: f32,
}

Rust (no-std)

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

/// Post-mixer actuator commands for a fixed-wing airframe.
///
/// Nested type with no fixed port identifier; published as one option of
/// ControlSurfaces.1.0.
#[derive(Clone, Debug, PartialEq)]
pub struct lanyard_flight_FixedWingSurfaces_1_0 {
    /// Left aileron deflection, -1.0 (full down) to +1.0 (full up).
    pub aileron_left: f32,
    /// Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
    /// separately from the left surface rather than as a single roll command
    /// so that flaperon and differential-aileron mixes can be expressed
    /// without a second message.
    pub aileron_right: f32,
    /// Elevator deflection, -1.0 (full down) to +1.0 (full up).
    pub elevator: f32,
    /// Rudder deflection, -1.0 (full left) to +1.0 (full right).
    pub rudder: f32,
    /// Normalised thrust command, 0.0 (idle) to 1.0 (full).
    pub throttle: f32,
}

Go

// Post-mixer actuator commands for a fixed-wing airframe.
//
// Nested type with no fixed port identifier; published as one option of
// ControlSurfaces.1.0.
type FixedWingSurfaces_1_0 struct {
    // Left aileron deflection, -1.0 (full down) to +1.0 (full up).
    AileronLeft float32
    // Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
    // separately from the left surface rather than as a single roll command
    // so that flaperon and differential-aileron mixes can be expressed
    // without a second message.
    AileronRight float32
    // Elevator deflection, -1.0 (full down) to +1.0 (full up).
    Elevator float32
    // Rudder deflection, -1.0 (full left) to +1.0 (full right).
    Rudder float32
    // Normalised thrust command, 0.0 (idle) to 1.0 (full).
    Throttle float32
}

TypeScript

// Post-mixer actuator commands for a fixed-wing airframe.
//
// Nested type with no fixed port identifier; published as one option of
// ControlSurfaces.1.0.
export interface FixedWingSurfaces_1_0 {
  // Left aileron deflection, -1.0 (full down) to +1.0 (full up).
  aileron_left: number;
  // Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
  // separately from the left surface rather than as a single roll command
  // so that flaperon and differential-aileron mixes can be expressed
  // without a second message.
  aileron_right: number;
  // Elevator deflection, -1.0 (full down) to +1.0 (full up).
  elevator: number;
  // Rudder deflection, -1.0 (full left) to +1.0 (full right).
  rudder: number;
  // Normalised thrust command, 0.0 (idle) to 1.0 (full).
  throttle: number;
}

Python

# Post-mixer actuator commands for a fixed-wing airframe.
#
# Nested type with no fixed port identifier; published as one option of
# ControlSurfaces.1.0.
@dataclass(slots=True)
class FixedWingSurfaces_1_0:
    # Left aileron deflection, -1.0 (full down) to +1.0 (full up).
    aileron_left: float = 0.0
    # Right aileron deflection, -1.0 (full down) to +1.0 (full up). Carried
    # separately from the left surface rather than as a single roll command
    # so that flaperon and differential-aileron mixes can be expressed
    # without a second message.
    aileron_right: float = 0.0
    # Elevator deflection, -1.0 (full down) to +1.0 (full up).
    elevator: float = 0.0
    # Rudder deflection, -1.0 (full left) to +1.0 (full right).
    rudder: float = 0.0
    # Normalised thrust command, 0.0 (idle) to 1.0 (full).
    throttle: float = 0.0

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