wurth_calypso/command/
device.rs1use super::EmptyResponse;
2use atat::atat_derive::AtatCmd;
3use heapless::String;
4
5#[derive(AtatCmd)]
6#[at_cmd("+start", EmptyResponse, timeout_ms = 100)]
7pub struct Start {}
8
9#[derive(AtatCmd)]
10#[at_cmd("+stop", EmptyResponse, timeout_ms = 100)]
11pub struct Stop {
12 #[at_arg(position = 0)]
13 pub timeout: u16,
14}
15
16#[derive(Clone, AtatCmd)]
17#[at_cmd("+test", EmptyResponse, timeout_ms = 100)]
18pub struct Test {}
19
20#[derive(AtatCmd)]
21#[at_cmd("+reboot", EmptyResponse, timeout_ms = 100)]
22pub struct Reboot {}
23
24#[derive(AtatCmd)]
25#[at_cmd("+factoryreset", EmptyResponse)]
26pub struct FactoryReset {}
27
28#[derive(AtatCmd)]
29#[at_cmd("+sleep", EmptyResponse, timeout_ms = 100)]
30pub struct Sleep {
31 #[at_arg(position = 0)]
32 pub timeout_secs: u32,
33}
34
35#[derive(AtatCmd)]
36#[at_cmd("+powersave", EmptyResponse, timeout_ms = 100)]
37pub struct PowerSave {}
38
39#[derive(AtatCmd)]
40#[at_cmd("+provisioningStart", EmptyResponse, timeout_ms = 100)]
41pub struct ProvisioningStart {}
42
43#[derive(AtatCmd)]
44#[at_cmd("+provisioningStop", EmptyResponse, timeout_ms = 100)]
45pub struct ProvisioningStop {}
46
47#[derive(AtatCmd)]
48#[at_cmd("+get", EmptyResponse, timeout_ms = 100)]
49pub struct Get {
50 #[at_arg(position = 0)]
51 pub id: String<16>,
52 #[at_arg(position = 1)]
53 pub option: String<24>,
54}
55
56#[derive(AtatCmd)]
57#[at_cmd("+set", EmptyResponse, timeout_ms = 100)]
58pub struct Set {
59 #[at_arg(position = 0)]
60 pub id: String<16>,
61 #[at_arg(position = 1)]
62 pub option: String<24>,
63}