#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__Alert() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__Alert__init(msg: *mut Alert) -> bool;
    fn interface_protocol__msg__Alert__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<Alert>, size: usize) -> bool;
    fn interface_protocol__msg__Alert__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<Alert>);
    fn interface_protocol__msg__Alert__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<Alert>, out_seq: *mut rosidl_runtime_rs::Sequence<Alert>) -> bool;
}

// Corresponds to interface_protocol__msg__Alert
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]

/// interface_protocol/msg/Alert.msg

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct Alert {

    // This member is not documented.
    #[allow(missing_docs)]
    pub type_: u8,

}

impl Alert {

    // This constant is not documented.
    #[allow(missing_docs)]
    pub const STARTUP: u8 = 0;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CONFIRM: u8 = 1;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const ERROR: u8 = 2;

}


impl Default for Alert {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__Alert__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__Alert__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for Alert {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Alert__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Alert__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Alert__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for Alert {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for Alert where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/Alert";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__Alert() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__BodyVelCmd() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__BodyVelCmd__init(msg: *mut BodyVelCmd) -> bool;
    fn interface_protocol__msg__BodyVelCmd__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<BodyVelCmd>, size: usize) -> bool;
    fn interface_protocol__msg__BodyVelCmd__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<BodyVelCmd>);
    fn interface_protocol__msg__BodyVelCmd__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<BodyVelCmd>, out_seq: *mut rosidl_runtime_rs::Sequence<BodyVelCmd>) -> bool;
}

// Corresponds to interface_protocol__msg__BodyVelCmd
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct BodyVelCmd {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub linear_velocity: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub yaw_velocity: f64,

}



impl Default for BodyVelCmd {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__BodyVelCmd__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__BodyVelCmd__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for BodyVelCmd {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__BodyVelCmd__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__BodyVelCmd__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__BodyVelCmd__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for BodyVelCmd {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for BodyVelCmd where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/BodyVelCmd";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__BodyVelCmd() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__GamepadKeys() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__GamepadKeys__init(msg: *mut GamepadKeys) -> bool;
    fn interface_protocol__msg__GamepadKeys__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<GamepadKeys>, size: usize) -> bool;
    fn interface_protocol__msg__GamepadKeys__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<GamepadKeys>);
    fn interface_protocol__msg__GamepadKeys__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<GamepadKeys>, out_seq: *mut rosidl_runtime_rs::Sequence<GamepadKeys>) -> bool;
}

// Corresponds to interface_protocol__msg__GamepadKeys
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]

/// Timestamp field using ROS2 header

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct GamepadKeys {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,

    /// Marks whether the hardware gamepad is connected
    pub hardware_connected: bool,

    /// Digital buttons (0 = released, 1 = pressed)
    /// Fixed size array of 12 elements
    pub digital_states: [i32; 12],

    /// Analog inputs (range: -1.0 to 1.0)
    /// Fixed size array of 6 elements
    pub analog_states: [f64; 6],

}

impl GamepadKeys {

    // This constant is not documented.
    #[allow(missing_docs)]
    pub const LB: u8 = 0;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const RB: u8 = 1;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const A: u8 = 2;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const B: u8 = 3;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const X: u8 = 4;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const Y: u8 = 5;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BACK: u8 = 6;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const START: u8 = 7;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CROSS_X_UP: u8 = 8;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CROSS_X_DOWN: u8 = 9;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CROSS_Y_LEFT: u8 = 10;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CROSS_Y_RIGHT: u8 = 11;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const LT: u8 = 0;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const RT: u8 = 1;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const LEFT_STICK_X: u8 = 2;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const LEFT_STICK_Y: u8 = 3;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const RIGHT_STICK_X: u8 = 4;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const RIGHT_STICK_Y: u8 = 5;

}


impl Default for GamepadKeys {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__GamepadKeys__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__GamepadKeys__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for GamepadKeys {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__GamepadKeys__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__GamepadKeys__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__GamepadKeys__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for GamepadKeys {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for GamepadKeys where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/GamepadKeys";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__GamepadKeys() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__Heartbeat() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__Heartbeat__init(msg: *mut Heartbeat) -> bool;
    fn interface_protocol__msg__Heartbeat__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<Heartbeat>, size: usize) -> bool;
    fn interface_protocol__msg__Heartbeat__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<Heartbeat>);
    fn interface_protocol__msg__Heartbeat__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<Heartbeat>, out_seq: *mut rosidl_runtime_rs::Sequence<Heartbeat>) -> bool;
}

