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

Function config_board

src/board_controller/board_controller.cpp:530–554  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530int config_board (const char *config, char *response, int *response_len, int response_max_len,
531 int board_id, const char *json_brainflow_input_params)
532{
533 std::lock_guard<std::mutex> lock (mutex);
534 if ((config == NULL) || (response == NULL) || (response_len == NULL) || (response_max_len < 1))
535 {
536 return (int)BrainFlowExitCodes::INVALID_ARGUMENTS_ERROR;
537 }
538
539 std::pair<int, struct BrainFlowInputParams> key;
540 int res = check_board_session (board_id, json_brainflow_input_params, key, false);
541 if (res != (int)BrainFlowExitCodes::STATUS_OK)
542 {
543 return res;
544 }
545 auto board_it = boards.find (key);
546 std::string conf = config;
547 std::string resp = "";
548 res = board_it->second->config_board (conf, resp);
549 if (res == (int)BrainFlowExitCodes::STATUS_OK)
550 {
551 res = copy_string_to_buffer (resp, response, response_len, response_max_len);
552 }
553 return res;
554}
555
556int config_board_with_bytes (
557 const char *bytes, int len, int board_id, const char *json_brainflow_input_params)

Callers 2

config_boardMethod · 0.50
config_boardMethod · 0.50

Calls 3

check_board_sessionFunction · 0.85
copy_string_to_bufferFunction · 0.85
config_boardMethod · 0.65

Tested by

no test coverage detected