get device name :param board_id: Board Id :type board_id: int :param preset: preset :type preset: int :return: Device Name :rtype: str :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR
(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET)
| 873 | |
| 874 | @classmethod |
| 875 | def get_device_name(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> str: |
| 876 | """get device name |
| 877 | |
| 878 | :param board_id: Board Id |
| 879 | :type board_id: int |
| 880 | :param preset: preset |
| 881 | :type preset: int |
| 882 | :return: Device Name |
| 883 | :rtype: str |
| 884 | :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR |
| 885 | """ |
| 886 | |
| 887 | string = numpy.zeros(4096).astype(numpy.ubyte) |
| 888 | string_len = numpy.zeros(1).astype(numpy.int32) |
| 889 | res = BoardControllerDLL.get_instance().get_device_name( |
| 890 | board_id, preset, string, string_len, string.size) |
| 891 | if res != BrainFlowExitCodes.STATUS_OK.value: |
| 892 | raise BrainFlowError('unable to request info about this board', res) |
| 893 | return string.tobytes().decode('utf-8')[0:string_len[0]] |
| 894 | |
| 895 | @classmethod |
| 896 | def get_eeg_channels(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> List[int]: |
nothing calls this directly
no test coverage detected