2023-09-28 08:09:33 +00:00
|
|
|
use anyhow::Result;
|
|
|
|
|
|
|
|
use crate::command::CommandRequest;
|
2023-09-26 12:37:59 +00:00
|
|
|
|
2023-09-26 06:30:16 +00:00
|
|
|
pub mod e1;
|
|
|
|
|
|
|
|
pub trait DeviceBackend {
|
2023-09-28 08:09:33 +00:00
|
|
|
fn build_query(&self, device_protocol_version: u32) -> CommandRequest;
|
|
|
|
fn process_message(&self, msg: &[u8]) -> Result<Vec<u8>>;
|
2023-09-26 06:30:16 +00:00
|
|
|
fn set_attribute(&self, attribute: &str, value: &str) -> ();
|
|
|
|
}
|