use crate::{
northward::PluginConfig,
southward::{
model::{ActionModel, ChannelModel, DeviceModel, PointModel},
RuntimeAction, RuntimeChannel, RuntimeDevice, RuntimePoint,
},
DriverResult, NorthwardResult,
};
use std::sync::Arc;
pub trait SouthwardModelConverter: Send + Sync + 'static {
fn convert_runtime_channel(
&self,
channel: ChannelModel,
) -> DriverResult<Arc<dyn RuntimeChannel>>;
fn convert_runtime_device(&self, device: DeviceModel) -> DriverResult<Arc<dyn RuntimeDevice>>;
fn convert_runtime_point(&self, point: PointModel) -> DriverResult<Arc<dyn RuntimePoint>>;
fn convert_runtime_action(&self, action: ActionModel) -> DriverResult<Arc<dyn RuntimeAction>>;
}
pub trait NorthwardModelConverter: Send + Sync + 'static {
fn convert_plugin_config(
&self,
config: serde_json::Value,
) -> NorthwardResult<Arc<dyn PluginConfig>>;
}