ros2_interfaces_iron/rosapi_msgs/srv/
get_time.rs1use serde::{Deserialize, Serialize};
2
3
4#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
5pub struct GetTimeRequest {
6
7}
8
9impl Default for GetTimeRequest {
10 fn default() -> Self {
11 GetTimeRequest {
12
13 }
14 }
15}
16
17impl ros2_client::Message for GetTimeRequest {}
18
19
20
21#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
22pub struct GetTimeResponse {
23 pub time: crate::builtin_interfaces::msg::Time,
24}
25
26impl Default for GetTimeResponse {
27 fn default() -> Self {
28 GetTimeResponse {
29 time: crate::builtin_interfaces::msg::Time::default(),
30 }
31 }
32}
33
34impl ros2_client::Message for GetTimeResponse {}
35
36
37pub struct GetTime;
38impl ros2_client::Service for GetTime {
39 type Request = GetTimeRequest;
40 type Response = GetTimeResponse;
41
42 fn request_type_name(&self) -> &str { "GetTimeRequest" }
43 fn response_type_name(&self) -> &str { "GetTimeResponse" }
44}