|
Bitbrain SDK 2.10.6
Bitbrain SDK
|
Constructors and destructors of device handlers. More...
Typedefs | |
| typedef struct bbt_device_s | bbt_device_t |
| bbt_device_t is an opaque type that identifies a connection to a device | |
Functions | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_air (const char *device_name) |
| Creates an instance of a handler to an air type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_diadem (const char *device_name) |
| Creates an instance of a handler to a diadem type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_hero (const char *device_name) |
| Creates an instance of a handler to a hero type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_8 (const char *device_name) |
| Creates an instance of a handler to an 8-channels versatile type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_16 (const char *device_name) |
| Creates an instance of a handler to a 16-channels versatile type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_32 (const char *device_name) |
| Creates an instance of a handler to a 32-channels versatile type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_64 (const char *left_device_name, const char *right_device_name) |
| Creates an instance of a handler to a 64-channels versatile type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_bio (const char *device_name) |
| Creates an instance of a handler to a biosignal versatile type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_ring (const char *device_name) |
| Creates an instance of a handler to a ring type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_ikon (const char *device_name) |
| Creates an instance of a handler to an ikon type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_ikon_sleep (const char *device_name) |
| Creates an instance of a handler to a ikon-sleep type device. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_plus_16 (const char *device_name, const char *connection_type, unsigned short sampling_rate) |
| Creates an instance of a handler to a versatile plus type device with 16 channels. | |
| BBT_SDK_API bbt_device_t * | bbt_device_new_versatile_plus_32 (const char *device_name, const char *connection_type, unsigned short sampling_rate) |
| Creates an instance of a handler to a versatile plus type device with 32 channels. | |
| BBT_SDK_API void | bbt_device_free (bbt_device_t *device) |
| Destroys the handler to a device. | |
Constructors and destructors of device handlers.
The main interaction to a specific device is performed using a handler to it as the first parameter for most of the functions in the SDK. The handler is provided by the bbt_device_new_ family of functions. These functions initialize the data to interact to a given device and return a handler to use in future SDK calls to act on the specific device. The handler must be kept as long as it lasts the interaction to the specific device. There is no need to generate a new handler upon disconnections or reconnections. In other words, the handler to a device outlives the connection to it.
[!IMPORTANT] The call to bbt_device_free is mandatory to properly finish the device handler. Otherwise, memory
leaks might be caused.
| typedef struct bbt_device_s bbt_device_t |
bbt_device_t is an opaque type that identifies a connection to a device
It is used along the SDK to identify the device to interact with.
| BBT_SDK_API bbt_device_t * bbt_device_new_air | ( | const char * | device_name | ) |
Creates an instance of a handler to an air type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_diadem | ( | const char * | device_name | ) |
Creates an instance of a handler to a diadem type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_hero | ( | const char * | device_name | ) |
Creates an instance of a handler to a hero type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_8 | ( | const char * | device_name | ) |
Creates an instance of a handler to an 8-channels versatile type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_16 | ( | const char * | device_name | ) |
Creates an instance of a handler to a 16-channels versatile type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_32 | ( | const char * | device_name | ) |
Creates an instance of a handler to a 32-channels versatile type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_64 | ( | const char * | left_device_name, |
| const char * | right_device_name | ||
| ) |
Creates an instance of a handler to a 64-channels versatile type device.
| left_device_name | The name of the device on the left of the setup |
| right_device_name | The name of the device on the right of the setup |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_bio | ( | const char * | device_name | ) |
Creates an instance of a handler to a biosignal versatile type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_ring | ( | const char * | device_name | ) |
Creates an instance of a handler to a ring type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_ikon | ( | const char * | device_name | ) |
Creates an instance of a handler to an ikon type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_ikon_sleep | ( | const char * | device_name | ) |
Creates an instance of a handler to a ikon-sleep type device.
| device_name | The name of the device to interact with as written in the label |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_plus_16 | ( | const char * | device_name, |
| const char * | connection_type, | ||
| unsigned short | sampling_rate | ||
| ) |
Creates an instance of a handler to a versatile plus type device with 16 channels.
| device_name | The name of the device to interact with as written in the label |
| connection_type | The type of the connection with the device ("Bluetooth", "USB") |
| sampling_rate | Sampling rate of the devices (see Versatile Plus: Device-specific settings). |
| BBT_SDK_API bbt_device_t * bbt_device_new_versatile_plus_32 | ( | const char * | device_name, |
| const char * | connection_type, | ||
| unsigned short | sampling_rate | ||
| ) |
Creates an instance of a handler to a versatile plus type device with 32 channels.
| device_name | The name of the device to interact with as written in the label |
| connection_type | The type of the connection with the device ("Bluetooth", "USB") |
| sampling_rate | Sampling rate of the devices (see Versatile Plus: Device-specific settings). |
| BBT_SDK_API void bbt_device_free | ( | bbt_device_t * | device | ) |
Destroys the handler to a device.
| device | The handler to the device |