![]() |
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 <fileinput.h>
Inheritance diagram for FileInput:
Collaboration diagram for FileInput:Classes | |
| class | MsgConfigureFileInput |
| class | MsgConfigureFileInputStreamTiming |
| class | MsgConfigureFileInputWork |
| class | MsgConfigureFileSourceName |
| class | MsgConfigureFileSourceSeek |
| class | MsgPlayPause |
| class | MsgReportFileInputStreamData |
| class | MsgReportFileInputStreamTiming |
| class | MsgReportFileSourceAcquisition |
| class | MsgReportHeaderCRC |
| class | MsgStartStop |
Public Member Functions | |
| FileInput (DeviceAPI *deviceAPI) | |
| virtual | ~FileInput () |
| virtual void | destroy () |
| virtual void | init () |
| initializations to be done when all collaborating objects are created and possibly connected More... | |
| virtual bool | start () |
| virtual void | stop () |
| virtual QByteArray | serialize () const |
| virtual bool | deserialize (const QByteArray &data) |
| virtual void | setMessageQueueToGUI (MessageQueue *queue) |
| virtual const QString & | getDeviceDescription () const |
| virtual int | getSampleRate () const |
| Sample rate exposed by the source. More... | |
| virtual void | setSampleRate (int sampleRate) |
| For when the source sample rate is set externally. More... | |
| virtual quint64 | getCenterFrequency () const |
| Center frequency exposed by the source. More... | |
| virtual void | setCenterFrequency (qint64 centerFrequency) |
| quint64 | getStartingTimeStamp () const |
| virtual bool | handleMessage (const Message &message) |
| virtual int | webapiSettingsGet (SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
| virtual int | webapiSettingsPutPatch (bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
| virtual int | webapiRunGet (SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
| virtual int | webapiRun (bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
| virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
Public Member Functions inherited from DeviceSampleSource | |
| DeviceSampleSource () | |
| virtual | ~DeviceSampleSource () |
| MessageQueue * | getInputMessageQueue () |
| MessageQueue * | getMessageQueueToGUI () |
| SampleSinkFifo * | getSampleFifo () |
Private Slots | |
| void | networkManagerFinished (QNetworkReply *reply) |
Private Member Functions | |
| void | openFileStream () |
| void | seekFileStream (int seekMillis) |
| bool | applySettings (const FileInputSettings &settings, bool force=false) |
| void | webapiFormatDeviceSettings (SWGSDRangel::SWGDeviceSettings &response, const FileInputSettings &settings) |
| void | webapiFormatDeviceReport (SWGSDRangel::SWGDeviceReport &response) |
| void | webapiReverseSendSettings (QList< QString > &deviceSettingsKeys, const FileInputSettings &settings, bool force) |
| void | webapiReverseSendStartStop (bool start) |
Private Attributes | |
| DeviceAPI * | m_deviceAPI |
| QMutex | m_mutex |
| FileInputSettings | m_settings |
| std::ifstream | m_ifstream |
| FileInputThread * | m_fileInputThread |
| QString | m_deviceDescription |
| QString | m_fileName |
| int | m_sampleRate |
| quint32 | m_sampleSize |
| quint64 | m_centerFrequency |
| quint64 | m_recordLength |
| record length in seconds computed from file size More... | |
| quint64 | m_startingTimeStamp |
| QTimer | m_masterTimer |
| QNetworkAccessManager * | m_networkManager |
| QNetworkRequest | m_networkRequest |
Additional Inherited Members | |
Public Types inherited from DeviceSampleSource | |
| enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } |
| enum | FrequencyShiftScheme { FSHIFT_STD = 0, FSHIFT_TXSYNC } |
Static Public Member Functions inherited from DeviceSampleSource | |
| static qint64 | calculateDeviceCenterFrequency (quint64 centerFrequency, qint64 transverterDeltaFrequency, int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme, bool transverterMode=false) |
| static qint64 | calculateCenterFrequency (quint64 deviceCenterFrequency, qint64 transverterDeltaFrequency, int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme, bool transverterMode=false) |
| static qint32 | calculateFrequencyShift (int log2Decim, fcPos_t fcPos, quint32 devSampleRate, FrequencyShiftScheme frequencyShiftScheme) |
Protected Slots inherited from DeviceSampleSource | |
| void | handleInputMessages () |
Protected Attributes inherited from DeviceSampleSource | |
| SampleSinkFifo | m_sampleFifo |
| MessageQueue | m_inputMessageQueue |
| Input queue to the source. More... | |
| MessageQueue * | m_guiMessageQueue |
| Input message queue to the GUI. More... | |
Definition at line 38 of file fileinput.h.
| FileInput::FileInput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 52 of file fileinput.cpp.
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the caller graph for this function:
|
virtual |
Definition at line 74 of file fileinput.cpp.
References m_masterTimer, m_networkManager, networkManagerFinished(), and stop().
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 406 of file fileinput.cpp.
References FileInputSettings::m_accelerationFactor, FileInputSettings::m_centerFrequency, m_centerFrequency, m_fileInputThread, FileInputSettings::m_fileName, FileInputSettings::m_loop, m_mutex, FileInputSettings::m_reverseAPIAddress, FileInputSettings::m_reverseAPIDeviceIndex, FileInputSettings::m_reverseAPIPort, DeviceSampleSource::m_sampleFifo, m_sampleRate, m_sampleSize, m_settings, FileInputSettings::m_useReverseAPI, FileInputThread::setSampleRateAndSize(), SampleSinkFifo::setSize(), and webapiReverseSendSettings().
Referenced by handleMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 238 of file fileinput.cpp.
References FileInput::MsgConfigureFileInput::create(), FileInputSettings::deserialize(), DeviceSampleSource::getMessageQueueToGUI(), DeviceSampleSource::m_inputMessageQueue, m_settings, MessageQueue::push(), and FileInputSettings::resetToDefaults().
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 83 of file fileinput.cpp.
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the caller graph for this function:
|
virtual |
Center frequency exposed by the source.
Implements DeviceSampleSource.
Definition at line 270 of file fileinput.cpp.
References m_centerFrequency.
Referenced by setSampleRate().
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 260 of file fileinput.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
Here is the caller graph for this function:
|
virtual |
Sample rate exposed by the source.
Implements DeviceSampleSource.
Definition at line 265 of file fileinput.cpp.
References m_sampleRate.
Referenced by setMessageQueueToGUI().
Here is the caller graph for this function:| quint64 FileInput::getStartingTimeStamp | ( | ) | const |
Definition at line 290 of file fileinput.cpp.
References m_startingTimeStamp.
Referenced by setSampleRate().
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 295 of file fileinput.cpp.
References applySettings(), FileInput::MsgPlayPause::create(), FileInput::MsgReportFileInputStreamTiming::create(), FileInput::MsgConfigureFileSourceName::getFileName(), DeviceSampleSource::getMessageQueueToGUI(), FileInput::MsgConfigureFileSourceSeek::getMillis(), FileInputThread::getSamplesCount(), FileInput::MsgConfigureFileInput::getSettings(), FileInput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), FileInput::MsgConfigureFileInputWork::isWorking(), m_deviceAPI, m_fileInputThread, m_fileName, FileInputSettings::m_loop, m_settings, FileInputSettings::m_useReverseAPI, Message::match(), openFileStream(), MessageQueue::push(), seekFileStream(), DeviceAPI::startDeviceEngine(), FileInputThread::startWork(), DeviceAPI::stopDeviceEngine(), FileInputThread::stopWork(), and webapiReverseSendStartStop().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSource.
Definition at line 170 of file fileinput.cpp.
References DeviceAPI::getDeviceEngineInputMessageQueue(), FileInputSettings::m_centerFrequency, m_deviceAPI, FileInputSettings::m_sampleRate, m_settings, and MessageQueue::push().
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the call graph for this function:
Here is the caller graph for this function:
|
privateslot |
Definition at line 664 of file fileinput.cpp.
Referenced by ~FileInput().
Here is the caller graph for this function:
|
private |
Definition at line 88 of file fileinput.cpp.
References FileRecord::Header::centerFrequency, FileRecord::Header::crc32, FileInput::MsgReportFileInputStreamData::create(), FileInput::MsgReportHeaderCRC::create(), DeviceSampleSource::getMessageQueueToGUI(), m_centerFrequency, m_fileName, m_ifstream, m_recordLength, m_sampleRate, m_sampleSize, m_startingTimeStamp, MessageQueue::push(), FileRecord::readHeader(), FileRecord::Header::sampleRate, FileRecord::Header::sampleSize, and FileRecord::Header::startTimeStamp.
Referenced by handleMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 156 of file fileinput.cpp.
References FileInputThread::isRunning(), m_fileInputThread, m_ifstream, m_mutex, m_recordLength, m_sampleRate, m_sampleSize, and FileInputThread::setSamplesCount().
Referenced by handleMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 233 of file fileinput.cpp.
References m_settings, and FileInputSettings::serialize().
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 275 of file fileinput.cpp.
References FileInput::MsgConfigureFileInput::create(), DeviceSampleSource::getMessageQueueToGUI(), FileInputSettings::m_centerFrequency, DeviceSampleSource::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inlinevirtual |
Implements DeviceSampleSource.
Definition at line 289 of file fileinput.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSource::m_guiMessageQueue.
Here is the call graph for this function:
|
inlinevirtual |
For when the source sample rate is set externally.
Implements DeviceSampleSource.
Definition at line 292 of file fileinput.h.
References getCenterFrequency(), getStartingTimeStamp(), handleMessage(), setCenterFrequency(), webapiReportGet(), webapiRun(), webapiRunGet(), webapiSettingsGet(), and webapiSettingsPutPatch().
Here is the call graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 176 of file fileinput.cpp.
References FileInput::MsgReportFileSourceAcquisition::create(), DeviceSampleSource::getMessageQueueToGUI(), FileInputSettings::m_accelerationFactor, m_deviceDescription, m_fileInputThread, m_ifstream, DeviceSampleSource::m_inputMessageQueue, m_masterTimer, m_mutex, DeviceSampleSource::m_sampleFifo, m_sampleRate, m_sampleSize, m_settings, MessageQueue::push(), FileInputThread::setSampleRateAndSize(), SampleSinkFifo::setSize(), and FileInputThread::startWork().
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Implements DeviceSampleSource.
Definition at line 213 of file fileinput.cpp.
References FileInput::MsgReportFileSourceAcquisition::create(), DeviceSampleSource::getMessageQueueToGUI(), m_deviceDescription, m_fileInputThread, m_mutex, MessageQueue::push(), and FileInputThread::stopWork().
Referenced by FileInput::MsgReportHeaderCRC::MsgReportHeaderCRC(), and ~FileInput().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 561 of file fileinput.cpp.
References SWGSDRangel::SWGDeviceReport::getFileInputReport(), FileInputThread::getSamplesCount(), m_fileInputThread, m_fileName, m_recordLength, m_sampleRate, m_sampleSize, m_startingTimeStamp, SWGSDRangel::SWGFileInputReport::setAbsoluteTime(), SWGSDRangel::SWGFileInputReport::setDurationTime(), SWGSDRangel::SWGFileInputReport::setElapsedTime(), SWGSDRangel::SWGFileInputReport::setFileName(), SWGSDRangel::SWGFileInputReport::setSampleRate(), and SWGSDRangel::SWGFileInputReport::setSampleSize().
Referenced by webapiReportGet().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 543 of file fileinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getFileInputSettings(), SWGSDRangel::SWGFileInputSettings::getReverseApiAddress(), FileInputSettings::m_accelerationFactor, FileInputSettings::m_fileName, FileInputSettings::m_loop, FileInputSettings::m_reverseAPIAddress, FileInputSettings::m_reverseAPIDeviceIndex, FileInputSettings::m_reverseAPIPort, FileInputSettings::m_useReverseAPI, SWGSDRangel::SWGFileInputSettings::setAccelerationFactor(), SWGSDRangel::SWGFileInputSettings::setFileName(), SWGSDRangel::SWGFileInputSettings::setLoop(), SWGSDRangel::SWGFileInputSettings::setReverseApiAddress(), SWGSDRangel::SWGFileInputSettings::setReverseApiDeviceIndex(), SWGSDRangel::SWGFileInputSettings::setReverseApiPort(), and SWGSDRangel::SWGFileInputSettings::setUseReverseApi().
Referenced by webapiSettingsGet(), and webapiSettingsPutPatch().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 532 of file fileinput.cpp.
References SWGSDRangel::SWGDeviceReport::getFileInputReport(), SWGSDRangel::SWGFileInputReport::init(), SWGSDRangel::SWGDeviceReport::setFileInputReport(), and webapiFormatDeviceReport().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 597 of file fileinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), SWGSDRangel::SWGDeviceSettings::getFileInputSettings(), FileInputSettings::m_accelerationFactor, m_deviceAPI, FileInputSettings::m_fileName, FileInputSettings::m_loop, m_networkManager, m_networkRequest, FileInputSettings::m_reverseAPIAddress, FileInputSettings::m_reverseAPIDeviceIndex, FileInputSettings::m_reverseAPIPort, SWGSDRangel::SWGFileInputSettings::setAccelerationFactor(), SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), SWGSDRangel::SWGDeviceSettings::setFileInputSettings(), SWGSDRangel::SWGFileInputSettings::setFileName(), SWGSDRangel::SWGFileInputSettings::setLoop(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by applySettings().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 636 of file fileinput.cpp.
References SWGSDRangel::SWGDeviceSettings::asJson(), DeviceAPI::getDeviceSetIndex(), m_deviceAPI, m_networkManager, m_networkRequest, FileInputSettings::m_reverseAPIAddress, FileInputSettings::m_reverseAPIDeviceIndex, FileInputSettings::m_reverseAPIPort, m_settings, SWGSDRangel::SWGDeviceSettings::setDeviceHwType(), SWGSDRangel::SWGDeviceSettings::setDirection(), and SWGSDRangel::SWGDeviceSettings::setOriginatorIndex().
Referenced by handleMessage().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 513 of file fileinput.cpp.
References FileInput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), DeviceSampleSource::getMessageQueueToGUI(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSource::m_inputMessageQueue, and MessageQueue::push().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 504 of file fileinput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 449 of file fileinput.cpp.
References SWGSDRangel::SWGDeviceSettings::getFileInputSettings(), SWGSDRangel::SWGFileInputSettings::init(), m_settings, SWGSDRangel::SWGDeviceSettings::setFileInputSettings(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
virtual |
Reimplemented from DeviceSampleSource.
Definition at line 460 of file fileinput.cpp.
References FileInput::MsgConfigureFileInput::create(), SWGSDRangel::SWGFileInputSettings::getAccelerationFactor(), SWGSDRangel::SWGDeviceSettings::getFileInputSettings(), SWGSDRangel::SWGFileInputSettings::getFileName(), SWGSDRangel::SWGFileInputSettings::getLoop(), SWGSDRangel::SWGFileInputSettings::getReverseApiAddress(), SWGSDRangel::SWGFileInputSettings::getReverseApiDeviceIndex(), SWGSDRangel::SWGFileInputSettings::getReverseApiPort(), SWGSDRangel::SWGFileInputSettings::getUseReverseApi(), FileInputSettings::m_accelerationFactor, FileInputSettings::m_fileName, DeviceSampleSource::m_guiMessageQueue, DeviceSampleSource::m_inputMessageQueue, FileInputSettings::m_loop, FileInputSettings::m_reverseAPIAddress, FileInputSettings::m_reverseAPIDeviceIndex, FileInputSettings::m_reverseAPIPort, m_settings, FileInputSettings::m_useReverseAPI, MessageQueue::push(), and webapiFormatDeviceSettings().
Referenced by setSampleRate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 332 of file fileinput.h.
Referenced by applySettings(), FileInput::MsgReportFileInputStreamData::getCenterFrequency(), getCenterFrequency(), and openFileStream().
|
private |
Definition at line 323 of file fileinput.h.
Referenced by handleMessage(), init(), webapiReverseSendSettings(), webapiReverseSendStartStop(), webapiRun(), and webapiRunGet().
|
private |
Definition at line 328 of file fileinput.h.
Referenced by getDeviceDescription(), start(), and stop().
|
private |
Definition at line 327 of file fileinput.h.
Referenced by applySettings(), handleMessage(), seekFileStream(), start(), stop(), and webapiFormatDeviceReport().
|
private |
Definition at line 329 of file fileinput.h.
Referenced by FileInput::MsgConfigureFileSourceName::getFileName(), handleMessage(), openFileStream(), and webapiFormatDeviceReport().
|
private |
Definition at line 326 of file fileinput.h.
Referenced by openFileStream(), seekFileStream(), and start().
|
private |
Definition at line 335 of file fileinput.h.
Referenced by start(), and ~FileInput().
|
private |
Definition at line 324 of file fileinput.h.
Referenced by applySettings(), seekFileStream(), start(), and stop().
|
private |
Definition at line 336 of file fileinput.h.
Referenced by webapiReverseSendSettings(), webapiReverseSendStartStop(), and ~FileInput().
|
private |
Definition at line 337 of file fileinput.h.
Referenced by webapiReverseSendSettings(), and webapiReverseSendStartStop().
|
private |
record length in seconds computed from file size
Definition at line 333 of file fileinput.h.
Referenced by FileInput::MsgReportFileInputStreamData::getRecordLength(), openFileStream(), seekFileStream(), and webapiFormatDeviceReport().
|
private |
Definition at line 330 of file fileinput.h.
Referenced by applySettings(), FileInput::MsgReportFileInputStreamData::getSampleRate(), getSampleRate(), openFileStream(), seekFileStream(), start(), and webapiFormatDeviceReport().
|
private |
Definition at line 331 of file fileinput.h.
Referenced by applySettings(), FileInput::MsgReportFileInputStreamData::getSampleSize(), openFileStream(), seekFileStream(), start(), and webapiFormatDeviceReport().
|
private |
Definition at line 325 of file fileinput.h.
Referenced by applySettings(), deserialize(), handleMessage(), init(), serialize(), setCenterFrequency(), start(), webapiReverseSendStartStop(), webapiSettingsGet(), and webapiSettingsPutPatch().
|
private |
Definition at line 334 of file fileinput.h.
Referenced by FileInput::MsgReportFileInputStreamData::getStartingTimeStamp(), getStartingTimeStamp(), openFileStream(), and webapiFormatDeviceReport().
1.8.13