mirror of
https://github.com/hubaldv/bioz-icd-rs.git
synced 2026-06-08 21:21:10 +00:00
Changed naming.
This commit is contained in:
22
src/lib.rs
22
src/lib.rs
@@ -55,7 +55,7 @@ pub struct SingleImpedanceOutput {
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||||
pub struct SweepImpedanceOutput {
|
pub struct SweepImpedanceOutput {
|
||||||
pub points: MeasurementPointSet,
|
pub points: SweepPoints,
|
||||||
pub magnitudes_8: Vec<f32, 8>,
|
pub magnitudes_8: Vec<f32, 8>,
|
||||||
pub phases_8: Vec<f32, 8>,
|
pub phases_8: Vec<f32, 8>,
|
||||||
pub magnitudes_18: Vec<f32, 18>,
|
pub magnitudes_18: Vec<f32, 18>,
|
||||||
@@ -70,7 +70,7 @@ pub struct SweepImpedanceOutput18 {
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
#[derive(Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||||
pub struct SweepImpedanceResult {
|
pub struct SweepImpedanceResult {
|
||||||
pub points: MeasurementPointSet,
|
pub points: SweepPoints,
|
||||||
pub periods_per_dft_8: Vec<f32, 8>,
|
pub periods_per_dft_8: Vec<f32, 8>,
|
||||||
pub periods_per_dft_18: Vec<f32, 18>,
|
pub periods_per_dft_18: Vec<f32, 18>,
|
||||||
}
|
}
|
||||||
@@ -147,9 +147,9 @@ impl ElectrodeOptionsWithMultiplexer {
|
|||||||
#[derive(Clone, Copy, Serialize, Deserialize, Schema, Debug, PartialEq)]
|
#[derive(Clone, Copy, Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||||
pub enum ElectrodeConfiguration {
|
pub enum ElectrodeConfiguration {
|
||||||
// WithoutMultiplexer2Lead(ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer), // Electrode +, Electrode -
|
// WithoutMultiplexer2Lead(ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer), // Electrode +, Electrode -
|
||||||
// WithoutMultiplexer4Lead(ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer), // V+, I+, V-, I-
|
// WithoutMultiplexer4Lead(ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer, ElectrodeOptionsWithoutMultiplexer), // I+, I-, V+, V-
|
||||||
WithMultiplexer2Lead(ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer), // Electrode +, Electrode -
|
WithMultiplexer2Lead(ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer), // Electrode +, Electrode -
|
||||||
WithMultiplexer4Lead(ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer), // V+, I+, V-, I-
|
WithMultiplexer4Lead(ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer, ElectrodeOptionsWithMultiplexer), // I+, I-, V+, V-
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Serialize, Deserialize, Schema, Debug, PartialEq)]
|
#[derive(Clone, Copy, Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||||
@@ -179,19 +179,19 @@ pub struct SingleImpedanceStartRequest {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Clone, Copy, Serialize, Deserialize, Schema, Debug, PartialEq)]
|
#[derive(Clone, Copy, Serialize, Deserialize, Schema, Debug, PartialEq)]
|
||||||
pub enum MeasurementPointSet {
|
pub enum SweepPoints {
|
||||||
Eight,
|
Eight,
|
||||||
Eighteen,
|
Eighteen,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl MeasurementPointSet {
|
impl SweepPoints {
|
||||||
pub fn values(&self) -> &'static [u32] {
|
pub fn values(&self) -> &'static [u32] {
|
||||||
match self {
|
match self {
|
||||||
MeasurementPointSet::Eight => {
|
SweepPoints::Eight => {
|
||||||
&[10000, 16000, 25000, 40000, 63000,
|
&[10000, 16000, 25000, 40000, 63000,
|
||||||
100000, 160000, 200000]
|
100000, 160000, 200000]
|
||||||
}
|
}
|
||||||
MeasurementPointSet::Eighteen => {
|
SweepPoints::Eighteen => {
|
||||||
&[100, 160, 250, 400, 630,
|
&[100, 160, 250, 400, 630,
|
||||||
1000, 1600, 2500, 4000, 6300,
|
1000, 1600, 2500, 4000, 6300,
|
||||||
10000, 16000, 25000, 40000, 63000,
|
10000, 16000, 25000, 40000, 63000,
|
||||||
@@ -201,8 +201,8 @@ impl MeasurementPointSet {
|
|||||||
}
|
}
|
||||||
pub fn len(&self) -> usize {
|
pub fn len(&self) -> usize {
|
||||||
match self {
|
match self {
|
||||||
MeasurementPointSet::Eight => 8,
|
SweepPoints::Eight => 8,
|
||||||
MeasurementPointSet::Eighteen => 18,
|
SweepPoints::Eighteen => 18,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -211,5 +211,5 @@ impl MeasurementPointSet {
|
|||||||
pub struct SweepImpedanceStartRequest {
|
pub struct SweepImpedanceStartRequest {
|
||||||
pub lead_mode: BioImpedanceLeadMode,
|
pub lead_mode: BioImpedanceLeadMode,
|
||||||
pub electrode_config: Option<ElectrodeConfiguration>,
|
pub electrode_config: Option<ElectrodeConfiguration>,
|
||||||
pub points: MeasurementPointSet,
|
pub points: SweepPoints,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user