use epics_macros_rs::EpicsRecord;
#[derive(EpicsRecord)]
#[record(type = "stringout")]
pub struct StringoutRecord {
#[field(type = "String")]
pub val: String,
#[field(type = "String")]
pub oval: String,
#[field(type = "Short")]
pub ivoa: i16,
#[field(type = "String")]
pub ivov: String,
#[field(type = "Short")]
pub omsl: i16,
#[field(type = "String")]
pub dol: String,
#[field(type = "Short")]
pub simm: i16,
#[field(type = "String")]
pub siml: String,
#[field(type = "String")]
pub siol: String,
#[field(type = "Short")]
pub sims: i16,
}
impl Default for StringoutRecord {
fn default() -> Self {
Self {
val: String::new(),
oval: String::new(),
ivoa: 0,
ivov: String::new(),
omsl: 0,
dol: String::new(),
simm: 0,
siml: String::new(),
siol: String::new(),
sims: 0,
}
}
}
impl StringoutRecord {
pub fn new(val: &str) -> Self {
Self {
val: val.to_string(),
..Default::default()
}
}
}