// Corresponds to interface_protocol__msg__Heartbeat
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct Heartbeat {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub node_name: rosidl_runtime_rs::String,


    // This member is not documented.
    #[allow(missing_docs)]
    pub startup_timestamp: i64,

    /// idle, running, error, sleep
    pub node_status: rosidl_runtime_rs::String,


    // This member is not documented.
    #[allow(missing_docs)]
    pub error_code: i64,


    // This member is not documented.
    #[allow(missing_docs)]
    pub error_message: rosidl_runtime_rs::String,

}



impl Default for Heartbeat {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__Heartbeat__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__Heartbeat__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for Heartbeat {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Heartbeat__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Heartbeat__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Heartbeat__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for Heartbeat {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for Heartbeat where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/Heartbeat";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__Heartbeat() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__ImuInfo() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__ImuInfo__init(msg: *mut ImuInfo) -> bool;
    fn interface_protocol__msg__ImuInfo__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<ImuInfo>, size: usize) -> bool;
    fn interface_protocol__msg__ImuInfo__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<ImuInfo>);
    fn interface_protocol__msg__ImuInfo__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<ImuInfo>, out_seq: *mut rosidl_runtime_rs::Sequence<ImuInfo>) -> bool;
}

// Corresponds to interface_protocol__msg__ImuInfo
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct ImuInfo {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub quaternion: geometry_msgs::msg::rmw::Quaternion,


    // This member is not documented.
    #[allow(missing_docs)]
    pub rpy: geometry_msgs::msg::rmw::Vector3,


    // This member is not documented.
    #[allow(missing_docs)]
    pub linear_acceleration: geometry_msgs::msg::rmw::Vector3,


    // This member is not documented.
    #[allow(missing_docs)]
    pub angular_velocity: geometry_msgs::msg::rmw::Vector3,

}



impl Default for ImuInfo {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__ImuInfo__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__ImuInfo__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for ImuInfo {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__ImuInfo__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__ImuInfo__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__ImuInfo__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for ImuInfo {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for ImuInfo where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/ImuInfo";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__ImuInfo() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointCommand() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__JointCommand__init(msg: *mut JointCommand) -> bool;
    fn interface_protocol__msg__JointCommand__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<JointCommand>, size: usize) -> bool;
    fn interface_protocol__msg__JointCommand__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<JointCommand>);
    fn interface_protocol__msg__JointCommand__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<JointCommand>, out_seq: *mut rosidl_runtime_rs::Sequence<JointCommand>) -> bool;
}

// Corresponds to interface_protocol__msg__JointCommand
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct JointCommand {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub position: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub velocity: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub feed_forward_torque: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub torque: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub stiffness: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub damping: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub parallel_parser_type: u8,

}



impl Default for JointCommand {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__JointCommand__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__JointCommand__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for JointCommand {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointCommand__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointCommand__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointCommand__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for JointCommand {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for JointCommand where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/JointCommand";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointCommand() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointMotionPlanRequest() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__JointMotionPlanRequest__init(msg: *mut JointMotionPlanRequest) -> bool;
    fn interface_protocol__msg__JointMotionPlanRequest__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<JointMotionPlanRequest>, size: usize) -> bool;
    fn interface_protocol__msg__JointMotionPlanRequest__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<JointMotionPlanRequest>);
    fn interface_protocol__msg__JointMotionPlanRequest__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<JointMotionPlanRequest>, out_seq: *mut rosidl_runtime_rs::Sequence<JointMotionPlanRequest>) -> bool;
}

// Corresponds to interface_protocol__msg__JointMotionPlanRequest
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]

/// Motion plan request message (via topic)
/// request_type constants

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct JointMotionPlanRequest {

    // This member is not documented.
    #[allow(missing_docs)]
    pub request_id: i32,


    // This member is not documented.
    #[allow(missing_docs)]
    pub request_type: u8,

    /// Motion target (consistent with JointMotion.action)
    pub use_gravity_compensation: bool,

    /// Empty array means reset to default
    pub joint_indices: rosidl_runtime_rs::Sequence<i32>,

    /// Target joint positions (rad)
    pub target_positions: rosidl_runtime_rs::Sequence<f64>,

    /// Target joint velocities (empty for auto-planning)
    pub target_velocities: rosidl_runtime_rs::Sequence<f64>,

    /// Expected execution time (s)
    pub execution_time: f64,

    /// Optional, empty array for default
    pub stiffness: rosidl_runtime_rs::Sequence<f64>,

    /// Optional, empty array for default
    pub damping: rosidl_runtime_rs::Sequence<f64>,

}

