MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / start_stream

Method start_stream

src/board_controller/neuromd/callibri.cpp:145–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

143}
144
145int 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
172int Callibri::stop_stream ()
173{

Callers

nothing calls this directly

Calls 2

read_threadMethod · 0.95
config_boardFunction · 0.50

Tested by

no test coverage detected