| 217 | } |
| 218 | |
| 219 | int 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 | |
| 242 | int DynLibBoard::call_open () |
| 243 | { |
nothing calls this directly
no test coverage detected