diff --git a/src/lib.rs b/src/lib.rs index f9071a3..b03a8bf 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1139,7 +1139,7 @@ impl DeviceTranform { } #[derive(Debug)] -struct VmcExtRvc { +pub struct VmcExtRvc { enable: bool, port: u16, ip_addr: Option, @@ -1208,6 +1208,18 @@ impl VmcMessage for VmcExtRvc { } } +impl VmcExtRvc { + pub fn new(enable: bool, port: u16, ip_addr: Option) -> MsgNewResult { + Ok(Self { enable, port, ip_addr}) + } + pub fn new_vmc_message(enable: bool, port: u16, ip_addr: Option) -> TraitMsgNewResult { + match Self::new(enable, port, ip_addr) { + Ok(val) => Ok(Box::new(val)), + Err(val) => Err(val) + } + } +} + #[derive(Debug)] struct VmcExtLight { name: String,