use atat::atat_derive::AtatResp;
use heapless::String;
use super::types::{MQTTStatusCode, Qos};
#[derive(Debug, Clone, AtatResp)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Connected {
#[at_arg(position = 0)]
pub id: u8,
#[at_arg(position = 1)]
pub rc: MQTTStatusCode,
}
#[derive(Debug, Clone, AtatResp)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Disconnected {
#[at_arg(position = 0)]
pub id: u8,
#[at_arg(position = 1)]
pub rc: MQTTStatusCode,
}
#[derive(Debug, Clone, AtatResp)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct PublishResponse {
#[at_arg(position = 0)]
pub id: u8,
#[at_arg(position = 1)]
pub pmid: u16,
#[at_arg(position = 2)]
pub rc: MQTTStatusCode,
}
#[derive(Debug, Clone, AtatResp)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Received {
#[at_arg(position = 0)]
pub id: u8,
#[at_arg(position = 1)]
pub topic: String<256>,
#[at_arg(position = 2)]
pub msg_length: u16,
#[at_arg(position = 3)]
pub qos: Qos,
#[at_arg(position = 2)]
pub mid: Option<u16>,
}
#[derive(Debug, Clone, AtatResp)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct Subscribed {
#[at_arg(position = 0)]
pub id: u8,
#[at_arg(position = 1)]
pub topic: String<256>,
#[at_arg(position = 2)]
pub rc: MQTTStatusCode,
}
#[derive(Debug, Clone, AtatResp)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct PromptToPublish {
#[at_arg(position = 0)]
pub pmid: u8,
}