get number of rows in resulting data table for a board :param board_id: Board Id :type board_id: int :param preset: preset :type preset: int :return: number of rows in returned numpy array :rtype: int :raises BrainFlowError: If this board has
(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET)
| 739 | |
| 740 | @classmethod |
| 741 | def get_num_rows(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int: |
| 742 | """get number of rows in resulting data table for a board |
| 743 | |
| 744 | :param board_id: Board Id |
| 745 | :type board_id: int |
| 746 | :param preset: preset |
| 747 | :type preset: int |
| 748 | :return: number of rows in returned numpy array |
| 749 | :rtype: int |
| 750 | :raises BrainFlowError: If this board has no such data exit code is UNSUPPORTED_BOARD_ERROR |
| 751 | """ |
| 752 | |
| 753 | num_rows = numpy.zeros(1).astype(numpy.int32) |
| 754 | res = BoardControllerDLL.get_instance().get_num_rows(board_id, preset, num_rows) |
| 755 | if res != BrainFlowExitCodes.STATUS_OK.value: |
| 756 | raise BrainFlowError('unable to request info about this board', res) |
| 757 | return int(num_rows[0]) |
| 758 | |
| 759 | @classmethod |
| 760 | def get_timestamp_channel(cls, board_id: int, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> int: |
nothing calls this directly
no test coverage detected