| 277 | } |
| 278 | |
| 279 | int BrainBit::start_stream (int buffer_size, const char *streamer_params) |
| 280 | { |
| 281 | if (is_streaming) |
| 282 | { |
| 283 | safe_logger (spdlog::level::err, "Streaming thread already running"); |
| 284 | return (int)BrainFlowExitCodes::STREAM_ALREADY_RUN_ERROR; |
| 285 | } |
| 286 | int res = prepare_for_acquisition (buffer_size, streamer_params); |
| 287 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 288 | { |
| 289 | return res; |
| 290 | } |
| 291 | |
| 292 | std::string command_start = "CommandStartSignal"; |
| 293 | std::string tmp = ""; |
| 294 | res = config_board (command_start, tmp); |
| 295 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 296 | { |
| 297 | return res; |
| 298 | } |
| 299 | |
| 300 | keep_alive = true; |
| 301 | streaming_thread = std::thread ([this] { this->read_thread (); }); |
| 302 | is_streaming = true; |
| 303 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 304 | } |
| 305 | |
| 306 | int BrainBit::stop_stream () |
| 307 | { |
nothing calls this directly
no test coverage detected