use crate::tlv::ToTLV;
pub use attribute::*;
pub use cluster::*;
pub use command::*;
pub use dataver::*;
pub use endpoint::*;
pub use event::*;
pub use handler::*;
pub use metadata::*;
pub use node::*;
pub use privilege::*;
pub use reply::*;
mod attribute;
mod cluster;
mod command;
mod dataver;
mod endpoint;
mod event;
mod handler;
mod metadata;
mod node;
mod privilege;
mod reply;
pub use crate::im::encoding::types::*;
#[derive(Debug, ToTLV, Copy, Clone)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct DeviceType {
pub dtype: u16,
pub drev: u16,
}
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
#[cfg_attr(feature = "defmt", derive(defmt::Format))]
pub struct SemanticTag<'a> {
pub mfg_code: Option<u16>,
pub namespace_id: u8,
pub tag: u8,
pub label: Option<&'a str>,
}
impl<'a> SemanticTag<'a> {
pub const fn new(namespace_id: u8, tag: u8) -> Self {
Self {
mfg_code: None,
namespace_id,
tag,
label: None,
}
}
pub const fn with_label(self, label: &'a str) -> Self {
Self {
label: Some(label),
..self
}
}
}