mirror of
https://github.com/hubaldv/bioz-icd-rs.git
synced 2026-07-23 16:47:44 +00:00
Implement UDP socket.
This commit is contained in:
10
src/lib.rs
10
src/lib.rs
@@ -18,7 +18,8 @@ endpoints! {
|
|||||||
| StartDataEndpoint | () | () | "data/start" |
|
| StartDataEndpoint | () | () | "data/start" |
|
||||||
| StopDataEndpoint | () | bool | "data/stop" |
|
| StopDataEndpoint | () | bool | "data/stop" |
|
||||||
| SetAlgorithmEndpoint | SetAlgorithm | () | "algorithm/start" |
|
| SetAlgorithmEndpoint | SetAlgorithm | () | "algorithm/start" |
|
||||||
|
| PressureEndpoint | () | f32 | "data/pressure" |
|
||||||
|
| SetValvesEndpoint | SetValves | () | "valve/set" |
|
||||||
}
|
}
|
||||||
|
|
||||||
topics! {
|
topics! {
|
||||||
@@ -54,6 +55,7 @@ pub enum Algorithm {
|
|||||||
Embed_RP,
|
Embed_RP,
|
||||||
Embed_Cascade_PID,
|
Embed_Cascade_PID,
|
||||||
Embed_Cascade_S,
|
Embed_Cascade_S,
|
||||||
|
UDP
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -64,4 +66,8 @@ pub struct SetAlgorithm {
|
|||||||
pub setpoint: f32,
|
pub setpoint: f32,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq, Format)]
|
||||||
|
pub struct SetValves {
|
||||||
|
pub valve_a: u16,
|
||||||
|
pub valve_b: u16,
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user