# DeviceState

enum DeviceState : Enum<DeviceState>

Enum describing the possible states of the IDeviceCompat

## Entries

DISCONNECTED
Link copied to clipboard
DISCONNECTED

The device is disconnected.

BUSY_CONNECTING
Link copied to clipboard
BUSY_CONNECTING

The device is busy establishing a connection with the host device.

BUSY_DISCOVERING
Link copied to clipboard
BUSY_DISCOVERING

The device is busy; a connection has been opened but services are being discovered.

BUSY_SUBSCRIBING
Link copied to clipboard
BUSY_SUBSCRIBING

The device is busy; a connection has been opened but characteristic notification / subscriptions are pending.

BUSY_DATA_TRANSFER
Link copied to clipboard
BUSY_DATA_TRANSFER

The device is busy with a data transfer to the host device.

BUSY_RUNNING_COMMAND
Link copied to clipboard
BUSY_RUNNING_COMMAND

The device is busy executing a command.

IDLE
Link copied to clipboard
IDLE

The device is idle and ready to receive commands. This is the only state where commands can be successfully executed.

## Properties

entries
Link copied to clipboard
val entries: EnumEntries<DeviceState>

Returns a representation of an immutable list of all enum entries, in the order they're declared.

name
Link copied to clipboard
val name: String
ordinal
Link copied to clipboard
val ordinal: Int
value
Link copied to clipboard
val value: Int

## Functions

valueOf
Link copied to clipboard
fun valueOf(value: String): DeviceState

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

values
Link copied to clipboard
fun values(): Array<DeviceState>

Returns an array containing the constants of this enum type, in the order they're declared.