mirror of
				https://github.com/f4exb/sdrangel.git
				synced 2025-10-31 13:00:26 -04:00 
			
		
		
		
	Migration of DaemonSource channel to RemoteSource
This commit is contained in:
		
							parent
							
								
									5b04cf4b5a
								
							
						
					
					
						commit
						c294f0a017
					
				| Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 18 KiB | 
| Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 7.1 KiB | 
| @ -8,7 +8,7 @@ add_subdirectory(udpsource) | ||||
| 
 | ||||
| find_package(CM256cc) | ||||
| if(CM256CC_FOUND) | ||||
|     add_subdirectory(daemonsource) | ||||
|     add_subdirectory(remotesource) | ||||
| endif(CM256CC_FOUND) | ||||
| 
 | ||||
| find_package(OpenCV) | ||||
| @ -17,6 +17,6 @@ if (OpenCV_FOUND) | ||||
| endif() | ||||
| 
 | ||||
| if (BUILD_DEBIAN) | ||||
|     add_subdirectory(daemonsource) | ||||
|     add_subdirectory(remotesource) | ||||
| endif (BUILD_DEBIAN) | ||||
| 
 | ||||
|  | ||||
| @ -1,83 +0,0 @@ | ||||
| project(daemonsource) | ||||
| 
 | ||||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||||
| 
 | ||||
| if (HAS_SSSE3) | ||||
|     message(STATUS "DaemonSource: use SSSE3 SIMD" ) | ||||
| elseif (HAS_NEON) | ||||
|     message(STATUS "DaemonSource: use Neon SIMD" ) | ||||
| else() | ||||
|     message(STATUS "DaemonSource: Unsupported architecture") | ||||
|     return() | ||||
| endif() | ||||
| 
 | ||||
| set(daemonsource_SOURCES | ||||
| 	daemonsource.cpp | ||||
| 	daemonsourcethread.cpp | ||||
| 	daemonsourcegui.cpp | ||||
| 	daemonsourceplugin.cpp | ||||
| 	daemonsourcesettings.cpp | ||||
| ) | ||||
| 
 | ||||
| set(daemonsource_HEADERS | ||||
| 	daemonsource.h | ||||
| 	daemonsourcethread.h | ||||
| 	daemonsourcegui.h | ||||
| 	daemonsourceplugin.h | ||||
| 	daemonsourcesettings.h | ||||
| ) | ||||
| 
 | ||||
| set(daemonsource_FORMS | ||||
| 	daemonsourcegui.ui | ||||
| ) | ||||
| 
 | ||||
| #include(${QT_USE_FILE}) | ||||
| add_definitions(${QT_DEFINITIONS}) | ||||
| add_definitions(-DQT_PLUGIN) | ||||
| add_definitions(-DQT_SHARED) | ||||
| 
 | ||||
| qt5_wrap_ui(daemonsource_FORMS_HEADERS ${daemonsource_FORMS}) | ||||
| 
 | ||||
| add_library(daemonsource SHARED | ||||
| 	${daemonsource_SOURCES} | ||||
| 	${daemonsource_HEADERS_MOC} | ||||
| 	${daemonsource_FORMS_HEADERS} | ||||
| ) | ||||
| 
 | ||||
| if (BUILD_DEBIAN) | ||||
| target_include_directories(daemonsource PUBLIC | ||||
|     . | ||||
|     ${CMAKE_CURRENT_BINARY_DIR} | ||||
|     ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client | ||||
|     ${LIBCM256CCSRC} | ||||
| ) | ||||
| else (BUILD_DEBIAN) | ||||
| target_include_directories(daemonsource PUBLIC | ||||
|     . | ||||
|     ${CMAKE_CURRENT_BINARY_DIR} | ||||
|     ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client | ||||
|     ${CM256CC_INCLUDE_DIR} | ||||
| ) | ||||
| endif (BUILD_DEBIAN) | ||||
| 
 | ||||
| if (BUILD_DEBIAN) | ||||
| target_link_libraries(daemonsource | ||||
|     ${QT_LIBRARIES} | ||||
|     cm256cc | ||||
|     sdrbase | ||||
|     sdrgui | ||||
|     swagger | ||||
| ) | ||||
| else (BUILD_DEBIAN) | ||||
| target_link_libraries(daemonsource | ||||
|     ${QT_LIBRARIES} | ||||
|     ${CM256CC_LIBRARIES} | ||||
|     sdrbase | ||||
|     sdrgui | ||||
|     swagger | ||||
| ) | ||||
| endif (BUILD_DEBIAN) | ||||
| 
 | ||||
| target_link_libraries(daemonsource Qt5::Core Qt5::Widgets Qt5::Network) | ||||
| 
 | ||||
| install(TARGETS daemonsource DESTINATION lib/plugins/channeltx) | ||||
							
								
								
									
										83
									
								
								plugins/channeltx/remotesource/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										83
									
								
								plugins/channeltx/remotesource/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,83 @@ | ||||
| project(remotesource) | ||||
| 
 | ||||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||||
| 
 | ||||
| if (HAS_SSSE3) | ||||
|     message(STATUS "RemoteSource: use SSSE3 SIMD" ) | ||||
| elseif (HAS_NEON) | ||||
|     message(STATUS "RemoteSource: use Neon SIMD" ) | ||||
| else() | ||||
|     message(STATUS "RemoteSource: Unsupported architecture") | ||||
|     return() | ||||
| endif() | ||||
| 
 | ||||
| set(remotesource_SOURCES | ||||
| 	remotesource.cpp | ||||
| 	remotesourcethread.cpp | ||||
| 	remotesourcegui.cpp | ||||
| 	remotesourceplugin.cpp | ||||
| 	remotesourcesettings.cpp | ||||
| ) | ||||
| 
 | ||||
| set(remotesource_HEADERS | ||||
| 	remotesource.h | ||||
| 	remotesourcethread.h | ||||
| 	remotesourcegui.h | ||||
| 	remotesourceplugin.h | ||||
| 	remotesourcesettings.h | ||||
| ) | ||||
| 
 | ||||
| set(remotesource_FORMS | ||||
| 	remotesourcegui.ui | ||||
| ) | ||||
| 
 | ||||
| #include(${QT_USE_FILE}) | ||||
| add_definitions(${QT_DEFINITIONS}) | ||||
| add_definitions(-DQT_PLUGIN) | ||||
| add_definitions(-DQT_SHARED) | ||||
| 
 | ||||
| qt5_wrap_ui(remotesource_FORMS_HEADERS ${remotesource_FORMS}) | ||||
| 
 | ||||
| add_library(remotesource SHARED | ||||
| 	${remotesource_SOURCES} | ||||
| 	${remotesource_HEADERS_MOC} | ||||
| 	${remotesource_FORMS_HEADERS} | ||||
| ) | ||||
| 
 | ||||
| if (BUILD_DEBIAN) | ||||
| target_include_directories(remotesource PUBLIC | ||||
|     . | ||||
|     ${CMAKE_CURRENT_BINARY_DIR} | ||||
|     ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client | ||||
|     ${LIBCM256CCSRC} | ||||
| ) | ||||
| else (BUILD_DEBIAN) | ||||
| target_include_directories(remotesource PUBLIC | ||||
|     . | ||||
|     ${CMAKE_CURRENT_BINARY_DIR} | ||||
|     ${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client | ||||
|     ${CM256CC_INCLUDE_DIR} | ||||
| ) | ||||
| endif (BUILD_DEBIAN) | ||||
| 
 | ||||
| if (BUILD_DEBIAN) | ||||
| target_link_libraries(remotesource | ||||
|     ${QT_LIBRARIES} | ||||
|     cm256cc | ||||
|     sdrbase | ||||
|     sdrgui | ||||
|     swagger | ||||
| ) | ||||
| else (BUILD_DEBIAN) | ||||
| target_link_libraries(remotesource | ||||
|     ${QT_LIBRARIES} | ||||
|     ${CM256CC_LIBRARIES} | ||||
|     sdrbase | ||||
|     sdrgui | ||||
|     swagger | ||||
| ) | ||||
| endif (BUILD_DEBIAN) | ||||
| 
 | ||||
| target_link_libraries(remotesource Qt5::Core Qt5::Widgets Qt5::Network) | ||||
| 
 | ||||
| install(TARGETS remotesource DESTINATION lib/plugins/channeltx) | ||||
| @ -1,8 +1,8 @@ | ||||
| <h1>Daemon source channel plugin</h1> | ||||
| <h1>Remote source channel plugin</h1> | ||||
| 
 | ||||
| <h2>Introduction</h2> | ||||
| 
 | ||||
| This plugin receives I/Q samples from UDP and copies them to the baseband to be transmitted by the sink output device. It uses SDRDaemon format and possible FEC protection. | ||||
| This plugin receives I/Q samples from UDP and copies them to the baseband to be transmitted by the sink output device. It uses SDRangel remote format and possible FEC protection. | ||||
| 
 | ||||
| It is present only in Linux binary releases. | ||||
| 
 | ||||
| @ -12,7 +12,7 @@ The plugin will be built only if the [CM256cc library](https://github.com/f4exb/ | ||||
| 
 | ||||
| <h2>Interface</h2> | ||||
| 
 | ||||
|  | ||||
|  | ||||
| 
 | ||||
| <h3>1: Data local address</h2> | ||||
| 
 | ||||
| @ -32,7 +32,7 @@ Stream sample rate as specified in the stream meta data | ||||
| 
 | ||||
| <h3>5: Stream status</h3> | ||||
| 
 | ||||
|  | ||||
|  | ||||
| 
 | ||||
| <h4>5.1: Total number of frames and number of FEC blocks</h4> | ||||
| 
 | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,6 +14,8 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #include "remotesource.h" | ||||
| 
 | ||||
| #include <sys/time.h> | ||||
| #include <unistd.h> | ||||
| #include <boost/crc.hpp> | ||||
| @ -26,25 +28,24 @@ | ||||
| 
 | ||||
| #include "SWGChannelSettings.h" | ||||
| #include "SWGChannelReport.h" | ||||
| #include "SWGDaemonSourceReport.h" | ||||
| #include "SWGRemoteSourceReport.h" | ||||
| 
 | ||||
| #include "dsp/devicesamplesink.h" | ||||
| #include "device/devicesinkapi.h" | ||||
| #include "dsp/upchannelizer.h" | ||||
| #include "dsp/threadedbasebandsamplesource.h" | ||||
| 
 | ||||
| #include "daemonsourcethread.h" | ||||
| #include "daemonsource.h" | ||||
| #include "remotesourcethread.h" | ||||
| 
 | ||||
| MESSAGE_CLASS_DEFINITION(DaemonSource::MsgSampleRateNotification, Message) | ||||
| MESSAGE_CLASS_DEFINITION(DaemonSource::MsgConfigureDaemonSource, Message) | ||||
| MESSAGE_CLASS_DEFINITION(DaemonSource::MsgQueryStreamData, Message) | ||||
| MESSAGE_CLASS_DEFINITION(DaemonSource::MsgReportStreamData, Message) | ||||
| MESSAGE_CLASS_DEFINITION(RemoteSource::MsgSampleRateNotification, Message) | ||||
| MESSAGE_CLASS_DEFINITION(RemoteSource::MsgConfigureRemoteSource, Message) | ||||
| MESSAGE_CLASS_DEFINITION(RemoteSource::MsgQueryStreamData, Message) | ||||
| MESSAGE_CLASS_DEFINITION(RemoteSource::MsgReportStreamData, Message) | ||||
| 
 | ||||
| const QString DaemonSource::m_channelIdURI = "sdrangel.channeltx.daemonsource"; | ||||
| const QString DaemonSource::m_channelId ="DaemonSource"; | ||||
| const QString RemoteSource::m_channelIdURI = "sdrangel.channeltx.remotesource"; | ||||
| const QString RemoteSource::m_channelId ="RemoteSource"; | ||||
| 
 | ||||
| DaemonSource::DaemonSource(DeviceSinkAPI *deviceAPI) : | ||||
| RemoteSource::RemoteSource(DeviceSinkAPI *deviceAPI) : | ||||
|     ChannelSourceAPI(m_channelIdURI), | ||||
|     m_deviceAPI(deviceAPI), | ||||
|     m_sourceThread(0), | ||||
| @ -67,7 +68,7 @@ DaemonSource::DaemonSource(DeviceSinkAPI *deviceAPI) : | ||||
|     connect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); | ||||
| } | ||||
| 
 | ||||
