248 #ifdef BBT_SDK_STATIC_DEFINE
250 # define BBT_SDK_NO_EXPORT
253 # ifdef BBT_SDK_EXPORTS
255 # define BBT_SDK_API __declspec(dllexport)
258 # define BBT_SDK_API __declspec(dllimport)
262 # ifndef BBT_SDK_NO_EXPORT
263 # define BBT_SDK_NO_EXPORT
270 #ifndef BBT_SDK_DEPRECATED
271 # define BBT_SDK_DEPRECATED __declspec(deprecated)
274 #ifndef BBT_SDK_DEPRECATED_EXPORT
275 # define BBT_SDK_DEPRECATED_EXPORT BBT_SDK_API BBT_SDK_DEPRECATED
278 #ifndef BBT_SDK_DEPRECATED_NO_EXPORT
279 # define BBT_SDK_DEPRECATED_NO_EXPORT BBT_SDK_NO_EXPORT BBT_SDK_DEPRECATED
283 # ifndef BBT_SDK_NO_DEPRECATED
284 # define BBT_SDK_NO_DEPRECATED
349 unsigned int max_len);
614 unsigned short* major,
615 unsigned short* minor);
1064 unsigned short* sequence,
1066 unsigned short* flags);
1103 unsigned short index);
BBT_SDK_API const short bbt_driver_battery_unknown
unknown battery level
BBT_SDK_API const short bbt_driver_battery_charging
battery charging
BBT_SDK_API int bbt_driver_enable_sd_card(bbt_driver_t *driver, int enable)
Enables or disables the SD card recording.
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.
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.
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.
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.
BBT_SDK_API int bbt_driver_is_sd_card_enabled(const bbt_driver_t *driver)
Checks if the SD card record is enabled.
BBT_SDK_API bbt_signal_t * bbt_driver_get_signal(const bbt_driver_t *driver, unsigned short index)
Gets a handler to the signal with the corresponding index that can be later used with functions in Si...
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.
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.
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.
BBT_SDK_API void bbt_driver_disconnect(bbt_driver_t *driver)
Disconnects from the device associated.
BBT_SDK_API void bbt_driver_reconnect(bbt_driver_t *driver)
Reconnects to the device associated.
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()
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()
BBT_SDK_API void bbt_driver_free(bbt_driver_t *driver)
Releases the memory of the driver created by bbt_driver_new_*()
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()
BBT_SDK_API const unsigned short bbt_driver_impedance_fair
bbt_driver_impedance_fair
BBT_SDK_API unsigned long bbt_driver_read_data_size(const bbt_driver_t *driver)
Gets the size of the data vector read on each block depending on the configuration of the driver.
BBT_SDK_API int bbt_driver_start(bbt_driver_t *driver)
Stars a new recording.
BBT_SDK_API const unsigned short bbt_driver_impedance_bad
bbt_driver_impedance_bad
BBT_SDK_API double * bbt_driver_read(bbt_driver_t *driver, unsigned short *sequence, short *battery, unsigned short *flags)
Reads one data message from the device.
BBT_SDK_API unsigned short bbt_driver_get_eeg_impedance(const bbt_driver_t *driver, unsigned short index)
Reads the impedance value for the index channel of the EEG signal (if any)
BBT_SDK_API const unsigned short bbt_driver_impedance_good
bbt_driver_impedance_good
BBT_SDK_API int bbt_driver_is_running(const bbt_driver_t *driver)
Checks if the recording is active.
BBT_SDK_API const unsigned short bbt_driver_impedance_unknown
bbt_driver_impedance_unknown
BBT_SDK_API int bbt_driver_stop(bbt_driver_t *driver)
Stops the current recording.
BBT_SDK_API const unsigned short bbt_driver_impedance_saturated
bbt_driver_impedance_saturated
BBT_SDK_API int bbt_driver_synchronize(const bbt_driver_t *driver, unsigned long *rtt, long *offset)
Computes the rtt and clock offset between the computer and the device.
typedefBBT_SDK_API struct bbt_driver_s bbt_driver_t
Opaque data type that represents the driver for a BBT device.
Definition: bbt_driver.h:432
BBT_SDK_API const int bbt_dry_eeg_sensor
dry eeg sensor
BBT_SDK_API const int bbt_water_eeg_sensor
water based eeg sensor
BBT_SDK_API int bbt_driver_import_eeg64_sd_record(const char *left_input_folder, const char *right_input_folder, const char *input_file, const char *output_folder)
Imports the eeg 64 recordings from the sd card into readable csv files.
BBT_SDK_API int bbt_driver_import_sd_record(const char *input_folder, const char *input_file, const char *output_folder)
Imports the recordings from the sd card into readable csv files.
BBT_SDK_API const unsigned short bbt_driver_flags_sd_card_access_error
SD card cannot be accessed.
BBT_SDK_API const unsigned short bbt_driver_flags_eeg64_not_synchronized
EEG64 device not synchronized.
BBT_SDK_API const unsigned short bbt_driver_flags_sd_card_full_error
SD card full error.
BBT_SDK_API const unsigned short bbt_driver_flags_bad_anchor_configuration
Bad anchor configuration.
BBT_SDK_API const unsigned short bbt_driver_flags_sd_card_file_error
SD card file error.
BBT_SDK_API const unsigned short bbt_driver_flags_sd_card_removed
SD card was removed.
BBT_SDK_API const unsigned short bbt_driver_flags_sd_card_folder_error
SD card folder error.
BBT_SDK_API const unsigned short bbt_driver_flags_sd_card_time_error
SD card creation time error.
BBT_SDK_API const unsigned short bbt_driver_flags_ok
data recording is ok
BBT_SDK_API int bbt_signal_set_mode(const bbt_signal_t *signal, int mode)
Sets the working mode of the signal.
BBT_SDK_API unsigned int bbt_signal_get_channels(const bbt_signal_t *signal)
Gets the number of channels that compose the signal.
struct bbt_signal_s bbt_signal_t
Opaque type to handle signals from Bitbrain devices.
Definition: bbt_driver.h:333
BBT_SDK_API char * bbt_signal_get_type(const bbt_signal_t *signal, char *output_buffer, unsigned int max_len)
Gets the type of the signal.
BBT_SDK_API unsigned int bbt_signal_get_samples(const bbt_signal_t *signal)
Gets the number of measurements gathered in every message.
BBT_SDK_API int bbt_signal_get_mode(const bbt_signal_t *signal)
Gets the current working mode of the signal.