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

Method call_init

src/board_controller/dyn_lib_board.cpp:219–240  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219int DynLibBoard::call_init ()
220{
221 if (dll_loader == NULL)
222 {
223 return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR;
224 }
225 int (*func) (void *) = (int (*) (void *))dll_loader->get_address ("initialize");
226 if (func == NULL)
227 {
228 safe_logger (spdlog::level::err, "failed to get function address for initialize");
229 return (int)BrainFlowExitCodes::GENERAL_ERROR;
230 }
231
232 std::tuple<int, struct BrainFlowInputParams, json> info =
233 std::make_tuple (board_id, params, board_descr);
234 int res = func ((void *)&info);
235 if (res != (int)BrainFlowExitCodes::STATUS_OK)
236 {
237 safe_logger (spdlog::level::err, "failed to initialize {}", res);
238 }
239 return res;
240}
241
242int DynLibBoard::call_open ()
243{

Callers

nothing calls this directly

Calls 1

get_addressMethod · 0.45

Tested by

no test coverage detected