2 #include "../CEBLModel.hpp"
15 source_names.push_back(
"Mindset");
16 source_names.push_back(
"Random Numbers");
17 source_names.push_back(
"Random EEG");
18 source_names.push_back(
"File");
20 active_stream_type = 0;
21 data_store_flag =
false;
28 if(data_stream != NULL)
48 if(this->data_store_flag)
50 this->data_buffer.
append(ret);
64 if(this->data_store_flag)
66 this->data_buffer.
append(ret);
81 if(data_stream == NULL || !data_stream->
isStarted())
89 if(data_stream != NULL)
97 return this->data_store_flag;
106 return this->data_buffer;
114 this->data_buffer.
clear();
119 this->data_store_flag = flag;
124 this->selected_source = source;
129 for(
unsigned int i=0; i<source_names.size();i++)
131 if(source_names[i]==source)
142 if(data_stream != NULL)
146 void DataSource::createDataStream()
148 if(this->data_stream != NULL)
150 delete this->data_stream;
151 this->data_stream = NULL;
154 switch(this->selected_source)
170 this->active_stream_type = selected_source;
176 if(data_stream == NULL || active_stream_type != selected_source)
178 if(data_stream != NULL)
179 data_stream->
start();
181 cerr <<
"DataSource: Illegal source selected.\n";
186 if(data_stream != NULL)