| 573 | } |
| 574 | |
| 575 | int add_streamer ( |
| 576 | const char *streamer, int preset, int board_id, const char *json_brainflow_input_params) |
| 577 | { |
| 578 | std::lock_guard<std::mutex> lock (mutex); |
| 579 | if (streamer == NULL) |
| 580 | { |
| 581 | return (int)BrainFlowExitCodes::INVALID_ARGUMENTS_ERROR; |
| 582 | } |
| 583 | |
| 584 | std::pair<int, struct BrainFlowInputParams> key; |
| 585 | int res = check_board_session (board_id, json_brainflow_input_params, key, false); |
| 586 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 587 | { |
| 588 | return res; |
| 589 | } |
| 590 | auto board_it = boards.find (key); |
| 591 | return board_it->second->add_streamer (streamer, preset); |
| 592 | } |
| 593 | |
| 594 | static int copy_string_to_buffer ( |
| 595 | const std::string &source, char *destination, int *destination_len, int max_len) |
no test coverage detected