|  | SDRAngel
    4.11.5
    Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware. | 
#include <chanalyzer.h>
 Inheritance diagram for ChannelAnalyzer:
 Inheritance diagram for ChannelAnalyzer: Collaboration diagram for ChannelAnalyzer:
 Collaboration diagram for ChannelAnalyzer:| Classes | |
| class | MsgConfigureChannelAnalyzer | 
| class | MsgConfigureChannelizer | 
| class | MsgReportChannelSampleRateChanged | 
| Public Member Functions | |
| ChannelAnalyzer (DeviceAPI *deviceAPI) | |
| virtual | ~ChannelAnalyzer () | 
| virtual void | destroy () | 
| void | setSampleSink (BasebandSampleSink *sampleSink) | 
| DownChannelizer * | getChannelizer () | 
| int | getInputSampleRate () const | 
| int | getChannelSampleRate () const | 
| int | getDecimation () const | 
| double | getMagSq () const | 
| double | getMagSqAvg () const | 
| bool | isPllLocked () const | 
| Real | getPllFrequency () const | 
| Real | getPllDeltaPhase () const | 
| Real | getPllPhase () const | 
| virtual void | feed (const SampleVector::const_iterator &begin, const SampleVector::const_iterator &end, bool positiveOnly) | 
| virtual void | start () | 
| virtual void | stop () | 
| virtual bool | handleMessage (const Message &cmd) | 
| Processing of a message. Returns true if message has actually been processed.  More... | |
| virtual void | getIdentifier (QString &id) | 
| virtual void | getTitle (QString &title) | 
| virtual qint64 | getCenterFrequency () const | 
| Applies to a default stream.  More... | |
| virtual QByteArray | serialize () const | 
| virtual bool | deserialize (const QByteArray &data) | 
| virtual int | getNbSinkStreams () const | 
| virtual int | getNbSourceStreams () const | 
| virtual qint64 | getStreamCenterFrequency (int streamIndex, bool sinkElseSource) const | 
|  Public Member Functions inherited from BasebandSampleSink | |
| BasebandSampleSink () | |
| virtual | ~BasebandSampleSink () | 
| MessageQueue * | getInputMessageQueue () | 
| Get the queue for asynchronous inbound communication.  More... | |
| virtual void | setMessageQueueToGUI (MessageQueue *queue) | 
| MessageQueue * | getMessageQueueToGUI () | 
|  Public Member Functions inherited from ChannelAPI | |
| ChannelAPI (const QString &name, StreamType streamType) | |
| virtual | ~ChannelAPI () | 
| virtual void | setName (const QString &name) | 
| virtual const QString & | getName () const | 
| virtual int | webapiSettingsGet (SWGSDRangel::SWGChannelSettings &response, QString &errorMessage) | 
| virtual int | webapiSettingsPutPatch (bool force, const QStringList &channelSettingsKeys, SWGSDRangel::SWGChannelSettings &response, QString &errorMessage) | 
| virtual int | webapiReportGet (SWGSDRangel::SWGChannelReport &response, QString &errorMessage) | 
| int | getIndexInDeviceSet () const | 
| void | setIndexInDeviceSet (int indexInDeviceSet) | 
| int | getDeviceSetIndex () const | 
| void | setDeviceSetIndex (int deviceSetIndex) | 
| DeviceAPI * | getDeviceAPI () | 
| void | setDeviceAPI (DeviceAPI *deviceAPI) | 
| uint64_t | getUID () const | 
| StreamType | getStreamType () const | 
| Static Public Attributes | |
| static const QString | m_channelIdURI = "sdrangel.channel.chanalyzer" | 
| static const QString | m_channelId = "ChannelAnalyzer" | 
| Private Member Functions | |
| void | applyChannelSettings (int inputSampleRate, int inputFrequencyOffset, bool force=false) | 
| void | applySettings (const ChannelAnalyzerSettings &settings, bool force=false) | 
| void | setFilters (int sampleRate, float bandwidth, float lowCutoff) | 
| void | processOneSample (Complex &c, fftfilt::cmplx *sideband) | 
| void | feedOneSample (const fftfilt::cmplx &s, const fftfilt::cmplx &pll) | 
| Private Attributes | |
| DeviceAPI * | m_deviceAPI | 
| ThreadedBasebandSampleSink * | m_threadedChannelizer | 
| DownChannelizer * | m_channelizer | 
| ChannelAnalyzerSettings | m_settings | 
| int | m_inputSampleRate | 
| int | m_inputFrequencyOffset | 
| int | m_undersampleCount | 
| fftfilt::cmplx | m_sum | 
| bool | m_usb | 
| double | m_magsq | 
| bool | m_useInterpolator | 
| NCOF | m_nco | 
| PhaseLockComplex | m_pll | 
| FreqLockComplex | m_fll | 
| Interpolator | m_interpolator | 
| Real | m_interpolatorDistance | 
| Real | m_interpolatorDistanceRemain | 
| fftfilt * | SSBFilter | 
| fftfilt * | DSBFilter | 
| fftfilt * | RRCFilter | 
| fftcorr * | m_corr | 
| BasebandSampleSink * | m_sampleSink | 
| SampleVector | m_sampleBuffer | 
| MovingAverageUtil< double, double, 480 > | m_channelPowerAvg | 
| QMutex | m_settingsMutex | 
| Additional Inherited Members | |
|  Public Types inherited from ChannelAPI | |
| enum | StreamType { StreamSingleSink, StreamSingleSource, StreamMIMO } | 
| < This is the same enum as in PluginInterface  More... | |
|  Protected Slots inherited from BasebandSampleSink | |
| void | handleInputMessages () | 
|  Protected Attributes inherited from BasebandSampleSink | |
| MessageQueue | m_inputMessageQueue | 
| Queue for asynchronous inbound communication.  More... | |
| MessageQueue * | m_guiMessageQueue | 
| Input message queue to the GUI.  More... | |
Definition at line 44 of file chanalyzer.h.
| ChannelAnalyzer::ChannelAnalyzer | ( | DeviceAPI * | deviceAPI | ) | 
Definition at line 35 of file chanalyzer.cpp.
References DeviceAPI::addChannelSink(), DeviceAPI::addChannelSinkAPI(), applyChannelSettings(), applySettings(), PhaseLockComplex::computeCoefficients(), DSBFilter, ChannelAnalyzerSettings::m_bandwidth, m_channelId, m_channelizer, m_corr, m_deviceAPI, m_inputFrequencyOffset, m_inputSampleRate, m_interpolatorDistance, m_interpolatorDistanceRemain, ChannelAnalyzerSettings::m_lowCutoff, m_magsq, m_pll, m_settings, m_sum, m_threadedChannelizer, m_undersampleCount, m_usb, m_useInterpolator, RRCFilter, ssbFftLen, and SSBFilter.
Referenced by ChannelAnalyzer::MsgReportChannelSampleRateChanged::MsgReportChannelSampleRateChanged().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Definition at line 67 of file chanalyzer.cpp.
References DSBFilter, m_channelizer, m_deviceAPI, m_threadedChannelizer, DeviceAPI::removeChannelSink(), DeviceAPI::removeChannelSinkAPI(), RRCFilter, and SSBFilter.
Referenced by ChannelAnalyzer::MsgReportChannelSampleRateChanged::MsgReportChannelSampleRateChanged().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 236 of file chanalyzer.cpp.
References Interpolator::create(), ChannelAnalyzerSettings::m_bandwidth, ChannelAnalyzerSettings::m_downSample, ChannelAnalyzerSettings::m_downSampleRate, m_fll, m_inputFrequencyOffset, m_inputSampleRate, m_interpolator, m_interpolatorDistance, m_interpolatorDistanceRemain, ChannelAnalyzerSettings::m_lowCutoff, m_nco, m_pll, m_settings, m_settingsMutex, ChannelAnalyzerSettings::m_spanLog2, setFilters(), NCOF::setFreq(), FreqLockComplex::setSampleRate(), and PhaseLockComplex::setSampleRate().
Referenced by ChannelAnalyzer(), handleMessage(), and start().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 297 of file chanalyzer.cpp.
References Interpolator::create(), fftfilt::create_rrc_filter(), ChannelAnalyzerSettings::m_bandwidth, ChannelAnalyzerSettings::m_downSample, ChannelAnalyzerSettings::m_downSampleRate, ChannelAnalyzerSettings::m_fll, m_fll, m_inputSampleRate, ChannelAnalyzerSettings::m_inputType, m_interpolator, m_interpolatorDistance, m_interpolatorDistanceRemain, ChannelAnalyzerSettings::m_lowCutoff, ChannelAnalyzerSettings::m_pll, m_pll, ChannelAnalyzerSettings::m_pllPskOrder, ChannelAnalyzerSettings::m_rrc, ChannelAnalyzerSettings::m_rrcRolloff, m_settings, m_settingsMutex, ChannelAnalyzerSettings::m_spanLog2, ChannelAnalyzerSettings::m_ssb, m_useInterpolator, FreqLockComplex::reset(), PhaseLockComplex::reset(), RRCFilter, setFilters(), PhaseLockComplex::setPskOrder(), FreqLockComplex::setSampleRate(), and PhaseLockComplex::setSampleRate().
Referenced by ChannelAnalyzer(), and handleMessage().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlinevirtual | 
Implements ChannelAPI.
Definition at line 145 of file chanalyzer.h.
| 
 | inlinevirtual | 
