Update project structure and configurations

This commit is contained in:
2026-05-23 10:19:55 +02:00
parent ab5dc7e568
commit 62efea0646
1832 changed files with 83568 additions and 51829 deletions

View File

@@ -700,6 +700,31 @@ impl Component for Pipe<Connected> {
}
}
}
fn signature(&self) -> String {
format!("Pipe(circuit={})", self.circuit_id.0)
}
fn to_params(&self) -> crate::ComponentParams {
crate::ComponentParams::new("Pipe")
.with_param("circuitId", self.circuit_id.0)
.with_param("lengthM", self.geometry.length_m)
.with_param("diameterM", self.geometry.diameter_m)
.with_param("roughnessM", self.geometry.roughness_m)
.with_param("fluidDensityKgPerM3", self.fluid_density_kg_per_m3)
.with_param("fluidViscosityPaS", self.fluid_viscosity_pa_s)
.with_param("calib", serde_json::to_value(&self.calib).unwrap_or(serde_json::Value::Null))
}
fn update_calib_factor(&mut self, factor: &str, value: f64) -> bool {
let mut c = self.calib().clone();
if c.set_factor(factor, value) {
self.set_calib(c);
true
} else {
false
}
}
}
impl StateManageable for Pipe<Connected> {