impl JointMotionPlanRequest {
    /// Plan and execute
    pub const REQUEST_PLAN_EXECUTE: u8 = 0;

    /// Cancel specified request_id
    pub const REQUEST_CANCEL: u8 = 1;

    /// Reset to default pose
    pub const REQUEST_RESET: u8 = 2;

}


impl Default for JointMotionPlanRequest {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__JointMotionPlanRequest__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__JointMotionPlanRequest__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for JointMotionPlanRequest {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointMotionPlanRequest__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointMotionPlanRequest__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointMotionPlanRequest__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for JointMotionPlanRequest {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for JointMotionPlanRequest where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/JointMotionPlanRequest";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointMotionPlanRequest() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointMotionPlanState() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__JointMotionPlanState__init(msg: *mut JointMotionPlanState) -> bool;
    fn interface_protocol__msg__JointMotionPlanState__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<JointMotionPlanState>, size: usize) -> bool;
    fn interface_protocol__msg__JointMotionPlanState__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<JointMotionPlanState>);
    fn interface_protocol__msg__JointMotionPlanState__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<JointMotionPlanState>, out_seq: *mut rosidl_runtime_rs::Sequence<JointMotionPlanState>) -> bool;
}

// Corresponds to interface_protocol__msg__JointMotionPlanState
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]

/// Planner status

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct JointMotionPlanState {

    // This member is not documented.
    #[allow(missing_docs)]
    pub request_id: i32,


    // This member is not documented.
    #[allow(missing_docs)]
    pub status: u8,

    /// Progress and time
    /// 0.0~1.0, overall planning/execution progress
    pub progress: f64,

}

impl JointMotionPlanState {

    // This constant is not documented.
    #[allow(missing_docs)]
    pub const STATUS_DISABLED: u8 = 0;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const IDLE: u8 = 1;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const EXECUTING: u8 = 2;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const EXITING: u8 = 3;

}


impl Default for JointMotionPlanState {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__JointMotionPlanState__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__JointMotionPlanState__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for JointMotionPlanState {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointMotionPlanState__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointMotionPlanState__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointMotionPlanState__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for JointMotionPlanState {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for JointMotionPlanState where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/JointMotionPlanState";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointMotionPlanState() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointOverrideCommand() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__JointOverrideCommand__init(msg: *mut JointOverrideCommand) -> bool;
    fn interface_protocol__msg__JointOverrideCommand__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<JointOverrideCommand>, size: usize) -> bool;
    fn interface_protocol__msg__JointOverrideCommand__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<JointOverrideCommand>);
    fn interface_protocol__msg__JointOverrideCommand__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<JointOverrideCommand>, out_seq: *mut rosidl_runtime_rs::Sequence<JointOverrideCommand>) -> bool;
}

// Corresponds to interface_protocol__msg__JointOverrideCommand
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct JointOverrideCommand {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub weight: f64,


    // This member is not documented.
    #[allow(missing_docs)]
    pub joint_indices: rosidl_runtime_rs::Sequence<i32>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub position: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub velocity: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub feed_forward_torque: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub torque: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub stiffness: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub damping: rosidl_runtime_rs::Sequence<f64>,

}



impl Default for JointOverrideCommand {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__JointOverrideCommand__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__JointOverrideCommand__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for JointOverrideCommand {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointOverrideCommand__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointOverrideCommand__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointOverrideCommand__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for JointOverrideCommand {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for JointOverrideCommand where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/JointOverrideCommand";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointOverrideCommand() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointState() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__JointState__init(msg: *mut JointState) -> bool;
    fn interface_protocol__msg__JointState__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<JointState>, size: usize) -> bool;
    fn interface_protocol__msg__JointState__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<JointState>);
    fn interface_protocol__msg__JointState__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<JointState>, out_seq: *mut rosidl_runtime_rs::Sequence<JointState>) -> bool;
}

