ros2_interfaces_rolling/rosbag2_interfaces/srv/
set_rate.rs

1use serde::{Deserialize, Serialize};
2
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub struct SetRateRequest {
6    pub rate: f64,
7}
8
9impl Default for SetRateRequest {
10    fn default() -> Self {
11        SetRateRequest {
12            rate: 0.0,
13        }
14    }
15}
16
17impl ros2_client::Message for SetRateRequest {}
18
19
20
21#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
22pub struct SetRateResponse {
23    pub success: bool,
24}
25
26impl Default for SetRateResponse {
27    fn default() -> Self {
28        SetRateResponse {
29            success: false,
30        }
31    }
32}
33
34impl ros2_client::Message for SetRateResponse {}
35
36
37pub struct SetRate;
38impl ros2_client::Service for SetRate {
39    type Request = SetRateRequest;
40    type Response = SetRateResponse;
41
42    fn request_type_name(&self) -> &str { "SetRateRequest" }
43    fn response_type_name(&self) -> &str { "SetRateResponse" }
44}