| 133 | } |
| 134 | |
| 135 | int StreamingBoard::start_stream (int buffer_size, const char *streamer_params) |
| 136 | { |
| 137 | if (keep_alive) |
| 138 | { |
| 139 | safe_logger (spdlog::level::err, "Streaming thread already running"); |
| 140 | return (int)BrainFlowExitCodes::STREAM_ALREADY_RUN_ERROR; |
| 141 | } |
| 142 | int res = prepare_for_acquisition (buffer_size, streamer_params); |
| 143 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 144 | { |
| 145 | return res; |
| 146 | } |
| 147 | |
| 148 | keep_alive = true; |
| 149 | for (int i = 0; i < (int)clients.size (); i++) |
| 150 | { |
| 151 | streaming_threads.push_back (std::thread ([this, i] { this->read_thread (i); })); |
| 152 | } |
| 153 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 154 | } |
| 155 | |
| 156 | int StreamingBoard::stop_stream () |
| 157 | { |
nothing calls this directly
no test coverage detected