// Corresponds to interface_protocol__msg__JointState
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct JointState {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub position: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub velocity: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub torque: rosidl_runtime_rs::Sequence<f64>,

}



impl Default for JointState {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__JointState__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__JointState__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for JointState {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointState__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointState__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__JointState__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for JointState {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for JointState where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/JointState";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__JointState() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__LedControl() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__LedControl__init(msg: *mut LedControl) -> bool;
    fn interface_protocol__msg__LedControl__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<LedControl>, size: usize) -> bool;
    fn interface_protocol__msg__LedControl__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<LedControl>);
    fn interface_protocol__msg__LedControl__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<LedControl>, out_seq: *mut rosidl_runtime_rs::Sequence<LedControl>) -> bool;
}

// Corresponds to interface_protocol__msg__LedControl
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct LedControl {

    // This member is not documented.
    #[allow(missing_docs)]
    pub color: u8,

}

impl LedControl {

    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BLINK_RED: u8 = 1;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BLINK_GREEN: u8 = 2;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BLINK_BLUE: u8 = 3;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BLINK_WHITE: u8 = 4;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CONSTANT_ON_WHITE: u8 = 5;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CONSTANT_ON_GREEN: u8 = 6;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BREATHE_WHITE: u8 = 7;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const WATER_WHITE: u8 = 8;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BREATHE_RED: u8 = 9;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const BLINK_ORANGE: u8 = 10;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CONSTANT_ON_ORANGE: u8 = 11;

}


impl Default for LedControl {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__LedControl__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__LedControl__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for LedControl {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__LedControl__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__LedControl__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__LedControl__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for LedControl {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for LedControl where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/LedControl";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__LedControl() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotionState() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__MotionState__init(msg: *mut MotionState) -> bool;
    fn interface_protocol__msg__MotionState__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<MotionState>, size: usize) -> bool;
    fn interface_protocol__msg__MotionState__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<MotionState>);
    fn interface_protocol__msg__MotionState__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<MotionState>, out_seq: *mut rosidl_runtime_rs::Sequence<MotionState>) -> bool;
}

// Corresponds to interface_protocol__msg__MotionState
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct MotionState {

    // This member is not documented.
    #[allow(missing_docs)]
    pub current_motion_task: rosidl_runtime_rs::String,


    // This member is not documented.
    #[allow(missing_docs)]
    pub available_transition_motions: rosidl_runtime_rs::Sequence<rosidl_runtime_rs::String>,

}



impl Default for MotionState {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__MotionState__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__MotionState__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for MotionState {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotionState__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotionState__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotionState__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for MotionState {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for MotionState where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/MotionState";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotionState() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotionStateRequest() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__MotionStateRequest__init(msg: *mut MotionStateRequest) -> bool;
    fn interface_protocol__msg__MotionStateRequest__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<MotionStateRequest>, size: usize) -> bool;
    fn interface_protocol__msg__MotionStateRequest__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<MotionStateRequest>);
    fn interface_protocol__msg__MotionStateRequest__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<MotionStateRequest>, out_seq: *mut rosidl_runtime_rs::Sequence<MotionStateRequest>) -> bool;
}

// Corresponds to interface_protocol__msg__MotionStateRequest
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct MotionStateRequest {

    // This member is not documented.
    #[allow(missing_docs)]
    pub target_motion_name: rosidl_runtime_rs::String,

}



impl Default for MotionStateRequest {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__MotionStateRequest__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__MotionStateRequest__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for MotionStateRequest {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotionStateRequest__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotionStateRequest__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotionStateRequest__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for MotionStateRequest {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for MotionStateRequest where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/MotionStateRequest";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotionStateRequest() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotorCommand() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__MotorCommand__init(msg: *mut MotorCommand) -> bool;
    fn interface_protocol__msg__MotorCommand__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<MotorCommand>, size: usize) -> bool;
    fn interface_protocol__msg__MotorCommand__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<MotorCommand>);
    fn interface_protocol__msg__MotorCommand__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<MotorCommand>, out_seq: *mut rosidl_runtime_rs::Sequence<MotorCommand>) -> bool;
}

