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

Method stop_stream

src/board_controller/muse/muse_athena.cpp:446–476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

444}
445
446int MuseAthena::stop_stream ()
447{
448 if (muse_peripheral == NULL)
449 {
450 return (int)BrainFlowExitCodes::BOARD_NOT_CREATED_ERROR;
451 }
452 int res = (int)BrainFlowExitCodes::STATUS_OK;
453 if (is_streaming)
454 {
455 res = config_board ("h");
456 if (res != (int)BrainFlowExitCodes::STATUS_OK)
457 {
458 bool is_connected = false;
459 if ((simpleble_peripheral_is_connected (muse_peripheral, &is_connected) ==
460 SIMPLEBLE_SUCCESS) &&
461 (!is_connected))
462 {
463 safe_logger (spdlog::level::warn,
464 "MuseAthena device is already disconnected during stop_stream");
465 res = (int)BrainFlowExitCodes::STATUS_OK;
466 }
467 }
468 }
469 else
470 {
471 res = (int)BrainFlowExitCodes::STREAM_ALREADY_RUN_ERROR;
472 }
473 is_streaming = false;
474 reset_timestamps ();
475 return res;
476}
477
478int MuseAthena::release_session ()
479{

Callers

nothing calls this directly

Calls 1

config_boardFunction · 0.50

Tested by

no test coverage detected