Driver SDK  1.6
Functions
Connection Management

Functions

BBT_SDK_API void bbt_driver_connect (bbt_driver_t *driver)
 Connects with the device associated to the driver. More...
 
BBT_SDK_API void bbt_driver_disconnect (bbt_driver_t *driver)
 Disconnects from the device associated. More...
 
BBT_SDK_API void bbt_driver_reconnect (bbt_driver_t *driver)
 Reconnects to the device associated. More...
 
BBT_SDK_API int bbt_driver_is_connected (const bbt_driver_t *driver)
 Checks if the driver is connected to the device. More...
 

Detailed Description

Functions to connect and disconnect the device

Function Documentation

◆ bbt_driver_connect()

BBT_SDK_API void bbt_driver_connect ( bbt_driver_t driver)

Connects with the device associated to the driver.

Parameters
[in]driverThe driver object
Precondition
The object driver must be not NULL
for (auto t = 0; !bbt_driver_is_connected(driver) && t < tries; ++t) {
std::cout << "try to connect [" << t + 1 << "]\n";
}
return bbt_driver_is_connected(driver) != 0;
BBT_SDK_API void bbt_driver_connect(bbt_driver_t *driver)
Connects with the device associated to the driver.
BBT_SDK_API int bbt_driver_is_connected(const bbt_driver_t *driver)
Checks if the driver is connected to the device.
Examples
example/main.cpp.

◆ bbt_driver_disconnect()

BBT_SDK_API void bbt_driver_disconnect ( bbt_driver_t driver)

Disconnects from the device associated.

Parameters
[in]driverThe driver object
Precondition
The object driver must be not NULL
Examples
example/main.cpp.

◆ bbt_driver_reconnect()

BBT_SDK_API void bbt_driver_reconnect ( bbt_driver_t driver)

Reconnects to the device associated.

This function is useful when dealing with failing connections to devices. The state of the device is kept so that the driver can recover a recording if the device is still running.

Parameters
[in]driverThe driver object
Precondition
The object driver must be not NULL
{
std::cout << "reconnect\n";
continue;
}
BBT_SDK_API void bbt_driver_reconnect(bbt_driver_t *driver)
Reconnects to the device associated.
Examples
example/main.cpp.

◆ bbt_driver_is_connected()

BBT_SDK_API int bbt_driver_is_connected ( const bbt_driver_t driver)

Checks if the driver is connected to the device.

Parameters
[in]driverThe driver object
Precondition
The object driver must be not NULL
Returns
True if the device is connected
Examples
example/main.cpp.