Skip to main content

Crate elata_eeg_hal

Crate elata_eeg_hal 

Source
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

  • EegDevice defines the device lifecycle and sample acquisition API
  • DeviceInfo and ChannelConfig describe a device’s static capabilities
  • SampleBuffer stores multi-channel EEG samples for downstream processing
  • bands exposes 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
ChannelConfig
Channel configuration for a device
DeviceInfo
Information about an EEG device
EegSample
A single multi-channel EEG sample
SampleBuffer
A buffer of EEG samples for batch processing

Enums§

ChannelType
Type of EEG channel
DeviceState
State of an EEG device
HalError
Errors that can occur when working with EEG devices

Traits§

ConfigurableDevice
Extension trait for devices that support configuration
EegDevice
Core trait for EEG devices

Type Aliases§

Result