BADevice

interface BADevice

Represents a BrainAccess device interface for interacting with Bluetooth peripherals.

Inheritors

Properties

Link copied to clipboard
abstract var batteryLevel: Float

The battery level of the device.

Link copied to clipboard
abstract var connectionState: MutableStateFlow<ConnectionStatus>

The current connection state of the device as a reactive MutableStateFlow.

Link copied to clipboard

The current configuration of the device.

Link copied to clipboard
abstract var lastSample: Int

Index of the last received data sample.

Link copied to clipboard
abstract var peripheralData: BluetoothPeripheral

The associated BluetoothPeripheral containing raw Bluetooth connection data.

Functions

Link copied to clipboard
abstract fun annotate()

Sends an annotation marker to the device stream.

Link copied to clipboard
abstract fun configure(config: BADeviceConfig)

Applies a new configuration to the device.

Link copied to clipboard

Initiates a connection to the device.

Link copied to clipboard
abstract fun disconnect()

Disconnects from the device.

Link copied to clipboard
abstract fun getName(): String

Returns the name of the device.

Link copied to clipboard
abstract fun getUUID(): String

Returns the unique identifier (UUID) of the device.

Link copied to clipboard

Begins battery level acquisition from the device.

Link copied to clipboard
abstract fun startStream()

Starts the data stream from the device.

Link copied to clipboard
abstract fun stopBatteryAcquisition()

Stops battery level acquisition.

Link copied to clipboard
abstract fun stopStream()

Stops the data stream from the device.