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

Method runPFBCH

src/sdr/SDRPostThread.cpp:416–455  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

414}
415
416void SDRPostThread::runPFBCH(SDRThreadIQData *data_in) {
417 bool refreshed = false;
418 if (numChannels != data_in->numChannels || sampleRate != data_in->sampleRate || chanMode != lastChanMode || doRefresh.load()) {
419 numChannels = data_in->numChannels;
420 sampleRate = data_in->sampleRate;
421 initPFBCH();
422 lastChanMode = 1;
423 refreshed = true;
424 }
425
426 if (refreshed || frequency != data_in->frequency) {
427 frequency = data_in->frequency;
428 updateActiveDemodulators();
429 updateChannels();
430 }
431
432 //push the full data_in into (Main spectrum + waterfall) visual queue:
433 DemodulatorThreadIQDataPtr fullSampleRateIQ = getFullSampleRateIqData(data_in);
434 pushVisualData(fullSampleRateIQ);
435
436 size_t outSize = data_in->data.size();
437
438 if (outSize > dataOut.capacity()) {
439 dataOut.reserve(outSize);
440 }
441 if (outSize != dataOut.size()) {
442 dataOut.resize(outSize);
443 }
444
445 // Find active demodulators
446 if (!runDemods.empty()) {
447 // Channelize data
448 // firpfbch produces [numChannels] interleaved output samples for every [numChannels] samples
449 for (int i = 0, iMax = data_in->data.size(); i < iMax; i+=numChannels) {
450 firpfbch_crcf_analyzer_execute(channelizer, &data_in->data[i], &dataOut[i]);
451 }
452
453 runDemodChannels(chanBw);
454 }
455}
456
457
458void SDRPostThread::initPFBCH2() {

Callers

nothing calls this directly

Calls 5

loadMethod · 0.80
capacityMethod · 0.80
reserveMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected