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

Method config_board

python_package/brainflow/board_shim.py:1461–1480  ·  view source on GitHub ↗

Use this method carefully and only if you understand what you are doing, do NOT use it to start or stop streaming :param config: string to send to a board :type config: str :return: response string if any :rtype: str

(self, config)

Source from the content-addressed store, hash-verified

1459 return data_arr.reshape(package_length, data_size)
1460
1461 def config_board(self, config) -> str:
1462 """Use this method carefully and only if you understand what you are doing, do NOT use it to start or stop streaming
1463
1464 :param config: string to send to a board
1465 :type config: str
1466 :return: response string if any
1467 :rtype: str
1468 """
1469 try:
1470 config_string = config.encode()
1471 except BaseException:
1472 config_string = config
1473 string = numpy.zeros(4096).astype(numpy.ubyte)
1474 string_len = numpy.zeros(1).astype(numpy.int32)
1475
1476 res = BoardControllerDLL.get_instance().config_board(
1477 config_string, string, string_len, string.size, self.board_id, self.input_json)
1478 if res != BrainFlowExitCodes.STATUS_OK.value:
1479 raise BrainFlowError('unable to config board', res)
1480 return string.tobytes().decode('utf-8')[0:string_len[0]]
1481
1482 def config_board_with_bytes(self, bytes_to_send) -> None:
1483 """Use this method carefully and only if you understand what you are doing

Callers 8

mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 3

BrainFlowErrorClass · 0.90
config_boardMethod · 0.65
get_instanceMethod · 0.45

Tested by 1

mainFunction · 0.76