Constructors and destructors of device handlers.
More...
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 infuture 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.
◆ 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 to.
◆ bbt_device_new_air()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_diadem()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_hero()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_versatile_8()
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_8 |
( |
const char * | device_name | ) |
|
Creates an instance of a handler to a 8-channels versatile type device.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_versatile_16()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_versatile_32()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_versatile_64()
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.
- Parameters
-
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 |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_versatile_bio()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_ring()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_ikon()
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.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_new_ikon_sleep()
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 versatile type device.
- Parameters
-
device_name | The name of the device to interact to as written in the label |
- Returns
- On success, a pointer to the opaque structure. On failure, NULL is returned
◆ bbt_device_free()
Destroys the handler to a device.
- Parameters
-
device | The handler to the device |