ros2_interfaces_rolling/wiimote_msgs/msg/
timed_switch.rs1use serde::{Deserialize, Serialize};
2
3#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
4pub struct TimedSwitch {
5 pub switch_mode: i8,
6 pub num_cycles: i32,
7 pub pulse_pattern: Vec<f32>,
8}
9
10impl TimedSwitch {
11 pub const ON: i8 = 1;
12 pub const OFF: i8 = 0;
13 pub const NO_CHANGE: i8 = -2;
14 pub const REPEAT: i8 = -1;
15 pub const FOREVER: i8 = -1;
16}
17
18impl Default for TimedSwitch {
19 fn default() -> Self {
20 TimedSwitch {
21 switch_mode: 0,
22 num_cycles: 0,
23 pulse_pattern: Vec::new(),
24 }
25 }
26}
27
28impl ros2_client::Message for TimedSwitch {}