pub struct Packet {
pub poor_signal: Option<u8>,
pub attention: Option<u8>,
pub meditation: Option<u8>,
pub raw_wave: Option<i16>,
pub eeg_power: Option<Power>,
}Expand description
Represents a data packet received from the NeuroSky device.
Fields§
§poor_signal: Option<u8>Signal quality (0 ~ 255)
attention: Option<u8>Attention eSense (0 ~ 100)
meditation: Option<u8>Meditation eSense (0 ~ 100)
raw_wave: Option<i16>Raw wave value (-32768 ~ 32767)
eeg_power: Option<Power>EEG power spectrum values (uV^2) Delta (0.5 ~ 2.75 Hz)
Trait Implementations§
Source§impl TryInto<PacketVariant> for Packet
impl TryInto<PacketVariant> for Packet
Source§fn try_into(self) -> Result<PacketVariant, Self::Error>
fn try_into(self) -> Result<PacketVariant, Self::Error>
Attempts to convert the Packet into a PacketVariant. If the packet
contains both eSense values and EEG power spectrum, it returns the
EegPower variant. If it contains only the raw wave value, it returns
the RawWave variant. If neither is present, it returns an error.
impl Copy for Packet
Auto Trait Implementations§
impl Freeze for Packet
impl RefUnwindSafe for Packet
impl Send for Packet
impl Sync for Packet
impl Unpin for Packet
impl UnwindSafe for Packet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more