| 143 | } |
| 144 | |
| 145 | int Callibri::start_stream (int buffer_size, const char *streamer_params) |
| 146 | { |
| 147 | if (is_streaming) |
| 148 | { |
| 149 | safe_logger (spdlog::level::err, "Streaming thread already running"); |
| 150 | return (int)BrainFlowExitCodes::STREAM_ALREADY_RUN_ERROR; |
| 151 | } |
| 152 | int res = prepare_for_acquisition (buffer_size, streamer_params); |
| 153 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 154 | { |
| 155 | return res; |
| 156 | } |
| 157 | |
| 158 | std::string command_start = "CommandStartSignal"; |
| 159 | std::string tmp = ""; |
| 160 | res = config_board (command_start, tmp); |
| 161 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 162 | { |
| 163 | return res; |
| 164 | } |
| 165 | |
| 166 | keep_alive = true; |
| 167 | streaming_thread = std::thread ([this] { this->read_thread (); }); |
| 168 | is_streaming = true; |
| 169 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 170 | } |
| 171 | |
| 172 | int Callibri::stop_stream () |
| 173 | { |
nothing calls this directly
no test coverage detected