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 <maincore.h>
Inherits QObject.
Classes | |
class | MsgAddChannel |
class | MsgAddDeviceSet |
class | MsgDeleteChannel |
class | MsgDeleteInstance |
class | MsgDeletePreset |
class | MsgLoadPreset |
class | MsgRemoveLastDeviceSet |
class | MsgSavePreset |
class | MsgSetDevice |
Signals | |
void | finished () |
Public Member Functions | |
MainCore (qtwebapp::LoggerWithFile *logger, const MainParser &parser, QObject *parent=0) | |
~MainCore () | |
MessageQueue * | getInputMessageQueue () |
const QTimer & | getMasterTimer () const |
const MainSettings & | getMainSettings () const |
void | addSourceDevice () |
void | addSinkDevice () |
void | removeLastDevice () |
void | changeSampleSource (int deviceSetIndex, int selectedDeviceIndex) |
void | changeSampleSink (int deviceSetIndex, int selectedDeviceIndex) |
void | addChannel (int deviceSetIndex, int selectedChannelIndex) |
void | deleteChannel (int deviceSetIndex, int channelIndex) |
Static Public Member Functions | |
static MainCore * | getInstance () |
Private Slots | |
void | handleMessages () |
Private Member Functions | |
void | loadSettings () |
void | loadPresetSettings (const Preset *preset, int tabIndex) |
void | savePresetSettings (Preset *preset, int tabIndex) |
void | setLoggingOptions () |
bool | handleMessage (const Message &cmd) |
Private Attributes | |
MainSettings | m_settings |
int | m_masterTabIndex |
DSPEngine * | m_dspEngine |
int | m_lastEngineState |
qtwebapp::LoggerWithFile * | m_logger |
MessageQueue | m_inputMessageQueue |
QTimer | m_masterTimer |
std::vector< DeviceSet * > | m_deviceSets |
PluginManager * | m_pluginManager |
WebAPIRequestMapper * | m_requestMapper |
WebAPIServer * | m_apiServer |
WebAPIAdapterSrv * | m_apiAdapter |
Static Private Attributes | |
static MainCore * | m_instance = 0 |
Friends | |
class | WebAPIAdapterSrv |
Definition at line 48 of file maincore.h.
|
explicit |
Definition at line 50 of file maincore.cpp.
References DSPEngine::getAMBEEngine(), DSPEngine::getAudioDeviceManager(), MainParser::getMIMOSupport(), MainParser::getServerAddress(), MainParser::getServerPort(), handleMessages(), PluginManager::loadPlugins(), loadSettings(), m_apiAdapter, m_apiServer, m_dspEngine, m_inputMessageQueue, m_instance, m_masterTimer, m_pluginManager, m_requestMapper, m_settings, WebAPIRequestMapper::setAdapter(), MainSettings::setAMBEEngine(), MainSettings::setAudioDeviceManager(), DSPEngine::setMIMOSupport(), WebAPIServer::start(), and WebAPIAdapterSrv.
MainCore::~MainCore | ( | ) |
Definition at line 85 of file maincore.cpp.
References m_apiAdapter, m_apiServer, m_deviceSets, m_logger, m_pluginManager, m_requestMapper, m_settings, removeLastDevice(), MainSettings::save(), and WebAPIServer::stop().
void MainCore::addChannel | ( | int | deviceSetIndex, |
int | selectedChannelIndex | ||
) |
Definition at line 530 of file maincore.cpp.
References DeviceSet::addRxChannel(), DeviceSet::addTxChannel(), PluginManager::getPluginAPI(), m_deviceSets, DeviceSet::m_deviceSinkEngine, DeviceSet::m_deviceSourceEngine, and m_pluginManager.
Referenced by handleMessage().
void MainCore::addSinkDevice | ( | ) |
Definition at line 258 of file maincore.cpp.
References DSPEngine::addDeviceSinkEngine(), PluginInterface::SamplingDevice::deviceItemIndex, PluginInterface::SamplingDevice::deviceNbItems, PluginInterface::SamplingDevice::displayedName, DeviceUserArgs::findUserArgs(), MainSettings::getDeviceUserArgs(), DeviceEnumerator::getFileSinkDeviceIndex(), DeviceEnumerator::getTxSamplingDevice(), DSPDeviceSinkEngine::getUID(), PluginInterface::SamplingDevice::hardwareId, PluginInterface::SamplingDevice::id, DeviceEnumerator::instance(), m_deviceSets, m_dspEngine, m_settings, PluginInterface::SamplingDevice::sequence, PluginInterface::SamplingDevice::serial, DSPDeviceSinkEngine::start(), and DeviceAPI::StreamSingleTx.
Referenced by handleMessage().
void MainCore::addSourceDevice | ( | ) |
Definition at line 303 of file maincore.cpp.
References DSPEngine::addDeviceSourceEngine(), PluginInterface::SamplingDevice::deviceItemIndex, PluginInterface::SamplingDevice::deviceNbItems, PluginInterface::SamplingDevice::displayedName, DeviceUserArgs::findUserArgs(), MainSettings::getDeviceUserArgs(), DeviceEnumerator::getFileInputDeviceIndex(), DeviceEnumerator::getRxSamplingDevice(), DSPDeviceSourceEngine::getUID(), PluginInterface::SamplingDevice::hardwareId, PluginInterface::SamplingDevice::id, DeviceEnumerator::instance(), m_deviceSets, m_dspEngine, m_settings, PluginInterface::SamplingDevice::sequence, PluginInterface::SamplingDevice::serial, DSPDeviceSourceEngine::start(), and DeviceAPI::StreamSingleRx.
Referenced by handleMessage().
void MainCore::changeSampleSink | ( | int | deviceSetIndex, |
int | selectedDeviceIndex | ||
) |
Definition at line 462 of file maincore.cpp.
References DeviceAPI::clearBuddiesLists(), PluginInterface::createSampleSinkPluginInstance(), PluginInterface::deleteSampleSinkPluginInstanceOutput(), PluginInterface::SamplingDevice::deviceItemIndex, PluginInterface::SamplingDevice::deviceNbItems, PluginInterface::SamplingDevice::displayedName, DeviceAPI::getHardwareId(), DeviceAPI::getPluginInterface(), DeviceAPI::getSampleSink(), DeviceAPI::getSamplingDeviceId(), DeviceAPI::getSamplingDeviceSerial(), DeviceEnumerator::getTxSamplingDevice(), MainSettings::getWorkingPreset(), PluginInterface::SamplingDevice::hardwareId, PluginInterface::SamplingDevice::id, DeviceEnumerator::instance(), DeviceAPI::loadSamplingDeviceSettings(), DeviceSet::m_deviceAPI, m_deviceSets, m_settings, DeviceAPI::resetSamplingDeviceId(), DeviceAPI::saveSamplingDeviceSettings(), PluginInterface::SamplingDevice::sequence, PluginInterface::SamplingDevice::serial, DeviceAPI::setBuddyLeader(), DeviceAPI::setDeviceItemIndex(), DeviceAPI::setDeviceNbItems(), DeviceAPI::setHardwareId(), DeviceAPI::setSampleSink(), DeviceAPI::setSamplingDeviceDisplayName(), DeviceAPI::setSamplingDeviceId(), DeviceAPI::setSamplingDevicePluginInterface(), DeviceAPI::setSamplingDeviceSequence(), DeviceAPI::setSamplingDeviceSerial(), and DeviceAPI::stopDeviceEngine().
Referenced by handleMessage().
void MainCore::changeSampleSource | ( | int | deviceSetIndex, |
int | selectedDeviceIndex | ||
) |
Definition at line 394 of file maincore.cpp.
References DeviceAPI::clearBuddiesLists(), PluginInterface::createSampleSourcePluginInstance(), PluginInterface::deleteSampleSourcePluginInstanceInput(), PluginInterface::SamplingDevice::deviceItemIndex, PluginInterface::SamplingDevice::deviceNbItems, PluginInterface::SamplingDevice::displayedName, DeviceAPI::getHardwareId(), DeviceAPI::getPluginInterface(), DeviceEnumerator::getRxSamplingDevice(), DeviceAPI::getSampleSource(), DeviceAPI::getSamplingDeviceId(), DeviceAPI::getSamplingDeviceSerial(), MainSettings::getWorkingPreset(), PluginInterface::SamplingDevice::hardwareId, PluginInterface::SamplingDevice::id, DeviceEnumerator::instance(), DeviceAPI::loadSamplingDeviceSettings(), DeviceSet::m_deviceAPI, m_deviceSets, m_settings, DeviceAPI::resetSamplingDeviceId(), DeviceAPI::saveSamplingDeviceSettings(), PluginInterface::SamplingDevice::sequence, PluginInterface::SamplingDevice::serial, DeviceAPI::setBuddyLeader(), DeviceAPI::setDeviceItemIndex(), DeviceAPI::setDeviceNbItems(), DeviceAPI::setHardwareId(), DeviceAPI::setSampleSource(), DeviceAPI::setSamplingDeviceDisplayName(), DeviceAPI::setSamplingDeviceId(), DeviceAPI::setSamplingDevicePluginInterface(), DeviceAPI::setSamplingDeviceSequence(), DeviceAPI::setSamplingDeviceSerial(), and DeviceAPI::stopDeviceEngine().
Referenced by handleMessage().
void MainCore::deleteChannel | ( | int | deviceSetIndex, |
int | channelIndex | ||
) |
Definition at line 547 of file maincore.cpp.
References DeviceSet::deleteRxChannel(), DeviceSet::deleteTxChannel(), m_deviceSets, DeviceSet::m_deviceSinkEngine, and DeviceSet::m_deviceSourceEngine.
Referenced by handleMessage().
|
signal |
|
inline |
Definition at line 56 of file maincore.h.
Referenced by WebAPIAdapterSrv::instanceDelete().
|
inlinestatic |
Definition at line 54 of file maincore.h.
|
inline |
Definition at line 59 of file maincore.h.
Referenced by WebAPIAdapterSrv::instanceConfigGet().
|
inline |
Definition at line 58 of file maincore.h.
|
private |
Definition at line 103 of file maincore.cpp.
References addChannel(), addSinkDevice(), addSourceDevice(), changeSampleSink(), changeSampleSource(), deleteChannel(), MainSettings::deletePreset(), finished(), MainCore::MsgDeleteChannel::getChannelIndex(), MainCore::MsgAddChannel::getChannelRegistrationIndex(), MainCore::MsgSetDevice::getDeviceIndex(), MainCore::MsgLoadPreset::getDeviceSetIndex(), MainCore::MsgSavePreset::getDeviceSetIndex(), MainCore::MsgSetDevice::getDeviceSetIndex(), MainCore::MsgAddChannel::getDeviceSetIndex(), MainCore::MsgDeleteChannel::getDeviceSetIndex(), MainCore::MsgSetDevice::getDeviceType(), MainCore::MsgAddDeviceSet::getDirection(), MainCore::MsgLoadPreset::getPreset(), MainCore::MsgSavePreset::getPreset(), MainCore::MsgDeletePreset::getPreset(), loadPresetSettings(), m_deviceSets, m_settings, Message::match(), removeLastDevice(), MainSettings::save(), savePresetSettings(), and MainSettings::sortPresets().
Referenced by handleMessages().
|
privateslot |
Definition at line 188 of file maincore.cpp.
References Message::getIdentifier(), handleMessage(), m_inputMessageQueue, and MessageQueue::pop().
Referenced by MainCore().
|
private |
Definition at line 564 of file maincore.cpp.
References Preset::getDescription(), Preset::getGroup(), PluginManager::getPluginAPI(), DeviceSet::loadRxChannelSettings(), DeviceAPI::loadSamplingDeviceSettings(), DeviceSet::loadTxChannelSettings(), DeviceSet::m_deviceAPI, m_deviceSets, DeviceSet::m_deviceSinkEngine, DeviceSet::m_deviceSourceEngine, and m_pluginManager.
Referenced by handleMessage().
|
private |
Definition at line 200 of file maincore.cpp.
References MainSettings::load(), m_settings, setLoggingOptions(), and MainSettings::sortPresets().
Referenced by MainCore().
void MainCore::removeLastDevice | ( | ) |
Definition at line 348 of file maincore.cpp.
References m_deviceSets, m_dspEngine, DSPEngine::removeLastDeviceSinkEngine(), DSPEngine::removeLastDeviceSourceEngine(), DSPDeviceSourceEngine::stop(), DSPDeviceSinkEngine::stop(), DSPDeviceSourceEngine::stopAcquistion(), and DSPDeviceSinkEngine::stopGeneration().
Referenced by handleMessage(), and ~MainCore().
|
private |
Definition at line 587 of file maincore.cpp.
References Preset::clearChannels(), Preset::getDescription(), Preset::getGroup(), DeviceSet::m_deviceAPI, m_deviceSets, DeviceSet::m_deviceSinkEngine, DeviceSet::m_deviceSourceEngine, DeviceSet::saveRxChannelSettings(), DeviceAPI::saveSamplingDeviceSettings(), DeviceSet::saveTxChannelSettings(), and Preset::setSourcePreset().
Referenced by handleMessage().
|
private |
Definition at line 209 of file maincore.cpp.
References arg(), qtwebapp::LoggerWithFile::createOrSetFileLogger(), qtwebapp::FileLoggerSettings::fileName, MainSettings::getConsoleMinLogLevel(), qtwebapp::LoggerWithFile::getFileLoggerSettings(), MainSettings::getFileMinLogLevel(), MainSettings::getLogFileName(), MainSettings::getUseLogFile(), qtwebapp::LoggerWithFile::hasFileLogger(), qtwebapp::LoggerWithFile::logToFile(), m_logger, m_settings, SDR_RX_SAMP_SZ, SDR_TX_SAMP_SZ, qtwebapp::LoggerWithFile::setConsoleMinMessageLevel(), qtwebapp::LoggerWithFile::setFileMinMessageLevel(), and qtwebapp::LoggerWithFile::setUseFileLogger().
Referenced by WebAPIAdapterSrv::instanceLoggingPut(), and loadSettings().
|
friend |
Definition at line 69 of file maincore.h.
Referenced by MainCore().
|
private |
Definition at line 286 of file maincore.h.
Referenced by MainCore(), and ~MainCore().
|
private |
Definition at line 285 of file maincore.h.
Referenced by MainCore(), and ~MainCore().
|
private |
Definition at line 281 of file maincore.h.
Referenced by addChannel(), addSinkDevice(), addSourceDevice(), changeSampleSink(), changeSampleSource(), deleteChannel(), WebAPIAdapterSrv::devicesetChannelDelete(), WebAPIAdapterSrv::devicesetChannelPost(), WebAPIAdapterSrv::devicesetChannelReportGet(), WebAPIAdapterSrv::devicesetChannelSettingsGet(), WebAPIAdapterSrv::devicesetChannelSettingsPutPatch(), WebAPIAdapterSrv::devicesetChannelsReportGet(), WebAPIAdapterSrv::devicesetDevicePut(), WebAPIAdapterSrv::devicesetDeviceReportGet(), WebAPIAdapterSrv::devicesetDeviceRunDelete(), WebAPIAdapterSrv::devicesetDeviceRunGet(), WebAPIAdapterSrv::devicesetDeviceRunPost(), WebAPIAdapterSrv::devicesetDeviceSettingsGet(), WebAPIAdapterSrv::devicesetDeviceSettingsPutPatch(), WebAPIAdapterSrv::devicesetGet(), WebAPIAdapterSrv::getDeviceSetList(), handleMessage(), WebAPIAdapterSrv::instanceDeviceSetDelete(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterSrv::instancePresetPut(), loadPresetSettings(), removeLastDevice(), savePresetSettings(), and ~MainCore().
|
private |
Definition at line 275 of file maincore.h.
Referenced by addSinkDevice(), addSourceDevice(), WebAPIAdapterSrv::instanceAMBEDevicesDelete(), WebAPIAdapterSrv::instanceAMBEDevicesGet(), WebAPIAdapterSrv::instanceAMBEDevicesPatch(), WebAPIAdapterSrv::instanceAMBEDevicesPut(), WebAPIAdapterSrv::instanceAMBESerialGet(), WebAPIAdapterSrv::instanceAudioGet(), WebAPIAdapterSrv::instanceAudioInputCleanupPatch(), WebAPIAdapterSrv::instanceAudioInputDelete(), WebAPIAdapterSrv::instanceAudioInputPatch(), WebAPIAdapterSrv::instanceAudioOutputCleanupPatch(), WebAPIAdapterSrv::instanceAudioOutputDelete(), WebAPIAdapterSrv::instanceAudioOutputPatch(), WebAPIAdapterSrv::instanceDVSerialGet(), WebAPIAdapterSrv::instanceDVSerialPatch(), MainCore(), and removeLastDevice().
|
private |
Definition at line 279 of file maincore.h.
Referenced by WebAPIAdapterSrv::devicesetChannelDelete(), WebAPIAdapterSrv::devicesetChannelPost(), WebAPIAdapterSrv::devicesetDevicePut(), handleMessages(), WebAPIAdapterSrv::instanceDeviceSetDelete(), WebAPIAdapterSrv::instanceDeviceSetPost(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterSrv::instancePresetPut(), and MainCore().
|
staticprivate |
Definition at line 272 of file maincore.h.
Referenced by MainCore().
|
private |
Definition at line 276 of file maincore.h.
|
private |
Definition at line 277 of file maincore.h.
Referenced by WebAPIAdapterSrv::instanceLoggingGet(), WebAPIAdapterSrv::instanceSummary(), setLoggingOptions(), and ~MainCore().
|
private |
Definition at line 274 of file maincore.h.
|
private |
Definition at line 280 of file maincore.h.
Referenced by MainCore().
|
private |
Definition at line 282 of file maincore.h.
Referenced by addChannel(), WebAPIAdapterSrv::devicesetChannelPost(), WebAPIAdapterSrv::instanceChannels(), loadPresetSettings(), MainCore(), and ~MainCore().
|
private |
Definition at line 284 of file maincore.h.
Referenced by MainCore(), and ~MainCore().
|
private |
Definition at line 273 of file maincore.h.
Referenced by addSinkDevice(), addSourceDevice(), changeSampleSink(), changeSampleSource(), handleMessage(), WebAPIAdapterSrv::instanceConfigGet(), WebAPIAdapterSrv::instanceLocationGet(), WebAPIAdapterSrv::instanceLocationPut(), WebAPIAdapterSrv::instanceLoggingPut(), WebAPIAdapterSrv::instancePresetDelete(), WebAPIAdapterSrv::instancePresetFilePost(), WebAPIAdapterSrv::instancePresetFilePut(), WebAPIAdapterSrv::instancePresetPatch(), WebAPIAdapterSrv::instancePresetPost(), WebAPIAdapterSrv::instancePresetPut(), WebAPIAdapterSrv::instancePresetsGet(), loadSettings(), MainCore(), setLoggingOptions(), and ~MainCore().