ros2-interfaces-iron 0.0.2

Structs for Messages and Services listed by ROS Index for ROS2 Iron. Built around the `ros2-client` crate.
Documentation
use serde::{Deserialize, Serialize};


#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SwitchControllerRequest {
    pub activate_controllers: Vec<::std::string::String>,
    pub deactivate_controllers: Vec<::std::string::String>,
    pub strictness: i32,
    pub activate_asap: bool,
    pub timeout: crate::builtin_interfaces::msg::Duration,
}

impl SwitchControllerRequest {
    pub const BEST_EFFORT: i32 = 1;
    pub const STRICT: i32 = 2;
}

impl Default for SwitchControllerRequest {
    fn default() -> Self {
        SwitchControllerRequest {
            activate_controllers: Vec::new(),
            deactivate_controllers: Vec::new(),
            strictness: 0,
            activate_asap: false,
            timeout: crate::builtin_interfaces::msg::Duration::default(),
        }
    }
}

impl ros2_client::Message for SwitchControllerRequest {}



#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct SwitchControllerResponse {
    pub ok: bool,
}

impl Default for SwitchControllerResponse {
    fn default() -> Self {
        SwitchControllerResponse {
            ok: false,
        }
    }
}

impl ros2_client::Message for SwitchControllerResponse {}


pub struct SwitchController;
impl ros2_client::Service for SwitchController {
    type Request = SwitchControllerRequest;
    type Response = SwitchControllerResponse;

    fn request_type_name(&self) -> &str { "SwitchControllerRequest" }
    fn response_type_name(&self) -> &str { "SwitchControllerResponse" }
}