| 26 | } |
| 27 | |
| 28 | int initialize (void *param) |
| 29 | { |
| 30 | if (helper != NULL) |
| 31 | { |
| 32 | return (int)BrainFlowExitCodes::ANOTHER_BOARD_IS_CREATED_ERROR; |
| 33 | } |
| 34 | std::tuple<int, struct BrainFlowInputParams, json> *info = |
| 35 | (std::tuple<int, struct BrainFlowInputParams, json> *)param; |
| 36 | helper = new MuseBGLibHelper (std::get<0> (*info), std::get<2> (*info)); |
| 37 | int res = helper->initialize (std::get<1> (*info)); |
| 38 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 39 | { |
| 40 | delete helper; |
| 41 | helper = NULL; |
| 42 | } |
| 43 | else |
| 44 | { |
| 45 | bglib_output = output; |
| 46 | } |
| 47 | return res; |
| 48 | } |
| 49 | |
| 50 | int open_device (void *param) |
| 51 | { |
nothing calls this directly
no test coverage detected