Functions to create and release driver objects
◆ bbt_driver_new_bluetooth()
BBT_SDK_API bbt_driver_t* bbt_driver_new_bluetooth |
( |
const char * |
device_name, |
|
|
int |
eeg_sensor_type |
|
) |
| |
Creates a driver for a bluetooth device. It must be released using bbt_driver_free()
- Parameters
-
[in] | device_name | The name of the device as detected by the bluetooth. It can also be the mac address with the format xx:xx:xx:xx:xx:xx where xx is a byte in hexadecimal. antenna |
[in] | eeg_sensor_type | The type of EEG sensor being used. See eeg_sensor_type |
- Precondition
- The device
device_name
must be paired with the computer
- Returns
- The object to use in successive calls of functions bbt_driver_*
if (!driver)
{
std::cout << "Unable to create an instance with the parameter provided\n";
return -1;
}
std::cout << "driver to " << device_name << " created\n";
- Examples
- example/main.cpp.
◆ bbt_driver_new_usb()
BBT_SDK_API bbt_driver_t* bbt_driver_new_usb |
( |
int |
port, |
|
|
int |
eeg_sensor_type |
|
) |
| |
Creates a driver for a usb device. It must be released using bbt_driver_free()
- Parameters
-
[in] | port | The number of the COM port of the device as specified by the OS antenna |
[in] | eeg_sensor_type | The type of EEG sensor being used. See eeg_sensor_type |
- Precondition
- The device
device_name
must be paired with the computer
- Returns
- The object to use in successive calls of functions bbt_driver_*
if (!driver)
{
std::cout << "Unable to create an instance with the parameter provided\n";
return -1;
}
std::cout << "driver to " << device_name << " created\n";
- Examples
- example/main.cpp.
◆ bbt_driver_new_eeg64()
BBT_SDK_API bbt_driver_t* bbt_driver_new_eeg64 |
( |
const char * |
left_device_name, |
|
|
const char * |
right_device_name |
|
) |
| |
Creates a driver for a eeg64 device with wet sensors. It must be released using bbt_driver_free()
- Parameters
-
[in] | left_device_name | The name of the device registering the sensors of the left side of the head as detected by the bluetooth antenna |
[in] | right_device_name | The name of the device registering the sensors of the right side of the head as detected by the bluetooth antenna |
- Precondition
- The devices
left_device_name
and right_device_name
must be paired with the computer
- Returns
- The object to use in successive calls of functions bbt_driver_*
◆ bbt_driver_free()
Releases the memory of the driver created by bbt_driver_new_*()
If the device is still connected, bbt_driver_disconnect() is called before releasing the object memory
- Parameters
-
[in] | driver | The driver object |
- Precondition
- The object
driver
must be not NULL
- Examples
- example/main.cpp.