pub enum HeadsetModel {
Insight,
EpocPlus,
EpocX,
EpocFlex,
Unknown(String),
}Expand description
Emotiv headset model identifier.
Inferred from the headset ID string returned by queryHeadsets.
Emotiv headset IDs follow patterns like INSIGHT-XXXXXXXX,
EPOCX-XXXXXXXX, EPOCPLUS-XXXXXXXX, etc.
Variants§
Insight
Emotiv Insight — 5 EEG channels at 128 Hz. Channels: AF3, AF4, T7, T8, Pz.
EpocPlus
Emotiv EPOC+ — 14 EEG channels at 128 Hz. Full 10-20 coverage.
EpocX
Emotiv EPOC X — 14 EEG channels at 256 Hz. Same electrode positions as EPOC+, higher sampling rate.
EpocFlex
Emotiv EPOC Flex — configurable up to 32 channels. Default configuration uses the same 14-channel EPOC+ layout.
Unknown(String)
Unknown or unrecognized Emotiv headset.
Implementations§
Source§impl HeadsetModel
impl HeadsetModel
Sourcepub fn from_headset_id(headset_id: &str) -> Self
pub fn from_headset_id(headset_id: &str) -> Self
Infer the headset model from a headset ID string.
Emotiv headset IDs follow the pattern MODEL-SERIAL where MODEL
is one of INSIGHT, EPOCPLUS, EPOCX, EPOCFLEX, EPOC+, EPOC-X, etc.
use emotiv_cortex_v2::headset::HeadsetModel;
assert_eq!(HeadsetModel::from_headset_id("INSIGHT-12345678"), HeadsetModel::Insight);
assert_eq!(HeadsetModel::from_headset_id("EPOCX-AABBCCDD"), HeadsetModel::EpocX);
assert_eq!(HeadsetModel::from_headset_id("EPOCPLUS-99887766"), HeadsetModel::EpocPlus);Sourcepub fn from_headset_info(info: &HeadsetInfo) -> Self
pub fn from_headset_info(info: &HeadsetInfo) -> Self
Infer the headset model from a HeadsetInfo response.
Sourcepub fn channel_config(&self) -> HeadsetChannelConfig
pub fn channel_config(&self) -> HeadsetChannelConfig
Get the standard EEG channel configuration for this headset model.
§Examples
use emotiv_cortex_v2::headset::HeadsetModel;
let config = HeadsetModel::EpocX.channel_config();
assert_eq!(config.channels.len(), 14);
assert_eq!(config.sampling_rate_hz, 256.0);Sourcepub fn num_channels(&self) -> usize
pub fn num_channels(&self) -> usize
Number of EEG channels for this headset model.
§Examples
use emotiv_cortex_v2::headset::HeadsetModel;
assert_eq!(HeadsetModel::Insight.num_channels(), 5);
assert_eq!(HeadsetModel::EpocX.num_channels(), 14);Sourcepub fn sampling_rate_hz(&self) -> f64
pub fn sampling_rate_hz(&self) -> f64
Sampling rate in Hz for this headset model.
Sourcepub fn channel_names(&self) -> &[&str]
pub fn channel_names(&self) -> &[&str]
Channel names for this headset model.
§Examples
use emotiv_cortex_v2::headset::HeadsetModel;
let names = HeadsetModel::Insight.channel_names();
assert_eq!(names, &["AF3", "AF4", "T7", "T8", "Pz"]);Trait Implementations§
Source§impl Clone for HeadsetModel
impl Clone for HeadsetModel
Source§fn clone(&self) -> HeadsetModel
fn clone(&self) -> HeadsetModel
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more