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

Method get_current_board_data

cpp_package/src/board_shim.cpp:216–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214}
215
216BrainFlowArray<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
233std::string BoardShim::config_board (std::string config)
234{

Callers

nothing calls this directly

Calls 3

get_num_rowsFunction · 0.85
get_current_board_dataFunction · 0.85
BrainFlowExceptionClass · 0.85

Tested by

no test coverage detected