| 802 | } |
| 803 | |
| 804 | int Ganglion::call_stop () |
| 805 | { |
| 806 | if (dll_loader == NULL) |
| 807 | { |
| 808 | return (int)BrainFlowExitCodes::BOARD_NOT_READY_ERROR; |
| 809 | } |
| 810 | int (*func) (void *) = (int (*) (void *))dll_loader->get_address ("stop_stream"); |
| 811 | if (func == NULL) |
| 812 | { |
| 813 | safe_logger (spdlog::level::err, "failed to get function address for stop_stream"); |
| 814 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 815 | } |
| 816 | |
| 817 | int res = func ((void *)stop_command.c_str ()); |
| 818 | if (res != (int)GanglionLib::CustomExitCodes::STATUS_OK) |
| 819 | { |
| 820 | safe_logger (spdlog::level::err, "failed to stop streaming {}", res); |
| 821 | return (int)BrainFlowExitCodes::GENERAL_ERROR; |
| 822 | } |
| 823 | return (int)BrainFlowExitCodes::STATUS_OK; |
| 824 | } |
| 825 | |
| 826 | int Ganglion::call_close () |
| 827 | { |
nothing calls this directly
no test coverage detected