seeed_lora_e5_at_commands/general/
responses.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
use atat_derive::AtatResp;
use heapless::String;

/// OK response
#[derive(Debug, Clone, AtatResp, PartialEq)]
pub struct OkResponse {
    pub ok: String<4>,
}

impl OkResponse {
    pub fn is_ok(&self) -> bool {
        self.ok.as_str().eq("OK")
    }
}

/// VER response
#[derive(Debug, Clone, AtatResp, PartialEq)]
pub struct VerResponse {
    pub major: u8,
    pub minor: u8,
    pub patch: u8,
}

/// LOWPOWER response
#[derive(Debug, Clone, AtatResp, PartialEq)]
pub struct LowPowerResponse {
    pub message: String<12>,
}