| 664 | } |
| 665 | |
| 666 | int check_board_session (int board_id, const char *json_brainflow_input_params, |
| 667 | std::pair<int, struct BrainFlowInputParams> &key, bool log_error) |
| 668 | { |
| 669 | struct BrainFlowInputParams params; |
| 670 | int res = string_to_brainflow_input_params (json_brainflow_input_params, ¶ms); |
| 671 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 672 | { |
| 673 | return res; |
| 674 | } |
| 675 | |
| 676 | key = get_key (board_id, params); |
| 677 | |
| 678 | if (boards.find (key) == boards.end ()) |
| 679 | { |
| 680 | if (log_error) |
| 681 | { |
| 682 | Board::board_logger->error ( |
| 683 | "Board with id {} and port provided config is not created", key.first); |
| 684 | } |
| 685 | return (int)BrainFlowExitCodes::BOARD_NOT_CREATED_ERROR; |
| 686 | } |
| 687 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 688 | } |
| 689 | |
| 690 | int string_to_brainflow_input_params ( |
| 691 | const char *json_brainflow_input_params, struct BrainFlowInputParams *params) |
no test coverage detected