decodeRaw
fun decodeRaw(packet: ByteArray, config: DeviceConfig, state: DecodeState, contactOut: (BooleanArray) -> Unit? = null, hardware: DeviceHardware = DeviceHardware.legacyDefault(config.model), out: (values: FloatArray, isDummy: Boolean) -> Unit): Boolean
Decode one stream packet, emitting the legacy positional layout per sample: [ch_0 … ch_{A-1}, (accX, accY, accZ if accel), (gyroX, gyroY, gyroZ if gyro), sampleIndex, dummyFlag, battery], where dummy (gap-fill) samples use channelCount leading zeros and dummyFlag = 1. IMU values are raw int16 counts. This is the language-neutral shape captured by the golden vectors.
Footer, from the end of the packet (PROTOCOL.md §5): [gyro 6]? [accel 6]? [contact c] [timestamp 4] [sampleSize 1] — the same order the C core reads (eeg_manager.cpp).