EegFrame

class EegFrame(val samples: FloatArray, val accel: FloatArray?, val gyro: FloatArray?, val sampleIndex: Long, val isDummy: Boolean, val batteryPct: Float, val digitalInput: Boolean = false)

One decoded sample (one time-point across all active electrodes), with typed fields for electrodes, IMU, sample index, gap flag and battery.

This is the wire truth: IMU values are the device's raw int16 counts, exactly as sent by the device. :core converts them to physical units per DeviceHardware when it builds an EegChunk (m/s² and deg/s).

Constructors

Link copied to clipboard
constructor(samples: FloatArray, accel: FloatArray?, gyro: FloatArray?, sampleIndex: Long, isDummy: Boolean, batteryPct: Float, digitalInput: Boolean = false)

Properties

Link copied to clipboard

[x, y, z] accelerometer reading in raw counts, or null when the hardware has no accelerometer (DeviceHardware.hasAccel). One reading per packet, repeated on each sample.

Link copied to clipboard

last known battery percentage (-1 until first battery read).

Link copied to clipboard
val digitalInput: Boolean = false

level of ADS chip 0's GPIO1 at this sample (firmware 3.8.1+); false for a dummy sample and whenever the stream did not ask for the digital input.

Link copied to clipboard

[x, y, z] gyroscope reading in raw counts, or null when the hardware has no gyroscope (DeviceHardware.hasGyro). One reading per packet, repeated on each sample.

Link copied to clipboard

true when this is a zero-filled gap sample (missing on the wire).

Link copied to clipboard

device sample counter for this sample (gaps detectable).

Link copied to clipboard

per-active-electrode values, in column order. µV in normal mode; in impedance mode, device-computed electrode impedance in kΩ (NOT a raw ADC count — the device applies Ohm's law on-chip and streams kΩ directly).