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 <filesinkoutput.h>
Classes | |
class | MsgConfigureFileSink |
class | MsgConfigureFileSinkName |
class | MsgConfigureFileSinkStreamTiming |
class | MsgConfigureFileSinkWork |
class | MsgReportFileSinkGeneration |
class | MsgReportFileSinkStreamTiming |
class | MsgStartStop |
Public Member Functions | |
FileSinkOutput (DeviceAPI *deviceAPI) | |
virtual | ~FileSinkOutput () |
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 sink. More... | |
virtual void | setSampleRate (int sampleRate) |
For when the sink sample rate is set externally. More... | |
virtual quint64 | getCenterFrequency () const |
Center frequency exposed by the sink. More... | |
virtual void | setCenterFrequency (qint64 centerFrequency) |
std::time_t | getStartingTimeStamp () const |
virtual bool | handleMessage (const Message &message) |
virtual int | webapiRunGet (SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
virtual int | webapiRun (bool run, SWGSDRangel::SWGDeviceState &response, QString &errorMessage) |
Public Member Functions inherited from DeviceSampleSink | |
DeviceSampleSink () | |
virtual | ~DeviceSampleSink () |
virtual int | webapiSettingsGet (SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
virtual int | webapiSettingsPutPatch (bool force, const QStringList &deviceSettingsKeys, SWGSDRangel::SWGDeviceSettings &response, QString &errorMessage) |
virtual int | webapiReportGet (SWGSDRangel::SWGDeviceReport &response, QString &errorMessage) |
MessageQueue * | getInputMessageQueue () |
MessageQueue * | getMessageQueueToGUI () |
SampleSourceFifo * | getSampleFifo () |
Private Member Functions | |
void | openFileStream () |
void | applySettings (const FileSinkSettings &settings, bool force=false) |
Private Attributes | |
DeviceAPI * | m_deviceAPI |
QMutex | m_mutex |
FileSinkSettings | m_settings |
std::ofstream | m_ofstream |
FileSinkThread * | m_fileSinkThread |
QString | m_deviceDescription |
QString | m_fileName |
std::time_t | m_startingTimeStamp |
const QTimer & | m_masterTimer |
Additional Inherited Members | |
Public Types inherited from DeviceSampleSink | |
enum | fcPos_t { FC_POS_INFRA = 0, FC_POS_SUPRA, FC_POS_CENTER } |
Static Public Member Functions inherited from DeviceSampleSink | |
static qint64 | calculateDeviceCenterFrequency (quint64 centerFrequency, qint64 transverterDeltaFrequency, int log2Interp, fcPos_t fcPos, quint32 devSampleRate, bool transverterMode=false) |
static qint64 | calculateCenterFrequency (quint64 deviceCenterFrequency, qint64 transverterDeltaFrequency, int log2Interp, fcPos_t fcPos, quint32 devSampleRate, bool transverterMode=false) |
static qint32 | calculateFrequencyShift (int log2Interp, fcPos_t fcPos, quint32 devSampleRate) |
Protected Slots inherited from DeviceSampleSink | |
void | handleInputMessages () |
Protected Attributes inherited from DeviceSampleSink | |
SampleSourceFifo | m_sampleSourceFifo |
MessageQueue | m_inputMessageQueue |
Input queue to the sink. More... | |
MessageQueue * | m_guiMessageQueue |
Input message queue to the GUI. More... | |
Definition at line 33 of file filesinkoutput.h.
FileSinkOutput::FileSinkOutput | ( | DeviceAPI * | deviceAPI | ) |
Definition at line 43 of file filesinkoutput.cpp.
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
virtual |
Definition at line 55 of file filesinkoutput.cpp.
References stop().
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
private |
Definition at line 274 of file filesinkoutput.cpp.
References DeviceAPI::getDeviceEngineInputMessageQueue(), FileSinkSettings::m_centerFrequency, m_deviceAPI, m_fileSinkThread, FileSinkSettings::m_log2Interp, m_mutex, FileSinkSettings::m_sampleRate, m_settings, MessageQueue::push(), FileSinkThread::setLog2Interpolation(), and FileSinkThread::setSamplerate().
Referenced by handleMessage(), and init().
|
virtual |
Implements DeviceSampleSink.
Definition at line 145 of file filesinkoutput.cpp.
References FileSinkOutput::MsgConfigureFileSink::create(), FileSinkSettings::deserialize(), DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, MessageQueue::push(), and FileSinkSettings::resetToDefaults().
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
virtual |
Implements DeviceSampleSink.
Definition at line 60 of file filesinkoutput.cpp.
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
virtual |
Center frequency exposed by the sink.
Implements DeviceSampleSink.
Definition at line 177 of file filesinkoutput.cpp.
References FileSinkSettings::m_centerFrequency, and m_settings.
Referenced by setSampleRate().
|
virtual |
Implements DeviceSampleSink.
Definition at line 167 of file filesinkoutput.cpp.
References m_deviceDescription.
Referenced by setMessageQueueToGUI().
|
virtual |
Sample rate exposed by the sink.
Implements DeviceSampleSink.
Definition at line 172 of file filesinkoutput.cpp.
References FileSinkSettings::m_sampleRate, and m_settings.
Referenced by setMessageQueueToGUI().
std::time_t FileSinkOutput::getStartingTimeStamp | ( | ) | const |
Definition at line 197 of file filesinkoutput.cpp.
References m_startingTimeStamp.
Referenced by setSampleRate().
|
virtual |
Implements DeviceSampleSink.
Definition at line 202 of file filesinkoutput.cpp.
References applySettings(), FileSinkOutput::MsgReportFileSinkStreamTiming::create(), FileSinkOutput::MsgConfigureFileSinkName::getFileName(), FileSinkOutput::MsgConfigureFileSink::getForce(), DeviceSampleSink::getMessageQueueToGUI(), FileSinkThread::getSamplesCount(), FileSinkOutput::MsgConfigureFileSink::getSettings(), FileSinkOutput::MsgStartStop::getStartStop(), DeviceAPI::initDeviceEngine(), FileSinkOutput::MsgConfigureFileSinkWork::isWorking(), m_deviceAPI, m_fileName, m_fileSinkThread, Message::match(), openFileStream(), MessageQueue::push(), DeviceAPI::startDeviceEngine(), FileSinkThread::startWork(), DeviceAPI::stopDeviceEngine(), and FileSinkThread::stopWork().
Referenced by setSampleRate().
|
virtual |
initializations to be done when all collaborating objects are created and possibly connected
Implements DeviceSampleSink.
Definition at line 86 of file filesinkoutput.cpp.
References applySettings(), and m_settings.
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
private |
Definition at line 65 of file filesinkoutput.cpp.
References FileRecord::Header::centerFrequency, FileSinkSettings::m_centerFrequency, m_fileName, FileSinkSettings::m_log2Interp, m_ofstream, FileSinkSettings::m_sampleRate, m_settings, m_startingTimeStamp, FileRecord::Header::sampleRate, FileRecord::Header::sampleSize, SDR_RX_SAMP_SZ, FileRecord::Header::startTimeStamp, and FileRecord::writeHeader().
Referenced by handleMessage(), and start().
|
virtual |
Implements DeviceSampleSink.
Definition at line 140 of file filesinkoutput.cpp.
References m_settings, and FileSinkSettings::serialize().
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
virtual |
Implements DeviceSampleSink.
Definition at line 182 of file filesinkoutput.cpp.
References FileSinkOutput::MsgConfigureFileSink::create(), FileSinkSettings::m_centerFrequency, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, m_settings, and MessageQueue::push().
Referenced by setSampleRate().
|
inlinevirtual |
Implements DeviceSampleSink.
Definition at line 185 of file filesinkoutput.h.
References getDeviceDescription(), getSampleRate(), and DeviceSampleSink::m_guiMessageQueue.
|
inlinevirtual |
For when the sink sample rate is set externally.
Implements DeviceSampleSink.
Definition at line 188 of file filesinkoutput.h.
References getCenterFrequency(), getStartingTimeStamp(), handleMessage(), setCenterFrequency(), webapiRun(), and webapiRunGet().
|
virtual |
Implements DeviceSampleSink.
Definition at line 91 of file filesinkoutput.cpp.
References FileSinkThread::connectTimer(), FileSinkOutput::MsgReportFileSinkGeneration::create(), DeviceSampleSink::getMessageQueueToGUI(), m_fileSinkThread, FileSinkSettings::m_log2Interp, m_masterTimer, m_mutex, m_ofstream, FileSinkSettings::m_sampleRate, DeviceSampleSink::m_sampleSourceFifo, m_settings, openFileStream(), MessageQueue::push(), FileSinkThread::setLog2Interpolation(), FileSinkThread::setSamplerate(), and FileSinkThread::startWork().
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming().
|
virtual |
Implements DeviceSampleSink.
Definition at line 117 of file filesinkoutput.cpp.
References FileSinkOutput::MsgReportFileSinkGeneration::create(), DeviceSampleSink::getMessageQueueToGUI(), m_fileSinkThread, m_mutex, m_ofstream, MessageQueue::push(), and FileSinkThread::stopWork().
Referenced by FileSinkOutput::MsgReportFileSinkStreamTiming::MsgReportFileSinkStreamTiming(), and ~FileSinkOutput().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 330 of file filesinkoutput.cpp.
References FileSinkOutput::MsgStartStop::create(), DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), m_deviceAPI, DeviceSampleSink::m_guiMessageQueue, DeviceSampleSink::m_inputMessageQueue, and MessageQueue::push().
Referenced by setSampleRate().
|
virtual |
Reimplemented from DeviceSampleSink.
Definition at line 321 of file filesinkoutput.cpp.
References DeviceAPI::getDeviceEngineStateStr(), SWGSDRangel::SWGDeviceState::getState(), and m_deviceAPI.
Referenced by setSampleRate().
|
private |
Definition at line 205 of file filesinkoutput.h.
Referenced by applySettings(), handleMessage(), webapiRun(), and webapiRunGet().
|
private |
Definition at line 210 of file filesinkoutput.h.
Referenced by getDeviceDescription().
|
private |
Definition at line 211 of file filesinkoutput.h.
Referenced by FileSinkOutput::MsgConfigureFileSinkName::getFileName(), handleMessage(), and openFileStream().
|
private |
Definition at line 209 of file filesinkoutput.h.
Referenced by applySettings(), handleMessage(), start(), and stop().
|
private |
Definition at line 213 of file filesinkoutput.h.
Referenced by start().
|
private |
Definition at line 206 of file filesinkoutput.h.
Referenced by applySettings(), start(), and stop().
|
private |
Definition at line 208 of file filesinkoutput.h.
Referenced by openFileStream(), start(), and stop().
|
private |
Definition at line 207 of file filesinkoutput.h.
Referenced by applySettings(), deserialize(), getCenterFrequency(), getSampleRate(), init(), openFileStream(), serialize(), setCenterFrequency(), and start().
|
private |
Definition at line 212 of file filesinkoutput.h.
Referenced by getStartingTimeStamp(), and openFileStream().