// Corresponds to interface_protocol__msg__MotorCommand
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct MotorCommand {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub position: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub velocity: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub feed_forward_torque: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub torque: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub stiffness: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub damping: rosidl_runtime_rs::Sequence<f64>,

}



impl Default for MotorCommand {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__MotorCommand__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__MotorCommand__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for MotorCommand {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorCommand__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorCommand__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorCommand__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for MotorCommand {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for MotorCommand where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/MotorCommand";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotorCommand() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotorDebug() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__MotorDebug__init(msg: *mut MotorDebug) -> bool;
    fn interface_protocol__msg__MotorDebug__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<MotorDebug>, size: usize) -> bool;
    fn interface_protocol__msg__MotorDebug__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<MotorDebug>);
    fn interface_protocol__msg__MotorDebug__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<MotorDebug>, out_seq: *mut rosidl_runtime_rs::Sequence<MotorDebug>) -> bool;
}

// Corresponds to interface_protocol__msg__MotorDebug
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct MotorDebug {

    // This member is not documented.
    #[allow(missing_docs)]
    pub mos_temperature: rosidl_runtime_rs::Sequence<f32>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub motor_temperature: rosidl_runtime_rs::Sequence<f32>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub voltage: rosidl_runtime_rs::Sequence<f32>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub current: rosidl_runtime_rs::Sequence<f32>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub error_code: rosidl_runtime_rs::Sequence<i32>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub offline: rosidl_runtime_rs::Sequence<u8>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub enable: rosidl_runtime_rs::Sequence<u8>,

}



impl Default for MotorDebug {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__MotorDebug__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__MotorDebug__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for MotorDebug {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorDebug__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorDebug__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorDebug__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for MotorDebug {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for MotorDebug where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/MotorDebug";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotorDebug() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotorState() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__MotorState__init(msg: *mut MotorState) -> bool;
    fn interface_protocol__msg__MotorState__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<MotorState>, size: usize) -> bool;
    fn interface_protocol__msg__MotorState__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<MotorState>);
    fn interface_protocol__msg__MotorState__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<MotorState>, out_seq: *mut rosidl_runtime_rs::Sequence<MotorState>) -> bool;
}

// Corresponds to interface_protocol__msg__MotorState
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct MotorState {

    // This member is not documented.
    #[allow(missing_docs)]
    pub header: std_msgs::msg::rmw::Header,


    // This member is not documented.
    #[allow(missing_docs)]
    pub position: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub velocity: rosidl_runtime_rs::Sequence<f64>,


    // This member is not documented.
    #[allow(missing_docs)]
    pub torque: rosidl_runtime_rs::Sequence<f64>,

}



impl Default for MotorState {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__MotorState__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__MotorState__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for MotorState {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorState__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorState__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__MotorState__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for MotorState {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for MotorState where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/MotorState";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__MotorState() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__ParallelParserType() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__ParallelParserType__init(msg: *mut ParallelParserType) -> bool;
    fn interface_protocol__msg__ParallelParserType__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<ParallelParserType>, size: usize) -> bool;
    fn interface_protocol__msg__ParallelParserType__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<ParallelParserType>);
    fn interface_protocol__msg__ParallelParserType__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<ParallelParserType>, out_seq: *mut rosidl_runtime_rs::Sequence<ParallelParserType>) -> bool;
}

// Corresponds to interface_protocol__msg__ParallelParserType
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct ParallelParserType {

    // This member is not documented.
    #[allow(missing_docs)]
    pub structure_needs_at_least_one_member: u8,

}

impl ParallelParserType {

    // This constant is not documented.
    #[allow(missing_docs)]
    pub const CLASSIC_PARSER: u8 = 0;


    // This constant is not documented.
    #[allow(missing_docs)]
    pub const RL_PARSER: u8 = 1;

}


impl Default for ParallelParserType {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__ParallelParserType__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__ParallelParserType__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for ParallelParserType {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__ParallelParserType__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__ParallelParserType__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__ParallelParserType__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for ParallelParserType {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for ParallelParserType where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/ParallelParserType";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__ParallelParserType() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__PowerInfo() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__PowerInfo__init(msg: *mut PowerInfo) -> bool;
    fn interface_protocol__msg__PowerInfo__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<PowerInfo>, size: usize) -> bool;
    fn interface_protocol__msg__PowerInfo__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<PowerInfo>);
    fn interface_protocol__msg__PowerInfo__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<PowerInfo>, out_seq: *mut rosidl_runtime_rs::Sequence<PowerInfo>) -> bool;
}

