get sampling rate for a board :param board_id: Board Id :type board_id: int :param preset: preset :type preset: int :return: sampling rate for this board id :rtype: int :raises BrainFlowError: If this board has no such data exit code is UNSUPP
(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET)
| 682 | |
| 683 | @classmethod |
| 684 | def get_sampling_rate(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int: |
| 685 | """get sampling rate for a board |
| 686 | |
| 687 | :param board_id: Board Id |
| 688 | :type board_id: int |
| 689 | :param preset: preset |
| 690 | :type preset: int |
| 691 | :return: sampling rate for this board id |
| 692 | :rtype: int |
| 693 | :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR |
| 694 | """ |
| 695 | |
| 696 | sampling_rate = numpy.zeros(1).astype(numpy.int32) |
| 697 | res = BoardControllerDLL.get_instance().get_sampling_rate(board_id, preset, sampling_rate) |
| 698 | if res != BrainFlowExitCodes.STATUS_OK.value: |
| 699 | raise BrainFlowError('unable to request info about this board', res) |
| 700 | return int(sampling_rate[0]) |
| 701 | |
| 702 | @classmethod |
| 703 | def get_package_num_channel(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int: |
nothing calls this directly
no test coverage detected