|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern "C"{ |
|
|
extern "C"{ |
|
|
|
|
|
|
|
|
|
|
|
//allgemein |
|
|
|
|
|
//------------------------------------------------------------------------------------------------------------------------------------- |
|
|
string PATH_OV = "meta/dist/Release/openvibe-designer.sh"; |
|
|
string PATH_OV = "meta/dist/Release/openvibe-designer.sh"; |
|
|
string PATH_AquisitionServer = "meta/dist/Release/openvibe-acquisition-server.sh"; |
|
|
string PATH_AquisitionServer = "meta/dist/Release/openvibe-acquisition-server.sh"; |
|
|
string PATH_FILES = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/"; |
|
|
|
|
|
string pathOVFile = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/signals/p300-xdawn-train2.ov"; |
|
|
|
|
|
string pathClassifierCFG = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-classifier.cfg"; |
|
|
|
|
|
string pathSpatialCFG = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-spatial-filter.cfg"; |
|
|
|
|
|
string PATH_DEFAULT = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/datasets"; |
|
|
|
|
|
|
|
|
|
|
|
string fileCopySpellingTaktil = "p300-visual-1-acquisition.xml"; |
|
|
|
|
|
string fileCopySpellingVisuell = "p300-visual-1-acquisition.xml"; |
|
|
|
|
|
string fileXDawnTraining = "p300-visual-2-train-xDAWN.xml"; |
|
|
string fileXDawnTraining = "p300-visual-2-train-xDAWN.xml"; |
|
|
string fileClassifierTraining = "p300-visual-3-train-classifier.xml"; |
|
|
string fileClassifierTraining = "p300-visual-3-train-classifier.xml"; |
|
|
string filefreeSpellingTaktil = "p300-visual-4-online.xml"; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//visuell |
|
|
|
|
|
//------------------------------------------------------------------------------------------------------------------------------------- |
|
|
|
|
|
string PATH_FILES_Visual = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/"; |
|
|
|
|
|
string pathOVFile_visuell = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/signals/p300-xdawn-train2.ov"; |
|
|
|
|
|
string pathClassifierCFG_visuell = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-classifier.cfg"; |
|
|
|
|
|
string pathSpatialCFG_visuell = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-spatial-filter.cfg"; |
|
|
|
|
|
string PATH_DEFAULT_visuell = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/datasets"; |
|
|
|
|
|
|
|
|
|
|
|
string fileCopySpellingVisuell = "p300-visual-1-acquisition.xml"; |
|
|
string filefreeSpellingVisuell = "p300-visual-4-online.xml"; |
|
|
string filefreeSpellingVisuell = "p300-visual-4-online.xml"; |
|
|
|
|
|
|
|
|
|
|
|
//taktil |
|
|
|
|
|
//------------------------------------------------------------------------------------------------------------------------------------ |
|
|
|
|
|
string fileCopySpellingTaktil = "p300-visual-1-acquisition.xml"; |
|
|
|
|
|
string filefreeSpellingTaktil = "p300-visual-4-online.xml"; |
|
|
|
|
|
|
|
|
|
|
|
string PATH_FILES_taktil = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/"; |
|
|
|
|
|
string pathOVFile_taktil = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/signals/p300-xdawn-train2.ov"; |
|
|
|
|
|
string pathClassifierCFG_taktil = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-classifier.cfg"; |
|
|
|
|
|
string pathSpatialCFG_taktil = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/cfg/p300-spatial-filter.cfg"; |
|
|
|
|
|
string PATH_DEFAULT_taktil = "Projekte/OpenViBE_visual_BCI-master/openvibe_visual_bci/datasets"; |
|
|
|
|
|
|
|
|
|
|
|
//Befehle |
|
|
|
|
|
//------------------------------------------------------------------------------------------------------------------------------------- |
|
|
string command = "bash"; |
|
|
string command = "bash"; |
|
|
string nogui = "--no-gui"; |
|
|
string nogui = "--no-gui"; |
|
|
string play = "--play"; |
|
|
string play = "--play"; |
|
|
|
|
|
|
|
|
char* getCommandFreespellingTaktil() |
|
|
char* getCommandFreespellingTaktil() |
|
|
{ |
|
|
{ |
|
|
string s = ""; |
|
|
string s = ""; |
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES).append(filefreeSpellingTaktil).append(" ").append(nogui); |
|
|
|
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_taktil).append(filefreeSpellingTaktil).append(" ").append(nogui); |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
|
|
|
|
|
|
char* getCommandFreespellingVisuell() |
|
|
char* getCommandFreespellingVisuell() |
|
|
{ |
|
|
{ |
|
|
string s = ""; |
|
|
string s = ""; |
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES).append(filefreeSpellingVisuell).append(" ").append(nogui); |
|
|
|
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_Visual).append(filefreeSpellingVisuell).append(" ").append(nogui); |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
|
|
|
|
|
|
char* getCommandCopyspellingTaktil() |
|
|
char* getCommandCopyspellingTaktil() |
|
|
{ |
|
|
{ |
|
|
string s = ""; |
|
|
string s = ""; |
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES).append(fileCopySpellingTaktil).append(" ").append(nogui); |
|
|
|
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_taktil).append(fileCopySpellingTaktil).append(" ").append(nogui); |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
|
|
|
|
|
|
char* getCommandCopyspellingVisuell() |
|
|
char* getCommandCopyspellingVisuell() |
|
|
{ |
|
|
{ |
|
|
string s = ""; |
|
|
string s = ""; |
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES).append(fileCopySpellingVisuell).append(" ").append(nogui); |
|
|
|
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_Visual).append(fileCopySpellingVisuell).append(" ").append(nogui); |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
return s_convert; |
|
|
return s_convert; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* getCommandXDawn() |
|
|
|
|
|
|
|
|
char* getCommandXDawn_taktil() |
|
|
{ |
|
|
{ |
|
|
string s = ""; |
|
|
string s = ""; |
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES).append(fileXDawnTraining).append(" ").append(nogui); |
|
|
|
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_taktil).append(fileXDawnTraining).append(" ").append(nogui); |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
return s_convert; |
|
|
return s_convert; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* getCommandClassifier() |
|
|
|
|
|
|
|
|
char* getCommandXDawn_visuell() |
|
|
{ |
|
|
{ |
|
|
string s = ""; |
|
|
string s = ""; |
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES).append(fileClassifierTraining).append(" ").append(nogui); |
|
|
|
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_Visual).append(fileXDawnTraining).append(" ").append(nogui); |
|
|
|
|
|
char char_array[s.length()+1]; |
|
|
|
|
|
strcpy(char_array, s.c_str()); |
|
|
|
|
|
char* s_convert = char_array; |
|
|
|
|
|
return s_convert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* getCommandClassifier_visuell() |
|
|
|
|
|
{ |
|
|
|
|
|
string s = ""; |
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_Visual).append(fileClassifierTraining).append(" ").append(nogui); |
|
|
|
|
|
char char_array[s.length()+1]; |
|
|
|
|
|
strcpy(char_array, s.c_str()); |
|
|
|
|
|
char* s_convert = char_array; |
|
|
|
|
|
return s_convert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* getCommandClassifier_taktil() |
|
|
|
|
|
{ |
|
|
|
|
|
string s = ""; |
|
|
|
|
|
s = s.append(command).append(" ").append(PATH_OV).append(" ").append( play).append(" ").append(PATH_FILES_taktil).append(fileClassifierTraining).append(" ").append(nogui); |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
|
|
|
|
|
|
return s_convert; |
|
|
return s_convert; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* getDefaultPath() |
|
|
|
|
|
|
|
|
char* getDefaultPath_visuell() |
|
|
|
|
|
{ |
|
|
|
|
|
string s = PATH_DEFAULT_visuell; |
|
|
|
|
|
char char_array[s.length()+1]; |
|
|
|
|
|
strcpy(char_array, s.c_str()); |
|
|
|
|
|
char* s_convert = char_array; |
|
|
|
|
|
return s_convert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* getDefaultPath_taktil() |
|
|
|
|
|
{ |
|
|
|
|
|
string s = PATH_DEFAULT_taktil; |
|
|
|
|
|
char char_array[s.length()+1]; |
|
|
|
|
|
strcpy(char_array, s.c_str()); |
|
|
|
|
|
char* s_convert = char_array; |
|
|
|
|
|
return s_convert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* getPathOVFile_visuell() |
|
|
|
|
|
{ |
|
|
|
|
|
string s = pathOVFile_visuell; |
|
|
|
|
|
char char_array[s.length()+1]; |
|
|
|
|
|
strcpy(char_array, s.c_str()); |
|
|
|
|
|
char* s_convert = char_array; |
|
|
|
|
|
return s_convert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* getSpatialCFGFile_visuell() |
|
|
|
|
|
{ |
|
|
|
|
|
string s = pathSpatialCFG_visuell; |
|
|
|
|
|
char char_array[s.length()+1]; |
|
|
|
|
|
strcpy(char_array, s.c_str()); |
|
|
|
|
|
char* s_convert = char_array; |
|
|
|
|
|
return s_convert; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
char* getClassifierCFGFile_visuell() |
|
|
{ |
|
|
{ |
|
|
string s = PATH_DEFAULT; |
|
|
|
|
|
|
|
|
string s = pathClassifierCFG_visuell; |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
return s_convert; |
|
|
return s_convert; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* getPathOVFile() |
|
|
|
|
|
|
|
|
char* getPathOVFile_taktil() |
|
|
{ |
|
|
{ |
|
|
string s = pathOVFile; |
|
|
|
|
|
|
|
|
string s = pathOVFile_taktil; |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
return s_convert; |
|
|
return s_convert; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* getSpatialCFGFile() |
|
|
|
|
|
|
|
|
char* getSpatialCFGFile_taktil() |
|
|
{ |
|
|
{ |
|
|
string s = pathSpatialCFG; |
|
|
|
|
|
|
|
|
string s = pathSpatialCFG_taktil; |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |
|
|
return s_convert; |
|
|
return s_convert; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
char* getClassifierCFGFile() |
|
|
|
|
|
|
|
|
char* getClassifierCFGFile_taktil() |
|
|
{ |
|
|
{ |
|
|
string s = pathClassifierCFG; |
|
|
|
|
|
|
|
|
string s = pathClassifierCFG_taktil; |
|
|
char char_array[s.length()+1]; |
|
|
char char_array[s.length()+1]; |
|
|
strcpy(char_array, s.c_str()); |
|
|
strcpy(char_array, s.c_str()); |
|
|
char* s_convert = char_array; |
|
|
char* s_convert = char_array; |