| 214 | } |
| 215 | |
| 216 | BrainFlowArray<double, 2> BoardShim::get_current_board_data (int num_samples, int preset) |
| 217 | { |
| 218 | int num_data_channels = BoardShim::get_num_rows (get_board_id (), preset); |
| 219 | double *buf = new double[num_samples * num_data_channels]; |
| 220 | int len = 0; |
| 221 | int res = ::get_current_board_data ( |
| 222 | num_samples, preset, buf, &len, board_id, serialized_params.c_str ()); |
| 223 | if (res != (int)BrainFlowExitCodes::STATUS_OK) |
| 224 | { |
| 225 | delete[] buf; |
| 226 | throw BrainFlowException ("failed to get board data", res); |
| 227 | } |
| 228 | BrainFlowArray<double, 2> matrix (buf, num_data_channels, len); |
| 229 | delete[] buf; |
| 230 | return matrix; |
| 231 | } |
| 232 | |
| 233 | std::string BoardShim::config_board (std::string config) |
| 234 | { |
nothing calls this directly
no test coverage detected