| 
 | virtual | 
Implements BasebandSampleSink.
Definition at line 78 of file chanalyzer.cpp.
References Interpolator::decimate(), BasebandSampleSink::feed(), m_interpolator, m_interpolatorDistance, m_interpolatorDistanceRemain, m_nco, m_sampleBuffer, m_sampleSink, m_settings, m_settingsMutex, ChannelAnalyzerSettings::m_ssb, m_useInterpolator, NCOF::nextIQ(), and processOneSample().
Referenced by getPllPhase().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlineprivate | 
Definition at line 197 of file chanalyzer.h.
References ChannelAnalyzerSettings::InputAutoCorr, ChannelAnalyzerSettings::InputPLL, ChannelAnalyzerSettings::InputSignal, ChannelAnalyzerSettings::m_inputType, ChannelAnalyzerSettings::m_ssb, fftcorr::run(), and SDR_RX_SCALEF.
Referenced by processOneSample().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlinevirtual | 
Applies to a default stream.
Implements ChannelAPI.
Definition at line 142 of file chanalyzer.h.
References ChannelAnalyzerSettings::m_frequency, and ChannelAnalyzer::MsgConfigureChannelAnalyzer::m_settings.
| 
 | inline | 
Definition at line 124 of file chanalyzer.h.
References m_channelizer.
Referenced by ChannelAnalyzerGUI::getRequestedChannelSampleRate().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Definition at line 126 of file chanalyzer.h.
References ChannelAnalyzerSettings::m_downSample, ChannelAnalyzerSettings::m_downSampleRate, m_inputSampleRate, and ChannelAnalyzer::MsgConfigureChannelAnalyzer::m_settings.
Referenced by ChannelAnalyzerGUI::tick().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Definition at line 127 of file chanalyzer.h.
References ChannelAnalyzer::MsgConfigureChannelAnalyzer::m_settings, and ChannelAnalyzerSettings::m_spanLog2.
Referenced by ChannelAnalyzerGUI::tick().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlinevirtual | 
| 
 | inline | 
