diff --git a/sdrbase/resources/webapi/doc/html2/index.html b/sdrbase/resources/webapi/doc/html2/index.html index e059944f5..40d126c29 100644 --- a/sdrbase/resources/webapi/doc/html2/index.html +++ b/sdrbase/resources/webapi/doc/html2/index.html @@ -6915,6 +6915,13 @@ margin-bottom: 20px; "type" : "integer", "format" : "uint16" }, + "multicastAddress" : { + "type" : "string" + }, + "multicastJoin" : { + "type" : "integer", + "description" : "Joim multicast group * 0 - leave group * 1 - join group\n" + }, "title" : { "type" : "string" }, @@ -33305,7 +33312,7 @@ except ApiException as e:
- Generated 2020-08-20T08:53:46.594+02:00 + Generated 2020-08-25T00:09:04.978+02:00
diff --git a/sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml b/sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml index 129d240ac..641de4ddc 100644 --- a/sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml +++ b/sdrbase/resources/webapi/doc/swagger/include/UDPSource.yaml @@ -47,6 +47,14 @@ UDPSourceSettings: udpPort: type: integer format: uint16 + multicastAddress: + type: string + multicastJoin: + type: integer + description: > + Joim multicast group + * 0 - leave group + * 1 - join group title: type: string streamIndex: diff --git a/swagger/sdrangel/code/html2/index.html b/swagger/sdrangel/code/html2/index.html index e059944f5..40d126c29 100644 --- a/swagger/sdrangel/code/html2/index.html +++ b/swagger/sdrangel/code/html2/index.html @@ -6915,6 +6915,13 @@ margin-bottom: 20px; "type" : "integer", "format" : "uint16" }, + "multicastAddress" : { + "type" : "string" + }, + "multicastJoin" : { + "type" : "integer", + "description" : "Joim multicast group * 0 - leave group * 1 - join group\n" + }, "title" : { "type" : "string" }, @@ -33305,7 +33312,7 @@ except ApiException as e:
- Generated 2020-08-20T08:53:46.594+02:00 + Generated 2020-08-25T00:09:04.978+02:00
diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp index 6e35a6f56..b979a1dbc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.cpp @@ -64,6 +64,10 @@ SWGUDPSourceSettings::SWGUDPSourceSettings() { m_udp_address_isSet = false; udp_port = 0; m_udp_port_isSet = false; + multicast_address = nullptr; + m_multicast_address_isSet = false; + multicast_join = 0; + m_multicast_join_isSet = false; title = nullptr; m_title_isSet = false; stream_index = 0; @@ -122,6 +126,10 @@ SWGUDPSourceSettings::init() { m_udp_address_isSet = false; udp_port = 0; m_udp_port_isSet = false; + multicast_address = new QString(""); + m_multicast_address_isSet = false; + multicast_join = 0; + m_multicast_join_isSet = false; title = new QString(""); m_title_isSet = false; stream_index = 0; @@ -160,6 +168,10 @@ SWGUDPSourceSettings::cleanup() { delete udp_address; } + if(multicast_address != nullptr) { + delete multicast_address; + } + if(title != nullptr) { delete title; } @@ -220,6 +232,10 @@ SWGUDPSourceSettings::fromJsonObject(QJsonObject &pJson) { ::SWGSDRangel::setValue(&udp_port, pJson["udpPort"], "qint32", ""); + ::SWGSDRangel::setValue(&multicast_address, pJson["multicastAddress"], "QString", "QString"); + + ::SWGSDRangel::setValue(&multicast_join, pJson["multicastJoin"], "qint32", ""); + ::SWGSDRangel::setValue(&title, pJson["title"], "QString", "QString"); ::SWGSDRangel::setValue(&stream_index, pJson["streamIndex"], "qint32", ""); @@ -304,6 +320,12 @@ SWGUDPSourceSettings::asJsonObject() { if(m_udp_port_isSet){ obj->insert("udpPort", QJsonValue(udp_port)); } + if(multicast_address != nullptr && *multicast_address != QString("")){ + toJsonValue(QString("multicastAddress"), multicast_address, obj, QString("QString")); + } + if(m_multicast_join_isSet){ + obj->insert("multicastJoin", QJsonValue(multicast_join)); + } if(title != nullptr && *title != QString("")){ toJsonValue(QString("title"), title, obj, QString("QString")); } @@ -509,6 +531,26 @@ SWGUDPSourceSettings::setUdpPort(qint32 udp_port) { this->m_udp_port_isSet = true; } +QString* +SWGUDPSourceSettings::getMulticastAddress() { + return multicast_address; +} +void +SWGUDPSourceSettings::setMulticastAddress(QString* multicast_address) { + this->multicast_address = multicast_address; + this->m_multicast_address_isSet = true; +} + +qint32 +SWGUDPSourceSettings::getMulticastJoin() { + return multicast_join; +} +void +SWGUDPSourceSettings::setMulticastJoin(qint32 multicast_join) { + this->multicast_join = multicast_join; + this->m_multicast_join_isSet = true; +} + QString* SWGUDPSourceSettings::getTitle() { return title; @@ -638,6 +680,12 @@ SWGUDPSourceSettings::isSet(){ if(m_udp_port_isSet){ isObjectUpdated = true; break; } + if(multicast_address && *multicast_address != QString("")){ + isObjectUpdated = true; break; + } + if(m_multicast_join_isSet){ + isObjectUpdated = true; break; + } if(title && *title != QString("")){ isObjectUpdated = true; break; } diff --git a/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h index 7147355a0..825f9a5bc 100644 --- a/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h +++ b/swagger/sdrangel/code/qt5/client/SWGUDPSourceSettings.h @@ -96,6 +96,12 @@ public: qint32 getUdpPort(); void setUdpPort(qint32 udp_port); + QString* getMulticastAddress(); + void setMulticastAddress(QString* multicast_address); + + qint32 getMulticastJoin(); + void setMulticastJoin(qint32 multicast_join); + QString* getTitle(); void setTitle(QString* title); @@ -175,6 +181,12 @@ private: qint32 udp_port; bool m_udp_port_isSet; + QString* multicast_address; + bool m_multicast_address_isSet; + + qint32 multicast_join; + bool m_multicast_join_isSet; + QString* title; bool m_title_isSet;