Bitbrain SDK 2.10.6
Bitbrain SDK
Loading...
Searching...
No Matches
bbt_device.h File Reference

Header for the Bitbrain device SDK. More...

Go to the source code of this file.

Data Structures

struct  bbt_device_signal_t
 The bbt_device_signal_t class. More...
 
struct  bbt_device_data_block_t
 The bbt_device_data_block_t class. More...
 

Macros

#define BBT_SDK_API
 
#define BBT_SDK_DEPRECATED   __declspec(deprecated)
 
#define BBT_SDK_DEPRECATED_EXPORT   BBT_SDK_API BBT_SDK_DEPRECATED
 
#define BBT_SDK_DEPRECATED_NO_EXPORT   BBT_SDK_NO_EXPORT BBT_SDK_DEPRECATED
 

Typedefs

typedef struct bbt_device_s bbt_device_t
 bbt_device_t is an opaque type that identifies a connection to a device
 

Enumerations

enum  bbt_powerline_frequency_t { POWERLINE_DISABLED = 0 , POWERLINE_50 = 50 , POWERLINE_60 = 60 }
 Powerline frequency options. More...
 
enum  bbt_device_signal_type_t {
  Accelerometer = 0 , Analog_Aux , BVP , Digital_Aux ,
  Digital_Input , Digital_Output , EEG , EXG ,
  GSR , IMU , Photodiode , PPG ,
  Digital_Input_Output
}
 Types of signal a Bitbrain device can acquire. More...
 
enum  bbt_device_type_t {
  AIR = 0 , DIADEM , HERO , VERSATILE_8 ,
  VERSATILE_16 , VERSATILE_32 , VERSATILE_64 , VERSATILE_BIO ,
  RING , IKON , IKON_SLEEP , VERSATILE_PLUS_16 ,
  VERSATILE_PLUS_32
}
 Supported Bitbrain devices. More...
 
enum  bbt_device_versatile_plus_dio_mode { DISABLED = 0 , DIGITAL_INPUT , DIGITAL_OUTPUT }
 Signal modes of the Versatile Plus Digital I/O (DIO) port. More...
 

Functions

BBT_SDK_API bbt_device_t * bbt_device_new_air (const char *device_name)
 Creates an instance of a handler to an air type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_diadem (const char *device_name)
 Creates an instance of a handler to a diadem type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_hero (const char *device_name)
 Creates an instance of a handler to a hero type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_8 (const char *device_name)
 Creates an instance of a handler to an 8-channels versatile type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_16 (const char *device_name)
 Creates an instance of a handler to a 16-channels versatile type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_32 (const char *device_name)
 Creates an instance of a handler to a 32-channels versatile type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_64 (const char *left_device_name, const char *right_device_name)
 Creates an instance of a handler to a 64-channels versatile type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_bio (const char *device_name)
 Creates an instance of a handler to a biosignal versatile type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_ring (const char *device_name)
 Creates an instance of a handler to a ring type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_ikon (const char *device_name)
 Creates an instance of a handler to an ikon type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_ikon_sleep (const char *device_name)
 Creates an instance of a handler to a ikon-sleep type device.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_plus_16 (const char *device_name, const char *connection_type, unsigned short sampling_rate)
 Creates an instance of a handler to a versatile plus type device with 16 channels.
 
BBT_SDK_API bbt_device_t * bbt_device_new_versatile_plus_32 (const char *device_name, const char *connection_type, unsigned short sampling_rate)
 Creates an instance of a handler to a versatile plus type device with 32 channels.
 
BBT_SDK_API void bbt_device_free (bbt_device_t *device)
 Destroys the handler to a device.
 
BBT_SDK_API int bbt_device_run_connection_server (const char *connection_server_folder, int connection_timeout)
 Starts the servers needed to establish the connections to the devices.
 
BBT_SDK_API int bbt_device_kill_connection_server ()
 Kills the connection servers.
 
BBT_SDK_API int bbt_device_connect (bbt_device_t *device)
 Initiates the connection to the device.
 
BBT_SDK_API int bbt_device_disconnect (bbt_device_t *device)
 Disconnects from the device and clears the information from the device.
 
BBT_SDK_API int bbt_device_reconnect (bbt_device_t *device)
 Recovers from accidental disconnection.
 
BBT_SDK_API int bbt_device_is_connected (const bbt_device_t *device)
 Returns the state of the connection with the device.
 
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_set_frequency (bbt_device_t *device, enum bbt_powerline_frequency_t powerline_info)
 Sets the powerline frequency for the device.
 
BBT_SDK_API const int bbt_device_get_powerline_frequency (const bbt_device_t *device)
 Gets the powerline frequency for the device.
 
BBT_SDK_API const char * bbt_device_get_conn_type (const bbt_device_t *device)
 Gets the connection type (usb or bluetooth)
 
BBT_SDK_API const int bbt_device_get_versatile_plus_sampling_rate (const bbt_device_t *device)
 Gets the sampling rate for the versatile plus signals.
 
BBT_SDK_API enum bbt_device_type_t bbt_device_get_type (const bbt_device_t *device)
 Gets the type of the device that has been configured.
 
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 *recording_folder_path, const char *recording_name)
 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.
 
BBT_SDK_API int bbt_device_start (bbt_device_t *device)
 Sets the device into acquisition mode.
 
BBT_SDK_API int bbt_device_stop (bbt_device_t *device)
 Stops acquisition mode and enters configuration mode.
 
BBT_SDK_API int bbt_device_is_acquiring (const bbt_device_t *device)
 Checks if the device is in acquisition mode.
 
BBT_SDK_API int bbt_device_read (bbt_device_t *device, struct bbt_device_data_block_t *block)
 Read a data block from a device.
 
BBT_SDK_API int bbt_mount_versatile_plus_sd_card (bbt_device_t *device)
 Mount SD volume in Versatile Plus devices to import data from them.
 
BBT_SDK_API int bbt_device_import_sd_record (const char *input_folder, const char *recording_name, const char *output_folder, enum bbt_device_type_t dev_type, enum bbt_powerline_frequency_t powerline_info, const char *version)
 Imports a recording from the SD Card of any Bitbrain device except from a 64-channels versatile device.
 
BBT_SDK_API int bbt_device_import_eeg64_sd_record (const char *left_input_folder, const char *right_input_folder, const char *recording_name, const char *output_folder, enum bbt_device_type_t dev_type, enum bbt_powerline_frequency_t powerline_info, const char *version)
 Imports a recording from the SD Card of a 64-channels versatile device.
 

Variables

BBT_SDK_API const short bbt_device_battery_unknown
 
BBT_SDK_API const short bbt_device_battery_charging
 
BBT_SDK_API const unsigned short bbt_device_impedance_unknown
 The impedance/quality is being computed.
 
BBT_SDK_API const unsigned short bbt_device_impedance_saturated
 The channel is saturated.
 
BBT_SDK_API const unsigned short bbt_device_impedance_bad
 The impedance/quality of the channel is bad.
 
BBT_SDK_API const unsigned short bbt_device_impedance_fair
 The impedance/quality of the channel is fair.
 
BBT_SDK_API const unsigned short bbt_device_impedance_good
 The impedance/quality of the channel is good.
 

Detailed Description

Header for the Bitbrain device SDK.

This file contains the C interface to the Bitbrain device SDK.

Date
28-09-2026