Functions to connect and disconnect the device
◆ bbt_driver_connect()
BBT_SDK_API void bbt_driver_connect |
( |
bbt_driver_t * |
driver | ) |
|
Connects with the device associated to the driver.
- Parameters
-
[in] | driver | The driver object |
- Precondition
- The object
driver
must be not NULL
std::cout << "try to connect [" << t + 1 << "]\n";
}
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] | driver | The 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] | driver | The 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] | driver | The driver object |
- Precondition
- The object
driver
must be not NULL
- Returns
- True if the device is connected
- Examples
- example/main.cpp.