create constructors for VmcExtSetRes

This commit is contained in:
Cassandra de la Cruz-Munoz 2024-01-01 14:05:04 -05:00
parent 43635f599f
commit 7f4e0faf09
Signed by: cassdlcm
GPG Key ID: BFEBACEA812DDA70

View File

@ -1859,7 +1859,7 @@ impl VmcExtSetEye {
} }
#[derive(Debug)] #[derive(Debug)]
struct VmcExtSetRes { pub struct VmcExtSetRes {
response: String response: String
} }
@ -1883,6 +1883,18 @@ impl VmcMessage for VmcExtSetRes {
} }
} }
impl VmcExtSetRes {
pub fn new(response: String) ->MsgNewResult<Self> {
Ok(Self { response })
}
pub fn new_vmc_message(response: String) ->TraitMsgNewResult {
match Self::new(response) {
Ok(val) => Ok(Box::new(val)),
Err(val) => Err(val)
}
}
}
#[derive(Debug)] #[derive(Debug)]
struct VmcExtSetCalibExec { struct VmcExtSetCalibExec {
mode: i32 mode: i32