BrainBit for developers Subscribe for updates Visit website

Device

Package: com.neuromd.neurosdk

Device class. Encapsulates low-level work with a physical device. Implements mechanisms for connecting and disconnecting, launching commands for executing commands, setting and reading parameters, generating events. It also provides all available information about the device.

Includes the following fields:

Connect

Initiate an attempt to connect to the device.

Blocking method.

Exceptions:

●       UnsupportedOperationException - Failed to connect to device

●       UnsupportedOperationException - An instance of the class is not available for operation because the Close method was called earlier

Disconnect

Disconnect from the device.

Blocking method.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

Channels

Supported hardware channel list.

Available if a device is connected.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

Commands

Supported list of commands.

Available if a device is connected.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

Parameters

Supported parameter list.

Available if a device is connected.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

Execute

Execute the command with the device.

Available if a device is connected.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

●       UnsupportedOperationException - The device does not support the command

ReadParam

Request parameter value.

Available if a device is connected.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

●       UnsupportedOperationException - The device does not support the parameter

SetParam

Set parameter value.

Available if a device is connected.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

●       UnsupportedOperationException - The device does not support the parameter

●       UnsupportedOperationException - The parameter is read-only

AddIntChannelDataListener

Subscribe to a data feed with integer values. (only for ChannelType.Battery)

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

RemoveIntChannelDataListener

Unsubscribe an integer data feed.

Exceptions:

●       UnsupportedOperationException - An instance of the class is not available for work because the Close method was called earlier

●       UnsupportedOperationException - The device is disabled

ParameterChanged

Subscribe to the parameter state change event.

More details: ParameterAccess

Close

Finish working with the device and free up all low-level resources. After that, working with methods of this class is inadmissible.

It is recommended to call the method after finishing working with the device.

 

Methods not listed in the table are not supported.