mirror of
https://github.com/hubaldv/bioz-icd-rs.git
synced 2025-12-05 21:21:18 +00:00
Change multi to sweep.
This commit is contained in:
18
src/lib.rs
18
src/lib.rs
@@ -14,7 +14,7 @@ pub enum ImpedanceInitError {
|
||||
|
||||
pub type ImpedanceInitResult = Result<f32, ImpedanceInitError>;
|
||||
|
||||
pub type MultiImpedanceInitResult = Result<MultiImpedanceResult, ImpedanceInitError>;
|
||||
pub type SweepImpedanceInitResult = Result<SweepImpedanceResult, ImpedanceInitError>;
|
||||
|
||||
endpoints! {
|
||||
list = ENDPOINT_LIST;
|
||||
@@ -25,9 +25,8 @@ endpoints! {
|
||||
| GetUniqueIdEndpoint | () | [u8; 12] | "get_id" |
|
||||
| SetGreenLedEndpoint | f32 | () | "led/green" |
|
||||
| StartSingleImpedanceEndpoint | SingleImpedanceStartRequest | ImpedanceInitResult | "imp/start_single" |
|
||||
| StopSingleImpedanceEndpoint | () | bool | "imp/stop_single" |
|
||||
| StartMultiImpedanceEndpoint | MultiImpedanceStartRequest | MultiImpedanceInitResult | "imp/start_multi" |
|
||||
| StopMultiImpedanceEndpoint | () | bool | "imp/stop_multi" |
|
||||
| StartSweepImpedanceEndpoint | SweepImpedanceStartRequest | SweepImpedanceInitResult | "imp/start_sweep" |
|
||||
| StopImpedanceEndpoint | () | bool | "imp/stop" |
|
||||
}
|
||||
|
||||
topics! {
|
||||
@@ -44,7 +43,7 @@ topics! {
|
||||
| TopicTy | MessageTy | Path | Cfg |
|
||||
| ------- | --------- | ---- | --- |
|
||||
| SingleImpedanceOutputTopic | SingleImpedanceOutput | "imp/single" | |
|
||||
| MultiImpedanceOutputTopic | MultiImpedanceOutput | "imp/multi" | |
|
||||
| SweepImpedanceOutputTopic | SweepImpedanceOutput | "imp/sweep" | |
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||
@@ -54,7 +53,7 @@ pub struct SingleImpedanceOutput {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||
pub struct MultiImpedanceOutput {
|
||||
pub struct SweepImpedanceOutput {
|
||||
pub points: MeasurementPointSet,
|
||||
pub magnitudes_8: Vec<f32, 8>,
|
||||
pub phases_8: Vec<f32, 8>,
|
||||
@@ -63,13 +62,13 @@ pub struct MultiImpedanceOutput {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||
pub struct MultiImpedanceOutput18 {
|
||||
pub struct SweepImpedanceOutput18 {
|
||||
pub magnitudes: Vec<f32, 18>,
|
||||
pub phases: Vec<f32, 18>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||
pub struct MultiImpedanceResult {
|
||||
pub struct SweepImpedanceResult {
|
||||
pub points: MeasurementPointSet,
|
||||
pub periods_per_dft_8: Vec<f32, 8>,
|
||||
pub periods_per_dft_18: Vec<f32, 18>,
|
||||
@@ -136,6 +135,7 @@ impl MeasurementPointSet {
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||
pub struct MultiImpedanceStartRequest {
|
||||
pub struct SweepImpedanceStartRequest {
|
||||
pub lead_mode: BioImpedanceLeadMode,
|
||||
pub points: MeasurementPointSet,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user