| DaemonSource::~DaemonSource() | ||||
| RemoteSource::~RemoteSource() | ||||
| { | ||||
|     disconnect(m_networkManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(networkManagerFinished(QNetworkReply*))); | ||||
|     delete m_networkManager; | ||||
| @ -77,33 +78,33 @@ DaemonSource::~DaemonSource() | ||||
|     delete m_channelizer; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::pull(Sample& sample) | ||||
| void RemoteSource::pull(Sample& sample) | ||||
| { | ||||
|     m_dataReadQueue.readSample(sample, true); // true is scale for Tx
 | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::pullAudio(int nbSamples) | ||||
| void RemoteSource::pullAudio(int nbSamples) | ||||
| { | ||||
|     (void) nbSamples; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::start() | ||||
| void RemoteSource::start() | ||||
| { | ||||
|     qDebug("DaemonSource::start"); | ||||
|     qDebug("RemoteSource::start"); | ||||
| 
 | ||||
|     if (m_running) { | ||||
|         stop(); | ||||
|     } | ||||
| 
 | ||||
|     m_sourceThread = new DaemonSourceThread(&m_dataQueue); | ||||
|     m_sourceThread = new RemoteSourceThread(&m_dataQueue); | ||||
|     m_sourceThread->startStop(true); | ||||
|     m_sourceThread->dataBind(m_settings.m_dataAddress, m_settings.m_dataPort); | ||||
|     m_running = true; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::stop() | ||||
| void RemoteSource::stop() | ||||
| { | ||||
|     qDebug("DaemonSource::stop"); | ||||
|     qDebug("RemoteSource::stop"); | ||||
| 
 | ||||
|     if (m_sourceThread != 0) | ||||
|     { | ||||
| @ -115,22 +116,22 @@ void DaemonSource::stop() | ||||
|     m_running = false; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::setDataLink(const QString& dataAddress, uint16_t dataPort) | ||||
| void RemoteSource::setDataLink(const QString& dataAddress, uint16_t dataPort) | ||||
| { | ||||
|     DaemonSourceSettings settings = m_settings; | ||||
|     RemoteSourceSettings settings = m_settings; | ||||
|     settings.m_dataAddress = dataAddress; | ||||
|     settings.m_dataPort = dataPort; | ||||
| 
 | ||||
|     MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(settings, false); | ||||
|     MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(settings, false); | ||||
|     m_inputMessageQueue.push(msg); | ||||
| } | ||||
| 
 | ||||
| bool DaemonSource::handleMessage(const Message& cmd) | ||||
| bool RemoteSource::handleMessage(const Message& cmd) | ||||
| { | ||||
|     if (UpChannelizer::MsgChannelizerNotification::match(cmd)) | ||||
|     { | ||||
|         UpChannelizer::MsgChannelizerNotification& notif = (UpChannelizer::MsgChannelizerNotification&) cmd; | ||||
|         qDebug() << "DaemonSource::handleMessage: MsgChannelizerNotification:" | ||||
|         qDebug() << "RemoteSource::handleMessage: MsgChannelizerNotification:" | ||||
|                 << " basebandSampleRate: " << notif.getBasebandSampleRate() | ||||
|                 << " outputSampleRate: " << notif.getSampleRate() | ||||
|                 << " inputFrequencyOffset: " << notif.getFrequencyOffset(); | ||||
| @ -143,10 +144,10 @@ bool DaemonSource::handleMessage(const Message& cmd) | ||||
| 
 | ||||
|         return true; | ||||
|     } | ||||
|     else if (MsgConfigureDaemonSource::match(cmd)) | ||||
|     else if (MsgConfigureRemoteSource::match(cmd)) | ||||
|     { | ||||
|         MsgConfigureDaemonSource& cfg = (MsgConfigureDaemonSource&) cmd; | ||||
|         qDebug() << "MsgConfigureDaemonSource::handleMessage: MsgConfigureDaemonSource"; | ||||
|         MsgConfigureRemoteSource& cfg = (MsgConfigureRemoteSource&) cmd; | ||||
|         qDebug() << "MsgConfigureRemoteSource::handleMessage: MsgConfigureRemoteSource"; | ||||
|         applySettings(cfg.getSettings(), cfg.getForce()); | ||||
| 
 | ||||
|         return true; | ||||
| @ -178,32 +179,32 @@ bool DaemonSource::handleMessage(const Message& cmd) | ||||
|     return false; | ||||
| } | ||||
| 
 | ||||
| QByteArray DaemonSource::serialize() const | ||||
| QByteArray RemoteSource::serialize() const | ||||
| { | ||||
|     return m_settings.serialize(); | ||||
| } | ||||
| 
 | ||||
| bool DaemonSource::deserialize(const QByteArray& data) | ||||
| bool RemoteSource::deserialize(const QByteArray& data) | ||||
| { | ||||
|     (void) data; | ||||
|     if (m_settings.deserialize(data)) | ||||
|     { | ||||
|         MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(m_settings, true); | ||||
|         MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(m_settings, true); | ||||
|         m_inputMessageQueue.push(msg); | ||||
|         return true; | ||||
|     } | ||||
|     else | ||||
|     { | ||||
|         m_settings.resetToDefaults(); | ||||
|         MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(m_settings, true); | ||||
|         MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(m_settings, true); | ||||
|         m_inputMessageQueue.push(msg); | ||||
|         return false; | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::applySettings(const DaemonSourceSettings& settings, bool force) | ||||
| void RemoteSource::applySettings(const RemoteSourceSettings& settings, bool force) | ||||
| { | ||||
|     qDebug() << "DaemonSource::applySettings:" | ||||
|     qDebug() << "RemoteSource::applySettings:" | ||||
|             << " m_dataAddress: " << settings.m_dataAddress | ||||
|             << " m_dataPort: " << settings.m_dataPort | ||||
|             << " force: " << force; | ||||
| @ -242,12 +243,12 @@ void DaemonSource::applySettings(const DaemonSourceSettings& settings, bool forc | ||||
|     m_settings = settings; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
| void RemoteSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
| { | ||||
|     (void) dataBlock; | ||||
|     if (dataBlock->m_rxControlBlock.m_blockCount < SDRDaemonNbOrginalBlocks) | ||||
|     { | ||||
|         qWarning("DaemonSource::handleDataBlock: incomplete data block: not processing"); | ||||
|         qWarning("RemoteSource::handleDataBlock: incomplete data block: not processing"); | ||||
|     } | ||||
|     else | ||||
|     { | ||||
| @ -274,7 +275,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
|         // Need to use the CM256 recovery
 | ||||
|         if (m_cm256p &&(dataBlock->m_rxControlBlock.m_originalCount < SDRDaemonNbOrginalBlocks)) | ||||
|         { | ||||
|             qDebug("DaemonSource::handleDataBlock: %d recovery blocks", dataBlock->m_rxControlBlock.m_recoveryCount); | ||||
|             qDebug("RemoteSource::handleDataBlock: %d recovery blocks", dataBlock->m_rxControlBlock.m_recoveryCount); | ||||
|             CM256::cm256_encoder_params paramsCM256; | ||||
|             paramsCM256.BlockBytes = sizeof(SDRDaemonProtectedBlock); // never changes
 | ||||
|             paramsCM256.OriginalCount = SDRDaemonNbOrginalBlocks;  // never changes
 | ||||
| @ -294,7 +295,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
| 
 | ||||
|             if (m_cm256.cm256_decode(paramsCM256, m_cm256DescriptorBlocks)) // CM256 decode
 | ||||
|             { | ||||
|                 qWarning() << "DaemonSource::handleDataBlock: decode CM256 error:" | ||||
|                 qWarning() << "RemoteSource::handleDataBlock: decode CM256 error:" | ||||
|                         << " m_originalCount: " << dataBlock->m_rxControlBlock.m_originalCount | ||||
|                         << " m_recoveryCount: " << dataBlock->m_rxControlBlock.m_recoveryCount; | ||||
|             } | ||||
| @ -325,7 +326,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
|             { | ||||
|                 if (!(m_currentMeta == *metaData)) | ||||
|                 { | ||||
|                     printMeta("DaemonSource::handleDataBlock", metaData); | ||||
|                     printMeta("RemoteSource::handleDataBlock", metaData); | ||||
| 
 | ||||
|                     if (m_currentMeta.m_sampleRate != metaData->m_sampleRate) | ||||
|                     { | ||||
| @ -338,7 +339,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
|             } | ||||
|             else | ||||
|             { | ||||
|                 qWarning() << "DaemonSource::handleDataBlock: recovered meta: invalid CRC32"; | ||||
|                 qWarning() << "RemoteSource::handleDataBlock: recovered meta: invalid CRC32"; | ||||
|             } | ||||
|         } | ||||
| 
 | ||||
| @ -346,7 +347,7 @@ void DaemonSource::handleDataBlock(SDRDaemonDataBlock* dataBlock) | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::handleData() | ||||
| void RemoteSource::handleData() | ||||
| { | ||||
|     SDRDaemonDataBlock* dataBlock; | ||||
| 
 | ||||
| @ -355,7 +356,7 @@ void DaemonSource::handleData() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData) | ||||
| void RemoteSource::printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData) | ||||
| { | ||||
|     qDebug().noquote() << header << ": " | ||||
|             << "|" << metaData->m_centerFrequency | ||||
| @ -369,41 +370,41 @@ void DaemonSource::printMeta(const QString& header, SDRDaemonMetaDataFEC *metaDa | ||||
|             << "|"; | ||||
| } | ||||
| 
 | ||||
| uint32_t DaemonSource::calculateDataReadQueueSize(int sampleRate) | ||||
| uint32_t RemoteSource::calculateDataReadQueueSize(int sampleRate) | ||||
| { | ||||
|     // scale for 20 blocks at 48 kS/s. Take next even number.
 | ||||
|     uint32_t maxSize = sampleRate / 2400; | ||||
|     maxSize = (maxSize % 2 == 0) ? maxSize : maxSize + 1; | ||||
|     qDebug("DaemonSource::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize); | ||||
|     qDebug("RemoteSource::calculateDataReadQueueSize: set max queue size to %u blocks", maxSize); | ||||
|     return maxSize; | ||||
| } | ||||
| 
 | ||||
| int DaemonSource::webapiSettingsGet( | ||||
| int RemoteSource::webapiSettingsGet( | ||||
|         SWGSDRangel::SWGChannelSettings& response, | ||||
|         QString& errorMessage) | ||||
| { | ||||
|     (void) errorMessage; | ||||
|     response.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings()); | ||||
|     response.getDaemonSourceSettings()->init(); | ||||
|     response.setRemoteSourceSettings(new SWGSDRangel::SWGRemoteSourceSettings()); | ||||
|     response.getRemoteSourceSettings()->init(); | ||||
|     webapiFormatChannelSettings(response, m_settings); | ||||
|     return 200; | ||||
| } | ||||
| 
 | ||||
| int DaemonSource::webapiSettingsPutPatch( | ||||
| int RemoteSource::webapiSettingsPutPatch( | ||||
|         bool force, | ||||
|         const QStringList& channelSettingsKeys, | ||||
|         SWGSDRangel::SWGChannelSettings& response, | ||||
|         QString& errorMessage) | ||||
| { | ||||
|     (void) errorMessage; | ||||
|     DaemonSourceSettings settings = m_settings; | ||||
|     RemoteSourceSettings settings = m_settings; | ||||
| 
 | ||||
|     if (channelSettingsKeys.contains("dataAddress")) { | ||||
|         settings.m_dataAddress = *response.getDaemonSourceSettings()->getDataAddress(); | ||||
|         settings.m_dataAddress = *response.getRemoteSourceSettings()->getDataAddress(); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("dataPort")) | ||||
|     { | ||||
|         int dataPort = response.getDaemonSourceSettings()->getDataPort(); | ||||
|         int dataPort = response.getRemoteSourceSettings()->getDataPort(); | ||||
| 
 | ||||
|         if ((dataPort < 1024) || (dataPort > 65535)) { | ||||
|             settings.m_dataPort = 9090; | ||||
| @ -412,34 +413,34 @@ int DaemonSource::webapiSettingsPutPatch( | ||||
|         } | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("rgbColor")) { | ||||
|         settings.m_rgbColor = response.getDaemonSourceSettings()->getRgbColor(); | ||||
|         settings.m_rgbColor = response.getRemoteSourceSettings()->getRgbColor(); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("title")) { | ||||
|         settings.m_title = *response.getDaemonSourceSettings()->getTitle(); | ||||
|         settings.m_title = *response.getRemoteSourceSettings()->getTitle(); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("useReverseAPI")) { | ||||
|         settings.m_useReverseAPI = response.getDaemonSourceSettings()->getUseReverseApi() != 0; | ||||
|         settings.m_useReverseAPI = response.getRemoteSourceSettings()->getUseReverseApi() != 0; | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("reverseAPIAddress")) { | ||||
|         settings.m_reverseAPIAddress = *response.getDaemonSourceSettings()->getReverseApiAddress() != 0; | ||||
|         settings.m_reverseAPIAddress = *response.getRemoteSourceSettings()->getReverseApiAddress() != 0; | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("reverseAPIPort")) { | ||||
|         settings.m_reverseAPIPort = response.getDaemonSourceSettings()->getReverseApiPort(); | ||||
|         settings.m_reverseAPIPort = response.getRemoteSourceSettings()->getReverseApiPort(); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("reverseAPIDeviceIndex")) { | ||||
|         settings.m_reverseAPIDeviceIndex = response.getDaemonSourceSettings()->getReverseApiDeviceIndex(); | ||||
|         settings.m_reverseAPIDeviceIndex = response.getRemoteSourceSettings()->getReverseApiDeviceIndex(); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("reverseAPIChannelIndex")) { | ||||
|         settings.m_reverseAPIChannelIndex = response.getDaemonSourceSettings()->getReverseApiChannelIndex(); | ||||
|         settings.m_reverseAPIChannelIndex = response.getRemoteSourceSettings()->getReverseApiChannelIndex(); | ||||
|     } | ||||
| 
 | ||||
|     MsgConfigureDaemonSource *msg = MsgConfigureDaemonSource::create(settings, force); | ||||
|     MsgConfigureRemoteSource *msg = MsgConfigureRemoteSource::create(settings, force); | ||||
|     m_inputMessageQueue.push(msg); | ||||
| 
 | ||||
|     qDebug("DaemonSource::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue); | ||||
|     qDebug("RemoteSource::webapiSettingsPutPatch: forward to GUI: %p", m_guiMessageQueue); | ||||
|     if (m_guiMessageQueue) // forward to GUI if any
 | ||||
|     { | ||||
|         MsgConfigureDaemonSource *msgToGUI = MsgConfigureDaemonSource::create(settings, force); | ||||
|         MsgConfigureRemoteSource *msgToGUI = MsgConfigureRemoteSource::create(settings, force); | ||||
|         m_guiMessageQueue->push(msgToGUI); | ||||
|     } | ||||
| 
 | ||||
| @ -448,88 +449,88 @@ int DaemonSource::webapiSettingsPutPatch( | ||||
|     return 200; | ||||
| } | ||||
| 
 | ||||
| int DaemonSource::webapiReportGet( | ||||
| int RemoteSource::webapiReportGet( | ||||
|         SWGSDRangel::SWGChannelReport& response, | ||||
|         QString& errorMessage) | ||||
| { | ||||
|     (void) errorMessage; | ||||
|     response.setDaemonSourceReport(new SWGSDRangel::SWGDaemonSourceReport()); | ||||
|     response.getDaemonSourceReport()->init(); | ||||
|     response.setRemoteSourceReport(new SWGSDRangel::SWGRemoteSourceReport()); | ||||
|     response.getRemoteSourceReport()->init(); | ||||
|     webapiFormatChannelReport(response); | ||||
|     return 200; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSourceSettings& settings) | ||||
| void RemoteSource::webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSourceSettings& settings) | ||||
| { | ||||
|     if (response.getDaemonSourceSettings()->getDataAddress()) { | ||||
|         *response.getDaemonSourceSettings()->getDataAddress() = settings.m_dataAddress; | ||||
|     if (response.getRemoteSourceSettings()->getDataAddress()) { | ||||
|         *response.getRemoteSourceSettings()->getDataAddress() = settings.m_dataAddress; | ||||
|     } else { | ||||
|         response.getDaemonSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); | ||||
|         response.getRemoteSourceSettings()->setDataAddress(new QString(settings.m_dataAddress)); | ||||
|     } | ||||
| 
 | ||||
|     response.getDaemonSourceSettings()->setDataPort(settings.m_dataPort); | ||||
|     response.getDaemonSourceSettings()->setRgbColor(settings.m_rgbColor); | ||||
|     response.getRemoteSourceSettings()->setDataPort(settings.m_dataPort); | ||||
|     response.getRemoteSourceSettings()->setRgbColor(settings.m_rgbColor); | ||||
| 
 | ||||
|     if (response.getDaemonSourceSettings()->getTitle()) { | ||||
|         *response.getDaemonSourceSettings()->getTitle() = settings.m_title; | ||||
|     if (response.getRemoteSourceSettings()->getTitle()) { | ||||
|         *response.getRemoteSourceSettings()->getTitle() = settings.m_title; | ||||
|     } else { | ||||
|         response.getDaemonSourceSettings()->setTitle(new QString(settings.m_title)); | ||||
|         response.getRemoteSourceSettings()->setTitle(new QString(settings.m_title)); | ||||
|     } | ||||
| 
 | ||||
|     response.getDaemonSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); | ||||
|     response.getRemoteSourceSettings()->setUseReverseApi(settings.m_useReverseAPI ? 1 : 0); | ||||
| 
 | ||||
|     if (response.getDaemonSourceSettings()->getReverseApiAddress()) { | ||||
|         *response.getDaemonSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; | ||||
|     if (response.getRemoteSourceSettings()->getReverseApiAddress()) { | ||||
|         *response.getRemoteSourceSettings()->getReverseApiAddress() = settings.m_reverseAPIAddress; | ||||
|     } else { | ||||
|         response.getDaemonSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); | ||||
|         response.getRemoteSourceSettings()->setReverseApiAddress(new QString(settings.m_reverseAPIAddress)); | ||||
|     } | ||||
| 
 | ||||
|     response.getDaemonSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort); | ||||
|     response.getDaemonSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); | ||||
|     response.getDaemonSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); | ||||
|     response.getRemoteSourceSettings()->setReverseApiPort(settings.m_reverseAPIPort); | ||||
|     response.getRemoteSourceSettings()->setReverseApiDeviceIndex(settings.m_reverseAPIDeviceIndex); | ||||
|     response.getRemoteSourceSettings()->setReverseApiChannelIndex(settings.m_reverseAPIChannelIndex); | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) | ||||
| void RemoteSource::webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response) | ||||
| { | ||||
|     struct timeval tv; | ||||
|     gettimeofday(&tv, 0); | ||||
| 
 | ||||
|     response.getDaemonSourceReport()->setTvSec(tv.tv_sec); | ||||
|     response.getDaemonSourceReport()->setTvUSec(tv.tv_usec); | ||||
|     response.getDaemonSourceReport()->setQueueSize(m_dataReadQueue.size()); | ||||
|     response.getDaemonSourceReport()->setQueueLength(m_dataReadQueue.length()); | ||||
|     response.getDaemonSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount()); | ||||
|     response.getDaemonSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors); | ||||
|     response.getDaemonSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors); | ||||
|     response.getDaemonSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks); | ||||
|     response.getDaemonSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks); | ||||
|     response.getDaemonSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency); | ||||
|     response.getDaemonSourceReport()->setSampleRate(m_currentMeta.m_sampleRate); | ||||
|     response.getDaemonSourceReport()->setDeviceCenterFreq(m_deviceAPI->getSampleSink()->getCenterFrequency()/1000); | ||||
|     response.getDaemonSourceReport()->setDeviceSampleRate(m_deviceAPI->getSampleSink()->getSampleRate()); | ||||
|     response.getRemoteSourceReport()->setTvSec(tv.tv_sec); | ||||
|     response.getRemoteSourceReport()->setTvUSec(tv.tv_usec); | ||||
|     response.getRemoteSourceReport()->setQueueSize(m_dataReadQueue.size()); | ||||
|     response.getRemoteSourceReport()->setQueueLength(m_dataReadQueue.length()); | ||||
|     response.getRemoteSourceReport()->setSamplesCount(m_dataReadQueue.readSampleCount()); | ||||
|     response.getRemoteSourceReport()->setCorrectableErrorsCount(m_nbCorrectableErrors); | ||||
|     response.getRemoteSourceReport()->setUncorrectableErrorsCount(m_nbUncorrectableErrors); | ||||
|     response.getRemoteSourceReport()->setNbOriginalBlocks(m_currentMeta.m_nbOriginalBlocks); | ||||
|     response.getRemoteSourceReport()->setNbFecBlocks(m_currentMeta.m_nbFECBlocks); | ||||
|     response.getRemoteSourceReport()->setCenterFreq(m_currentMeta.m_centerFrequency); | ||||
|     response.getRemoteSourceReport()->setSampleRate(m_currentMeta.m_sampleRate); | ||||
|     response.getRemoteSourceReport()->setDeviceCenterFreq(m_deviceAPI->getSampleSink()->getCenterFrequency()/1000); | ||||
|     response.getRemoteSourceReport()->setDeviceSampleRate(m_deviceAPI->getSampleSink()->getSampleRate()); | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DaemonSourceSettings& settings, bool force) | ||||
| void RemoteSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force) | ||||
| { | ||||
|     SWGSDRangel::SWGChannelSettings *swgChannelSettings = new SWGSDRangel::SWGChannelSettings(); | ||||
|     swgChannelSettings->setTx(1); | ||||
|     swgChannelSettings->setChannelType(new QString("DaemonSource")); | ||||
|     swgChannelSettings->setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings()); | ||||
|     SWGSDRangel::SWGDaemonSourceSettings *swgDaemonSourceSettings = swgChannelSettings->getDaemonSourceSettings(); | ||||
|     swgChannelSettings->setChannelType(new QString("RemoteSource")); | ||||
|     swgChannelSettings->setRemoteSourceSettings(new SWGSDRangel::SWGRemoteSourceSettings()); | ||||
|     SWGSDRangel::SWGRemoteSourceSettings *swgRemoteSourceSettings = swgChannelSettings->getRemoteSourceSettings(); | ||||
| 
 | ||||
|     // transfer data that has been modified. When force is on transfer all data except reverse API data
 | ||||
| 
 | ||||
|     if (channelSettingsKeys.contains("dataAddress") || force) { | ||||
|         swgDaemonSourceSettings->setDataAddress(new QString(settings.m_dataAddress)); | ||||
|         swgRemoteSourceSettings->setDataAddress(new QString(settings.m_dataAddress)); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("dataPort") || force) { | ||||
|         swgDaemonSourceSettings->setDataPort(settings.m_dataPort); | ||||
|         swgRemoteSourceSettings->setDataPort(settings.m_dataPort); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("rgbColor") || force) { | ||||
|         swgDaemonSourceSettings->setRgbColor(settings.m_rgbColor); | ||||
|         swgRemoteSourceSettings->setRgbColor(settings.m_rgbColor); | ||||
|     } | ||||
|     if (channelSettingsKeys.contains("title") || force) { | ||||
|         swgDaemonSourceSettings->setTitle(new QString(settings.m_title)); | ||||
|         swgRemoteSourceSettings->setTitle(new QString(settings.m_title)); | ||||
|     } | ||||
| 
 | ||||
|     QString channelSettingsURL = QString("http://%1:%2/sdrangel/deviceset/%3/channel/%4/settings") | ||||
| @ -551,13 +552,13 @@ void DaemonSource::webapiReverseSendSettings(QList<QString>& channelSettingsKeys | ||||
|     delete swgChannelSettings; | ||||
| } | ||||
| 
 | ||||
| void DaemonSource::networkManagerFinished(QNetworkReply *reply) | ||||
| void RemoteSource::networkManagerFinished(QNetworkReply *reply) | ||||
| { | ||||
|     QNetworkReply::NetworkError replyError = reply->error(); | ||||
| 
 | ||||
|     if (replyError) | ||||
|     { | ||||
|         qWarning() << "DaemonSource::networkManagerFinished:" | ||||
|         qWarning() << "RemoteSource::networkManagerFinished:" | ||||
|                 << " error(" << (int) replyError | ||||
|                 << "): " << replyError | ||||
|                 << ": " << reply->errorString(); | ||||
| @ -566,5 +567,5 @@ void DaemonSource::networkManagerFinished(QNetworkReply *reply) | ||||
| 
 | ||||
|     QString answer = reply->readAll(); | ||||
|     answer.chop(1); // remove last \n
 | ||||
|     qDebug("DaemonSource::networkManagerFinished: reply:\n%s", answer.toStdString().c_str()); | ||||
|     qDebug("RemoteSource::networkManagerFinished: reply:\n%s", answer.toStdString().c_str()); | ||||
| } | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,8 +14,8 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRC_H_ | ||||
| #define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRC_H_ | ||||
| #ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRC_H_ | ||||
| #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRC_H_ | ||||
| 
 | ||||
| #include <QObject> | ||||
| #include <QNetworkRequest> | ||||
| @ -26,40 +26,41 @@ | ||||
| #include "channel/channelsourceapi.h" | ||||
| #include "util/message.h" | ||||
| 
 | ||||
| #include "daemonsourcesettings.h" | ||||
| #include "channel/sdrdaemondataqueue.h" | ||||
| #include "channel/sdrdaemondatablock.h" | ||||
| #include "channel/sdrdaemondatareadqueue.h" | ||||
| 
 | ||||
| #include "../remotesource/remotesourcesettings.h" | ||||
| 
 | ||||
| class ThreadedBasebandSampleSource; | ||||
| class UpChannelizer; | ||||
| class DeviceSinkAPI; | ||||
| class DaemonSourceThread; | ||||
| class RemoteSourceThread; | ||||
| class SDRDaemonDataBlock; | ||||
| class QNetworkAccessManager; | ||||
| class QNetworkReply; | ||||
| 
 | ||||
| class DaemonSource : public BasebandSampleSource, public ChannelSourceAPI { | ||||
| class RemoteSource : public BasebandSampleSource, public ChannelSourceAPI { | ||||
|     Q_OBJECT | ||||
| 
 | ||||
| public: | ||||
|     class MsgConfigureDaemonSource : public Message { | ||||
|     class MsgConfigureRemoteSource : public Message { | ||||
|         MESSAGE_CLASS_DECLARATION | ||||
| 
 | ||||
|     public: | ||||
|         const DaemonSourceSettings& getSettings() const { return m_settings; } | ||||
|         const RemoteSourceSettings& getSettings() const { return m_settings; } | ||||
|         bool getForce() const { return m_force; } | ||||
| 
 | ||||
|         static MsgConfigureDaemonSource* create(const DaemonSourceSettings& settings, bool force) | ||||
|         static MsgConfigureRemoteSource* create(const RemoteSourceSettings& settings, bool force) | ||||
|         { | ||||
|             return new MsgConfigureDaemonSource(settings, force); | ||||
|             return new MsgConfigureRemoteSource(settings, force); | ||||
|         } | ||||
| 
 | ||||
|     private: | ||||
|         DaemonSourceSettings m_settings; | ||||
|         RemoteSourceSettings m_settings; | ||||
|         bool m_force; | ||||
| 
 | ||||
|         MsgConfigureDaemonSource(const DaemonSourceSettings& settings, bool force) : | ||||
|         MsgConfigureRemoteSource(const RemoteSourceSettings& settings, bool force) : | ||||
|             Message(), | ||||
|             m_settings(settings), | ||||
|             m_force(force) | ||||
| @ -179,8 +180,8 @@ public: | ||||
|         { } | ||||
|     }; | ||||
| 
 | ||||
|     DaemonSource(DeviceSinkAPI *deviceAPI); | ||||
|     ~DaemonSource(); | ||||
|     RemoteSource(DeviceSinkAPI *deviceAPI); | ||||
|     ~RemoteSource(); | ||||
| 
 | ||||
|     virtual void destroy() { delete this; } | ||||
| 
 | ||||
| @ -221,12 +222,12 @@ private: | ||||
|     ThreadedBasebandSampleSource* m_threadedChannelizer; | ||||
|     UpChannelizer* m_channelizer; | ||||
|     SDRDaemonDataQueue m_dataQueue; | ||||
|     DaemonSourceThread *m_sourceThread; | ||||
|     RemoteSourceThread *m_sourceThread; | ||||
|     CM256 m_cm256; | ||||
|     CM256 *m_cm256p; | ||||
|     bool m_running; | ||||
| 
 | ||||
|     DaemonSourceSettings m_settings; | ||||
|     RemoteSourceSettings m_settings; | ||||
| 
 | ||||
|     CM256::cm256_block   m_cm256DescriptorBlocks[2*SDRDaemonNbOrginalBlocks]; //!< CM256 decoder descriptors (block addresses and block indexes)
 | ||||
|     SDRDaemonMetaDataFEC m_currentMeta; | ||||
| @ -239,17 +240,17 @@ private: | ||||
|     QNetworkAccessManager *m_networkManager; | ||||
|     QNetworkRequest m_networkRequest; | ||||
| 
 | ||||
|     void applySettings(const DaemonSourceSettings& settings, bool force = false); | ||||
|     void applySettings(const RemoteSourceSettings& settings, bool force = false); | ||||
|     void handleDataBlock(SDRDaemonDataBlock *dataBlock); | ||||
|     void printMeta(const QString& header, SDRDaemonMetaDataFEC *metaData); | ||||
|     uint32_t calculateDataReadQueueSize(int sampleRate); | ||||
|     void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const DaemonSourceSettings& settings); | ||||
|     void webapiFormatChannelSettings(SWGSDRangel::SWGChannelSettings& response, const RemoteSourceSettings& settings); | ||||
|     void webapiFormatChannelReport(SWGSDRangel::SWGChannelReport& response); | ||||
|     void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const DaemonSourceSettings& settings, bool force); | ||||
|     void webapiReverseSendSettings(QList<QString>& channelSettingsKeys, const RemoteSourceSettings& settings, bool force); | ||||
| 
 | ||||
| private slots: | ||||
|     void networkManagerFinished(QNetworkReply *reply); | ||||
|     void handleData(); | ||||
| }; | ||||
| 
 | ||||
| #endif // PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRC_H_
 | ||||
| #endif // PLUGINS_CHANNELTX_REMOTESRC_REMOTESRC_H_
 | ||||
| @ -9,7 +9,7 @@ CONFIG += plugin | ||||
| 
 | ||||
| QT += core gui widgets multimedia network opengl | ||||
| 
 | ||||
| TARGET = daemonsource | ||||
| TARGET = remotesource | ||||
| 
 | ||||
| CONFIG(MINGW32):LIBCM256CCSRC = "C:\softs\cm256cc" | ||||
| CONFIG(MSVC):LIBCM256CCSRC = "C:\softs\cm256cc" | ||||
| @ -38,19 +38,19 @@ CONFIG(MINGW32):INCLUDEPATH += "C:\softs\boost_1_66_0" | ||||
| CONFIG(MSVC):INCLUDEPATH += "C:\softs\boost_1_66_0" | ||||
| CONFIG(macx):INCLUDEPATH += "../../../../../boost_1_69_0" | ||||
| 
 | ||||
| SOURCES += daemonsource.cpp\ | ||||
|     daemonsourcegui.cpp\ | ||||
|     daemonsourcesettings.cpp\ | ||||
|     daemonsourceplugin.cpp\ | ||||
|     daemonsourcethread.cpp | ||||
| SOURCES += remotesource.cpp\ | ||||
|     remotesourcegui.cpp\ | ||||
|     remotesourcesettings.cpp\ | ||||
|     remotesourceplugin.cpp\ | ||||
|     remotesourcethread.cpp | ||||
| 
 | ||||
| HEADERS += daemonsource.h\ | ||||
|     daemonsourcegui.h\ | ||||
|     daemonsourcesettings.h\ | ||||
|     daemonsourceplugin.h\ | ||||
|     daemonsourcethread.h | ||||
| HEADERS += remotesource.h\ | ||||
|     remotesourcegui.h\ | ||||
|     remotesourcesettings.h\ | ||||
|     remotesourceplugin.h\ | ||||
|     remotesourcethread.h | ||||
| 
 | ||||
| FORMS += daemonsourcegui.ui | ||||
| FORMS += remotesourcegui.ui | ||||
| 
 | ||||
| LIBS += -L../../../sdrbase/$${build_subdir} -lsdrbase | ||||
| LIBS += -L../../../sdrgui/$${build_subdir} -lsdrgui | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,58 +14,59 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #include "remotesourcegui.h" | ||||
| 
 | ||||
| #include "device/devicesinkapi.h" | ||||
| #include "device/deviceuiset.h" | ||||
| #include "gui/basicchannelsettingsdialog.h" | ||||
| #include "mainwindow.h" | ||||
| 
 | ||||
| #include "daemonsource.h" | ||||
| #include "ui_daemonsourcegui.h" | ||||
| #include "daemonsourcegui.h" | ||||
| #include "remotesource.h" | ||||
| #include "ui_remotesourcegui.h" | ||||
| 
 | ||||
| DaemonSourceGUI* DaemonSourceGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx) | ||||
| RemoteSourceGUI* RemoteSourceGUI::create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx) | ||||
| { | ||||
|     DaemonSourceGUI* gui = new DaemonSourceGUI(pluginAPI, deviceUISet, channelTx); | ||||
|     RemoteSourceGUI* gui = new RemoteSourceGUI(pluginAPI, deviceUISet, channelTx); | ||||
|     return gui; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::destroy() | ||||
| void RemoteSourceGUI::destroy() | ||||
| { | ||||
|     delete this; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::setName(const QString& name) | ||||
| void RemoteSourceGUI::setName(const QString& name) | ||||
| { | ||||
|     setObjectName(name); | ||||
| } | ||||
| 
 | ||||
| QString DaemonSourceGUI::getName() const | ||||
| QString RemoteSourceGUI::getName() const | ||||
| { | ||||
|     return objectName(); | ||||
| } | ||||
| 
 | ||||
| qint64 DaemonSourceGUI::getCenterFrequency() const { | ||||
| qint64 RemoteSourceGUI::getCenterFrequency() const { | ||||
|     return 0; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::setCenterFrequency(qint64 centerFrequency) | ||||
| void RemoteSourceGUI::setCenterFrequency(qint64 centerFrequency) | ||||
| { | ||||
|     (void) centerFrequency; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::resetToDefaults() | ||||
| void RemoteSourceGUI::resetToDefaults() | ||||
| { | ||||
|     m_settings.resetToDefaults(); | ||||
|     displaySettings(); | ||||
|     applySettings(true); | ||||
| } | ||||
| 
 | ||||
| QByteArray DaemonSourceGUI::serialize() const | ||||
| QByteArray RemoteSourceGUI::serialize() const | ||||
| { | ||||
|     return m_settings.serialize(); | ||||
| } | ||||
| 
 | ||||
| bool DaemonSourceGUI::deserialize(const QByteArray& data) | ||||
| bool RemoteSourceGUI::deserialize(const QByteArray& data) | ||||
| { | ||||
|     if(m_settings.deserialize(data)) { | ||||
|         displaySettings(); | ||||
| @ -77,26 +78,26 @@ bool DaemonSourceGUI::deserialize(const QByteArray& data) | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| bool DaemonSourceGUI::handleMessage(const Message& message) | ||||
| bool RemoteSourceGUI::handleMessage(const Message& message) | ||||
| { | ||||
|     if (DaemonSource::MsgSampleRateNotification::match(message)) | ||||
|     if (RemoteSource::MsgSampleRateNotification::match(message)) | ||||
|     { | ||||
|         DaemonSource::MsgSampleRateNotification& notif = (DaemonSource::MsgSampleRateNotification&) message; | ||||
|         RemoteSource::MsgSampleRateNotification& notif = (RemoteSource::MsgSampleRateNotification&) message; | ||||
|         m_channelMarker.setBandwidth(notif.getSampleRate()); | ||||
|         return true; | ||||
|     } | ||||
|     else if (DaemonSource::MsgConfigureDaemonSource::match(message)) | ||||
|     else if (RemoteSource::MsgConfigureRemoteSource::match(message)) | ||||
|     { | ||||
|         const DaemonSource::MsgConfigureDaemonSource& cfg = (DaemonSource::MsgConfigureDaemonSource&) message; | ||||
|         const RemoteSource::MsgConfigureRemoteSource& cfg = (RemoteSource::MsgConfigureRemoteSource&) message; | ||||
|         m_settings = cfg.getSettings(); | ||||
|         blockApplySettings(true); | ||||
|         displaySettings(); | ||||
|         blockApplySettings(false); | ||||
|         return true; | ||||
|     } | ||||
|     else if (DaemonSource::MsgReportStreamData::match(message)) | ||||
|     else if (RemoteSource::MsgReportStreamData::match(message)) | ||||
|     { | ||||
|         const DaemonSource::MsgReportStreamData& report = (DaemonSource::MsgReportStreamData&) message; | ||||
|         const RemoteSource::MsgReportStreamData& report = (RemoteSource::MsgReportStreamData&) message; | ||||
|         ui->sampleRate->setText(QString("%1").arg(report.get_sampleRate())); | ||||
|         QString nominalNbBlocksText = QString("%1/%2") | ||||
|                 .arg(report.get_nbOriginalBlocks() + report.get_nbFECBlocks()) | ||||
| @ -153,9 +154,9 @@ bool DaemonSourceGUI::handleMessage(const Message& message) | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| DaemonSourceGUI::DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) : | ||||
| RemoteSourceGUI::RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent) : | ||||
|         RollupWidget(parent), | ||||
|         ui(new Ui::DaemonSourceGUI), | ||||
|         ui(new Ui::RemoteSourceGUI), | ||||
|         m_pluginAPI(pluginAPI), | ||||
|         m_deviceUISet(deviceUISet), | ||||
|         m_countUnrecoverable(0), | ||||
| @ -173,21 +174,21 @@ DaemonSourceGUI::DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, | ||||
|     connect(this, SIGNAL(widgetRolled(QWidget*,bool)), this, SLOT(onWidgetRolled(QWidget*,bool))); | ||||
|     connect(this, SIGNAL(customContextMenuRequested(const QPoint &)), this, SLOT(onMenuDialogCalled(const QPoint &))); | ||||
| 
 | ||||
|     m_daemonSrc = (DaemonSource*) channelTx; | ||||
|     m_daemonSrc->setMessageQueueToGUI(getInputMessageQueue()); | ||||
|     m_remoteSrc = (RemoteSource*) channelTx; | ||||
|     m_remoteSrc->setMessageQueueToGUI(getInputMessageQueue()); | ||||
| 
 | ||||
|     connect(&(m_deviceUISet->m_deviceSinkAPI->getMasterTimer()), SIGNAL(timeout()), this, SLOT(tick())); | ||||
| 
 | ||||
|     m_channelMarker.blockSignals(true); | ||||
|     m_channelMarker.setColor(m_settings.m_rgbColor); | ||||
|     m_channelMarker.setCenterFrequency(0); | ||||
|     m_channelMarker.setTitle("Daemon source"); | ||||
|     m_channelMarker.setTitle("Remote source"); | ||||
|     m_channelMarker.blockSignals(false); | ||||
|     m_channelMarker.setVisible(true); // activate signal on the last setting only
 | ||||
| 
 | ||||
|     m_settings.setChannelMarker(&m_channelMarker); | ||||
| 
 | ||||
|     m_deviceUISet->registerTxChannelInstance(DaemonSource::m_channelIdURI, this); | ||||
|     m_deviceUISet->registerTxChannelInstance(RemoteSource::m_channelIdURI, this); | ||||
|     m_deviceUISet->addChannelMarker(&m_channelMarker); | ||||
|     m_deviceUISet->addRollupWidget(this); | ||||
| 
 | ||||
| @ -200,30 +201,30 @@ DaemonSourceGUI::DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, | ||||
|     applySettings(true); | ||||
| } | ||||
| 
 | ||||
| DaemonSourceGUI::~DaemonSourceGUI() | ||||
| RemoteSourceGUI::~RemoteSourceGUI() | ||||
| { | ||||
|     m_deviceUISet->removeTxChannelInstance(this); | ||||
|     delete m_daemonSrc; | ||||
|     delete m_remoteSrc; | ||||
|     delete ui; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::blockApplySettings(bool block) | ||||
| void RemoteSourceGUI::blockApplySettings(bool block) | ||||
| { | ||||
|     m_doApplySettings = !block; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::applySettings(bool force) | ||||
| void RemoteSourceGUI::applySettings(bool force) | ||||
| { | ||||
|     if (m_doApplySettings) | ||||
|     { | ||||
|         setTitleColor(m_channelMarker.getColor()); | ||||
| 
 | ||||
|         DaemonSource::MsgConfigureDaemonSource* message = DaemonSource::MsgConfigureDaemonSource::create(m_settings, force); | ||||
|         m_daemonSrc->getInputMessageQueue()->push(message); | ||||
|         RemoteSource::MsgConfigureRemoteSource* message = RemoteSource::MsgConfigureRemoteSource::create(m_settings, force); | ||||
|         m_remoteSrc->getInputMessageQueue()->push(message); | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::displaySettings() | ||||
| void RemoteSourceGUI::displaySettings() | ||||
| { | ||||
|     m_channelMarker.blockSignals(true); | ||||
|     m_channelMarker.setCenterFrequency(0); | ||||
| @ -241,17 +242,17 @@ void DaemonSourceGUI::displaySettings() | ||||
|     blockApplySettings(false); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::leaveEvent(QEvent*) | ||||
| void RemoteSourceGUI::leaveEvent(QEvent*) | ||||
| { | ||||
|     m_channelMarker.setHighlighted(false); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::enterEvent(QEvent*) | ||||
| void RemoteSourceGUI::enterEvent(QEvent*) | ||||
| { | ||||
|     m_channelMarker.setHighlighted(true); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::handleSourceMessages() | ||||
| void RemoteSourceGUI::handleSourceMessages() | ||||
| { | ||||
|     Message* message; | ||||
| 
 | ||||
| @ -264,13 +265,13 @@ void DaemonSourceGUI::handleSourceMessages() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown) | ||||
| void RemoteSourceGUI::onWidgetRolled(QWidget* widget, bool rollDown) | ||||
| { | ||||
|     (void) widget; | ||||
|     (void) rollDown; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::onMenuDialogCalled(const QPoint &p) | ||||
| void RemoteSourceGUI::onMenuDialogCalled(const QPoint &p) | ||||
| { | ||||
|     BasicChannelSettingsDialog dialog(&m_channelMarker, this); | ||||
|     dialog.setUseReverseAPI(m_settings.m_useReverseAPI); | ||||
| @ -296,13 +297,13 @@ void DaemonSourceGUI::onMenuDialogCalled(const QPoint &p) | ||||
|     applySettings(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::on_dataAddress_returnPressed() | ||||
| void RemoteSourceGUI::on_dataAddress_returnPressed() | ||||
| { | ||||
|     m_settings.m_dataAddress = ui->dataAddress->text(); | ||||
|     applySettings(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::on_dataPort_returnPressed() | ||||
| void RemoteSourceGUI::on_dataPort_returnPressed() | ||||
| { | ||||
|     bool dataOk; | ||||
|     int dataPort = ui->dataPort->text().toInt(&dataOk); | ||||
| @ -319,7 +320,7 @@ void DaemonSourceGUI::on_dataPort_returnPressed() | ||||
|     applySettings(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::on_dataApplyButton_clicked(bool checked) | ||||
| void RemoteSourceGUI::on_dataApplyButton_clicked(bool checked) | ||||
| { | ||||
|     (void) checked; | ||||
|     m_settings.m_dataAddress = ui->dataAddress->text(); | ||||
| @ -335,7 +336,7 @@ void DaemonSourceGUI::on_dataApplyButton_clicked(bool checked) | ||||
|     applySettings(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::on_eventCountsReset_clicked(bool checked) | ||||
| void RemoteSourceGUI::on_eventCountsReset_clicked(bool checked) | ||||
| { | ||||
|     (void) checked; | ||||
|     m_countUnrecoverable = 0; | ||||
| @ -345,7 +346,7 @@ void DaemonSourceGUI::on_eventCountsReset_clicked(bool checked) | ||||
|     displayEventTimer(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::displayEventCounts() | ||||
| void RemoteSourceGUI::displayEventCounts() | ||||
| { | ||||
|     QString nstr = QString("%1").arg(m_countUnrecoverable, 3, 10, QChar('0')); | ||||
|     ui->eventUnrecText->setText(nstr); | ||||
| @ -353,7 +354,7 @@ void DaemonSourceGUI::displayEventCounts() | ||||
|     ui->eventRecText->setText(nstr); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::displayEventStatus(int recoverableCount, int unrecoverableCount) | ||||
| void RemoteSourceGUI::displayEventStatus(int recoverableCount, int unrecoverableCount) | ||||
| { | ||||
| 
 | ||||
|     if (unrecoverableCount == 0) | ||||
| @ -370,7 +371,7 @@ void DaemonSourceGUI::displayEventStatus(int recoverableCount, int unrecoverable | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::displayEventTimer() | ||||
| void RemoteSourceGUI::displayEventTimer() | ||||
| { | ||||
|     int elapsedTimeMillis = m_time.elapsed(); | ||||
|     QTime recordLength(0, 0, 0, 0); | ||||
| @ -379,12 +380,12 @@ void DaemonSourceGUI::displayEventTimer() | ||||
|     ui->eventCountsTimeText->setText(s_time); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::tick() | ||||
| void RemoteSourceGUI::tick() | ||||
| { | ||||
|     if (++m_tickCount == 20) // once per second
 | ||||
|     { | ||||
|         DaemonSource::MsgQueryStreamData *msg = DaemonSource::MsgQueryStreamData::create(); | ||||
|         m_daemonSrc->getInputMessageQueue()->push(msg); | ||||
|         RemoteSource::MsgQueryStreamData *msg = RemoteSource::MsgQueryStreamData::create(); | ||||
|         m_remoteSrc->getInputMessageQueue()->push(msg); | ||||
| 
 | ||||
|         displayEventTimer(); | ||||
| 
 | ||||
| @ -392,6 +393,6 @@ void DaemonSourceGUI::tick() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceGUI::channelMarkerChangedByCursor() | ||||
| void RemoteSourceGUI::channelMarkerChangedByCursor() | ||||
| { | ||||
| } | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,8 +14,8 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCGUI_H_ | ||||
| #define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCGUI_H_ | ||||
| #ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ | ||||
| #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ | ||||
| 
 | ||||
| #include <QTime> | ||||
| 
 | ||||
| @ -24,22 +24,22 @@ | ||||
| #include "gui/rollupwidget.h" | ||||
| #include "util/messagequeue.h" | ||||
| 
 | ||||
| #include "daemonsourcesettings.h" | ||||
| #include "../remotesource/remotesourcesettings.h" | ||||
| 
 | ||||
| class PluginAPI; | ||||
| class DeviceUISet; | ||||
| class BasebandSampleSource; | ||||
| class DaemonSource; | ||||
| class RemoteSource; | ||||
| 
 | ||||
| namespace Ui { | ||||
|     class DaemonSourceGUI; | ||||
|     class RemoteSourceGUI; | ||||
| } | ||||
| 
 | ||||
| class DaemonSourceGUI : public RollupWidget, public PluginInstanceGUI { | ||||
| class RemoteSourceGUI : public RollupWidget, public PluginInstanceGUI { | ||||
|     Q_OBJECT | ||||
| 
 | ||||
| public: | ||||
|     static DaemonSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx); | ||||
|     static RemoteSourceGUI* create(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx); | ||||
|     virtual void destroy(); | ||||
| 
 | ||||
|     void setName(const QString& name); | ||||
| @ -57,14 +57,14 @@ public slots: | ||||
|     void channelMarkerChangedByCursor(); | ||||
| 
 | ||||
| private: | ||||
|     Ui::DaemonSourceGUI* ui; | ||||
|     Ui::RemoteSourceGUI* ui; | ||||
|     PluginAPI* m_pluginAPI; | ||||
|     DeviceUISet* m_deviceUISet; | ||||
|     ChannelMarker m_channelMarker; | ||||
|     DaemonSourceSettings m_settings; | ||||
|     RemoteSourceSettings m_settings; | ||||
|     bool m_doApplySettings; | ||||
| 
 | ||||
|     DaemonSource* m_daemonSrc; | ||||
|     RemoteSource* m_remoteSrc; | ||||
|     MessageQueue m_inputMessageQueue; | ||||
| 
 | ||||
|     uint32_t m_countUnrecoverable; | ||||
| @ -77,8 +77,8 @@ private: | ||||
|     QTime m_time; | ||||
|     uint32_t m_tickCount; | ||||
| 
 | ||||
|     explicit DaemonSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0); | ||||
|     virtual ~DaemonSourceGUI(); | ||||
|     explicit RemoteSourceGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUISet, BasebandSampleSource *channelTx, QWidget* parent = 0); | ||||
|     virtual ~RemoteSourceGUI(); | ||||
| 
 | ||||
|     void blockApplySettings(bool block); | ||||
|     void applySettings(bool force = false); | ||||
| @ -103,4 +103,4 @@ private slots: | ||||
| }; | ||||
| 
 | ||||
| 
 | ||||
| #endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCGUI_H_ */ | ||||
| #endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCGUI_H_ */ | ||||
| @ -1,7 +1,7 @@ | ||||
| <?xml version="1.0" encoding="UTF-8"?> | ||||
| <ui version="4.0"> | ||||
|  <class>DaemonSourceGUI</class> | ||||
|  <widget class="RollupWidget" name="DaemonSourceGUI"> | ||||
|  <class>RemoteSourceGUI</class> | ||||
|  <widget class="RollupWidget" name="RemoteSourceGUI"> | ||||
|   <property name="geometry"> | ||||
|    <rect> | ||||
|     <x>0</x> | ||||
| @ -35,7 +35,7 @@ | ||||
|    </font> | ||||
|   </property> | ||||
|   <property name="windowTitle"> | ||||
|    <string>Daemon source</string> | ||||
|    <string>Remote source</string> | ||||
|   </property> | ||||
|   <widget class="QWidget" name="settingsContainer" native="true"> | ||||
|    <property name="geometry"> | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -18,61 +18,61 @@ | ||||
| #include "plugin/pluginapi.h" | ||||
| 
 | ||||
| #ifndef SERVER_MODE | ||||
| #include "daemonsourcegui.h" | ||||
| #include "remotesourcegui.h" | ||||
| #endif | ||||
| #include "daemonsource.h" | ||||
| #include "daemonsourceplugin.h" | ||||
| #include "remotesource.h" | ||||
| #include "remotesourceplugin.h" | ||||
| 
 | ||||
| const PluginDescriptor DaemonSourcePlugin::m_pluginDescriptor = { | ||||
|     QString("Daemon channel source"), | ||||
|     QString("4.3.2"), | ||||
| const PluginDescriptor RemoteSourcePlugin::m_pluginDescriptor = { | ||||
|     QString("Remote channel source"), | ||||
|     QString("4.4.2"), | ||||
|     QString("(c) Edouard Griffiths, F4EXB"), | ||||
|     QString("https://github.com/f4exb/sdrangel"), | ||||
|     true, | ||||
|     QString("https://github.com/f4exb/sdrangel") | ||||
| }; | ||||
| 
 | ||||
| DaemonSourcePlugin::DaemonSourcePlugin(QObject* parent) : | ||||
| RemoteSourcePlugin::RemoteSourcePlugin(QObject* parent) : | ||||
|     QObject(parent), | ||||
|     m_pluginAPI(0) | ||||
| { | ||||
| } | ||||
| 
 | ||||
| const PluginDescriptor& DaemonSourcePlugin::getPluginDescriptor() const | ||||
| const PluginDescriptor& RemoteSourcePlugin::getPluginDescriptor() const | ||||
| { | ||||
|     return m_pluginDescriptor; | ||||
| } | ||||
| 
 | ||||
| void DaemonSourcePlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| void RemoteSourcePlugin::initPlugin(PluginAPI* pluginAPI) | ||||
| { | ||||
|     m_pluginAPI = pluginAPI; | ||||
| 
 | ||||
|     // register source
 | ||||
|     m_pluginAPI->registerTxChannel(DaemonSource::m_channelIdURI, DaemonSource::m_channelId, this); | ||||
|     m_pluginAPI->registerTxChannel(RemoteSource::m_channelIdURI, RemoteSource::m_channelId, this); | ||||
| } | ||||
| 
 | ||||
| #ifdef SERVER_MODE | ||||
| PluginInstanceGUI* DaemonSourcePlugin::createTxChannelGUI( | ||||
| PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI( | ||||
|         DeviceUISet *deviceUISet __attribute__((unused)), | ||||
|         BasebandSampleSource *txChannel __attribute__((unused))) | ||||
| { | ||||
|     return 0; | ||||
| } | ||||
| #else | ||||
| PluginInstanceGUI* DaemonSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| PluginInstanceGUI* RemoteSourcePlugin::createTxChannelGUI(DeviceUISet *deviceUISet, BasebandSampleSource *txChannel) | ||||
| { | ||||
|     return DaemonSourceGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
|     return RemoteSourceGUI::create(m_pluginAPI, deviceUISet, txChannel); | ||||
| } | ||||
| #endif | ||||
| 
 | ||||
| BasebandSampleSource* DaemonSourcePlugin::createTxChannelBS(DeviceSinkAPI *deviceAPI) | ||||
| BasebandSampleSource* RemoteSourcePlugin::createTxChannelBS(DeviceSinkAPI *deviceAPI) | ||||
| { | ||||
|     return new DaemonSource(deviceAPI); | ||||
|     return new RemoteSource(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| ChannelSourceAPI* DaemonSourcePlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) | ||||
| ChannelSourceAPI* RemoteSourcePlugin::createTxChannelCS(DeviceSinkAPI *deviceAPI) | ||||
| { | ||||
|     return new DaemonSource(deviceAPI); | ||||
|     return new RemoteSource(deviceAPI); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,8 +14,8 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCPLUGIN_H_ | ||||
| #define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCPLUGIN_H_ | ||||
| #ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCPLUGIN_H_ | ||||
| #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCPLUGIN_H_ | ||||
| 
 | ||||
| #include <QObject> | ||||
| #include "plugin/plugininterface.h" | ||||
| @ -23,13 +23,13 @@ | ||||
| class DeviceUISet; | ||||
| class BasebandSampleSource; | ||||
| 
 | ||||
| class DaemonSourcePlugin : public QObject, PluginInterface { | ||||
| class RemoteSourcePlugin : public QObject, PluginInterface { | ||||
|     Q_OBJECT | ||||
|     Q_INTERFACES(PluginInterface) | ||||
|     Q_PLUGIN_METADATA(IID "sdrangel.channeltx.daemonsrc") | ||||
|     Q_PLUGIN_METADATA(IID "sdrangel.channeltx.remotesrc") | ||||
| 
 | ||||
| public: | ||||
|     explicit DaemonSourcePlugin(QObject* parent = 0); | ||||
|     explicit RemoteSourcePlugin(QObject* parent = 0); | ||||
| 
 | ||||
|     const PluginDescriptor& getPluginDescriptor() const; | ||||
|     void initPlugin(PluginAPI* pluginAPI); | ||||
| @ -44,4 +44,4 @@ private: | ||||
|     PluginAPI* m_pluginAPI; | ||||
| }; | ||||
| 
 | ||||
| #endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCPLUGIN_H_ */ | ||||
| #endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCPLUGIN_H_ */ | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,23 +14,25 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #include "remotesourcesettings.h" | ||||
| 
 | ||||
| #include <QColor> | ||||
| 
 | ||||
| #include "util/simpleserializer.h" | ||||
| #include "settings/serializable.h" | ||||
| #include "daemonsourcesettings.h" | ||||
| 
 | ||||
| DaemonSourceSettings::DaemonSourceSettings() | ||||
| 
 | ||||
| RemoteSourceSettings::RemoteSourceSettings() | ||||
| { | ||||
|     resetToDefaults(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceSettings::resetToDefaults() | ||||
| void RemoteSourceSettings::resetToDefaults() | ||||
| { | ||||
|     m_dataAddress = "127.0.0.1"; | ||||
|     m_dataPort = 9090; | ||||
|     m_rgbColor = QColor(140, 4, 4).rgb(); | ||||
|     m_title = "Daemon source"; | ||||
|     m_title = "Remote source"; | ||||
|     m_channelMarker = nullptr; | ||||
|     m_useReverseAPI = false; | ||||
|     m_reverseAPIAddress = "127.0.0.1"; | ||||
| @ -39,7 +41,7 @@ void DaemonSourceSettings::resetToDefaults() | ||||
|     m_reverseAPIChannelIndex = 0; | ||||
| } | ||||
| 
 | ||||
| QByteArray DaemonSourceSettings::serialize() const | ||||
| QByteArray RemoteSourceSettings::serialize() const | ||||
| { | ||||
|     SimpleSerializer s(1); | ||||
|     s.writeString(1, m_dataAddress); | ||||
| @ -55,7 +57,7 @@ QByteArray DaemonSourceSettings::serialize() const | ||||
|     return s.final(); | ||||
| } | ||||
| 
 | ||||
| bool DaemonSourceSettings::deserialize(const QByteArray& data) | ||||
| bool RemoteSourceSettings::deserialize(const QByteArray& data) | ||||
| { | ||||
|     SimpleDeserializer d(data); | ||||
| 
 | ||||
| @ -80,7 +82,7 @@ bool DaemonSourceSettings::deserialize(const QByteArray& data) | ||||
|         } | ||||
| 
 | ||||
|         d.readU32(3, &m_rgbColor, QColor(0, 255, 255).rgb()); | ||||
|         d.readString(4, &m_title, "Daemon source"); | ||||
|         d.readString(4, &m_title, "Remote source"); | ||||
|         d.readBool(5, &m_useReverseAPI, false); | ||||
|         d.readString(6, &m_reverseAPIAddress, "127.0.0.1"); | ||||
|         d.readU32(7, &tmp, 0); | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,15 +14,15 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCSETTINGS_H_ | ||||
| #define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCSETTINGS_H_ | ||||
| #ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCSETTINGS_H_ | ||||
| #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCSETTINGS_H_ | ||||
| 
 | ||||
| #include <QString> | ||||
| #include <QByteArray> | ||||
| 
 | ||||
| class Serializable; | ||||
| 
 | ||||
| struct DaemonSourceSettings | ||||
| struct RemoteSourceSettings | ||||
| { | ||||
|     QString  m_dataAddress; //!< Listening (local) data address
 | ||||
|     uint16_t m_dataPort;    //!< Listening data port
 | ||||
| @ -36,11 +36,11 @@ struct DaemonSourceSettings | ||||
| 
 | ||||
|     Serializable *m_channelMarker; | ||||
| 
 | ||||
|     DaemonSourceSettings(); | ||||
|     RemoteSourceSettings(); | ||||
|     void resetToDefaults(); | ||||
|     void setChannelMarker(Serializable *channelMarker) { m_channelMarker = channelMarker; } | ||||
|     QByteArray serialize() const; | ||||
|     bool deserialize(const QByteArray& data); | ||||
| }; | ||||
| 
 | ||||
| #endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCSETTINGS_H_ */ | ||||
| #endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCSETTINGS_H_ */ | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,6 +14,8 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #include "remotesourcethread.h" | ||||
| 
 | ||||
| #include <algorithm> | ||||
| 
 | ||||
| #include <QUdpSocket> | ||||
| @ -22,12 +24,11 @@ | ||||
| #include "channel/sdrdaemondataqueue.h" | ||||
| #include "channel/sdrdaemondatablock.h" | ||||
| 
 | ||||
| #include "daemonsourcethread.h" | ||||
| 
 | ||||
| MESSAGE_CLASS_DEFINITION(DaemonSourceThread::MsgStartStop, Message) | ||||
| MESSAGE_CLASS_DEFINITION(DaemonSourceThread::MsgDataBind, Message) | ||||
| MESSAGE_CLASS_DEFINITION(RemoteSourceThread::MsgStartStop, Message) | ||||
| MESSAGE_CLASS_DEFINITION(RemoteSourceThread::MsgDataBind, Message) | ||||
| 
 | ||||
| DaemonSourceThread::DaemonSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent) : | ||||
| RemoteSourceThread::RemoteSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent) : | ||||
|     QThread(parent), | ||||
|     m_running(false), | ||||
|     m_dataQueue(dataQueue), | ||||
| @ -38,26 +39,26 @@ DaemonSourceThread::DaemonSourceThread(SDRDaemonDataQueue *dataQueue, QObject* p | ||||
|     connect(&m_inputMessageQueue, SIGNAL(messageEnqueued()), this, SLOT(handleInputMessages()), Qt::QueuedConnection); | ||||
| } | ||||
| 
 | ||||
| DaemonSourceThread::~DaemonSourceThread() | ||||
| RemoteSourceThread::~RemoteSourceThread() | ||||
| { | ||||
|     qDebug("DaemonSourceThread::~DaemonSourceThread"); | ||||
|     qDebug("RemoteSourceThread::~RemoteSourceThread"); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceThread::startStop(bool start) | ||||
| void RemoteSourceThread::startStop(bool start) | ||||
| { | ||||
|     MsgStartStop *msg = MsgStartStop::create(start); | ||||
|     m_inputMessageQueue.push(msg); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceThread::dataBind(const QString& address, uint16_t port) | ||||
| void RemoteSourceThread::dataBind(const QString& address, uint16_t port) | ||||
| { | ||||
|     MsgDataBind *msg = MsgDataBind::create(address, port); | ||||
|     m_inputMessageQueue.push(msg); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceThread::startWork() | ||||
| void RemoteSourceThread::startWork() | ||||
| { | ||||
|     qDebug("DaemonSourceThread::startWork"); | ||||
|     qDebug("RemoteSourceThread::startWork"); | ||||
|     m_startWaitMutex.lock(); | ||||
|     m_socket = new QUdpSocket(this); | ||||
|     start(); | ||||
| @ -66,18 +67,18 @@ void DaemonSourceThread::startWork() | ||||
|     m_startWaitMutex.unlock(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceThread::stopWork() | ||||
| void RemoteSourceThread::stopWork() | ||||
| { | ||||
|     qDebug("DaemonSourceThread::stopWork"); | ||||
|     qDebug("RemoteSourceThread::stopWork"); | ||||
|     delete m_socket; | ||||
|     m_socket = 0; | ||||
|     m_running = false; | ||||
|     wait(); | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceThread::run() | ||||
| void RemoteSourceThread::run() | ||||
| { | ||||
|     qDebug("DaemonSourceThread::run: begin"); | ||||
|     qDebug("RemoteSourceThread::run: begin"); | ||||
|     m_running = true; | ||||
|     m_startWaiter.wakeAll(); | ||||
| 
 | ||||
| @ -87,11 +88,11 @@ void DaemonSourceThread::run() | ||||
|     } | ||||
| 
 | ||||
|     m_running = false; | ||||
|     qDebug("DaemonSourceThread::run: end"); | ||||
|     qDebug("RemoteSourceThread::run: end"); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| void DaemonSourceThread::handleInputMessages() | ||||
| void RemoteSourceThread::handleInputMessages() | ||||
| { | ||||
|     Message* message; | ||||
| 
 | ||||
| @ -100,7 +101,7 @@ void DaemonSourceThread::handleInputMessages() | ||||
|         if (MsgStartStop::match(*message)) | ||||
|         { | ||||
|             MsgStartStop* notif = (MsgStartStop*) message; | ||||
|             qDebug("DaemonSourceThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop"); | ||||
|             qDebug("RemoteSourceThread::handleInputMessages: MsgStartStop: %s", notif->getStartStop() ? "start" : "stop"); | ||||
| 
 | ||||
|             if (notif->getStartStop()) { | ||||
|                 startWork(); | ||||
| @ -113,7 +114,7 @@ void DaemonSourceThread::handleInputMessages() | ||||
|         else if (MsgDataBind::match(*message)) | ||||
|         { | ||||
|             MsgDataBind* notif = (MsgDataBind*) message; | ||||
|             qDebug("DaemonSourceThread::handleInputMessages: MsgDataBind: %s:%d", qPrintable(notif->getAddress().toString()), notif->getPort()); | ||||
|             qDebug("RemoteSourceThread::handleInputMessages: MsgDataBind: %s:%d", qPrintable(notif->getAddress().toString()), notif->getPort()); | ||||
| 
 | ||||
|             if (m_socket) | ||||
|             { | ||||
| @ -125,7 +126,7 @@ void DaemonSourceThread::handleInputMessages() | ||||
|     } | ||||
| } | ||||
| 
 | ||||
| void DaemonSourceThread::readPendingDatagrams() | ||||
| void RemoteSourceThread::readPendingDatagrams() | ||||
| { | ||||
|     SDRDaemonSuperBlock superBlock; | ||||
|     qint64 size; | ||||
| @ -181,7 +182,7 @@ void DaemonSourceThread::readPendingDatagrams() | ||||
|         } | ||||
|         else | ||||
|         { | ||||
|             qWarning("DaemonSourceThread::readPendingDatagrams: wrong super block size not processing"); | ||||
|             qWarning("RemoteSourceThread::readPendingDatagrams: wrong super block size not processing"); | ||||
|         } | ||||
|     } | ||||
| } | ||||
| @ -1,5 +1,5 @@ | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| // Copyright (C) 2018 Edouard Griffiths, F4EXB                                   //
 | ||||
| // Copyright (C) 2018-2019 Edouard Griffiths, F4EXB                              //
 | ||||
| //                                                                               //
 | ||||
| // This program is free software; you can redistribute it and/or modify          //
 | ||||
| // it under the terms of the GNU General Public License as published by          //
 | ||||
| @ -14,8 +14,8 @@ | ||||
| // along with this program. If not, see <http://www.gnu.org/licenses/>.          //
 | ||||
| ///////////////////////////////////////////////////////////////////////////////////
 | ||||
| 
 | ||||
| #ifndef PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCTHREAD_H_ | ||||
| #define PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCTHREAD_H_ | ||||
| #ifndef PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCTHREAD_H_ | ||||
| #define PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCTHREAD_H_ | ||||
| 
 | ||||
| #include <QThread> | ||||
| #include <QMutex> | ||||
| @ -29,7 +29,7 @@ class SDRDaemonDataQueue; | ||||
| class SDRDaemonDataBlock; | ||||
| class QUdpSocket; | ||||
| 
 | ||||
| class DaemonSourceThread : public QThread { | ||||
| class RemoteSourceThread : public QThread { | ||||
|     Q_OBJECT | ||||
| public: | ||||
|     class MsgStartStop : public Message { | ||||
| @ -74,8 +74,8 @@ public: | ||||
|         } | ||||
|     }; | ||||
| 
 | ||||
|     DaemonSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent = 0); | ||||
|     ~DaemonSourceThread(); | ||||
|     RemoteSourceThread(SDRDaemonDataQueue *dataQueue, QObject* parent = 0); | ||||
|     ~RemoteSourceThread(); | ||||
| 
 | ||||
|     void startStop(bool start); | ||||
|     void dataBind(const QString& address, uint16_t port); | ||||
| @ -106,4 +106,4 @@ private slots: | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| #endif /* PLUGINS_CHANNELTX_DAEMONSRC_DAEMONSRCTHREAD_H_ */ | ||||
| #endif /* PLUGINS_CHANNELTX_REMOTESRC_REMOTESRCTHREAD_H_ */ | ||||
| @ -8,7 +8,7 @@ add_subdirectory(udpsource) | ||||
| 
 | ||||
| find_package(CM256cc) | ||||
| if(CM256CC_FOUND) | ||||
|     add_subdirectory(daemonsource) | ||||
|     add_subdirectory(remotesource) | ||||
| endif() | ||||
| 
 | ||||
| find_package(OpenCV) | ||||
|  | ||||
| @ -1,46 +0,0 @@ | ||||
| project(daemonsource) | ||||
| 
 | ||||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||||
| set(PLUGIN_PREFIX "../../../plugins/channeltx/daemonsource") | ||||
| 
 | ||||
| set(daemonsource_SOURCES | ||||
| 	${PLUGIN_PREFIX}/daemonsource.cpp | ||||
| 	${PLUGIN_PREFIX}/daemonsourcethread.cpp | ||||
| 	${PLUGIN_PREFIX}/daemonsourceplugin.cpp | ||||
| 	${PLUGIN_PREFIX}/daemonsourcesettings.cpp | ||||
| ) | ||||
| 
 | ||||
| set(daemonsource_HEADERS | ||||
| 	${PLUGIN_PREFIX}/daemonsource.h | ||||
| 	${PLUGIN_PREFIX}/daemonsourcethread.h | ||||
| 	${PLUGIN_PREFIX}/daemonsourceplugin.h | ||||
| 	${PLUGIN_PREFIX}/daemonsourcesettings.h | ||||
| ) | ||||
| 
 | ||||
| include_directories( | ||||
| 	. | ||||
| 	${CMAKE_CURRENT_BINARY_DIR} | ||||
| 	${CM256CC_INCLUDE_DIR} | ||||
| 	${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client | ||||
| ) | ||||
| 
 | ||||
| #include(${QT_USE_FILE}) | ||||
| add_definitions(${QT_DEFINITIONS}) | ||||
| add_definitions(-DQT_PLUGIN) | ||||
| add_definitions(-DQT_SHARED) | ||||
| 
 | ||||
| add_library(daemonsourcesrv SHARED | ||||
| 	${daemonsource_SOURCES} | ||||
| 	${daemonsource_HEADERS_MOC} | ||||
| ) | ||||
| 
 | ||||
| target_link_libraries(daemonsourcesrv | ||||
| 	${QT_LIBRARIES} | ||||
| 	${CM256CC_LIBRARIES} | ||||
| 	sdrbase | ||||
| 	swagger | ||||
| ) | ||||
| 
 | ||||
| target_link_libraries(daemonsourcesrv Qt5::Core Qt5::Network) | ||||
| 
 | ||||
| install(TARGETS daemonsourcesrv DESTINATION lib/pluginssrv/channeltx) | ||||
							
								
								
									
										46
									
								
								pluginssrv/channeltx/remotesource/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								pluginssrv/channeltx/remotesource/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,46 @@ | ||||
| project(remotesource) | ||||
| 
 | ||||
| set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") | ||||
| set(PLUGIN_PREFIX "../../../plugins/channeltx/remotesource") | ||||
| 
 | ||||
| set(remotesource_SOURCES | ||||
| 	${PLUGIN_PREFIX}/remotesource.cpp | ||||
| 	${PLUGIN_PREFIX}/remotesourcethread.cpp | ||||
| 	${PLUGIN_PREFIX}/remotesourceplugin.cpp | ||||
| 	${PLUGIN_PREFIX}/remotesourcesettings.cpp | ||||
| ) | ||||
| 
 | ||||
| set(remotesource_HEADERS | ||||
| 	${PLUGIN_PREFIX}/remotesource.h | ||||
| 	${PLUGIN_PREFIX}/remotesourcethread.h | ||||
| 	${PLUGIN_PREFIX}/remotesourceplugin.h | ||||
| 	${PLUGIN_PREFIX}/remotesourcesettings.h | ||||
| ) | ||||
| 
 | ||||
| include_directories( | ||||
| 	. | ||||
| 	${CMAKE_CURRENT_BINARY_DIR} | ||||
| 	${CM256CC_INCLUDE_DIR} | ||||
| 	${CMAKE_SOURCE_DIR}/swagger/sdrangel/code/qt5/client | ||||
| ) | ||||
| 
 | ||||
| #include(${QT_USE_FILE}) | ||||
| add_definitions(${QT_DEFINITIONS}) | ||||
| add_definitions(-DQT_PLUGIN) | ||||
| add_definitions(-DQT_SHARED) | ||||
| 
 | ||||
| add_library(remotesourcesrv SHARED | ||||
| 	${remotesource_SOURCES} | ||||
| 	${remotesource_HEADERS_MOC} | ||||
| ) | ||||
| 
 | ||||
| target_link_libraries(remotesourcesrv | ||||
| 	${QT_LIBRARIES} | ||||
| 	${CM256CC_LIBRARIES} | ||||
| 	sdrbase | ||||
| 	swagger | ||||
| ) | ||||
| 
 | ||||
| target_link_libraries(remotesourcesrv Qt5::Core Qt5::Network) | ||||
| 
 | ||||
| install(TARGETS remotesourcesrv DESTINATION lib/pluginssrv/channeltx) | ||||
| @ -23,7 +23,7 @@ | ||||
|         <file>webapi/doc/swagger/include/PlutoSdr.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/RtlSdr.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/RemoteSink.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/DaemonSource.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/RemoteSource.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/SDRDaemonSource.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/SDRDaemonSink.yaml</file> | ||||
|         <file>webapi/doc/swagger/include/SDRPlay.yaml</file> | ||||
|  | ||||
| @ -1759,8 +1759,8 @@ margin-bottom: 20px; | ||||
|     "SSBDemodReport" : { | ||||
|       "$ref" : "#/definitions/SSBDemodReport" | ||||
|     }, | ||||
|     "DaemonSourceReport" : { | ||||
|       "$ref" : "#/definitions/DaemonSourceReport" | ||||
|     "RemoteSourceReport" : { | ||||
|       "$ref" : "#/definitions/RemoteSourceReport" | ||||
|     }, | ||||
|     "SSBModReport" : { | ||||
|       "$ref" : "#/definitions/SSBModReport" | ||||
| @ -1816,8 +1816,8 @@ margin-bottom: 20px; | ||||
|     "RemoteSinkSettings" : { | ||||
|       "$ref" : "#/definitions/RemoteSinkSettings" | ||||
|     }, | ||||
|     "DaemonSourceSettings" : { | ||||
|       "$ref" : "#/definitions/DaemonSourceSettings" | ||||
|     "RemoteSourceSettings" : { | ||||
|       "$ref" : "#/definitions/RemoteSourceSettings" | ||||
|     }, | ||||
|     "SSBModSettings" : { | ||||
|       "$ref" : "#/definitions/SSBModSettings" | ||||
| @ -2047,98 +2047,6 @@ margin-bottom: 20px; | ||||
|     } | ||||
|   }, | ||||
|   "description" : "DV serial device details" | ||||
| }; | ||||
|             defs.DaemonSourceReport = { | ||||
|   "properties" : { | ||||
|     "queueLength" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue length in number of data frames" | ||||
|     }, | ||||
|     "queueSize" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue size in number of data frames" | ||||
|     }, | ||||
|     "samplesCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute consumed samples count" | ||||
|     }, | ||||
|     "correctableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of correctable errors" | ||||
|     }, | ||||
|     "uncorrectableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of uncorrectable errors" | ||||
|     }, | ||||
|     "tvSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp seconds" | ||||
|     }, | ||||
|     "tvUSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp microseconds" | ||||
|     }, | ||||
|     "nbOriginalBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of original blocks per frame" | ||||
|     }, | ||||
|     "nbFECBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of FEC blocks per frame" | ||||
|     }, | ||||
|     "centerFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream center frequency setting in kHz" | ||||
|     }, | ||||
|     "sampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream nominal sample rate in S/s" | ||||
|     }, | ||||
|     "deviceCenterFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device center frequency in kHz" | ||||
|     }, | ||||
|     "deviceSampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device baseband sample rate in S/s" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Daemon channel source report" | ||||
| }; | ||||
|             defs.DaemonSourceSettings = { | ||||
|   "properties" : { | ||||
|     "dataAddress" : { | ||||
|       "type" : "string", | ||||
|       "description" : "Remote USB data address" | ||||
|     }, | ||||
|     "dataPort" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Remote USB data port" | ||||
|     }, | ||||
|     "rgbColor" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "title" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "useReverseAPI" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Synchronize with reverse API (1 for yes, 0 for no)" | ||||
|     }, | ||||
|     "reverseAPIAddress" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "reverseAPIPort" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIDeviceIndex" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIChannelIndex" : { | ||||
|       "type" : "integer" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Daemon channel source settings" | ||||
| }; | ||||
|             defs.DeviceListItem = { | ||||
|   "properties" : { | ||||
| @ -3844,6 +3752,98 @@ margin-bottom: 20px; | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Remote channel sink settings" | ||||
| }; | ||||
|             defs.RemoteSourceReport = { | ||||
|   "properties" : { | ||||
|     "queueLength" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue length in number of data frames" | ||||
|     }, | ||||
|     "queueSize" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue size in number of data frames" | ||||
|     }, | ||||
|     "samplesCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute consumed samples count" | ||||
|     }, | ||||
|     "correctableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of correctable errors" | ||||
|     }, | ||||
|     "uncorrectableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of uncorrectable errors" | ||||
|     }, | ||||
|     "tvSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp seconds" | ||||
|     }, | ||||
|     "tvUSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp microseconds" | ||||
|     }, | ||||
|     "nbOriginalBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of original blocks per frame" | ||||
|     }, | ||||
|     "nbFECBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of FEC blocks per frame" | ||||
|     }, | ||||
|     "centerFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream center frequency setting in kHz" | ||||
|     }, | ||||
|     "sampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream nominal sample rate in S/s" | ||||
|     }, | ||||
|     "deviceCenterFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device center frequency in kHz" | ||||
|     }, | ||||
|     "deviceSampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device baseband sample rate in S/s" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Remote channel source report" | ||||
| }; | ||||
|             defs.RemoteSourceSettings = { | ||||
|   "properties" : { | ||||
|     "dataAddress" : { | ||||
|       "type" : "string", | ||||
|       "description" : "Remote USB data address" | ||||
|     }, | ||||
|     "dataPort" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Remote USB data port" | ||||
|     }, | ||||
|     "rgbColor" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "title" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "useReverseAPI" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Synchronize with reverse API (1 for yes, 0 for no)" | ||||
|     }, | ||||
|     "reverseAPIAddress" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "reverseAPIPort" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIDeviceIndex" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIChannelIndex" : { | ||||
|       "type" : "integer" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Remote channel source settings" | ||||
| }; | ||||
|             defs.RtlSdrReport = { | ||||
|   "properties" : { | ||||
| @ -24373,7 +24373,7 @@ except ApiException as e: | ||||
|           </div> | ||||
|           <div id="generator"> | ||||
|             <div class="content"> | ||||
|               Generated 2019-01-22T23:24:38.456+01:00 | ||||
|               Generated 2019-01-23T00:24:46.985+01:00 | ||||
|             </div> | ||||
|           </div> | ||||
|       </div> | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| DaemonSourceSettings: | ||||
|   description: "Daemon channel source settings" | ||||
| RemoteSourceSettings: | ||||
|   description: "Remote channel source settings" | ||||
|   properties: | ||||
|     dataAddress: | ||||
|       description: "Remote USB data address" | ||||
| @ -23,8 +23,8 @@ DaemonSourceSettings: | ||||
|     reverseAPIChannelIndex: | ||||
|       type: integer  | ||||
|        | ||||
| DaemonSourceReport: | ||||
|   description: "Daemon channel source report" | ||||
| RemoteSourceReport: | ||||
|   description: "Remote channel source report" | ||||
|   properties: | ||||
|     queueLength: | ||||
|       description: "Data read/write queue length in number of data frames" | ||||
| @ -1890,8 +1890,8 @@ definitions: | ||||
|         $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModSettings" | ||||
|       RemoteSinkSettings: | ||||
|         $ref: "/doc/swagger/include/RemoteSink.yaml#/RemoteSinkSettings" | ||||
|       DaemonSourceSettings: | ||||
|         $ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceSettings" | ||||
|       RemoteSourceSettings: | ||||
|         $ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceSettings" | ||||
|       SSBModSettings: | ||||
|         $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModSettings" | ||||
|       SSBDemodSettings: | ||||
| @ -1931,8 +1931,8 @@ definitions: | ||||
|         $ref: "/doc/swagger/include/NFMMod.yaml#/NFMModReport" | ||||
|       SSBDemodReport: | ||||
|         $ref: "/doc/swagger/include/SSBDemod.yaml#/SSBDemodReport" | ||||
|       DaemonSourceReport: | ||||
|         $ref: "/doc/swagger/include/DaemonSource.yaml#/DaemonSourceReport" | ||||
|       RemoteSourceReport: | ||||
|         $ref: "/doc/swagger/include/RemoteSource.yaml#/RemoteSourceReport" | ||||
|       SSBModReport: | ||||
|         $ref: "/doc/swagger/include/SSBMod.yaml#/SSBModReport" | ||||
|       UDPSourceReport: | ||||
|  | ||||
| @ -2266,14 +2266,14 @@ bool WebAPIRequestMapper::validateChannelSettings( | ||||
|             return false; | ||||
|         } | ||||
|     } | ||||
|     else if (*channelType == "DaemonSource") | ||||
|     else if (*channelType == "RemoteSource") | ||||
|     { | ||||
|         if (channelSettings.getTx() != 0) | ||||
|         { | ||||
|             QJsonObject daemonChannelSourceSettingsJsonObject = jsonObject["DaemonSourceSettings"].toObject(); | ||||
|             channelSettingsKeys = daemonChannelSourceSettingsJsonObject.keys(); | ||||
|             channelSettings.setDaemonSourceSettings(new SWGSDRangel::SWGDaemonSourceSettings()); | ||||
|             channelSettings.getDaemonSourceSettings()->fromJsonObject(daemonChannelSourceSettingsJsonObject); | ||||
|             QJsonObject remoteChannelSourceSettingsJsonObject = jsonObject["RemoteSourceSettings"].toObject(); | ||||
|             channelSettingsKeys = remoteChannelSourceSettingsJsonObject.keys(); | ||||
|             channelSettings.setRemoteSourceSettings(new SWGSDRangel::SWGRemoteSourceSettings()); | ||||
|             channelSettings.getRemoteSourceSettings()->fromJsonObject(remoteChannelSourceSettingsJsonObject); | ||||
|             return true; | ||||
|         } | ||||
|         else { | ||||
| @ -2519,7 +2519,7 @@ void WebAPIRequestMapper::resetChannelSettings(SWGSDRangel::SWGChannelSettings& | ||||
|     channelSettings.setNfmDemodSettings(0); | ||||
|     channelSettings.setNfmModSettings(0); | ||||
|     channelSettings.setRemoteSinkSettings(0); | ||||
|     channelSettings.setDaemonSourceSettings(0); | ||||
|     channelSettings.setRemoteSourceSettings(0); | ||||
|     channelSettings.setSsbDemodSettings(0); | ||||
|     channelSettings.setSsbModSettings(0); | ||||
|     channelSettings.setUdpSourceSettings(0); | ||||
| @ -2539,7 +2539,7 @@ void WebAPIRequestMapper::resetChannelReport(SWGSDRangel::SWGChannelReport& chan | ||||
|     channelReport.setDsdDemodReport(0); | ||||
|     channelReport.setNfmDemodReport(0); | ||||
|     channelReport.setNfmModReport(0); | ||||
|     channelReport.setDaemonSourceReport(0); | ||||
|     channelReport.setRemoteSourceReport(0); | ||||
|     channelReport.setSsbDemodReport(0); | ||||
|     channelReport.setSsbModReport(0); | ||||
|     channelReport.setUdpSourceReport(0); | ||||
|  | ||||
| @ -1,5 +1,5 @@ | ||||
| DaemonSourceSettings: | ||||
|   description: "Daemon channel source settings" | ||||
| RemoteSourceSettings: | ||||
|   description: "Remote channel source settings" | ||||
|   properties: | ||||
|     dataAddress: | ||||
|       description: "Remote USB data address" | ||||
| @ -23,8 +23,8 @@ DaemonSourceSettings: | ||||
|     reverseAPIChannelIndex: | ||||
|       type: integer  | ||||
|        | ||||
| DaemonSourceReport: | ||||
|   description: "Daemon channel source report" | ||||
| RemoteSourceReport: | ||||
|   description: "Remote channel source report" | ||||
|   properties: | ||||
|     queueLength: | ||||
|       description: "Data read/write queue length in number of data frames" | ||||
| @ -1890,8 +1890,8 @@ definitions: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModSettings" | ||||
|       RemoteSinkSettings: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/RemoteSink.yaml#/RemoteSinkSettings" | ||||
|       DaemonSourceSettings: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceSettings" | ||||
|       RemoteSourceSettings: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceSettings" | ||||
|       SSBModSettings: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModSettings" | ||||
|       SSBDemodSettings: | ||||
| @ -1931,8 +1931,8 @@ definitions: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/NFMMod.yaml#/NFMModReport" | ||||
|       SSBDemodReport: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/SSBDemod.yaml#/SSBDemodReport" | ||||
|       DaemonSourceReport: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/DaemonSource.yaml#/DaemonSourceReport" | ||||
|       RemoteSourceReport: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/RemoteSource.yaml#/RemoteSourceReport" | ||||
|       SSBModReport: | ||||
|         $ref: "http://localhost:8081/api/swagger/include/SSBMod.yaml#/SSBModReport" | ||||
|       UDPSourceReport: | ||||
|  | ||||
| @ -1759,8 +1759,8 @@ margin-bottom: 20px; | ||||
|     "SSBDemodReport" : { | ||||
|       "$ref" : "#/definitions/SSBDemodReport" | ||||
|     }, | ||||
|     "DaemonSourceReport" : { | ||||
|       "$ref" : "#/definitions/DaemonSourceReport" | ||||
|     "RemoteSourceReport" : { | ||||
|       "$ref" : "#/definitions/RemoteSourceReport" | ||||
|     }, | ||||
|     "SSBModReport" : { | ||||
|       "$ref" : "#/definitions/SSBModReport" | ||||
| @ -1816,8 +1816,8 @@ margin-bottom: 20px; | ||||
|     "RemoteSinkSettings" : { | ||||
|       "$ref" : "#/definitions/RemoteSinkSettings" | ||||
|     }, | ||||
|     "DaemonSourceSettings" : { | ||||
|       "$ref" : "#/definitions/DaemonSourceSettings" | ||||
|     "RemoteSourceSettings" : { | ||||
|       "$ref" : "#/definitions/RemoteSourceSettings" | ||||
|     }, | ||||
|     "SSBModSettings" : { | ||||
|       "$ref" : "#/definitions/SSBModSettings" | ||||
| @ -2047,98 +2047,6 @@ margin-bottom: 20px; | ||||
|     } | ||||
|   }, | ||||
|   "description" : "DV serial device details" | ||||
| }; | ||||
|             defs.DaemonSourceReport = { | ||||
|   "properties" : { | ||||
|     "queueLength" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue length in number of data frames" | ||||
|     }, | ||||
|     "queueSize" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue size in number of data frames" | ||||
|     }, | ||||
|     "samplesCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute consumed samples count" | ||||
|     }, | ||||
|     "correctableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of correctable errors" | ||||
|     }, | ||||
|     "uncorrectableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of uncorrectable errors" | ||||
|     }, | ||||
|     "tvSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp seconds" | ||||
|     }, | ||||
|     "tvUSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp microseconds" | ||||
|     }, | ||||
|     "nbOriginalBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of original blocks per frame" | ||||
|     }, | ||||
|     "nbFECBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of FEC blocks per frame" | ||||
|     }, | ||||
|     "centerFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream center frequency setting in kHz" | ||||
|     }, | ||||
|     "sampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream nominal sample rate in S/s" | ||||
|     }, | ||||
|     "deviceCenterFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device center frequency in kHz" | ||||
|     }, | ||||
|     "deviceSampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device baseband sample rate in S/s" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Daemon channel source report" | ||||
| }; | ||||
|             defs.DaemonSourceSettings = { | ||||
|   "properties" : { | ||||
|     "dataAddress" : { | ||||
|       "type" : "string", | ||||
|       "description" : "Remote USB data address" | ||||
|     }, | ||||
|     "dataPort" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Remote USB data port" | ||||
|     }, | ||||
|     "rgbColor" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "title" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "useReverseAPI" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Synchronize with reverse API (1 for yes, 0 for no)" | ||||
|     }, | ||||
|     "reverseAPIAddress" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "reverseAPIPort" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIDeviceIndex" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIChannelIndex" : { | ||||
|       "type" : "integer" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Daemon channel source settings" | ||||
| }; | ||||
|             defs.DeviceListItem = { | ||||
|   "properties" : { | ||||
| @ -3844,6 +3752,98 @@ margin-bottom: 20px; | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Remote channel sink settings" | ||||
| }; | ||||
|             defs.RemoteSourceReport = { | ||||
|   "properties" : { | ||||
|     "queueLength" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue length in number of data frames" | ||||
|     }, | ||||
|     "queueSize" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Data read/write queue size in number of data frames" | ||||
|     }, | ||||
|     "samplesCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute consumed samples count" | ||||
|     }, | ||||
|     "correctableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of correctable errors" | ||||
|     }, | ||||
|     "uncorrectableErrorsCount" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Absolute number of uncorrectable errors" | ||||
|     }, | ||||
|     "tvSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp seconds" | ||||
|     }, | ||||
|     "tvUSec" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Counts timestamp microseconds" | ||||
|     }, | ||||
|     "nbOriginalBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of original blocks per frame" | ||||
|     }, | ||||
|     "nbFECBlocks" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Number of FEC blocks per frame" | ||||
|     }, | ||||
|     "centerFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream center frequency setting in kHz" | ||||
|     }, | ||||
|     "sampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Stream nominal sample rate in S/s" | ||||
|     }, | ||||
|     "deviceCenterFreq" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device center frequency in kHz" | ||||
|     }, | ||||
|     "deviceSampleRate" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Device baseband sample rate in S/s" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Remote channel source report" | ||||
| }; | ||||
|             defs.RemoteSourceSettings = { | ||||
|   "properties" : { | ||||
|     "dataAddress" : { | ||||
|       "type" : "string", | ||||
|       "description" : "Remote USB data address" | ||||
|     }, | ||||
|     "dataPort" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Remote USB data port" | ||||
|     }, | ||||
|     "rgbColor" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "title" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "useReverseAPI" : { | ||||
|       "type" : "integer", | ||||
|       "description" : "Synchronize with reverse API (1 for yes, 0 for no)" | ||||
|     }, | ||||
|     "reverseAPIAddress" : { | ||||
|       "type" : "string" | ||||
|     }, | ||||
|     "reverseAPIPort" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIDeviceIndex" : { | ||||
|       "type" : "integer" | ||||
|     }, | ||||
|     "reverseAPIChannelIndex" : { | ||||
|       "type" : "integer" | ||||
|     } | ||||
|   }, | ||||
|   "description" : "Remote channel source settings" | ||||
| }; | ||||
|             defs.RtlSdrReport = { | ||||
|   "properties" : { | ||||
| @ -24373,7 +24373,7 @@ except ApiException as e: | ||||
|           </div> | ||||
|           <div id="generator"> | ||||
|             <div class="content"> | ||||
|               Generated 2019-01-22T23:24:38.456+01:00 | ||||
|               Generated 2019-01-23T00:24:46.985+01:00 | ||||
|             </div> | ||||
|           </div> | ||||
|       </div> | ||||
|  | ||||
| @ -48,8 +48,8 @@ SWGChannelReport::SWGChannelReport() { | ||||
|     m_nfm_mod_report_isSet = false; | ||||
|     ssb_demod_report = nullptr; | ||||
|     m_ssb_demod_report_isSet = false; | ||||
|     daemon_source_report = nullptr; | ||||
|     m_daemon_source_report_isSet = false; | ||||
|     remote_source_report = nullptr; | ||||
|     m_remote_source_report_isSet = false; | ||||
|     ssb_mod_report = nullptr; | ||||
|     m_ssb_mod_report_isSet = false; | ||||
|     udp_source_report = nullptr; | ||||
| @ -88,8 +88,8 @@ SWGChannelReport::init() { | ||||
|     m_nfm_mod_report_isSet = false; | ||||
|     ssb_demod_report = new SWGSSBDemodReport(); | ||||
|     m_ssb_demod_report_isSet = false; | ||||
|     daemon_source_report = new SWGDaemonSourceReport(); | ||||
|     m_daemon_source_report_isSet = false; | ||||
|     remote_source_report = new SWGRemoteSourceReport(); | ||||
|     m_remote_source_report_isSet = false; | ||||
|     ssb_mod_report = new SWGSSBModReport(); | ||||
|     m_ssb_mod_report_isSet = false; | ||||
|     udp_source_report = new SWGUDPSourceReport(); | ||||
| @ -132,8 +132,8 @@ SWGChannelReport::cleanup() { | ||||
|     if(ssb_demod_report != nullptr) {  | ||||
|         delete ssb_demod_report; | ||||
|     } | ||||
|     if(daemon_source_report != nullptr) {  | ||||
|         delete daemon_source_report; | ||||
|     if(remote_source_report != nullptr) {  | ||||
|         delete remote_source_report; | ||||
|     } | ||||
|     if(ssb_mod_report != nullptr) {  | ||||
|         delete ssb_mod_report; | ||||
| @ -183,7 +183,7 @@ SWGChannelReport::fromJsonObject(QJsonObject &pJson) { | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&ssb_demod_report, pJson["SSBDemodReport"], "SWGSSBDemodReport", "SWGSSBDemodReport"); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&daemon_source_report, pJson["DaemonSourceReport"], "SWGDaemonSourceReport", "SWGDaemonSourceReport"); | ||||
|     ::SWGSDRangel::setValue(&remote_source_report, pJson["RemoteSourceReport"], "SWGRemoteSourceReport", "SWGRemoteSourceReport"); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&ssb_mod_report, pJson["SSBModReport"], "SWGSSBModReport", "SWGSSBModReport"); | ||||
|      | ||||
| @ -241,8 +241,8 @@ SWGChannelReport::asJsonObject() { | ||||
|     if((ssb_demod_report != nullptr) && (ssb_demod_report->isSet())){ | ||||
|         toJsonValue(QString("SSBDemodReport"), ssb_demod_report, obj, QString("SWGSSBDemodReport")); | ||||
|     } | ||||
|     if((daemon_source_report != nullptr) && (daemon_source_report->isSet())){ | ||||
|         toJsonValue(QString("DaemonSourceReport"), daemon_source_report, obj, QString("SWGDaemonSourceReport")); | ||||
|     if((remote_source_report != nullptr) && (remote_source_report->isSet())){ | ||||
|         toJsonValue(QString("RemoteSourceReport"), remote_source_report, obj, QString("SWGRemoteSourceReport")); | ||||
|     } | ||||
|     if((ssb_mod_report != nullptr) && (ssb_mod_report->isSet())){ | ||||
|         toJsonValue(QString("SSBModReport"), ssb_mod_report, obj, QString("SWGSSBModReport")); | ||||
| @ -363,14 +363,14 @@ SWGChannelReport::setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report) { | ||||
|     this->m_ssb_demod_report_isSet = true; | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceReport* | ||||
| SWGChannelReport::getDaemonSourceReport() { | ||||
|     return daemon_source_report; | ||||
| SWGRemoteSourceReport* | ||||
| SWGChannelReport::getRemoteSourceReport() { | ||||
|     return remote_source_report; | ||||
| } | ||||
| void | ||||
| SWGChannelReport::setDaemonSourceReport(SWGDaemonSourceReport* daemon_source_report) { | ||||
|     this->daemon_source_report = daemon_source_report; | ||||
|     this->m_daemon_source_report_isSet = true; | ||||
| SWGChannelReport::setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report) { | ||||
|     this->remote_source_report = remote_source_report; | ||||
|     this->m_remote_source_report_isSet = true; | ||||
| } | ||||
| 
 | ||||
| SWGSSBModReport* | ||||
| @ -438,7 +438,7 @@ SWGChannelReport::isSet(){ | ||||
|         if(nfm_demod_report != nullptr && nfm_demod_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(nfm_mod_report != nullptr && nfm_mod_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(ssb_demod_report != nullptr && ssb_demod_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(daemon_source_report != nullptr && daemon_source_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(remote_source_report != nullptr && remote_source_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(ssb_mod_report != nullptr && ssb_mod_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(udp_source_report != nullptr && udp_source_report->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(udp_sink_report != nullptr && udp_sink_report->isSet()){ isObjectUpdated = true; break;} | ||||
|  | ||||
| @ -27,9 +27,9 @@ | ||||
| #include "SWGATVModReport.h" | ||||
| #include "SWGBFMDemodReport.h" | ||||
| #include "SWGDSDDemodReport.h" | ||||
| #include "SWGDaemonSourceReport.h" | ||||
| #include "SWGNFMDemodReport.h" | ||||
| #include "SWGNFMModReport.h" | ||||
| #include "SWGRemoteSourceReport.h" | ||||
| #include "SWGSSBDemodReport.h" | ||||
| #include "SWGSSBModReport.h" | ||||
| #include "SWGUDPSinkReport.h" | ||||
| @ -86,8 +86,8 @@ public: | ||||
|     SWGSSBDemodReport* getSsbDemodReport(); | ||||
|     void setSsbDemodReport(SWGSSBDemodReport* ssb_demod_report); | ||||
| 
 | ||||
|     SWGDaemonSourceReport* getDaemonSourceReport(); | ||||
|     void setDaemonSourceReport(SWGDaemonSourceReport* daemon_source_report); | ||||
|     SWGRemoteSourceReport* getRemoteSourceReport(); | ||||
|     void setRemoteSourceReport(SWGRemoteSourceReport* remote_source_report); | ||||
| 
 | ||||
|     SWGSSBModReport* getSsbModReport(); | ||||
|     void setSsbModReport(SWGSSBModReport* ssb_mod_report); | ||||
| @ -138,8 +138,8 @@ private: | ||||
|     SWGSSBDemodReport* ssb_demod_report; | ||||
|     bool m_ssb_demod_report_isSet; | ||||
| 
 | ||||
|     SWGDaemonSourceReport* daemon_source_report; | ||||
|     bool m_daemon_source_report_isSet; | ||||
|     SWGRemoteSourceReport* remote_source_report; | ||||
|     bool m_remote_source_report_isSet; | ||||
| 
 | ||||
|     SWGSSBModReport* ssb_mod_report; | ||||
|     bool m_ssb_mod_report_isSet; | ||||
|  | ||||
| @ -48,8 +48,8 @@ SWGChannelSettings::SWGChannelSettings() { | ||||
|     m_nfm_mod_settings_isSet = false; | ||||
|     remote_sink_settings = nullptr; | ||||
|     m_remote_sink_settings_isSet = false; | ||||
|     daemon_source_settings = nullptr; | ||||
|     m_daemon_source_settings_isSet = false; | ||||
|     remote_source_settings = nullptr; | ||||
|     m_remote_source_settings_isSet = false; | ||||
|     ssb_mod_settings = nullptr; | ||||
|     m_ssb_mod_settings_isSet = false; | ||||
|     ssb_demod_settings = nullptr; | ||||
| @ -90,8 +90,8 @@ SWGChannelSettings::init() { | ||||
|     m_nfm_mod_settings_isSet = false; | ||||
|     remote_sink_settings = new SWGRemoteSinkSettings(); | ||||
|     m_remote_sink_settings_isSet = false; | ||||
|     daemon_source_settings = new SWGDaemonSourceSettings(); | ||||
|     m_daemon_source_settings_isSet = false; | ||||
|     remote_source_settings = new SWGRemoteSourceSettings(); | ||||
|     m_remote_source_settings_isSet = false; | ||||
|     ssb_mod_settings = new SWGSSBModSettings(); | ||||
|     m_ssb_mod_settings_isSet = false; | ||||
|     ssb_demod_settings = new SWGSSBDemodSettings(); | ||||
| @ -136,8 +136,8 @@ SWGChannelSettings::cleanup() { | ||||
|     if(remote_sink_settings != nullptr) {  | ||||
|         delete remote_sink_settings; | ||||
|     } | ||||
|     if(daemon_source_settings != nullptr) {  | ||||
|         delete daemon_source_settings; | ||||
|     if(remote_source_settings != nullptr) {  | ||||
|         delete remote_source_settings; | ||||
|     } | ||||
|     if(ssb_mod_settings != nullptr) {  | ||||
|         delete ssb_mod_settings; | ||||
| @ -190,7 +190,7 @@ SWGChannelSettings::fromJsonObject(QJsonObject &pJson) { | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&remote_sink_settings, pJson["RemoteSinkSettings"], "SWGRemoteSinkSettings", "SWGRemoteSinkSettings"); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&daemon_source_settings, pJson["DaemonSourceSettings"], "SWGDaemonSourceSettings", "SWGDaemonSourceSettings"); | ||||
|     ::SWGSDRangel::setValue(&remote_source_settings, pJson["RemoteSourceSettings"], "SWGRemoteSourceSettings", "SWGRemoteSourceSettings"); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&ssb_mod_settings, pJson["SSBModSettings"], "SWGSSBModSettings", "SWGSSBModSettings"); | ||||
|      | ||||
| @ -250,8 +250,8 @@ SWGChannelSettings::asJsonObject() { | ||||
|     if((remote_sink_settings != nullptr) && (remote_sink_settings->isSet())){ | ||||
|         toJsonValue(QString("RemoteSinkSettings"), remote_sink_settings, obj, QString("SWGRemoteSinkSettings")); | ||||
|     } | ||||
|     if((daemon_source_settings != nullptr) && (daemon_source_settings->isSet())){ | ||||
|         toJsonValue(QString("DaemonSourceSettings"), daemon_source_settings, obj, QString("SWGDaemonSourceSettings")); | ||||
|     if((remote_source_settings != nullptr) && (remote_source_settings->isSet())){ | ||||
|         toJsonValue(QString("RemoteSourceSettings"), remote_source_settings, obj, QString("SWGRemoteSourceSettings")); | ||||
|     } | ||||
|     if((ssb_mod_settings != nullptr) && (ssb_mod_settings->isSet())){ | ||||
|         toJsonValue(QString("SSBModSettings"), ssb_mod_settings, obj, QString("SWGSSBModSettings")); | ||||
| @ -375,14 +375,14 @@ SWGChannelSettings::setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_set | ||||
|     this->m_remote_sink_settings_isSet = true; | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceSettings* | ||||
| SWGChannelSettings::getDaemonSourceSettings() { | ||||
|     return daemon_source_settings; | ||||
| SWGRemoteSourceSettings* | ||||
| SWGChannelSettings::getRemoteSourceSettings() { | ||||
|     return remote_source_settings; | ||||
| } | ||||
| void | ||||
| SWGChannelSettings::setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings) { | ||||
|     this->daemon_source_settings = daemon_source_settings; | ||||
|     this->m_daemon_source_settings_isSet = true; | ||||
| SWGChannelSettings::setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings) { | ||||
|     this->remote_source_settings = remote_source_settings; | ||||
|     this->m_remote_source_settings_isSet = true; | ||||
| } | ||||
| 
 | ||||
| SWGSSBModSettings* | ||||
| @ -460,7 +460,7 @@ SWGChannelSettings::isSet(){ | ||||
|         if(nfm_demod_settings != nullptr && nfm_demod_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(nfm_mod_settings != nullptr && nfm_mod_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(remote_sink_settings != nullptr && remote_sink_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(daemon_source_settings != nullptr && daemon_source_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(remote_source_settings != nullptr && remote_source_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(ssb_mod_settings != nullptr && ssb_mod_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(ssb_demod_settings != nullptr && ssb_demod_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|         if(udp_source_settings != nullptr && udp_source_settings->isSet()){ isObjectUpdated = true; break;} | ||||
|  | ||||
| @ -27,10 +27,10 @@ | ||||
| #include "SWGATVModSettings.h" | ||||
| #include "SWGBFMDemodSettings.h" | ||||
| #include "SWGDSDDemodSettings.h" | ||||
| #include "SWGDaemonSourceSettings.h" | ||||
| #include "SWGNFMDemodSettings.h" | ||||
| #include "SWGNFMModSettings.h" | ||||
| #include "SWGRemoteSinkSettings.h" | ||||
| #include "SWGRemoteSourceSettings.h" | ||||
| #include "SWGSSBDemodSettings.h" | ||||
| #include "SWGSSBModSettings.h" | ||||
| #include "SWGUDPSinkSettings.h" | ||||
| @ -87,8 +87,8 @@ public: | ||||
|     SWGRemoteSinkSettings* getRemoteSinkSettings(); | ||||
|     void setRemoteSinkSettings(SWGRemoteSinkSettings* remote_sink_settings); | ||||
| 
 | ||||
|     SWGDaemonSourceSettings* getDaemonSourceSettings(); | ||||
|     void setDaemonSourceSettings(SWGDaemonSourceSettings* daemon_source_settings); | ||||
|     SWGRemoteSourceSettings* getRemoteSourceSettings(); | ||||
|     void setRemoteSourceSettings(SWGRemoteSourceSettings* remote_source_settings); | ||||
| 
 | ||||
|     SWGSSBModSettings* getSsbModSettings(); | ||||
|     void setSsbModSettings(SWGSSBModSettings* ssb_mod_settings); | ||||
| @ -142,8 +142,8 @@ private: | ||||
|     SWGRemoteSinkSettings* remote_sink_settings; | ||||
|     bool m_remote_sink_settings_isSet; | ||||
| 
 | ||||
|     SWGDaemonSourceSettings* daemon_source_settings; | ||||
|     bool m_daemon_source_settings_isSet; | ||||
|     SWGRemoteSourceSettings* remote_source_settings; | ||||
|     bool m_remote_source_settings_isSet; | ||||
| 
 | ||||
|     SWGSSBModSettings* ssb_mod_settings; | ||||
|     bool m_ssb_mod_settings_isSet; | ||||
|  | ||||
| @ -49,8 +49,6 @@ | ||||
| #include "SWGDSDDemodSettings.h" | ||||
| #include "SWGDVSeralDevices.h" | ||||
| #include "SWGDVSerialDevice.h" | ||||
| #include "SWGDaemonSourceReport.h" | ||||
| #include "SWGDaemonSourceSettings.h" | ||||
| #include "SWGDeviceListItem.h" | ||||
| #include "SWGDeviceReport.h" | ||||
| #include "SWGDeviceSet.h" | ||||
| @ -100,6 +98,8 @@ | ||||
| #include "SWGRange.h" | ||||
| #include "SWGRangeFloat.h" | ||||
| #include "SWGRemoteSinkSettings.h" | ||||
| #include "SWGRemoteSourceReport.h" | ||||
| #include "SWGRemoteSourceSettings.h" | ||||
| #include "SWGRtlSdrReport.h" | ||||
| #include "SWGRtlSdrSettings.h" | ||||
| #include "SWGSDRPlayReport.h" | ||||
| @ -242,12 +242,6 @@ namespace SWGSDRangel { | ||||
|     if(QString("SWGDVSerialDevice").compare(type) == 0) { | ||||
|       return new SWGDVSerialDevice(); | ||||
|     } | ||||
|     if(QString("SWGDaemonSourceReport").compare(type) == 0) { | ||||
|       return new SWGDaemonSourceReport(); | ||||
|     } | ||||
|     if(QString("SWGDaemonSourceSettings").compare(type) == 0) { | ||||
|       return new SWGDaemonSourceSettings(); | ||||
|     } | ||||
|     if(QString("SWGDeviceListItem").compare(type) == 0) { | ||||
|       return new SWGDeviceListItem(); | ||||
|     } | ||||
| @ -395,6 +389,12 @@ namespace SWGSDRangel { | ||||
|     if(QString("SWGRemoteSinkSettings").compare(type) == 0) { | ||||
|       return new SWGRemoteSinkSettings(); | ||||
|     } | ||||
|     if(QString("SWGRemoteSourceReport").compare(type) == 0) { | ||||
|       return new SWGRemoteSourceReport(); | ||||
|     } | ||||
|     if(QString("SWGRemoteSourceSettings").compare(type) == 0) { | ||||
|       return new SWGRemoteSourceSettings(); | ||||
|     } | ||||
|     if(QString("SWGRtlSdrReport").compare(type) == 0) { | ||||
|       return new SWGRtlSdrReport(); | ||||
|     } | ||||
|  | ||||
| @ -11,7 +11,7 @@ | ||||
|  */ | ||||
| 
 | ||||
| 
 | ||||
| #include "SWGDaemonSourceReport.h" | ||||
| #include "SWGRemoteSourceReport.h" | ||||
| 
 | ||||
| #include "SWGHelpers.h" | ||||
| 
 | ||||
| @ -22,12 +22,12 @@ | ||||
| 
 | ||||
| namespace SWGSDRangel { | ||||
| 
 | ||||
| SWGDaemonSourceReport::SWGDaemonSourceReport(QString* json) { | ||||
| SWGRemoteSourceReport::SWGRemoteSourceReport(QString* json) { | ||||
|     init(); | ||||
|     this->fromJson(*json); | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceReport::SWGDaemonSourceReport() { | ||||
| SWGRemoteSourceReport::SWGRemoteSourceReport() { | ||||
|     queue_length = 0; | ||||
|     m_queue_length_isSet = false; | ||||
|     queue_size = 0; | ||||
| @ -56,12 +56,12 @@ SWGDaemonSourceReport::SWGDaemonSourceReport() { | ||||
|     m_device_sample_rate_isSet = false; | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceReport::~SWGDaemonSourceReport() { | ||||
| SWGRemoteSourceReport::~SWGRemoteSourceReport() { | ||||
|     this->cleanup(); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| SWGDaemonSourceReport::init() { | ||||
| SWGRemoteSourceReport::init() { | ||||
|     queue_length = 0; | ||||
|     m_queue_length_isSet = false; | ||||
|     queue_size = 0; | ||||
| @ -91,7 +91,7 @@ SWGDaemonSourceReport::init() { | ||||
| } | ||||
| 
 | ||||
| void | ||||
| SWGDaemonSourceReport::cleanup() { | ||||
| SWGRemoteSourceReport::cleanup() { | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| @ -107,8 +107,8 @@ SWGDaemonSourceReport::cleanup() { | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceReport* | ||||
| SWGDaemonSourceReport::fromJson(QString &json) { | ||||
| SWGRemoteSourceReport* | ||||
| SWGRemoteSourceReport::fromJson(QString &json) { | ||||
|     QByteArray array (json.toStdString().c_str()); | ||||
|     QJsonDocument doc = QJsonDocument::fromJson(array); | ||||
|     QJsonObject jsonObject = doc.object(); | ||||
| @ -117,7 +117,7 @@ SWGDaemonSourceReport::fromJson(QString &json) { | ||||
| } | ||||
| 
 | ||||
| void | ||||
| SWGDaemonSourceReport::fromJsonObject(QJsonObject &pJson) { | ||||
| SWGRemoteSourceReport::fromJsonObject(QJsonObject &pJson) { | ||||
|     ::SWGSDRangel::setValue(&queue_length, pJson["queueLength"], "qint32", ""); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&queue_size, pJson["queueSize"], "qint32", ""); | ||||
| @ -147,7 +147,7 @@ SWGDaemonSourceReport::fromJsonObject(QJsonObject &pJson) { | ||||
| } | ||||
| 
 | ||||
| QString | ||||
| SWGDaemonSourceReport::asJson () | ||||
| SWGRemoteSourceReport::asJson () | ||||
| { | ||||
|     QJsonObject* obj = this->asJsonObject(); | ||||
| 
 | ||||
| @ -158,7 +158,7 @@ SWGDaemonSourceReport::asJson () | ||||
| } | ||||
| 
 | ||||
| QJsonObject* | ||||
| SWGDaemonSourceReport::asJsonObject() { | ||||
| SWGRemoteSourceReport::asJsonObject() { | ||||
|     QJsonObject* obj = new QJsonObject(); | ||||
|     if(m_queue_length_isSet){ | ||||
|         obj->insert("queueLength", QJsonValue(queue_length)); | ||||
| @ -204,138 +204,138 @@ SWGDaemonSourceReport::asJsonObject() { | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getQueueLength() { | ||||
| SWGRemoteSourceReport::getQueueLength() { | ||||
|     return queue_length; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setQueueLength(qint32 queue_length) { | ||||
| SWGRemoteSourceReport::setQueueLength(qint32 queue_length) { | ||||
|     this->queue_length = queue_length; | ||||
|     this->m_queue_length_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getQueueSize() { | ||||
| SWGRemoteSourceReport::getQueueSize() { | ||||
|     return queue_size; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setQueueSize(qint32 queue_size) { | ||||
| SWGRemoteSourceReport::setQueueSize(qint32 queue_size) { | ||||
|     this->queue_size = queue_size; | ||||
|     this->m_queue_size_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getSamplesCount() { | ||||
| SWGRemoteSourceReport::getSamplesCount() { | ||||
|     return samples_count; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setSamplesCount(qint32 samples_count) { | ||||
| SWGRemoteSourceReport::setSamplesCount(qint32 samples_count) { | ||||
|     this->samples_count = samples_count; | ||||
|     this->m_samples_count_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getCorrectableErrorsCount() { | ||||
| SWGRemoteSourceReport::getCorrectableErrorsCount() { | ||||
|     return correctable_errors_count; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setCorrectableErrorsCount(qint32 correctable_errors_count) { | ||||
| SWGRemoteSourceReport::setCorrectableErrorsCount(qint32 correctable_errors_count) { | ||||
|     this->correctable_errors_count = correctable_errors_count; | ||||
|     this->m_correctable_errors_count_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getUncorrectableErrorsCount() { | ||||
| SWGRemoteSourceReport::getUncorrectableErrorsCount() { | ||||
|     return uncorrectable_errors_count; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setUncorrectableErrorsCount(qint32 uncorrectable_errors_count) { | ||||
| SWGRemoteSourceReport::setUncorrectableErrorsCount(qint32 uncorrectable_errors_count) { | ||||
|     this->uncorrectable_errors_count = uncorrectable_errors_count; | ||||
|     this->m_uncorrectable_errors_count_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getTvSec() { | ||||
| SWGRemoteSourceReport::getTvSec() { | ||||
|     return tv_sec; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setTvSec(qint32 tv_sec) { | ||||
| SWGRemoteSourceReport::setTvSec(qint32 tv_sec) { | ||||
|     this->tv_sec = tv_sec; | ||||
|     this->m_tv_sec_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getTvUSec() { | ||||
| SWGRemoteSourceReport::getTvUSec() { | ||||
|     return tv_u_sec; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setTvUSec(qint32 tv_u_sec) { | ||||
| SWGRemoteSourceReport::setTvUSec(qint32 tv_u_sec) { | ||||
|     this->tv_u_sec = tv_u_sec; | ||||
|     this->m_tv_u_sec_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getNbOriginalBlocks() { | ||||
| SWGRemoteSourceReport::getNbOriginalBlocks() { | ||||
|     return nb_original_blocks; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setNbOriginalBlocks(qint32 nb_original_blocks) { | ||||
| SWGRemoteSourceReport::setNbOriginalBlocks(qint32 nb_original_blocks) { | ||||
|     this->nb_original_blocks = nb_original_blocks; | ||||
|     this->m_nb_original_blocks_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getNbFecBlocks() { | ||||
| SWGRemoteSourceReport::getNbFecBlocks() { | ||||
|     return nb_fec_blocks; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setNbFecBlocks(qint32 nb_fec_blocks) { | ||||
| SWGRemoteSourceReport::setNbFecBlocks(qint32 nb_fec_blocks) { | ||||
|     this->nb_fec_blocks = nb_fec_blocks; | ||||
|     this->m_nb_fec_blocks_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getCenterFreq() { | ||||
| SWGRemoteSourceReport::getCenterFreq() { | ||||
|     return center_freq; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setCenterFreq(qint32 center_freq) { | ||||
| SWGRemoteSourceReport::setCenterFreq(qint32 center_freq) { | ||||
|     this->center_freq = center_freq; | ||||
|     this->m_center_freq_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getSampleRate() { | ||||
| SWGRemoteSourceReport::getSampleRate() { | ||||
|     return sample_rate; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setSampleRate(qint32 sample_rate) { | ||||
| SWGRemoteSourceReport::setSampleRate(qint32 sample_rate) { | ||||
|     this->sample_rate = sample_rate; | ||||
|     this->m_sample_rate_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getDeviceCenterFreq() { | ||||
| SWGRemoteSourceReport::getDeviceCenterFreq() { | ||||
|     return device_center_freq; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setDeviceCenterFreq(qint32 device_center_freq) { | ||||
| SWGRemoteSourceReport::setDeviceCenterFreq(qint32 device_center_freq) { | ||||
|     this->device_center_freq = device_center_freq; | ||||
|     this->m_device_center_freq_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceReport::getDeviceSampleRate() { | ||||
| SWGRemoteSourceReport::getDeviceSampleRate() { | ||||
|     return device_sample_rate; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceReport::setDeviceSampleRate(qint32 device_sample_rate) { | ||||
| SWGRemoteSourceReport::setDeviceSampleRate(qint32 device_sample_rate) { | ||||
|     this->device_sample_rate = device_sample_rate; | ||||
|     this->m_device_sample_rate_isSet = true; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| bool | ||||
| SWGDaemonSourceReport::isSet(){ | ||||
| SWGRemoteSourceReport::isSet(){ | ||||
|     bool isObjectUpdated = false; | ||||
|     do{ | ||||
|         if(m_queue_length_isSet){ isObjectUpdated = true; break;} | ||||
| @ -11,13 +11,13 @@ | ||||
|  */ | ||||
| 
 | ||||
| /*
 | ||||
|  * SWGDaemonSourceReport.h | ||||
|  * SWGRemoteSourceReport.h | ||||
|  * | ||||
|  * Daemon channel source report | ||||
|  * Remote channel source report | ||||
|  */ | ||||
| 
 | ||||
| #ifndef SWGDaemonSourceReport_H_ | ||||
| #define SWGDaemonSourceReport_H_ | ||||
| #ifndef SWGRemoteSourceReport_H_ | ||||
| #define SWGRemoteSourceReport_H_ | ||||
| 
 | ||||
| #include <QJsonObject> | ||||
| 
 | ||||
| @ -28,18 +28,18 @@ | ||||
| 
 | ||||
| namespace SWGSDRangel { | ||||
| 
 | ||||
| class SWG_API SWGDaemonSourceReport: public SWGObject { | ||||
| class SWG_API SWGRemoteSourceReport: public SWGObject { | ||||
| public: | ||||
|     SWGDaemonSourceReport(); | ||||
|     SWGDaemonSourceReport(QString* json); | ||||
|     virtual ~SWGDaemonSourceReport(); | ||||
|     SWGRemoteSourceReport(); | ||||
|     SWGRemoteSourceReport(QString* json); | ||||
|     virtual ~SWGRemoteSourceReport(); | ||||
|     void init(); | ||||
|     void cleanup(); | ||||
| 
 | ||||
|     virtual QString asJson () override; | ||||
|     virtual QJsonObject* asJsonObject() override; | ||||
|     virtual void fromJsonObject(QJsonObject &json) override; | ||||
|     virtual SWGDaemonSourceReport* fromJson(QString &jsonString) override; | ||||
|     virtual SWGRemoteSourceReport* fromJson(QString &jsonString) override; | ||||
| 
 | ||||
|     qint32 getQueueLength(); | ||||
|     void setQueueLength(qint32 queue_length); | ||||
| @ -127,4 +127,4 @@ private: | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif /* SWGDaemonSourceReport_H_ */ | ||||
| #endif /* SWGRemoteSourceReport_H_ */ | ||||
| @ -11,7 +11,7 @@ | ||||
|  */ | ||||
| 
 | ||||
| 
 | ||||
| #include "SWGDaemonSourceSettings.h" | ||||
| #include "SWGRemoteSourceSettings.h" | ||||
| 
 | ||||
| #include "SWGHelpers.h" | ||||
| 
 | ||||
| @ -22,12 +22,12 @@ | ||||
| 
 | ||||
| namespace SWGSDRangel { | ||||
| 
 | ||||
| SWGDaemonSourceSettings::SWGDaemonSourceSettings(QString* json) { | ||||
| SWGRemoteSourceSettings::SWGRemoteSourceSettings(QString* json) { | ||||
|     init(); | ||||
|     this->fromJson(*json); | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceSettings::SWGDaemonSourceSettings() { | ||||
| SWGRemoteSourceSettings::SWGRemoteSourceSettings() { | ||||
|     data_address = nullptr; | ||||
|     m_data_address_isSet = false; | ||||
|     data_port = 0; | ||||
| @ -48,12 +48,12 @@ SWGDaemonSourceSettings::SWGDaemonSourceSettings() { | ||||
|     m_reverse_api_channel_index_isSet = false; | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceSettings::~SWGDaemonSourceSettings() { | ||||
| SWGRemoteSourceSettings::~SWGRemoteSourceSettings() { | ||||
|     this->cleanup(); | ||||
| } | ||||
| 
 | ||||
| void | ||||
| SWGDaemonSourceSettings::init() { | ||||
| SWGRemoteSourceSettings::init() { | ||||
|     data_address = new QString(""); | ||||
|     m_data_address_isSet = false; | ||||
|     data_port = 0; | ||||
| @ -75,7 +75,7 @@ SWGDaemonSourceSettings::init() { | ||||
| } | ||||
| 
 | ||||
| void | ||||
| SWGDaemonSourceSettings::cleanup() { | ||||
| SWGRemoteSourceSettings::cleanup() { | ||||
|     if(data_address != nullptr) {  | ||||
|         delete data_address; | ||||
|     } | ||||
| @ -93,8 +93,8 @@ SWGDaemonSourceSettings::cleanup() { | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| SWGDaemonSourceSettings* | ||||
| SWGDaemonSourceSettings::fromJson(QString &json) { | ||||
| SWGRemoteSourceSettings* | ||||
| SWGRemoteSourceSettings::fromJson(QString &json) { | ||||
|     QByteArray array (json.toStdString().c_str()); | ||||
|     QJsonDocument doc = QJsonDocument::fromJson(array); | ||||
|     QJsonObject jsonObject = doc.object(); | ||||
| @ -103,7 +103,7 @@ SWGDaemonSourceSettings::fromJson(QString &json) { | ||||
| } | ||||
| 
 | ||||
| void | ||||
| SWGDaemonSourceSettings::fromJsonObject(QJsonObject &pJson) { | ||||
| SWGRemoteSourceSettings::fromJsonObject(QJsonObject &pJson) { | ||||
|     ::SWGSDRangel::setValue(&data_address, pJson["dataAddress"], "QString", "QString"); | ||||
|      | ||||
|     ::SWGSDRangel::setValue(&data_port, pJson["dataPort"], "qint32", ""); | ||||
| @ -125,7 +125,7 @@ SWGDaemonSourceSettings::fromJsonObject(QJsonObject &pJson) { | ||||
| } | ||||
| 
 | ||||
| QString | ||||
| SWGDaemonSourceSettings::asJson () | ||||
| SWGRemoteSourceSettings::asJson () | ||||
| { | ||||
|     QJsonObject* obj = this->asJsonObject(); | ||||
| 
 | ||||
| @ -136,7 +136,7 @@ SWGDaemonSourceSettings::asJson () | ||||
| } | ||||
| 
 | ||||
| QJsonObject* | ||||
| SWGDaemonSourceSettings::asJsonObject() { | ||||
| SWGRemoteSourceSettings::asJsonObject() { | ||||
|     QJsonObject* obj = new QJsonObject(); | ||||
|     if(data_address != nullptr && *data_address != QString("")){ | ||||
|         toJsonValue(QString("dataAddress"), data_address, obj, QString("QString")); | ||||
| @ -170,98 +170,98 @@ SWGDaemonSourceSettings::asJsonObject() { | ||||
| } | ||||
| 
 | ||||
| QString* | ||||
| SWGDaemonSourceSettings::getDataAddress() { | ||||
| SWGRemoteSourceSettings::getDataAddress() { | ||||
|     return data_address; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setDataAddress(QString* data_address) { | ||||
| SWGRemoteSourceSettings::setDataAddress(QString* data_address) { | ||||
|     this->data_address = data_address; | ||||
|     this->m_data_address_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceSettings::getDataPort() { | ||||
| SWGRemoteSourceSettings::getDataPort() { | ||||
|     return data_port; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setDataPort(qint32 data_port) { | ||||
| SWGRemoteSourceSettings::setDataPort(qint32 data_port) { | ||||
|     this->data_port = data_port; | ||||
|     this->m_data_port_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceSettings::getRgbColor() { | ||||
| SWGRemoteSourceSettings::getRgbColor() { | ||||
|     return rgb_color; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setRgbColor(qint32 rgb_color) { | ||||
| SWGRemoteSourceSettings::setRgbColor(qint32 rgb_color) { | ||||
|     this->rgb_color = rgb_color; | ||||
|     this->m_rgb_color_isSet = true; | ||||
| } | ||||
| 
 | ||||
| QString* | ||||
| SWGDaemonSourceSettings::getTitle() { | ||||
| SWGRemoteSourceSettings::getTitle() { | ||||
|     return title; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setTitle(QString* title) { | ||||
| SWGRemoteSourceSettings::setTitle(QString* title) { | ||||
|     this->title = title; | ||||
|     this->m_title_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceSettings::getUseReverseApi() { | ||||
| SWGRemoteSourceSettings::getUseReverseApi() { | ||||
|     return use_reverse_api; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setUseReverseApi(qint32 use_reverse_api) { | ||||
| SWGRemoteSourceSettings::setUseReverseApi(qint32 use_reverse_api) { | ||||
|     this->use_reverse_api = use_reverse_api; | ||||
|     this->m_use_reverse_api_isSet = true; | ||||
| } | ||||
| 
 | ||||
| QString* | ||||
| SWGDaemonSourceSettings::getReverseApiAddress() { | ||||
| SWGRemoteSourceSettings::getReverseApiAddress() { | ||||
|     return reverse_api_address; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setReverseApiAddress(QString* reverse_api_address) { | ||||
| SWGRemoteSourceSettings::setReverseApiAddress(QString* reverse_api_address) { | ||||
|     this->reverse_api_address = reverse_api_address; | ||||
|     this->m_reverse_api_address_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceSettings::getReverseApiPort() { | ||||
| SWGRemoteSourceSettings::getReverseApiPort() { | ||||
|     return reverse_api_port; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setReverseApiPort(qint32 reverse_api_port) { | ||||
| SWGRemoteSourceSettings::setReverseApiPort(qint32 reverse_api_port) { | ||||
|     this->reverse_api_port = reverse_api_port; | ||||
|     this->m_reverse_api_port_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceSettings::getReverseApiDeviceIndex() { | ||||
| SWGRemoteSourceSettings::getReverseApiDeviceIndex() { | ||||
|     return reverse_api_device_index; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) { | ||||
| SWGRemoteSourceSettings::setReverseApiDeviceIndex(qint32 reverse_api_device_index) { | ||||
|     this->reverse_api_device_index = reverse_api_device_index; | ||||
|     this->m_reverse_api_device_index_isSet = true; | ||||
| } | ||||
| 
 | ||||
| qint32 | ||||
| SWGDaemonSourceSettings::getReverseApiChannelIndex() { | ||||
| SWGRemoteSourceSettings::getReverseApiChannelIndex() { | ||||
|     return reverse_api_channel_index; | ||||
| } | ||||
| void | ||||
| SWGDaemonSourceSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) { | ||||
| SWGRemoteSourceSettings::setReverseApiChannelIndex(qint32 reverse_api_channel_index) { | ||||
|     this->reverse_api_channel_index = reverse_api_channel_index; | ||||
|     this->m_reverse_api_channel_index_isSet = true; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| bool | ||||
| SWGDaemonSourceSettings::isSet(){ | ||||
| SWGRemoteSourceSettings::isSet(){ | ||||
|     bool isObjectUpdated = false; | ||||
|     do{ | ||||
|         if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;} | ||||
| @ -11,13 +11,13 @@ | ||||
|  */ | ||||
| 
 | ||||
| /*
 | ||||
|  * SWGDaemonSourceSettings.h | ||||
|  * SWGRemoteSourceSettings.h | ||||
|  * | ||||
|  * Daemon channel source settings | ||||
|  * Remote channel source settings | ||||
|  */ | ||||
| 
 | ||||
| #ifndef SWGDaemonSourceSettings_H_ | ||||
| #define SWGDaemonSourceSettings_H_ | ||||
| #ifndef SWGRemoteSourceSettings_H_ | ||||
| #define SWGRemoteSourceSettings_H_ | ||||
| 
 | ||||
| #include <QJsonObject> | ||||
| 
 | ||||
| @ -29,18 +29,18 @@ | ||||
| 
 | ||||
| namespace SWGSDRangel { | ||||
| 
 | ||||
| class SWG_API SWGDaemonSourceSettings: public SWGObject { | ||||
| class SWG_API SWGRemoteSourceSettings: public SWGObject { | ||||
| public: | ||||
|     SWGDaemonSourceSettings(); | ||||
|     SWGDaemonSourceSettings(QString* json); | ||||
|     virtual ~SWGDaemonSourceSettings(); | ||||
|     SWGRemoteSourceSettings(); | ||||
|     SWGRemoteSourceSettings(QString* json); | ||||
|     virtual ~SWGRemoteSourceSettings(); | ||||
|     void init(); | ||||
|     void cleanup(); | ||||
| 
 | ||||
|     virtual QString asJson () override; | ||||
|     virtual QJsonObject* asJsonObject() override; | ||||
|     virtual void fromJsonObject(QJsonObject &json) override; | ||||
|     virtual SWGDaemonSourceSettings* fromJson(QString &jsonString) override; | ||||
|     virtual SWGRemoteSourceSettings* fromJson(QString &jsonString) override; | ||||
| 
 | ||||
|     QString* getDataAddress(); | ||||
|     void setDataAddress(QString* data_address); | ||||
| @ -104,4 +104,4 @@ private: | ||||
| 
 | ||||
| } | ||||
| 
 | ||||
| #endif /* SWGDaemonSourceSettings_H_ */ | ||||
| #endif /* SWGRemoteSourceSettings_H_ */ | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user