Bitbrain SDK 2.8.6
Bitbrain SDK
|
The bbt_device_data_block_t class. More...
#include <bbt_device.h>
Data Fields | |
unsigned short | sequence |
short | battery |
unsigned short | flags |
double * | signal_data [10] |
unsigned short * | impedances |
The bbt_device_data_block_t class.
A device data block is generated and communicated at a fixed frequency (bbt_device_get_frequency) by the device. Each block contains a unique[1] consecutive sequence, the battery level, a flag that inidicates any problem and the data from the differrent signals.
The data is separated per signal. So, the data of the signal with index i in the device_signals array obtained from bbt_device_get_signals, is in the signal_data[i] array of doubles. Inside each signal data array, the values are arranged in a channels x samples matrix, as is the bbt_device_signal_t struct. First, all the samples from channel 1, then all the samples from channel 2, etc. If the signal is not enabled, the pointer to the data of the signal is set to 0. If an eeg signal is returned, the corresponding contact impedance/quality measurement is available in the impedances field.
[1] The sequence wraps after 2^16 data blocks and goes back to 0 again.
unsigned short bbt_device_data_block_t::sequence |
The number of sequence of the data block. They are consecutive and wrap around at 2**16
short bbt_device_data_block_t::battery |
The remaining battery (see Battery level constants)
unsigned short bbt_device_data_block_t::flags |
A flag set inidicating any problem during acquisition. 0 if no problem occur
double* bbt_device_data_block_t::signal_data[10] |
The table of data per signal
unsigned short* bbt_device_data_block_t::impedances |
If EEG is being acquired, this list is the quality per channel (see EEG impedance/quality values)