MCPcopy Create free account
hub / github.com/cjcliffe/CubicSDR / readLoop

Method readLoop

src/sdr/SoapySDRThread.cpp:405–433  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

403
404
405void SDRThread::readLoop() {
406
407 SDRThreadIQDataQueuePtr iqDataOutQueue = std::static_pointer_cast<SDRThreadIQDataQueue>( getOutputQueue("IQDataOutput"));
408
409 if (iqDataOutQueue == nullptr) {
410 return;
411 }
412
413 updateGains();
414
415 try {
416 while (!stopping.load()) {
417
418 updateSettings();
419
420 if (SDR_DEVICE_LOST == readStream(iqDataOutQueue)) {
421 //stop reading loop:
422 stopping = true;
423 }
424 } //End while
425 }
426 catch (...) {
427 //notify App of device loss:
428 std::cout << "SDRThread::readLoop() exception, stopping device..." << std::endl << std::flush;
429 stopping = true;
430 }
431
432 iqDataOutQueue->flush();
433}
434
435void SDRThread::updateGains() {
436 SDRDeviceInfo *devInfo = deviceInfo.load();

Callers

nothing calls this directly

Calls 2

loadMethod · 0.80
flushMethod · 0.80

Tested by

no test coverage detected