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

Method add_streamer

python_package/brainflow/board_shim.py:1263–1282  ·  view source on GitHub ↗

Add streamer :param preset: preset :type preset: int :param streamer_params parameter to stream data from brainflow, supported vals: "file://%file_name%:w", "file://%file_name%:a", "streaming_board://%multicast_group_ip%:%port%". Range for multicast addresses is from "224.0.

(self, streamer_params: str, preset: int = BrainFlowPresets.DEFAULT_PRESET)

Source from the content-addressed store, hash-verified

1261 raise BrainFlowError('unable to prepare streaming session', res)
1262
1263 def add_streamer(self, streamer_params: str, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> None:
1264 """Add streamer
1265
1266 :param preset: preset
1267 :type preset: int
1268 :param streamer_params parameter to stream data from brainflow, supported vals: "file://%file_name%:w", "file://%file_name%:a", "streaming_board://%multicast_group_ip%:%port%". Range for multicast addresses is from "224.0.0.0" to "239.255.255.255"
1269 :type streamer_params: str
1270 """
1271
1272 if streamer_params is None:
1273 streamer = None
1274 else:
1275 try:
1276 streamer = streamer_params.encode()
1277 except BaseException:
1278 streamer = streamer_params
1279
1280 res = BoardControllerDLL.get_instance().add_streamer(streamer, preset, self.board_id, self.input_json)
1281 if res != BrainFlowExitCodes.STATUS_OK.value:
1282 raise BrainFlowError('unable to add streamer', res)
1283
1284 def delete_streamer(self, streamer_params: str, preset: int = BrainFlowPresets.DEFAULT_PRESET) -> None:
1285 """Delete streamer

Callers 6

mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95
mainFunction · 0.95

Calls 3

BrainFlowErrorClass · 0.90
add_streamerMethod · 0.65
get_instanceMethod · 0.45

Tested by

no test coverage detected