BrainBit for developers Subscribe for updates Visit website

NTDevice

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

Description

NTDevice

Constructor. Instantiating a device class.

Create an instance of a device class based on a device description.

enumerator

Description: an instance of the device lookup class

Data type: NTDeviceEnumerator

info

Description: Device Information

Data type: NTDeviceInfo

Return value:

Description: device class instance

Data type: NTDevice.

subscribeParameterChanged

Function. Adding a listener for changing device parameters.

Subscribe to a parameter state change event.

Parameters:

subscriber

Description: pointer to the device parameter event handling method

Data type: void (NTParameter)

Return value:

Description: An error flag, returns NO if an error occurs.

Data type: bool.

connect

Function. Connect to device.

Initiate an attempt to connect to the device. Blocking method.

Return value:

Description: An error flag, returns NO if an error occurs.

Data type: bool.

disconnect

Function. Disconnecting a device.

Blocking method.

Return value:

Description: An error flag, returns NO if an error occurs.

Data type: bool.

execute

An error flag, returns NO if an error occurs.

Execute the command with the device. Available if device is connected.

Parameters:

command

Description: Executable command

Data type: NTCommand

Return value:

Description: An error flag, returns NO if an error occurs.

Data type: bool.

channels

Field. Supported hardware channels.

Description. Request a list of supported hardware channels. Available if device is connected.

Data type. [NTChannelInfo]?

commands

Field. Supported Command List.

Description. Query for a list of supported commands. Available if device is connected.

Data type. [NSNumber]?

parameters

Field. Supported parameter list.

Description. Query for a list of supported parameters.

Data type. [NTParameterInfo]?

name

Function. Device name query.

Returns the name of the device.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Device name.

Data type: String.

state

Returns the name of the device.

Returns the connection status of a device.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Device connection status.

Data type: NTState.

address

Function. Device address request.

Returns the address of the device.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Device address.

Data type: String.

serialNumber

Function. Requesting the serial number of the device.

Returns the serial number of the device.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Serial number of the device.

Data type: String.

firmwareMode

Function. Device operating mode request.

Returns the current operating mode of the device.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Device operation mode.

Data type: NTFirmwareMode.

samplingFrequency

Function. Physiological signal sampling rate request.

Returns the current sampling rate of the physiological signal.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Physiological signal sampling rate.

Data type: NTSamplingFrequency.

gain

Function. Signal gain request.

Returns the current signal gain.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Signal gain.

Data type: NTGain.

offset

Function. Signal Offset Request.

Returns the offset of the signal.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Signal offset.

Data type: UInt8.

firmwareVersion

Function. Firmware version query.

Returns the firmware version.

Parameters:

error

Description: Function execution error

Data type: NSErrorPointer

Return value:

Description: Firmware version.

Data type: NTFirmwareVersion.

 

Methods not listed in the table are not supported.