Add api to msp lsp types

This commit is contained in:
Dominik Werder
2025-05-14 16:28:41 +02:00
parent 2232e4b478
commit f96b09cdac
2 changed files with 33 additions and 0 deletions

View File

@@ -11,6 +11,8 @@ pub fn dbg_chn(chn: &str) -> bool {
"SINEG01:QE-B1-OP",
"STSRD01-TCWL-STX02:AMP1CURR",
"SATMA01-DBPM150:EST-Q1-SUM",
"TEST:SLOWPAUSE:SCALAR:F32:000000",
"TEST:SLOWPAUSE:SCALAR:F32:000001",
];
chns.contains(&chn)
} else {

View File

@@ -16,6 +16,37 @@ autoerr::create_error_v1!(
#[derive(Debug, Clone)]
pub struct MspU32(pub u32);
impl MspU32 {
pub fn to_db_i32(&self) -> i32 {
self.0 as i32
}
pub fn from_db_i32(x: i32) -> Self {
MspU32(x as u32)
}
pub fn to_u64(&self) -> u64 {
self.0 as u64
}
}
#[derive(Debug, Clone)]
pub struct LspU32(pub u32);
impl LspU32 {
pub fn to_db_i32(&self) -> i32 {
self.0 as i32
}
pub fn from_db_i32(x: i32) -> Self {
LspU32(x as u32)
}
pub fn to_u32(&self) -> u32 {
self.0
}
}
#[derive(Debug, Clone, Serialize, Deserialize)]
pub enum PrebinnedPartitioning {
Sec1,