DeviceConfig

data class DeviceConfig(val model: DeviceModel, val channels: List<String>, val gain: List<Int>, val bias: List<Boolean>, val active: List<Boolean>, val srate: Int, val impedanceMode: ImpedanceMode)

Immutable device configuration. Replaces the legacy mutable BADeviceConfig (which used var/MutableList shared as a per-type static).

Field meanings are preserved from the legacy wire contract:

  • gain per-channel gain (e.g. 8). Only active channels' gain is transmitted.

  • bias per-channel bias enable; packed LSB-first, one byte per 8 channels (channel 0 = bit 0 of the first byte, channel 8 = bit 0 of the second).

  • active per-channel enable mask.

  • srate sample rate in Hz; one of SUPPORTED_SRATES (the rates with a wire code) — anything else is rejected at construction instead of being sent as an unknown code.

  • impedanceMode wire code byte 0 of the config blob; any non-OFF mode selects the impedance packet layout (24-bit absolute) vs the normal layout (24-bit first sample

    • 12-bit deltas).

The four lists MUST all be length DeviceModel.channelCount.

Constructors

Link copied to clipboard
constructor(model: DeviceModel, channels: List<String>, gain: List<Int>, bias: List<Boolean>, active: List<Boolean>, srate: Int, impedanceMode: ImpedanceMode)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard

Number of active (transmitting) electrodes.

Link copied to clipboard
Link copied to clipboard

Total channels in the montage.

Link copied to clipboard
Link copied to clipboard
val gain: List<Int>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val srate: Int