get board description as json :param board_id: Board Id :type board_id: int :param preset: preset :type preset: int :return: info about board :rtype: json :raises BrainFlowError: If there is no such board id exit code is UNSUPPORTED_BOARD_ERRO
(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET)
| 852 | |
| 853 | @classmethod |
| 854 | def get_board_descr(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET): |
| 855 | """get board description as json |
| 856 | |
| 857 | :param board_id: Board Id |
| 858 | :type board_id: int |
| 859 | :param preset: preset |
| 860 | :type preset: int |
| 861 | :return: info about board |
| 862 | :rtype: json |
| 863 | :raises BrainFlowError: If there is no such board id exit code is UNSUPPORTED_BOARD_ERROR |
| 864 | """ |
| 865 | |
| 866 | string = numpy.zeros(16000).astype(numpy.ubyte) |
| 867 | string_len = numpy.zeros(1).astype(numpy.int32) |
| 868 | res = BoardControllerDLL.get_instance().get_board_descr( |
| 869 | board_id, preset, string, string_len, string.size) |
| 870 | if res != BrainFlowExitCodes.STATUS_OK.value: |
| 871 | raise BrainFlowError('unable to request info about this board', res) |
| 872 | return json.loads(string.tobytes().decode('utf-8')[0:string_len[0]]) |
| 873 | |
| 874 | @classmethod |
| 875 | def get_device_name(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> str: |
nothing calls this directly
no test coverage detected