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

Function check_board_session

src/board_controller/board_controller.cpp:666–688  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

664}
665
666int 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, &params);
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
690int string_to_brainflow_input_params (
691 const char *json_brainflow_input_params, struct BrainFlowInputParams *params)

Callers 13

is_preparedFunction · 0.85
start_streamFunction · 0.85
stop_streamFunction · 0.85
insert_markerFunction · 0.85
release_sessionFunction · 0.85
get_current_board_dataFunction · 0.85
get_board_data_countFunction · 0.85
get_board_dataFunction · 0.85
get_board_sampling_rateFunction · 0.85
config_boardFunction · 0.85
config_board_with_bytesFunction · 0.85
add_streamerFunction · 0.85

Calls 2

get_keyFunction · 0.85

Tested by

no test coverage detected