MCPcopy Create free account
hub / github.com/brainflow-dev/brainflow / get_board_presets

Method get_board_presets

python_package/brainflow/board_shim.py:819–836  ·  view source on GitHub ↗

get available presets for this board id :param board_id: Board Id :type board_id: int :return: presets for this board id :rtype: List[str] :raises BrainFlowError: In case of internal error or invalid args

(cls, board_id: int)

Source from the content-addressed store, hash-verified

817
818 @classmethod
819 def get_board_presets(cls, board_id: int) -> List[str]:
820 """get available presets for this board id
821
822 :param board_id: Board Id
823 :type board_id: int
824 :return: presets for this board id
825 :rtype: List[str]
826 :raises BrainFlowError: In case of internal error or invalid args
827 """
828
829 num_presets = numpy.zeros(1).astype(numpy.int32)
830 presets = numpy.zeros(512).astype(numpy.int32)
831
832 res = BoardControllerDLL.get_instance().get_board_presets(board_id, presets, num_presets)
833 if res != BrainFlowExitCodes.STATUS_OK.value:
834 raise BrainFlowError('unable to request info about this board', res)
835 result = presets.tolist()[0:num_presets[0]]
836 return result
837
838 @classmethod
839 def get_version(cls) -> str:

Callers

nothing calls this directly

Calls 3

BrainFlowErrorClass · 0.90
get_board_presetsMethod · 0.65
get_instanceMethod · 0.45

Tested by

no test coverage detected