Definition at line 125 of file chanalyzer.h.
References m_inputSampleRate.
Referenced by ChannelAnalyzerGUI::displaySettings(), and ChannelAnalyzerGUI::handleMessage().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
| 
 | inline | 
Definition at line 129 of file chanalyzer.h.
References m_channelPowerAvg.
Referenced by ChannelAnalyzerGUI::tick().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlinevirtual | 
| 
 | inlinevirtual | 
| 
 | inline | 
Definition at line 132 of file chanalyzer.h.
References PhaseLockComplex::getDeltaPhi(), and m_pll.
 Here is the call graph for this function:
 Here is the call graph for this function:| Real ChannelAnalyzer::getPllFrequency | ( | ) | const | 
Definition at line 383 of file chanalyzer.cpp.
References FreqLockComplex::getFreq(), PhaseLockComplex::getFreq(), ChannelAnalyzerSettings::m_fll, m_fll, ChannelAnalyzerSettings::m_pll, m_pll, and m_settings.
Referenced by isPllLocked(), and ChannelAnalyzerGUI::tick().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Definition at line 133 of file chanalyzer.h.
References feed(), PhaseLockComplex::getPhiHat(), handleMessage(), m_pll, start(), and stop().
 Here is the call graph for this function:
 Here is the call graph for this function:| 
 | inlinevirtual | 
