mirror of
https://github.com/f4exb/sdrangel.git
synced 2025-02-03 09:44:01 -05:00
DaemonSink: added server plugin
This commit is contained in:
parent
4518984ddb
commit
6e750b206f
@ -7,6 +7,11 @@ if((LIBDSDCC_FOUND AND LIBMBE_FOUND) OR BUILD_DEBIAN)
|
||||
add_subdirectory(demoddsd)
|
||||
endif()
|
||||
|
||||
find_package(CM256cc)
|
||||
if(CM256CC_FOUND)
|
||||
add_subdirectory(daemonsink)
|
||||
endif(CM256CC_FOUND)
|
||||
|
||||
add_subdirectory(demodnfm)
|
||||
add_subdirectory(demodssb)
|
||||
add_subdirectory(demodwfm)
|
||||
|
48
pluginssrv/channelrx/daemonsink/CMakeLists.txt
Normal file
48
pluginssrv/channelrx/daemonsink/CMakeLists.txt
Normal file
@ -0,0 +1,48 @@
|
||||
project(daemonsink)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
set(PLUGIN_PREFIX "../../../plugins/channelrx/daemonsink")
|
||||
|
||||
set(daemonsink_SOURCES
|
||||
${PLUGIN_PREFIX}/daemonsink.cpp
|
||||
${PLUGIN_PREFIX}/daemonsinksettings.cpp
|
||||
${PLUGIN_PREFIX}/daemonsinkthread.cpp
|
||||
${PLUGIN_PREFIX}/daemonsinkplugin.cpp
|
||||
)
|
||||
|
||||
set(daemonsink_HEADERS
|
||||
${PLUGIN_PREFIX}/daemonsink.h
|
||||
${PLUGIN_PREFIX}/daemonsinksettings.h
|
||||
${PLUGIN_PREFIX}/daemonsinkthread.h
|
||||
${PLUGIN_PREFIX}/daemonsinkplugin.h
|
||||
)
|
||||
|
||||
include_directories(
|
||||
.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}/sdrdaemon
|
||||
${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(daemonsinksrv SHARED
|
||||
${daemonsink_SOURCES}
|
||||
${daemonsink_HEADERS_MOC}
|
||||
)
|
||||
|
||||
target_link_libraries(daemonsinksrv
|
||||
${QT_LIBRARIES}
|
||||
${CM256CC_LIBRARIES}
|
||||
sdrbase
|
||||
sdrdaemon
|
||||
swagger
|
||||
)
|
||||
|
||||
target_link_libraries(daemonsinksrv Qt5::Core)
|
||||
|
||||
install(TARGETS daemonsinksrv DESTINATION lib/pluginssrv/channelrx)
|
@ -1693,6 +1693,12 @@ margin-bottom: 20px;
|
||||
"txDelay" : {
|
||||
"type" : "integer",
|
||||
"description" : "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"description" : "Daemon channel sink settings"
|
||||
@ -28724,7 +28730,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-09-06T20:10:22.329+02:00
|
||||
Generated 2018-09-08T18:41:07.952+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -13,3 +13,7 @@ DaemonSinkSettings:
|
||||
txDelay:
|
||||
description: "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
type: integer
|
||||
rgbColor:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
|
@ -13,3 +13,7 @@ DaemonSinkSettings:
|
||||
txDelay:
|
||||
description: "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
type: integer
|
||||
rgbColor:
|
||||
type: integer
|
||||
title:
|
||||
type: string
|
||||
|
@ -1693,6 +1693,12 @@ margin-bottom: 20px;
|
||||
"txDelay" : {
|
||||
"type" : "integer",
|
||||
"description" : "Minimum delay in ms between consecutive USB blocks transmissions"
|
||||
},
|
||||
"rgbColor" : {
|
||||
"type" : "integer"
|
||||
},
|
||||
"title" : {
|
||||
"type" : "string"
|
||||
}
|
||||
},
|
||||
"description" : "Daemon channel sink settings"
|
||||
@ -28724,7 +28730,7 @@ except ApiException as e:
|
||||
</div>
|
||||
<div id="generator">
|
||||
<div class="content">
|
||||
Generated 2018-09-06T20:10:22.329+02:00
|
||||
Generated 2018-09-08T18:41:07.952+02:00
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -36,6 +36,10 @@ SWGDaemonSinkSettings::SWGDaemonSinkSettings() {
|
||||
m_data_port_isSet = false;
|
||||
tx_delay = 0;
|
||||
m_tx_delay_isSet = false;
|
||||
rgb_color = 0;
|
||||
m_rgb_color_isSet = false;
|
||||
title = nullptr;
|
||||
m_title_isSet = false;
|
||||
}
|
||||
|
||||
SWGDaemonSinkSettings::~SWGDaemonSinkSettings() {
|
||||
@ -52,6 +56,10 @@ SWGDaemonSinkSettings::init() {
|
||||
m_data_port_isSet = false;
|
||||
tx_delay = 0;
|
||||
m_tx_delay_isSet = false;
|
||||
rgb_color = 0;
|
||||
m_rgb_color_isSet = false;
|
||||
title = new QString("");
|
||||
m_title_isSet = false;
|
||||
}
|
||||
|
||||
void
|
||||
@ -62,6 +70,10 @@ SWGDaemonSinkSettings::cleanup() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
if(title != nullptr) {
|
||||
delete title;
|
||||
}
|
||||
}
|
||||
|
||||
SWGDaemonSinkSettings*
|
||||
@ -83,6 +95,10 @@ SWGDaemonSinkSettings::fromJsonObject(QJsonObject &pJson) {
|
||||
|
||||
::SWGSDRangel::setValue(&tx_delay, pJson["txDelay"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&rgb_color, pJson["rgbColor"], "qint32", "");
|
||||
|
||||
::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString");
|
||||
|
||||
}
|
||||
|
||||
QString
|
||||
@ -111,6 +127,12 @@ SWGDaemonSinkSettings::asJsonObject() {
|
||||
if(m_tx_delay_isSet){
|
||||
obj->insert("txDelay", QJsonValue(tx_delay));
|
||||
}
|
||||
if(m_rgb_color_isSet){
|
||||
obj->insert("rgbColor", QJsonValue(rgb_color));
|
||||
}
|
||||
if(title != nullptr && *title != QString("")){
|
||||
toJsonValue(QString("title"), title, obj, QString("QString"));
|
||||
}
|
||||
|
||||
return obj;
|
||||
}
|
||||
@ -155,6 +177,26 @@ SWGDaemonSinkSettings::setTxDelay(qint32 tx_delay) {
|
||||
this->m_tx_delay_isSet = true;
|
||||
}
|
||||
|
||||
qint32
|
||||
SWGDaemonSinkSettings::getRgbColor() {
|
||||
return rgb_color;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setRgbColor(qint32 rgb_color) {
|
||||
this->rgb_color = rgb_color;
|
||||
this->m_rgb_color_isSet = true;
|
||||
}
|
||||
|
||||
QString*
|
||||
SWGDaemonSinkSettings::getTitle() {
|
||||
return title;
|
||||
}
|
||||
void
|
||||
SWGDaemonSinkSettings::setTitle(QString* title) {
|
||||
this->title = title;
|
||||
this->m_title_isSet = true;
|
||||
}
|
||||
|
||||
|
||||
bool
|
||||
SWGDaemonSinkSettings::isSet(){
|
||||
@ -164,6 +206,8 @@ SWGDaemonSinkSettings::isSet(){
|
||||
if(data_address != nullptr && *data_address != QString("")){ isObjectUpdated = true; break;}
|
||||
if(m_data_port_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_tx_delay_isSet){ isObjectUpdated = true; break;}
|
||||
if(m_rgb_color_isSet){ isObjectUpdated = true; break;}
|
||||
if(title != nullptr && *title != QString("")){ isObjectUpdated = true; break;}
|
||||
}while(false);
|
||||
return isObjectUpdated;
|
||||
}
|
||||
|
@ -54,6 +54,12 @@ public:
|
||||
qint32 getTxDelay();
|
||||
void setTxDelay(qint32 tx_delay);
|
||||
|
||||
qint32 getRgbColor();
|
||||
void setRgbColor(qint32 rgb_color);
|
||||
|
||||
QString* getTitle();
|
||||
void setTitle(QString* title);
|
||||
|
||||
|
||||
virtual bool isSet() override;
|
||||
|
||||
@ -70,6 +76,12 @@ private:
|
||||
qint32 tx_delay;
|
||||
bool m_tx_delay_isSet;
|
||||
|
||||
qint32 rgb_color;
|
||||
bool m_rgb_color_isSet;
|
||||
|
||||
QString* title;
|
||||
bool m_title_isSet;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user