use mabi_core::Error as CoreError;
use thiserror::Error;
pub type BacnetResult<T> = Result<T, BacnetError>;
#[derive(Debug, Error)]
pub enum BacnetError {
#[error("Object not found: {object_type}:{instance}")]
ObjectNotFound { object_type: String, instance: u32 },
#[error("Property not found: {property}")]
PropertyNotFound { property: String },
#[error("Invalid object type: {0}")]
InvalidObjectType(u16),
#[error("Server error: {0}")]
Server(String),
#[error("Protocol error: {0}")]
Protocol(String),
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[error("Core error: {0}")]
Core(#[from] CoreError),
}