Implements ChannelAPI.
Definition at line 150 of file chanalyzer.h.
References ChannelAnalyzerSettings::m_frequency, and ChannelAnalyzer::MsgConfigureChannelAnalyzer::m_settings.
| 
 | inlinevirtual | 
| 
 | virtual | 
Processing of a message. Returns true if message has actually been processed.
Implements BasebandSampleSink.
Definition at line 180 of file chanalyzer.cpp.
References applyChannelSettings(), applySettings(), DownChannelizer::configure(), ChannelAnalyzer::MsgReportChannelSampleRateChanged::create(), ChannelAnalyzer::MsgConfigureChannelizer::getCenterFrequency(), ChannelAnalyzer::MsgConfigureChannelAnalyzer::getForce(), DownChannelizer::MsgChannelizerNotification::getFrequencyOffset(), BasebandSampleSink::getInputMessageQueue(), BasebandSampleSink::getMessageQueueToGUI(), DownChannelizer::MsgChannelizerNotification::getSampleRate(), ChannelAnalyzer::MsgConfigureChannelizer::getSampleRate(), ChannelAnalyzer::MsgConfigureChannelAnalyzer::getSettings(), m_channelizer, Message::match(), and MessageQueue::push().
Referenced by getPllPhase().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Definition at line 130 of file chanalyzer.h.
References getPllFrequency(), PhaseLockComplex::locked(), ChannelAnalyzerSettings::m_pll, m_pll, and ChannelAnalyzer::MsgConfigureChannelAnalyzer::m_settings.
Referenced by ChannelAnalyzerGUI::tick().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 115 of file chanalyzer.cpp.
References DSBFilter, FreqLockComplex::feed(), PhaseLockComplex::feed(), feedOneSample(), FreqLockComplex::getComplex(), PhaseLockComplex::getComplex(), i, m_channelPowerAvg, ChannelAnalyzerSettings::m_fll, m_fll, m_magsq, ChannelAnalyzerSettings::m_pll, m_pll, ChannelAnalyzerSettings::m_rrc, m_settings, ChannelAnalyzerSettings::m_spanLog2, ChannelAnalyzerSettings::m_ssb, m_sum, m_undersampleCount, m_usb, RRCFilter, fftfilt::runDSB(), fftfilt::runFilt(), fftfilt::runSSB(), SDR_RX_SCALEF, and SSBFilter.
Referenced by feed().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inlinevirtual | 
| 
 | private | 
