diff --git a/plugins/channelrx/demodadsb/adsbdemod.cpp b/plugins/channelrx/demodadsb/adsbdemod.cpp index 312ec149d..49dcd9f81 100644 --- a/plugins/channelrx/demodadsb/adsbdemod.cpp +++ b/plugins/channelrx/demodadsb/adsbdemod.cpp @@ -756,7 +756,7 @@ void ADSBDemod::setTarget(const QString& name, float targetAzimuth, float target m_targetAzElValid = true; // Send to Rotator Controllers - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(this, "target"); if (mapMessageQueues) diff --git a/plugins/channelrx/demodadsb/adsbdemodgui.cpp b/plugins/channelrx/demodadsb/adsbdemodgui.cpp index 7dec4d67c..ec50fb583 100644 --- a/plugins/channelrx/demodadsb/adsbdemodgui.cpp +++ b/plugins/channelrx/demodadsb/adsbdemodgui.cpp @@ -711,7 +711,7 @@ bool ADSBDemodGUI::updateLocalPosition(Aircraft *aircraft, double latitude, doub void ADSBDemodGUI::sendToMap(Aircraft *aircraft, QList *animations) { // Send to Map feature - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_adsbDemod, "mapitems"); if (mapMessageQueues) { @@ -4044,7 +4044,7 @@ void ADSBDemodGUI::tick() // Remove aircraft from hash i = m_aircraft.erase(i); // Remove from map feature - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_adsbDemod, "mapitems"); if (mapMessageQueues) { diff --git a/plugins/channelrx/demodais/aisdemod.cpp b/plugins/channelrx/demodais/aisdemod.cpp index a8903c090..534e634bf 100644 --- a/plugins/channelrx/demodais/aisdemod.cpp +++ b/plugins/channelrx/demodais/aisdemod.cpp @@ -148,7 +148,7 @@ bool AISDemod::handleMessage(const Message& cmd) getMessageQueueToGUI()->push(msg); } - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); // Forward to AIS feature QList *aisMessageQueues = messagePipes.getMessageQueues(this, "ais"); diff --git a/plugins/channelrx/demodais/aisdemodgui.cpp b/plugins/channelrx/demodais/aisdemodgui.cpp index 36adb15fb..b09799818 100644 --- a/plugins/channelrx/demodais/aisdemodgui.cpp +++ b/plugins/channelrx/demodais/aisdemodgui.cpp @@ -702,7 +702,7 @@ void AISDemodGUI::on_logOpen_clicked() bool cancelled = false; QStringList cols; - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *aisMessageQueues = messagePipes.getMessageQueues(m_aisDemod, "ais"); while (!cancelled && CSV::readRow(in, &cols)) diff --git a/plugins/channelrx/demodapt/aptdemodgui.cpp b/plugins/channelrx/demodapt/aptdemodgui.cpp index 8c4741f0c..531690aa2 100644 --- a/plugins/channelrx/demodapt/aptdemodgui.cpp +++ b/plugins/channelrx/demodapt/aptdemodgui.cpp @@ -867,7 +867,7 @@ void APTDemodGUI::on_deleteImageFromMap_clicked() void APTDemodGUI::deleteImageFromMap(const QString &name) { - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_aptDemod, "mapitems"); if (mapMessageQueues) { diff --git a/plugins/channelrx/demodapt/aptdemodimageworker.cpp b/plugins/channelrx/demodapt/aptdemodimageworker.cpp index 9e9f0ec7d..0bf1497d9 100644 --- a/plugins/channelrx/demodapt/aptdemodimageworker.cpp +++ b/plugins/channelrx/demodapt/aptdemodimageworker.cpp @@ -661,7 +661,7 @@ void APTDemodImageWorker::makeTransparent(QImage &image) void APTDemodImageWorker::sendImageToMap(QImage image) { // Send to Map feature - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_aptDemod, "mapitems"); if (mapMessageQueues) { diff --git a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp index a365a46b3..95c2a62de 100644 --- a/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp +++ b/plugins/channelrx/demodchirpchat/chirpchatdemod.cpp @@ -220,7 +220,7 @@ bool ChirpChatDemod::handleMessage(const Message& cmd) } // Forward to APRS and other packet features - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *packetMessageQueues = messagePipes.getMessageQueues(this, "packets"); if (packetMessageQueues) { diff --git a/plugins/channelrx/demodpacket/packetdemod.cpp b/plugins/channelrx/demodpacket/packetdemod.cpp index 74ccf6cc7..e2677b47b 100644 --- a/plugins/channelrx/demodpacket/packetdemod.cpp +++ b/plugins/channelrx/demodpacket/packetdemod.cpp @@ -156,7 +156,7 @@ bool PacketDemod::handleMessage(const Message& cmd) getMessageQueueToGUI()->push(msg); } - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); // Forward to APRS and other packet features QList *packetMessageQueues = messagePipes.getMessageQueues(this, "packets"); diff --git a/plugins/channelrx/radioastronomy/radioastronomygui.cpp b/plugins/channelrx/radioastronomy/radioastronomygui.cpp index d483b2fd7..620d20923 100644 --- a/plugins/channelrx/radioastronomy/radioastronomygui.cpp +++ b/plugins/channelrx/radioastronomy/radioastronomygui.cpp @@ -1908,7 +1908,7 @@ void RadioAstronomyGUI::on_powerTable_cellDoubleClicked(int row, int column) if ((column >= POWER_COL_RA) && (column >= POWER_COL_EL)) { // Display target in Star Tracker - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *messageQueues = messagePipes.getMessageQueues(m_radioAstronomy, "startracker.display"); if (messageQueues) { @@ -4276,7 +4276,7 @@ void RadioAstronomyGUI::showLoSMarker(int row) void RadioAstronomyGUI::updateLoSMarker(const QString& name, float l, float b, float d) { // Send to Star Tracker - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *messageQueues = messagePipes.getMessageQueues(m_radioAstronomy, "startracker.display"); if (messageQueues) { @@ -4678,7 +4678,7 @@ void RadioAstronomyGUI::on_spectrumIndex_valueChanged(int value) ui->powerTable->scrollTo(ui->powerTable->model()->index(value, 0)); ui->spectrumDateTime->setDateTime(m_fftMeasurements[value]->m_dateTime); // Display target in Star Tracker - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *messageQueues = messagePipes.getMessageQueues(m_radioAstronomy, "startracker.display"); if (messageQueues) { diff --git a/plugins/feature/afc/afc.cpp b/plugins/feature/afc/afc.cpp index e5a0d8679..904726c2b 100644 --- a/plugins/feature/afc/afc.cpp +++ b/plugins/feature/afc/afc.cpp @@ -138,11 +138,11 @@ bool AFC::handleMessage(const Message& cmd) return true; } } - else if (MessagePipesCommon::MsgReportChannelDeleted::match(cmd)) + else if (MessagePipesLegacyCommon::MsgReportChannelDeleted::match(cmd)) { - qDebug() << "AFC::handleMessage: MessagePipesCommon::MsgReportChannelDeleted"; - MessagePipesCommon::MsgReportChannelDeleted& report = (MessagePipesCommon::MsgReportChannelDeleted&) cmd; - const MessagePipesCommon::ChannelRegistrationKey& channelKey = report.getChannelRegistrationKey(); + qDebug() << "AFC::handleMessage: MessagePipesLegacyCommon::MsgReportChannelDeleted"; + MessagePipesLegacyCommon::MsgReportChannelDeleted& report = (MessagePipesLegacyCommon::MsgReportChannelDeleted&) cmd; + const MessagePipesLegacyCommon::ChannelRegistrationKey& channelKey = report.getChannelRegistrationKey(); MainCore::instance()->getMessagePipes().unregisterChannelToFeature(channelKey.m_key, this, "settings"); return true; diff --git a/plugins/feature/ais/aisgui.cpp b/plugins/feature/ais/aisgui.cpp index e10ea4a48..c8ec612ae 100644 --- a/plugins/feature/ais/aisgui.cpp +++ b/plugins/feature/ais/aisgui.cpp @@ -416,7 +416,7 @@ void AISGUI::sendToMap(const QString &name, const QString &label, float heading ) { - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_ais, "mapitems"); if (mapMessageQueues) { diff --git a/plugins/feature/aprs/aprsgui.cpp b/plugins/feature/aprs/aprsgui.cpp index 219e4bd08..2fb159115 100644 --- a/plugins/feature/aprs/aprsgui.cpp +++ b/plugins/feature/aprs/aprsgui.cpp @@ -337,7 +337,7 @@ bool APRSGUI::handleMessage(const Message& message) } // Forward to map - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_aprs, "mapitems"); if (mapMessageQueues) { diff --git a/plugins/feature/demodanalyzer/demodanalyzer.cpp b/plugins/feature/demodanalyzer/demodanalyzer.cpp index 565d3ee96..0e763c59d 100644 --- a/plugins/feature/demodanalyzer/demodanalyzer.cpp +++ b/plugins/feature/demodanalyzer/demodanalyzer.cpp @@ -272,7 +272,7 @@ void DemodAnalyzer::applySettings(const DemodAnalyzerSettings& settings, bool fo void DemodAnalyzer::updateChannels() { MainCore *mainCore = MainCore::instance(); - // MessagePipes& messagePipes = mainCore->getMessagePipes(); + // MessagePipesLegacy& messagePipes = mainCore->getMessagePipes(); std::vector& deviceSets = mainCore->getDeviceSets(); std::vector::const_iterator it = deviceSets.begin(); m_availableChannels.clear(); diff --git a/plugins/feature/jogdialcontroller/jogdialcontroller.cpp b/plugins/feature/jogdialcontroller/jogdialcontroller.cpp index 8e3fb9022..be571bb0f 100644 --- a/plugins/feature/jogdialcontroller/jogdialcontroller.cpp +++ b/plugins/feature/jogdialcontroller/jogdialcontroller.cpp @@ -203,7 +203,7 @@ void JogdialController::applySettings(const JogdialControllerSettings& settings, void JogdialController::updateChannels() { MainCore *mainCore = MainCore::instance(); - // MessagePipes& messagePipes = mainCore->getMessagePipes(); + // MessagePipesLegacy& messagePipes = mainCore->getMessagePipes(); std::vector& deviceSets = mainCore->getDeviceSets(); std::vector::const_iterator it = deviceSets.begin(); m_availableChannels.clear(); diff --git a/plugins/feature/map/mapmodel.cpp b/plugins/feature/map/mapmodel.cpp index 2f79a54e3..b0180ccc0 100644 --- a/plugins/feature/map/mapmodel.cpp +++ b/plugins/feature/map/mapmodel.cpp @@ -18,7 +18,7 @@ #include #include "channel/channelwebapiutils.h" -#include "pipes/messagepipes.h" +#include "pipes/messagepipeslegacy.h" #include "maincore.h" #include "mapmodel.h" @@ -358,7 +358,7 @@ void MapModel::updateTarget() azEl->calculate(); // Send to Rotator Controllers - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_gui->getMap(), "target"); if (mapMessageQueues) { diff --git a/plugins/feature/satellitetracker/satellitetrackerworker.cpp b/plugins/feature/satellitetracker/satellitetrackerworker.cpp index 3b6bbb8b9..a5c6bbaa2 100644 --- a/plugins/feature/satellitetracker/satellitetrackerworker.cpp +++ b/plugins/feature/satellitetracker/satellitetrackerworker.cpp @@ -234,7 +234,7 @@ void SatelliteTrackerWorker::applySettings(const SatelliteTrackerSettings& setti void SatelliteTrackerWorker::removeFromMap(QString id) { - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_satelliteTracker, "mapitems"); if (mapMessageQueues) sendToMap(mapMessageQueues, id, "", "", "", 0.0f, 0.0, 0.0, 0.0, 0.0, nullptr, nullptr, nullptr, nullptr); @@ -405,7 +405,7 @@ void SatelliteTrackerWorker::update() azimuth = std::fmod(azimuth + 180.0, 360.0); elevation = 180.0 - elevation; } - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *rotatorMessageQueues = messagePipes.getMessageQueues(m_satelliteTracker, "target"); if (rotatorMessageQueues) { @@ -425,7 +425,7 @@ void SatelliteTrackerWorker::update() // Send to Map if (m_settings.m_drawOnMap) { - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_satelliteTracker, "mapitems"); if (mapMessageQueues) { diff --git a/plugins/feature/startracker/startrackerworker.cpp b/plugins/feature/startracker/startrackerworker.cpp index 44c34e59d..6821e4291 100644 --- a/plugins/feature/startracker/startrackerworker.cpp +++ b/plugins/feature/startracker/startrackerworker.cpp @@ -407,7 +407,7 @@ void StarTrackerWorker::updateRaDec(RADec rd, QDateTime dt, bool lbTarget) void StarTrackerWorker::removeFromMap(QString id) { - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList *mapMessageQueues = messagePipes.getMessageQueues(m_starTracker, "mapitems"); if (mapMessageQueues) { sendToMap(mapMessageQueues, id, "", "", 0.0, 0.0); @@ -580,7 +580,7 @@ void StarTrackerWorker::update() } } - MessagePipes& messagePipes = MainCore::instance()->getMessagePipes(); + MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipes(); QList* messageQueues; // Send Az/El to Rotator Controllers diff --git a/sdrbase/CMakeLists.txt b/sdrbase/CMakeLists.txt index 8bdeffc42..5a247fba9 100644 --- a/sdrbase/CMakeLists.txt +++ b/sdrbase/CMakeLists.txt @@ -170,10 +170,10 @@ set(sdrbase_SOURCES pipes/datafifostore.cpp pipes/datapipes.cpp pipes/datapipesgcworker.cpp - pipes/messagepipes.cpp + pipes/messagepipeslegacy.cpp pipes/messagepipes2.cpp - pipes/messagepipescommon.cpp - pipes/messagepipesgcworker.cpp + pipes/messagepipeslegacycommon.cpp + pipes/messagepipeslegacygcworker.cpp pipes/messagepipes2gcworker.cpp pipes/messagequeuestore.cpp pipes/pipeendpoint.cpp @@ -381,10 +381,10 @@ set(sdrbase_HEADERS pipes/datapipesgcworker.h pipes/elementpipescommon.h pipes/elementpipesgc.h - pipes/messagepipes.h + pipes/messagepipeslegacy.h pipes/messagepipes2.h - pipes/messagepipescommon.h - pipes/messagepipesgcworker.h + pipes/messagepipeslegacycommon.h + pipes/messagepipeslegacygcworker.h pipes/messagepipes2gcworker.h pipes/messagequeuestore.h pipes/pipeendpoint.h diff --git a/sdrbase/maincore.h b/sdrbase/maincore.h index d333dc402..9f37565db 100644 --- a/sdrbase/maincore.h +++ b/sdrbase/maincore.h @@ -27,7 +27,7 @@ #include "export.h" #include "settings/mainsettings.h" #include "util/message.h" -#include "pipes/messagepipes.h" +#include "pipes/messagepipeslegacy.h" #include "pipes/messagepipes2.h" #include "pipes/datapipes.h" #include "channel/channelapi.h" @@ -731,7 +731,7 @@ public: void removeFeatureInstance(Feature *feature); void clearFeatures(FeatureSet *featureSet); // pipes - MessagePipes& getMessagePipes() { return m_messagePipes; } + MessagePipesLegacy& getMessagePipes() { return m_messagePipes; } MessagePipes2& getMessagePipes2() { return m_messagePipes2; } DataPipes& getDataPipes() { return m_dataPipes; } @@ -752,7 +752,7 @@ private: QMap m_channelsMap; //!< Channel to device set map QMap m_featuresMap; //!< Feature to feature set map PluginManager* m_pluginManager; - MessagePipes m_messagePipes; + MessagePipesLegacy m_messagePipes; MessagePipes2 m_messagePipes2; DataPipes m_dataPipes; diff --git a/sdrbase/pipes/messagepipes.cpp b/sdrbase/pipes/messagepipeslegacy.cpp similarity index 67% rename from sdrbase/pipes/messagepipes.cpp rename to sdrbase/pipes/messagepipeslegacy.cpp index da0818302..2c918f436 100644 --- a/sdrbase/pipes/messagepipes.cpp +++ b/sdrbase/pipes/messagepipeslegacy.cpp @@ -19,13 +19,13 @@ #include "util/messagequeue.h" -#include "messagepipesgcworker.h" -#include "messagepipes.h" +#include "messagepipeslegacygcworker.h" +#include "messagepipeslegacy.h" #include "pipeendpoint.h" -MessagePipes::MessagePipes() +MessagePipesLegacy::MessagePipesLegacy() { - m_gcWorker = new MessagePipesGCWorker(); + m_gcWorker = new MessagePipesLegacyGCWorker(); m_gcWorker->setC2FRegistrations( m_registrations.getMutex(), m_registrations.getElements(), @@ -35,43 +35,43 @@ MessagePipes::MessagePipes() startGC(); } -MessagePipes::~MessagePipes() +MessagePipesLegacy::~MessagePipesLegacy() { if (m_gcWorker->isRunning()) { stopGC(); } } -MessageQueue *MessagePipes::registerChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) +MessageQueue *MessagePipesLegacy::registerChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) { - qDebug("MessagePipes::registerChannelToFeature: %p %p %s", source, dest, qPrintable(type)); + qDebug("MessagePipesLegacy::registerChannelToFeature: %p %p %s", source, dest, qPrintable(type)); return m_registrations.registerProducerToConsumer(source, dest, type); } -MessageQueue *MessagePipes::unregisterChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) +MessageQueue *MessagePipesLegacy::unregisterChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type) { - qDebug("MessagePipes::unregisterChannelToFeature: %p %p %s", source, dest, qPrintable(type)); + qDebug("MessagePipesLegacy::unregisterChannelToFeature: %p %p %s", source, dest, qPrintable(type)); MessageQueue *messageQueue = m_registrations.unregisterProducerToConsumer(source, dest, type); m_gcWorker->addMessageQueueToDelete(messageQueue); return messageQueue; } -QList* MessagePipes::getMessageQueues(const PipeEndPoint *source, const QString& type) +QList* MessagePipesLegacy::getMessageQueues(const PipeEndPoint *source, const QString& type) { - qDebug("MessagePipes::getMessageQueues: %p %s", source, qPrintable(type)); + qDebug("MessagePipesLegacy::getMessageQueues: %p %s", source, qPrintable(type)); return m_registrations.getElements(source, type); } -void MessagePipes::startGC() +void MessagePipesLegacy::startGC() { - qDebug("MessagePipes::startGC"); + qDebug("MessagePipesLegacy::startGC"); m_gcWorker->startWork(); m_gcThread.start(); } -void MessagePipes::stopGC() +void MessagePipesLegacy::stopGC() { - qDebug("MessagePipes::stopGC"); + qDebug("MessagePipesLegacy::stopGC"); m_gcWorker->stopWork(); m_gcThread.quit(); m_gcThread.wait(); diff --git a/sdrbase/pipes/messagepipes.h b/sdrbase/pipes/messagepipeslegacy.h similarity index 81% rename from sdrbase/pipes/messagepipes.h rename to sdrbase/pipes/messagepipeslegacy.h index 519f24698..562e582a8 100644 --- a/sdrbase/pipes/messagepipes.h +++ b/sdrbase/pipes/messagepipeslegacy.h @@ -15,8 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef SDRBASE_PIPES_MESSAGEPIPES_H_ -#define SDRBASE_PIPES_MESSAGEPIPES_H_ +#ifndef SDRBASE_PIPES_MESSAGEPIPESLEGACY_H_ +#define SDRBASE_PIPES_MESSAGEPIPESLEGACY_H_ #include #include @@ -26,21 +26,21 @@ #include "export.h" -#include "messagepipescommon.h" +#include "messagepipeslegacycommon.h" #include "elementpipesregistrations.h" class PipeEndPoint; -class MessagePipesGCWorker; +class MessagePipesLegacyGCWorker; class MessageQueue; -class SDRBASE_API MessagePipes : public QObject +class SDRBASE_API MessagePipesLegacy : public QObject { Q_OBJECT public: - MessagePipes(); - MessagePipes(const MessagePipes&) = delete; - MessagePipes& operator=(const MessagePipes&) = delete; - ~MessagePipes(); + MessagePipesLegacy(); + MessagePipesLegacy(const MessagePipesLegacy&) = delete; + MessagePipesLegacy& operator=(const MessagePipesLegacy&) = delete; + ~MessagePipesLegacy(); // FIXME: Names of these functions should probably change, as we now support channel or feature at either end MessageQueue *registerChannelToFeature(const PipeEndPoint *source, PipeEndPoint *dest, const QString& type); @@ -50,10 +50,10 @@ public: private: ElementPipesRegistrations m_registrations; QThread m_gcThread; //!< Garbage collector thread - MessagePipesGCWorker *m_gcWorker; //!< Garbage collector + MessagePipesLegacyGCWorker *m_gcWorker; //!< Garbage collector void startGC(); //!< Start garbage collector void stopGC(); //!< Stop garbage collector }; -#endif // SDRBASE_PIPES_MESSAGEPIPES_H_ +#endif // SDRBASE_PIPES_MESSAGEPIPESLEGACY_H_ diff --git a/sdrbase/pipes/messagepipescommon.cpp b/sdrbase/pipes/messagepipeslegacycommon.cpp similarity index 91% rename from sdrbase/pipes/messagepipescommon.cpp rename to sdrbase/pipes/messagepipeslegacycommon.cpp index f749fb2e5..984a452d5 100644 --- a/sdrbase/pipes/messagepipescommon.cpp +++ b/sdrbase/pipes/messagepipeslegacycommon.cpp @@ -15,6 +15,6 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#include "messagepipescommon.h" +#include "messagepipeslegacycommon.h" -MESSAGE_CLASS_DEFINITION(MessagePipesCommon::MsgReportChannelDeleted, Message) +MESSAGE_CLASS_DEFINITION(MessagePipesLegacyCommon::MsgReportChannelDeleted, Message) diff --git a/sdrbase/pipes/messagepipescommon.h b/sdrbase/pipes/messagepipeslegacycommon.h similarity index 93% rename from sdrbase/pipes/messagepipescommon.h rename to sdrbase/pipes/messagepipeslegacycommon.h index 2fda6a3bc..42f3b9600 100644 --- a/sdrbase/pipes/messagepipescommon.h +++ b/sdrbase/pipes/messagepipeslegacycommon.h @@ -15,8 +15,8 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef SDRBASE_PIPES_MESSAGEPIPESCOMON_H_ -#define SDRBASE_PIPES_MESSAGEPIPESCOMON_H_ +#ifndef SDRBASE_PIPES_MESSAGEPIPESLEGACYCOMON_H_ +#define SDRBASE_PIPES_MESSAGEPIPESLEGACYCOMON_H_ #include #include @@ -29,7 +29,7 @@ class PipeEndPoint; class MessageQueue; -class SDRBASE_API MessagePipesCommon +class SDRBASE_API MessagePipesLegacyCommon { public: typedef ElementPipesCommon::RegistrationKey ChannelRegistrationKey; @@ -58,4 +58,4 @@ public: }; }; -#endif // SDRBASE_PIPES_MESSAGEPIPESCOMON_H_ +#endif // SDRBASE_PIPES_MESSAGEPIPESLEGACYCOMON_H_ diff --git a/sdrbase/pipes/messagepipesgcworker.cpp b/sdrbase/pipes/messagepipeslegacygcworker.cpp similarity index 74% rename from sdrbase/pipes/messagepipesgcworker.cpp rename to sdrbase/pipes/messagepipeslegacygcworker.cpp index 4a3ee0e5b..f05c65bc3 100644 --- a/sdrbase/pipes/messagepipesgcworker.cpp +++ b/sdrbase/pipes/messagepipeslegacygcworker.cpp @@ -19,50 +19,50 @@ #include "feature/feature.h" #include "util/messagequeue.h" #include "maincore.h" -#include "messagepipescommon.h" -#include "messagepipesgcworker.h" +#include "messagepipeslegacycommon.h" +#include "messagepipeslegacygcworker.h" -bool MessagePipesGCWorker::MessagePipesGC::existsProducer(const PipeEndPoint *pipeEndPoint) +bool MessagePipesLegacyGCWorker::MessagePipesGC::existsProducer(const PipeEndPoint *pipeEndPoint) { return MainCore::instance()->existsChannel((const ChannelAPI *)pipeEndPoint) || MainCore::instance()->existsFeature((const Feature *)pipeEndPoint); } -bool MessagePipesGCWorker::MessagePipesGC::existsConsumer(const PipeEndPoint *pipeEndPoint) +bool MessagePipesLegacyGCWorker::MessagePipesGC::existsConsumer(const PipeEndPoint *pipeEndPoint) { return MainCore::instance()->existsChannel((const ChannelAPI *)pipeEndPoint) || MainCore::instance()->existsFeature((const Feature *)pipeEndPoint); } -void MessagePipesGCWorker::MessagePipesGC::sendMessageToConsumer( +void MessagePipesLegacyGCWorker::MessagePipesGC::sendMessageToConsumer( const MessageQueue *, - MessagePipesCommon::ChannelRegistrationKey, + MessagePipesLegacyCommon::ChannelRegistrationKey, PipeEndPoint *) { } -MessagePipesGCWorker::MessagePipesGCWorker() : +MessagePipesLegacyGCWorker::MessagePipesLegacyGCWorker() : m_running(false) {} -MessagePipesGCWorker::~MessagePipesGCWorker() +MessagePipesLegacyGCWorker::~MessagePipesLegacyGCWorker() {} -void MessagePipesGCWorker::startWork() +void MessagePipesLegacyGCWorker::startWork() { connect(&m_gcTimer, SIGNAL(timeout()), this, SLOT(processGC())); m_gcTimer.start(10000); // collect garbage every 10s m_running = true; } -void MessagePipesGCWorker::stopWork() +void MessagePipesLegacyGCWorker::stopWork() { m_running = false; m_gcTimer.stop(); disconnect(&m_gcTimer, SIGNAL(timeout()), this, SLOT(processGC())); } -void MessagePipesGCWorker::addMessageQueueToDelete(MessageQueue *messageQueue) +void MessagePipesLegacyGCWorker::addMessageQueueToDelete(MessageQueue *messageQueue) { if (messageQueue) { @@ -71,8 +71,8 @@ void MessagePipesGCWorker::addMessageQueueToDelete(MessageQueue *messageQueue) } } -void MessagePipesGCWorker::processGC() +void MessagePipesLegacyGCWorker::processGC() { - // qDebug("MessagePipesGCWorker::processGC"); + // qDebug("MessagePipesLegacyGCWorker::processGC"); m_messagePipesGC.processGC(); } diff --git a/sdrbase/pipes/messagepipesgcworker.h b/sdrbase/pipes/messagepipeslegacygcworker.h similarity index 78% rename from sdrbase/pipes/messagepipesgcworker.h rename to sdrbase/pipes/messagepipeslegacygcworker.h index 14b8e5f27..309b13125 100644 --- a/sdrbase/pipes/messagepipesgcworker.h +++ b/sdrbase/pipes/messagepipeslegacygcworker.h @@ -15,30 +15,30 @@ // along with this program. If not, see . // /////////////////////////////////////////////////////////////////////////////////// -#ifndef SDRBASE_PIPES_MESSAGEPIPESGCWORKER_H_ -#define SDRBASE_PIPES_MESSAGEPIPESGCWORKER_H_ +#ifndef SDRBASE_PIPES_MESSAGEPIPESLEGACYGCWORKER_H_ +#define SDRBASE_PIPES_MESSAGEPIPESLEGACYGCWORKER_H_ #include #include #include "export.h" -#include "messagepipescommon.h" +#include "messagepipeslegacycommon.h" #include "elementpipesgc.h" class QMutex; -class SDRBASE_API MessagePipesGCWorker : public QObject +class SDRBASE_API MessagePipesLegacyGCWorker : public QObject { Q_OBJECT public: - MessagePipesGCWorker(); - ~MessagePipesGCWorker(); + MessagePipesLegacyGCWorker(); + ~MessagePipesLegacyGCWorker(); void setC2FRegistrations( QMutex *c2fMutex, - QMap> *c2fQueues, - QMap> *c2fPipeEndPoints + QMap> *c2fQueues, + QMap> *c2fPipeEndPoints ) { m_messagePipesGC.setRegistrations(c2fMutex, c2fQueues, c2fPipeEndPoints); @@ -55,7 +55,7 @@ private: private: virtual bool existsProducer(const PipeEndPoint *pipeEndPoint); virtual bool existsConsumer(const PipeEndPoint *pipeEndPoint); - virtual void sendMessageToConsumer(const MessageQueue *messageQueue, MessagePipesCommon::ChannelRegistrationKey key, PipeEndPoint *pipeEndPoint); + virtual void sendMessageToConsumer(const MessageQueue *messageQueue, MessagePipesLegacyCommon::ChannelRegistrationKey key, PipeEndPoint *pipeEndPoint); }; MessagePipesGC m_messagePipesGC; @@ -66,4 +66,4 @@ private slots: void processGC(); //!< Collect garbage }; -#endif +#endif // SDRBASE_PIPES_MESSAGEPIPESLEGACYGCWORKER_H_ diff --git a/sdrbase/pipes/pipeendpoint.cpp b/sdrbase/pipes/pipeendpoint.cpp index 68066edd7..eae38fccd 100644 --- a/sdrbase/pipes/pipeendpoint.cpp +++ b/sdrbase/pipes/pipeendpoint.cpp @@ -34,7 +34,7 @@ MESSAGE_CLASS_DEFINITION(PipeEndPoint::MsgReportPipes, Message) QList PipeEndPoint::updateAvailablePipeSources(QString pipeName, QStringList pipeTypes, QStringList pipeURIs, PipeEndPoint *destination) { MainCore *mainCore = MainCore::instance(); - MessagePipes& messagePipes = mainCore->getMessagePipes(); + MessagePipesLegacy& messagePipes = mainCore->getMessagePipes(); std::vector& deviceSets = mainCore->getDeviceSets(); QHash availablePipes;