ros2-interfaces-rolling 0.0.1

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


#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct COWriteIDReq {
    pub nodeid: i8,
    pub index: u16,
    pub subindex: u8,
    pub data: u32,
    pub canopen_datatype: u8,
}

impl COWriteIDReq {
    pub const CANOPEN_DATATYPE_INT8: u8 = 0x02;
    pub const CANOPEN_DATATYPE_INT16: u8 = 0x03;
    pub const CANOPEN_DATATYPE_INT32: u8 = 0x04;
    pub const CANOPEN_DATATYPE_UINT8: u8 = 0x05;
    pub const CANOPEN_DATATYPE_UINT16: u8 = 0x06;
    pub const CANOPEN_DATATYPE_UINT32: u8 = 0x07;
}

impl Default for COWriteIDReq {
    fn default() -> Self {
        COWriteIDReq {
            nodeid: 0,
            index: 0,
            subindex: 0,
            data: 0,
            canopen_datatype: 0,
        }
    }
}

impl ros2_client::Message for COWriteIDReq {}



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

impl Default for COWriteIDRes {
    fn default() -> Self {
        COWriteIDRes {
            success: false,
        }
    }
}

impl ros2_client::Message for COWriteIDRes {}


pub struct COWriteID;
impl ros2_client::Service for COWriteID {
    type Request = COWriteIDReq;
    type Response = COWriteIDRes;

    fn request_type_name(&self) -> &str { "COWriteIDReq" }
    fn response_type_name(&self) -> &str { "COWriteIDRes" }
}