ros2_interfaces_rolling/micro_ros_msgs/msg/
entity.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
use serde::{Deserialize, Serialize};

#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub struct Entity {
    pub entity_type: u8,
    pub name: ::std::string::String,
    pub types: Vec<::std::string::String>,
}

impl Entity {
    pub const PUBLISHER: u8 = 0;
    pub const SUBSCRIBER: u8 = 1;
    pub const SERVICE_SERVER: u8 = 2;
    pub const SERVICE_CLIENT: u8 = 3;
}

impl Default for Entity {
    fn default() -> Self {
        Entity {
            entity_type: 0,
            name: ::std::string::String::new(),
            types: Vec::new(),
        }
    }
}

impl ros2_client::Message for Entity {}