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)
| 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 |