use bacnet_types::primitives::ObjectIdentifier;
pub fn kebab(name: impl std::fmt::Display) -> String {
name.to_string().to_lowercase().replace('_', "-")
}
pub fn object_label(object: ObjectIdentifier) -> String {
format!(
"{} {}",
kebab(object.object_type()),
object.instance_number()
)
}
pub const PRIORITIES: usize = 16;
pub fn priority_label(priority: usize) -> &'static str {
match priority {
1 => "life safety, manual",
2 => "life safety, automatic",
5 => "critical equipment",
6 => "minimum on/off time",
8 => "operator, manual",
_ => "site defined",
}
}