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

Method insert_marker

src/board_controller/board.cpp:201–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

199}
200
201int Board::insert_marker (double value, int preset)
202{
203 if (std::fabs (value) < std::numeric_limits<double>::epsilon ())
204 {
205 safe_logger (spdlog::level::err, "0 is a default value for marker, you can not use it.");
206 return (int)BrainFlowExitCodes::INVALID_ARGUMENTS_ERROR;
207 }
208 std::string preset_str = preset_to_string (preset);
209 if ((board_descr.find (preset_str) == board_descr.end ()) ||
210 (marker_queues.find (preset) == marker_queues.end ()))
211 {
212 safe_logger (spdlog::level::err, "invalid preset");
213 return (int)BrainFlowExitCodes::INVALID_ARGUMENTS_ERROR;
214 }
215 lock.lock ();
216 marker_queues[preset].push_back (value);
217 lock.unlock ();
218 return (int)BrainFlowExitCodes::STATUS_OK;
219}
220
221void Board::free_packages ()
222{

Callers

nothing calls this directly

Calls 2

lockMethod · 0.45
unlockMethod · 0.45

Tested by

no test coverage detected