// Corresponds to interface_protocol__msg__PowerInfo
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]


// This struct is not documented.
#[allow(missing_docs)]

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct PowerInfo {

    // This member is not documented.
    #[allow(missing_docs)]
    pub enable: bool,


    // This member is not documented.
    #[allow(missing_docs)]
    pub percentage: f32,


    // This member is not documented.
    #[allow(missing_docs)]
    pub voltage: f32,


    // This member is not documented.
    #[allow(missing_docs)]
    pub current: f32,


    // This member is not documented.
    #[allow(missing_docs)]
    pub current_limit: f32,


    // This member is not documented.
    #[allow(missing_docs)]
    pub error_code: i32,

}



impl Default for PowerInfo {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__PowerInfo__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__PowerInfo__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for PowerInfo {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__PowerInfo__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__PowerInfo__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__PowerInfo__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for PowerInfo {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for PowerInfo where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/PowerInfo";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__PowerInfo() }
  }
}


#[link(name = "interface_protocol__rosidl_typesupport_c")]
extern "C" {
    fn rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__Tts() -> *const std::ffi::c_void;
}

#[link(name = "interface_protocol__rosidl_generator_c")]
extern "C" {
    fn interface_protocol__msg__Tts__init(msg: *mut Tts) -> bool;
    fn interface_protocol__msg__Tts__Sequence__init(seq: *mut rosidl_runtime_rs::Sequence<Tts>, size: usize) -> bool;
    fn interface_protocol__msg__Tts__Sequence__fini(seq: *mut rosidl_runtime_rs::Sequence<Tts>);
    fn interface_protocol__msg__Tts__Sequence__copy(in_seq: &rosidl_runtime_rs::Sequence<Tts>, out_seq: *mut rosidl_runtime_rs::Sequence<Tts>) -> bool;
}

// Corresponds to interface_protocol__msg__Tts
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]

/// Must, Speech content

#[repr(C)]
#[derive(Clone, Debug, PartialEq, PartialOrd)]
pub struct Tts {

    // This member is not documented.
    #[allow(missing_docs)]
    pub text: rosidl_runtime_rs::String,

    /// Optional, Default: en
    pub language: rosidl_runtime_rs::String,

    /// Optional, Default: default
    pub speaker: rosidl_runtime_rs::String,

    /// Optional, Default: 150
    pub rate: i64,

}



impl Default for Tts {
  fn default() -> Self {
    unsafe {
      let mut msg = std::mem::zeroed();
      if !interface_protocol__msg__Tts__init(&mut msg as *mut _) {
        panic!("Call to interface_protocol__msg__Tts__init() failed");
      }
      msg
    }
  }
}

impl rosidl_runtime_rs::SequenceAlloc for Tts {
  fn sequence_init(seq: &mut rosidl_runtime_rs::Sequence<Self>, size: usize) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Tts__Sequence__init(seq as *mut _, size) }
  }
  fn sequence_fini(seq: &mut rosidl_runtime_rs::Sequence<Self>) {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Tts__Sequence__fini(seq as *mut _) }
  }
  fn sequence_copy(in_seq: &rosidl_runtime_rs::Sequence<Self>, out_seq: &mut rosidl_runtime_rs::Sequence<Self>) -> bool {
    // SAFETY: This is safe since the pointer is guaranteed to be valid/initialized.
    unsafe { interface_protocol__msg__Tts__Sequence__copy(in_seq, out_seq as *mut _) }
  }
}

impl rosidl_runtime_rs::Message for Tts {
  type RmwMsg = Self;
  fn into_rmw_message(msg_cow: std::borrow::Cow<'_, Self>) -> std::borrow::Cow<'_, Self::RmwMsg> { msg_cow }
  fn from_rmw_message(msg: Self::RmwMsg) -> Self { msg }
}

impl rosidl_runtime_rs::RmwMessage for Tts where Self: Sized {
  const TYPE_NAME: &'static str = "interface_protocol/msg/Tts";
  fn get_type_support() -> *const std::ffi::c_void {
    // SAFETY: No preconditions for this function.
    unsafe { rosidl_typesupport_c__get_message_type_support_handle__interface_protocol__msg__Tts() }
  }
}