Definition at line 270 of file chanalyzer.cpp.
References fftfilt::create_dsb_filter(), fftfilt::create_filter(), fftfilt::create_rrc_filter(), DSBFilter, ChannelAnalyzerSettings::m_rrcRolloff, m_settings, m_usb, RRCFilter, and SSBFilter.
Referenced by applyChannelSettings(), and applySettings().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | inline | 
Definition at line 112 of file chanalyzer.h.
References m_sampleSink.
Referenced by ChannelAnalyzerGUI::ChannelAnalyzerGUI().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements BasebandSampleSink.
Definition at line 171 of file chanalyzer.cpp.
References applyChannelSettings(), m_inputFrequencyOffset, and m_inputSampleRate.
Referenced by getPllPhase().
 Here is the call graph for this function:
 Here is the call graph for this function: Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | virtual | 
Implements BasebandSampleSink.
Definition at line 176 of file chanalyzer.cpp.
Referenced by getPllPhase().
 Here is the caller graph for this function:
 Here is the caller graph for this function:| 
 | private | 
Definition at line 182 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), processOneSample(), setFilters(), and ~ChannelAnalyzer().
| 
 | static | 
Definition at line 158 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), and ChannelAnalyzerPlugin::initPlugin().
| 
 | static | 
Definition at line 157 of file chanalyzer.h.
Referenced by ChannelAnalyzerGUI::ChannelAnalyzerGUI(), and ChannelAnalyzerPlugin::initPlugin().
| 
 | private | 
Definition at line 163 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), getChannelizer(), handleMessage(), and ~ChannelAnalyzer().
| 
 | private | 
Definition at line 188 of file chanalyzer.h.
Referenced by getMagSqAvg(), and processOneSample().
| 
 | private | 
Definition at line 184 of file chanalyzer.h.
Referenced by ChannelAnalyzer().
| 
 | private | 
Definition at line 161 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), and ~ChannelAnalyzer().
| 
 | private | 
Definition at line 176 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), getPllFrequency(), and processOneSample().
| 
 | private | 
Definition at line 167 of file chanalyzer.h.
Referenced by applyChannelSettings(), ChannelAnalyzer(), and start().
| 
 | private | 
Definition at line 166 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), ChannelAnalyzer(), getChannelSampleRate(), getInputSampleRate(), and start().
| 
 | private | 
Definition at line 177 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), and feed().
| 
 | private | 
Definition at line 178 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), ChannelAnalyzer(), and feed().
| 
 | private | 
Definition at line 179 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), ChannelAnalyzer(), and feed().
| 
 | private | 
Definition at line 171 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), getMagSq(), and processOneSample().
| 
 | private | 
Definition at line 174 of file chanalyzer.h.
Referenced by applyChannelSettings(), and feed().
| 
 | private | 
Definition at line 175 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), ChannelAnalyzer(), getPllDeltaPhase(), getPllFrequency(), getPllPhase(), isPllLocked(), and processOneSample().
| 
 | private | 
Definition at line 187 of file chanalyzer.h.
Referenced by feed().
| 
 | private | 
Definition at line 186 of file chanalyzer.h.
Referenced by feed(), and setSampleSink().
| 
 | private | 
Definition at line 164 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), ChannelAnalyzer(), feed(), getPllFrequency(), processOneSample(), and setFilters().
| 
 | private | 
Definition at line 189 of file chanalyzer.h.
Referenced by applyChannelSettings(), applySettings(), and feed().
| 
 | private | 
Definition at line 169 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), and processOneSample().
| 
 | private | 
Definition at line 162 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), and ~ChannelAnalyzer().
| 
 | private | 
Definition at line 168 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), and processOneSample().
| 
 | private | 
Definition at line 170 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), processOneSample(), and setFilters().
| 
 | private | 
Definition at line 172 of file chanalyzer.h.
Referenced by applySettings(), ChannelAnalyzer(), and feed().
| 
 | private | 
Definition at line 183 of file chanalyzer.h.
Referenced by applySettings(), ChannelAnalyzer(), processOneSample(), setFilters(), and ~ChannelAnalyzer().
| 
 | private | 
Definition at line 181 of file chanalyzer.h.
Referenced by ChannelAnalyzer(), processOneSample(), setFilters(), and ~ChannelAnalyzer().
 1.8.13
 1.8.13