Functions to query and change the device cnfiguration.
More...
|
enum | bbt_device_signal_type_t {
Accelerometer = 0
, Analog_Aux
, BVP
, Digital_Aux
,
Digital_Input
, Digital_Output
, EEG
, EXG
,
GSR
, IMU
, Photodiode
, PPG
} |
| The bbt_device_signal_type_t enum. More...
|
|
BBT_SDK_API int | bbt_device_get_hardware_version (const bbt_device_t *device, unsigned short *major, unsigned short *minor) |
| Gets the major and minor versions of the device hardware.
|
BBT_SDK_API int | bbt_device_get_firmware_version (const bbt_device_t *device, unsigned short *major, unsigned short *minor) |
| Gets the major and minor versions of the device firmware.
|
BBT_SDK_API unsigned short | bbt_device_get_frequency (const bbt_device_t *device) |
| Returns the frequency that the device communicates new data when acquiring.
|
BBT_SDK_API int | bbt_device_get_signals (const bbt_device_t *device, unsigned short *n, const struct bbt_device_signal_t **device_signals) |
| Get the list of signals available in the device.
|
BBT_SDK_API int | bbt_device_get_signal_mode (const bbt_device_t *device, unsigned short n) |
| Gets the configuration mode of a signal in the device.
|
BBT_SDK_API int | bbt_device_enable_signal (bbt_device_t *device, unsigned short n) |
| Enables the acquisition of this signal.
|
BBT_SDK_API int | bbt_device_disable_signal (bbt_device_t *device, unsigned short n) |
| Disables the acquisition of this signal.
|
BBT_SDK_API int | bbt_device_set_signal_mode (bbt_device_t *device, unsigned short n, int mode) |
| Sets the mode to a specific value.
|
BBT_SDK_API int | bbt_device_has_sd_card_capabilities (const bbt_device_t *device) |
| Check if the device has SD Card capabilities to record the data.
|
BBT_SDK_API int | bbt_device_is_sd_card_enabled (const bbt_device_t *device) |
| Check if the SD Card recording is enabled in the device.
|
BBT_SDK_API int | bbt_device_enable_sd_card (bbt_device_t *device, const char *full_recording_path) |
| Enable the SD Card recording in the device.
|
BBT_SDK_API int | bbt_device_disable_sd_card (bbt_device_t *device) |
| Disable the SD Card recording in the device.
|
Functions to query and change the device cnfiguration.
The initial state of a device after a reset is the configuration mode with all the signals disabled and the SD Card recording disabled too. You can query and modify the configuration of the device by calling the functions in this group. During configuration, no data streaming is available. Only a request/reply communication happens between the SDK and the device.
◆ bbt_device_signal_type_t
◆ bbt_device_get_hardware_version()
BBT_SDK_API int bbt_device_get_hardware_version |
( |
const bbt_device_t * | device, |
|
|
unsigned short * | major, |
|
|
unsigned short * | minor ) |
Gets the major and minor versions of the device hardware.
- Parameters
-
device | The handle to the device |
major | The number of major version |
minor | The number of minor version |
- Returns
- True on success, false otherwise.
◆ bbt_device_get_firmware_version()
BBT_SDK_API int bbt_device_get_firmware_version |
( |
const bbt_device_t * | device, |
|
|
unsigned short * | major, |
|
|
unsigned short * | minor ) |
Gets the major and minor versions of the device firmware.
- Parameters
-
device | The handle to the device |
major | The number of major version |
minor | The number of minor version |
- Returns
- True on success, false otherwise.
◆ bbt_device_get_frequency()
BBT_SDK_API unsigned short bbt_device_get_frequency |
( |
const bbt_device_t * | device | ) |
|
Returns the frequency that the device communicates new data when acquiring.
On acquisition, you should call bbt_device_read at this frequency to avoid data loss
- Parameters
-
device | The handle to the device |
- Returns
- The frequency value in Hz. 0 If something went wrong.
◆ bbt_device_get_signals()
Get the list of signals available in the device.
The order of the list is crucial to be able to index the data received during acquisition with bbt_device_read.
- Parameters
-
device | The handle to the device |
n | Output parameter to receive the number of signals 0 <= n <= 10. |
device_signals | Output parameter to receive the array of pointers to bbt_device_signal_t. The index in this array will be used to identify the signal in the device in other functions. |
- Returns
- True on success. False otherwise
◆ bbt_device_get_signal_mode()
BBT_SDK_API int bbt_device_get_signal_mode |
( |
const bbt_device_t * | device, |
|
|
unsigned short | n ) |
Gets the configuration mode of a signal in the device.
- Parameters
-
- Returns
- The mode of the signal. 0 if it is disabled (not aquired). Values different from 0 indicate that the signal is being acquired.
◆ bbt_device_enable_signal()
BBT_SDK_API int bbt_device_enable_signal |
( |
bbt_device_t * | device, |
|
|
unsigned short | n ) |
Enables the acquisition of this signal.
- Parameters
-
device | The handle to the device |
n | The index of the signal to enable, as returned in the array from function bbt_device_get_signals |
- Returns
- True on success, false otherwise
◆ bbt_device_disable_signal()
BBT_SDK_API int bbt_device_disable_signal |
( |
bbt_device_t * | device, |
|
|
unsigned short | n ) |
Disables the acquisition of this signal.
- Parameters
-
deviceThe | handle to the device |
n | The index of the signal to disable, as returned in the array from function bbt_device_get_signals |
- Returns
- True on success, false otherwise
◆ bbt_device_set_signal_mode()
BBT_SDK_API int bbt_device_set_signal_mode |
( |
bbt_device_t * | device, |
|
|
unsigned short | n, |
|
|
int | mode ) |
Sets the mode to a specific value.
- Note
- This function is not needed in general, as the signals can be enabled/disabled using the corresponding functions. Only very specific uses of specific signals may require this function.
- Parameters
-
device | The handle to the device |
n | The index of the signal to set the mode, as returned in the array from function bbt_device_get_signals |
mode | The mode to set. Acceptable values are from 0 to 255. A value of 0 disables the signal. |
- Returns
- True on success, false otherwise
◆ bbt_device_has_sd_card_capabilities()
BBT_SDK_API int bbt_device_has_sd_card_capabilities |
( |
const bbt_device_t * | device | ) |
|
Check if the device has SD Card capabilities to record the data.
- Parameters
-
device | The handle to the device |
- Returns
- True if the device can record data in the SD Card. False otherwise.
◆ bbt_device_is_sd_card_enabled()
BBT_SDK_API int bbt_device_is_sd_card_enabled |
( |
const bbt_device_t * | device | ) |
|
Check if the SD Card recording is enabled in the device.
- Parameters
-
device | The handle to the device |
- Returns
- True if the recording to the SD card is enabled. False otherwise
◆ bbt_device_enable_sd_card()
BBT_SDK_API int bbt_device_enable_sd_card |
( |
bbt_device_t * | device, |
|
|
const char * | full_recording_path ) |
Enable the SD Card recording in the device.
- Parameters
-
device | The handle to the device |
full_recording_path | The path in the SD Card where the recording will take place |
- Returns
- True on success. False otherwise
◆ bbt_device_disable_sd_card()
BBT_SDK_API int bbt_device_disable_sd_card |
( |
bbt_device_t * | device | ) |
|
Disable the SD Card recording in the device.
- Parameters
-
device | The handle to the device |
- Returns
- True on success. False otherwise