Linux
SDK Integretion
Flow Diagram
Integration Steps
Download alg-linux-v1.0.zip
libalg_algorithm.so
Algorithm libalg_algorithm.h
Head FileinputData/zeng.csv
Test Datamian.c
Examplereadcsv.c
,Read File Tool
Init Method
void initAll(void); Init data
Add Device
int add_device(char *serial)
Delete Device
int delete_device(char * serial)
Get Original Data
get_eeg_info_t Split_data_frame(char *str)
Return:
typedef struct
{
unsigned int frame_dect_ok;
int frame_index;
unsigned long group_count;
double AF7_eeg_data[50];
int AF7_leadoff_flag[50];
double AF8_eeg_data[50];
int AF8_leadoff_flag[50];
int have_4sec_time_flag;
int time_flag_postion;
long time_counter;
} get_eeg_info_t;
Get Indicators from Algoithm
algorithmTarget get_algorithm_result(double data_raw[58],int index) data_raws stands for original data, index 0-28 are for channel AF7 and index 29-57 are for channel AF8. index stands for the index of the array.
Return:
typedef struct {
double mindfullness; // Mindfulness
double focus; // Degree of concentration
double emotion; // Degree of mood
double stress; // Degree of pressure
double fatigue; // Degree of fatigue
double relax; // Degree of relax
energyName energy; // Original data
int isValid;
int sqd[2]; // signal quality indicators from AF7 and AF8 (signal description: 0 stands for good signal quality,1 stands for poor signal quality)
int sqdValid;
} algorithmTarget;
typedef struct {
double alpha;
double beta;
double theta;
double delta;
double gamma;
}energyName;
More about data specification, please ref to Data Specification
Get Conherence Indicator
double get_alg_coherence(double * indata,int len)
Get 4 Indicators of mindfullness radar map
mindfulnessScore getMindfulnessScore(double * array,int length)
typedef struct{
int stability; // Stability
double potential; // Poential
double percent; // Percentage
int score;// Sore
} mindfulnessScore;
More about data specification, please ref to Data Specification