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

Method is_prepared

python_package/brainflow/board_shim.py:1422–1433  ·  view source on GitHub ↗

Check if session is ready or not :return: session status :rtype: bool

(self)

Source from the content-addressed store, hash-verified

1420 raise BrainFlowError('unable to insert marker', res)
1421
1422 def is_prepared(self) -> bool:
1423 """Check if session is ready or not
1424
1425 :return: session status
1426 :rtype: bool
1427 """
1428 prepared = numpy.zeros(1).astype(numpy.int32)
1429
1430 res = BoardControllerDLL.get_instance().is_prepared(prepared, self.board_id, self.input_json)
1431 if res != BrainFlowExitCodes.STATUS_OK.value:
1432 raise BrainFlowError('unable to check session status', res)
1433 return bool(prepared[0])
1434
1435 def get_board_data(self, num_samples=None, preset: int = BrainFlowPresets.DEFAULT_PRESET):
1436 """Get board data and remove data from ringbuffer

Callers 9

__del__Method · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 3

BrainFlowErrorClass · 0.90
is_preparedMethod · 0.65
get_instanceMethod · 0.45

Tested by

no test coverage detected