Expand description
EEG Hardware Abstraction Layer
This crate provides a unified interface for EEG devices, allowing models to work with any supported device without knowing the underlying hardware.
§Main concepts
EegDevicedefines the device lifecycle and sample acquisition APIDeviceInfoandChannelConfigdescribe a device’s static capabilitiesSampleBufferstores multi-channel EEG samples for downstream processingbandsexposes standard EEG band ranges reused across the SDK
§Example
use elata_eeg_hal::{EegSample, SampleBuffer};
let mut buffer = SampleBuffer::new(256, 4);
let sample = EegSample::new(0, vec![1.0, 2.0, 3.0, 4.0]);
buffer.push(&sample);
assert_eq!(buffer.sample_count(), 1);
assert_eq!(buffer.channel_data(0), &[1.0]);Modules§
- bands
- Standard EEG frequency bands (in Hz)
Structs§
- Channel
- Information about a single channel
- Channel
Config - Channel configuration for a device
- Device
Info - Information about an EEG device
- EegSample
- A single multi-channel EEG sample
- Sample
Buffer - A buffer of EEG samples for batch processing
Enums§
- Channel
Type - Type of EEG channel
- Device
State - State of an EEG device
- HalError
- Errors that can occur when working with EEG devices
Traits§
- Configurable
Device - Extension trait for devices that support configuration
- EegDevice
- Core trait for EEG devices