Partial add of error

This commit is contained in:
Blizzard Finnegan 2023-08-16 15:44:48 -04:00
parent 638275e857
commit 4aec97865d
Signed by: blizzardfinnegan
GPG key ID: 61C1E13067E0018E
3 changed files with 33 additions and 34 deletions

View file

@ -5,10 +5,9 @@ pub mod FmCO2_objects;
pub mod FmCOMMAND_LINE_objects;
pub mod FmDATATRANSFER_objects;
pub mod FmDEVICE_objects;
//pub mod FmECG_objects;
pub mod FmERROR_objects;
pub mod FmNUMERIC_objects;
//pub mod collection_objects;
pub mod data_transfer_objects;
pub mod device_objects;
pub mod ecg_objects;
pub mod error_objects;
pub mod filesys_objects;

View file

@ -8,16 +8,16 @@ pub trait FmECG:Downcast{}
#[derive(Clone,Debug)]
pub enum FmECGSpecies{
SpPACER,
SpGLOBALMEASURE,
SpLEADMEASURE,
SpSTATUS,
SpRHYTHMREPORT,
SpAUTOREPORT,
SpMISCELLANEOUS,
SpSTANDARD,
SpSETTINGS,
SpSELECTOR,
SpPACER, //0 data
SpGLOBALMEASURE, //1 data
SpLEADMEASURE, //2 data
SpSTATUS, //3 data
SpRHYTHMREPORT, //32 config
SpAUTOREPORT, //33 config
SpMISCELLANEOUS, //34 config
SpSTANDARD, //35 config
SpSETTINGS, //36 config
SpSELECTOR, //0 param
}
impl ObjectSpecies for FmECGSpecies{}

View file

@ -21,77 +21,77 @@ impl ObjectSpecies for FmERRORSpecies{}
impl FmERROR for CErrEStd{}
#[derive(Getters,Builder,Clone,Debug)]
pub struct CErrEStd{
errclassid:uint32,
errorcode:uint16,
description:ansichar,
data:uint8,
errclassid:u32,
errorcode:u16,
description:String,
data:u8,
#[getter(skip)]
raw_object:RawObject,
}
pub impl CErrEStd {
fn new() -> Self { todo!() }
impl CErrEStd {
pub fn new() -> Self { todo!() }
}
impl Object for CErrEStd{
fn get_family(&self) -> datatypes::Family { datatypes::Family::FmERROR }
fn get_genus(&self) -> datatypes::Genus { datatypes::Genus::GnERROR }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::CErrEStd) }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::SpSTANDARD) }
fn get_raw_object(&self) -> RawObject { self.raw_object.clone() }
}
impl FmERROR for CErrPGetError{}
#[derive(Getters,Builder,Clone,Debug)]
pub struct CErrPGetError{
errclassid:uint32,
source:uint16,
errcode:uint16,
errclassid:u32,
source:u16,
errcode:u16,
#[getter(skip)]
raw_object:RawObject,
}
pub impl CErrPGetError {
fn new() -> Self { todo!() }
impl CErrPGetError {
pub fn new() -> Self { todo!() }
}
impl Object for CErrPGetError{
fn get_family(&self) -> datatypes::Family { datatypes::Family::FmERROR }
fn get_genus(&self) -> datatypes::Genus { datatypes::Genus::GnPARAMETER }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::CErrPGetError) }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::SpGET_ERROR) }
fn get_raw_object(&self) -> RawObject { self.raw_object.clone() }
}
impl FmERROR for CErrDExtStd{}
#[derive(Getters,Builder,Clone,Debug)]
pub struct CErrDExtStd{
errorcontainer:Object::ANY_CLASS,
errorcontainer:&'static dyn FmERROR,
#[getter(skip)]
raw_object:RawObject,
}
pub impl CErrDExtStd {
fn new() -> Self { todo!() }
impl CErrDExtStd {
pub fn new() -> Self { todo!() }
}
impl Object for CErrDExtStd{
fn get_family(&self) -> datatypes::Family { datatypes::Family::FmERROR }
fn get_genus(&self) -> datatypes::Genus { datatypes::Genus::GnDATAEXT }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::CErrDExtStd) }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::SpSTANDARD) }
fn get_raw_object(&self) -> RawObject { self.raw_object.clone() }
}
impl FmERROR for CErrDDesc{}
#[derive(Getters,Builder,Clone,Debug)]
pub struct CErrDDesc{
ioparameter:uint32,
ioparameter:u32,
#[getter(skip)]
raw_object:RawObject,
}
pub impl CErrDDesc {
fn new() -> Self { todo!() }
impl CErrDDesc {
pub fn new() -> Self { todo!() }
}
impl Object for CErrDDesc{
fn get_family(&self) -> datatypes::Family { datatypes::Family::FmERROR }
fn get_genus(&self) -> datatypes::Genus { datatypes::Genus::GnDATA }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::CErrDDesc) }
fn get_species(&self) -> Box<dyn super::ObjectSpecies> { Box::new(FmERRORSpecies::SpDESCRIPTOR) }
fn get_raw_object(&self) -> RawObject { self.raw_object.clone() }
}