mendi 0.0.2

Rust client for the Mendi neurofeedback headband over BLE using btleplug
Documentation
// This file is @generated by prost-build from proto/device_v4.proto.
// To regenerate, run: cargo build --features regenerate-proto
/// First characteristic UUID 0xABB1.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Frame {
    /// Acceleration X in int16. Default +-2G
    #[prost(int32, tag = "1")]
    pub acc_x: i32,
    /// Acceleration Y
    #[prost(int32, tag = "2")]
    pub acc_y: i32,
    /// Acceleration Z
    #[prost(int32, tag = "3")]
    pub acc_z: i32,
    /// Angular velocity X in int16. Default +-125dps
    #[prost(int32, tag = "4")]
    pub ang_x: i32,
    /// Angular velocity Y
    #[prost(int32, tag = "5")]
    pub ang_y: i32,
    /// Angular velocity Z
    #[prost(int32, tag = "6")]
    pub ang_z: i32,
    /// Temperature in celsius
    #[prost(float, tag = "7")]
    pub temp: f32,
    /// Infrared, left channel
    #[prost(int32, tag = "8")]
    pub ir_l: i32,
    /// Red LED, left channel
    #[prost(int32, tag = "9")]
    pub red_l: i32,
    /// Ambient light, left channel
    #[prost(int32, tag = "10")]
    pub amb_l: i32,
    /// Infrared, right channel
    #[prost(int32, tag = "11")]
    pub ir_r: i32,
    /// Red LED, right channel
    #[prost(int32, tag = "12")]
    pub red_r: i32,
    /// Ambient light, right channel
    #[prost(int32, tag = "13")]
    pub amb_r: i32,
    /// Infrared, pulse channel
    #[prost(int32, tag = "14")]
    pub ir_p: i32,
    /// Red LED, pulse channel
    #[prost(int32, tag = "15")]
    pub red_p: i32,
    /// Ambient light, pulse channel
    #[prost(int32, tag = "16")]
    pub amb_p: i32,
}
/// Second characteristic UUID 0xABB2.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Sensor {
    /// Set true for read operations.
    #[prost(bool, tag = "1")]
    pub read: bool,
    /// Register address (8-bit).
    #[prost(uint32, tag = "2")]
    pub address: u32,
    /// Data to write or data read (24-bit in lowest bytes).
    #[prost(fixed32, tag = "3")]
    pub data: u32,
}
/// Third characteristic UUID 0xABB3.
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Imu {
    /// Number of bytes to read (max 10).
    #[prost(uint32, tag = "1")]
    pub read: u32,
    /// Register address (8-bit).
    #[prost(uint32, tag = "2")]
    pub address: u32,
    /// Data to write or data read (max 10 bytes).
    #[prost(bytes = "vec", tag = "3")]
    pub data: ::prost::alloc::vec::Vec<u8>,
}
/// Fourth characteristic UUID 0xABB4.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Adc {
    /// Voltage in mV (e.g. 3510 = 3.51V).
    #[prost(uint32, tag = "1")]
    pub voltage: u32,
    /// True when battery is charging.
    #[prost(bool, tag = "2")]
    pub charging: bool,
    /// True when USB cable is connected.
    #[prost(bool, tag = "3")]
    pub usb: bool,
}
/// Fifth characteristic UUID 0xABB5.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Diagnostics {
    /// ADC measured at power on.
    #[prost(message, optional, tag = "1")]
    pub adc: ::core::option::Option<Adc>,
    /// True if IMU self-test passes.
    #[prost(bool, tag = "2")]
    pub imu_ok: bool,
    /// True if sensor self-test passes.
    #[prost(bool, tag = "3")]
    pub sensor_ok: bool,
}
/// Sixth characteristic UUID 0xABB6.
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Calibration {
    /// Left channel offset (-127mA to 127mA).
    #[prost(float, tag = "1")]
    pub offset_l: f32,
    /// Right channel offset (-127mA to 127mA).
    #[prost(float, tag = "2")]
    pub offset_r: f32,
    /// Pulse channel offset (-127mA to 127mA).
    #[prost(float, tag = "3")]
    pub offset_p: f32,
    /// Automatic calibration on/off.
    #[prost(bool, tag = "4")]
    pub enable: bool,
    /// Low power mode on/off.
    #[prost(bool, tag = "5")]
    pub low_power_mode: bool,
}