monarch2/command/mqtt/
types.rs

1use atat::atat_derive::AtatEnum;
2
3/// The possible sensitivity settings use by Walter's GNSS receiver. This sets the amount of
4/// time that the receiver is actually on. More sensitivity requires more power.
5#[derive(Clone, Debug, PartialEq, AtatEnum, Default)]
6#[cfg_attr(feature = "defmt", derive(defmt::Format))]
7#[at_enum(u8)]
8pub enum Qos {
9    #[default]
10    AtMostOnce = 0,
11    AtLeastOnce = 1,
12    ExactlyOnce = 2,
13}
14
15/// Publishing return code.
16#[derive(Debug, Clone, Copy, PartialEq, Eq, AtatEnum)]
17#[cfg_attr(feature = "defmt", derive(defmt::Format))]
18#[repr(i8)]
19pub enum MQTTStatusCode {
20    Success = 0,
21    NoMem = -1,
22    Protocol = -2,
23    Inval = -3,
24    NoConn = -4,
25    ConnRefused = -5,
26    NotFound = -6,
27    ConnLost = -7,
28    Tls = -8,
29    PayloadSize = -9,
30    NotSupported = -10,
31    Auth = -11,
32    AclDenied = -12,
33    Unknown = -13,
34    Errno = -14,
35    Eai = -15,
36    Proxy = -16,
37    Unavailable = -17,
38}