ros2_interfaces_iron/mavros_msgs/srv/
command_int.rs

1use serde::{Deserialize, Serialize};
2
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub struct CommandIntRequest {
6    pub broadcast: bool,
7    pub frame: u8,
8    pub command: u16,
9    pub current: u8,
10    pub autocontinue: u8,
11    pub param1: f32,
12    pub param2: f32,
13    pub param3: f32,
14    pub param4: f32,
15    pub x: i32,
16    pub y: i32,
17    pub z: f32,
18}
19
20impl Default for CommandIntRequest {
21    fn default() -> Self {
22        CommandIntRequest {
23            broadcast: false,
24            frame: 0,
25            command: 0,
26            current: 0,
27            autocontinue: 0,
28            param1: 0.0,
29            param2: 0.0,
30            param3: 0.0,
31            param4: 0.0,
32            x: 0,
33            y: 0,
34            z: 0.0,
35        }
36    }
37}
38
39impl ros2_client::Message for CommandIntRequest {}
40
41
42
43#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
44pub struct CommandIntResponse {
45    pub success: bool,
46}
47
48impl Default for CommandIntResponse {
49    fn default() -> Self {
50        CommandIntResponse {
51            success: false,
52        }
53    }
54}
55
56impl ros2_client::Message for CommandIntResponse {}
57
58
59pub struct CommandInt;
60impl ros2_client::Service for CommandInt {
61    type Request = CommandIntRequest;
62    type Response = CommandIntResponse;
63
64    fn request_type_name(&self) -> &str { "CommandIntRequest" }
65    fn response_type_name(&self) -> &str { "CommandIntResponse" }
66}