Functions to get and set the configuration of the device. Here you can see a snippet of the configuration of a device.
std::cout << "Initial signals:\n";
print_device_configuration(driver);
std::cout << "Enable all signals:\n";
enable_all_signals(driver);
std::cout << "Configure sd card:\n";
configure_sd_card(driver);
◆ bbt_driver_get_number_of_signals()
BBT_SDK_API unsigned short bbt_driver_get_number_of_signals |
( |
const bbt_driver_t * |
driver | ) |
|
Gets the number of signals available in the device.
- Parameters
-
[in] | driver | The driver object |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- The number of signals available
- Examples
- example/main.cpp.
◆ bbt_driver_get_signal()
Gets a handler to the signal with the corresponding index that can be later used with functions in Signal Object.
- Parameters
-
[in] | driver | The driver object |
[in] | index | The index of the signal |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- Examples
- example/main.cpp.
◆ bbt_driver_has_sd_card_capability()
BBT_SDK_API int bbt_driver_has_sd_card_capability |
( |
const bbt_driver_t * |
driver | ) |
|
Checks if the device can record the data in a SD card.
- Parameters
-
[in] | driver | The driver object |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- True if the device can record the data in a SD card
- Examples
- example/main.cpp.
◆ bbt_driver_is_sd_card_enabled()
BBT_SDK_API int bbt_driver_is_sd_card_enabled |
( |
const bbt_driver_t * |
driver | ) |
|
Checks if the SD card record is enabled.
- Parameters
-
[in] | driver | The driver object |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- True if the SD card record is enabled
- Examples
- example/main.cpp.
◆ bbt_driver_enable_sd_card()
BBT_SDK_API int bbt_driver_enable_sd_card |
( |
bbt_driver_t * |
driver, |
|
|
int |
enable |
|
) |
| |
Enables or disables the SD card recording.
Configures the device to, in addition to sending the data to the computer, record the data in the sd card. To enable the recording, the card must be inserted in the device. Otherwise this function will return false. This fact can be used to check if the sd card is inserted in the device.
- Parameters
-
[in] | driver | The driver object |
[in] | enable | True to enable, false to disable |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
-
If
enable
is true, the SD card must be inserted for success. Otherwise, it will return false.
- Returns
- True on success
- Examples
- example/main.cpp.
◆ bbt_driver_get_folder()
BBT_SDK_API char* bbt_driver_get_folder |
( |
const bbt_driver_t * |
driver, |
|
|
char * |
output_buffer, |
|
|
unsigned int |
max_len |
|
) |
| |
Gets the name of the folder in the SD card where the data is going to be recorded.
- Parameters
-
[in] | driver | The driver object |
[out] | output_buffer | The buffer to write the name to |
[in] | max_len | The maximum size of the buffer buf |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- True if the folder name was correctly gathered
- Examples
- example/main.cpp.
◆ bbt_driver_set_folder()
BBT_SDK_API int bbt_driver_set_folder |
( |
bbt_driver_t * |
driver, |
|
|
const char * |
folder |
|
) |
| |
Sets the name of the folder in the SD card where the data is going to be recorded.
- Parameters
-
[in] | driver | The driver object |
[in] | folder | The name of the folder |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- True on success
- Examples
- example/main.cpp.
◆ bbt_driver_get_file()
BBT_SDK_API char* bbt_driver_get_file |
( |
const bbt_driver_t * |
driver, |
|
|
char * |
output_buffer, |
|
|
unsigned int |
max_len |
|
) |
| |
Gets the name of the file in the SD card where the data is going to be recorded.
- Parameters
-
| driver | The driver object |
[out] | output_buffer | The buffer to write the name to |
[in] | max_len | The maximum size of the buffer buf |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- True if the file name was correctly gathered
- Examples
- example/main.cpp.
◆ bbt_driver_set_file()
BBT_SDK_API int bbt_driver_set_file |
( |
bbt_driver_t * |
driver, |
|
|
const char * |
file |
|
) |
| |
Sets the name of the file in the SD card where the data is going to be recorded.
- Parameters
-
[in] | driver | The driver object |
[in] | file | The name of the folder |
- Precondition
- The object
driver
must be not NULL
-
The
driver
must be connected (bbt_driver_is_connected() == true)
- Returns
- True on success
- Examples
- example/main.cpp.