mirror of
https://github.com/f4exb/sdrangel.git
synced 2024-09-28 15:56:33 -04:00
Rotator controller and dependent plugins: implemented new message pipes and other fixes. Part of #1154
This commit is contained in:
parent
1819ca6e94
commit
842546aec6
@ -772,21 +772,17 @@ void ADSBDemod::setTarget(const QString& name, float targetAzimuth, float target
|
|||||||
m_targetAzElValid = true;
|
m_targetAzElValid = true;
|
||||||
|
|
||||||
// Send to Rotator Controllers
|
// Send to Rotator Controllers
|
||||||
MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipesLegacy();
|
QList<ObjectPipe*> rotatorPipes;
|
||||||
QList<MessageQueue*> *mapMessageQueues = messagePipes.getMessageQueues(this, "target");
|
MainCore::instance()->getMessagePipes().getMessagePipes(this, "target", rotatorPipes);
|
||||||
|
|
||||||
if (mapMessageQueues)
|
for (const auto& pipe : rotatorPipes)
|
||||||
{
|
{
|
||||||
QList<MessageQueue*>::iterator it = mapMessageQueues->begin();
|
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
||||||
|
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
||||||
for (; it != mapMessageQueues->end(); ++it)
|
swgTarget->setName(new QString(name));
|
||||||
{
|
swgTarget->setAzimuth(targetAzimuth);
|
||||||
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
swgTarget->setElevation(targetElevation);
|
||||||
swgTarget->setName(new QString(name));
|
messageQueue->push(MainCore::MsgTargetAzimuthElevation::create(this, swgTarget));
|
||||||
swgTarget->setAzimuth(targetAzimuth);
|
|
||||||
swgTarget->setElevation(targetElevation);
|
|
||||||
(*it)->push(MainCore::MsgTargetAzimuthElevation::create(this, swgTarget));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,6 +60,7 @@ MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgStopSweep, Message)
|
|||||||
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgSweepComplete, Message)
|
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgSweepComplete, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgSweepStatus, Message)
|
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgSweepStatus, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgReportAvailableFeatures, Message)
|
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgReportAvailableFeatures, Message)
|
||||||
|
MESSAGE_CLASS_DEFINITION(RadioAstronomy::MsgReportAvailableRotators, Message)
|
||||||
|
|
||||||
const char * const RadioAstronomy::m_channelIdURI = "sdrangel.channel.radioastronomy";
|
const char * const RadioAstronomy::m_channelIdURI = "sdrangel.channel.radioastronomy";
|
||||||
const char * const RadioAstronomy::m_channelId = "RadioAstronomy";
|
const char * const RadioAstronomy::m_channelId = "RadioAstronomy";
|
||||||
@ -108,6 +109,12 @@ RadioAstronomy::RadioAstronomy(DeviceAPI *deviceAPI) :
|
|||||||
this,
|
this,
|
||||||
&RadioAstronomy::handleFeatureAdded
|
&RadioAstronomy::handleFeatureAdded
|
||||||
);
|
);
|
||||||
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::featureRemoved,
|
||||||
|
this,
|
||||||
|
&RadioAstronomy::handleFeatureRemoved
|
||||||
|
);
|
||||||
|
|
||||||
m_sweepTimer.setSingleShot(true);
|
m_sweepTimer.setSingleShot(true);
|
||||||
}
|
}
|
||||||
@ -115,6 +122,12 @@ RadioAstronomy::RadioAstronomy(DeviceAPI *deviceAPI) :
|
|||||||
RadioAstronomy::~RadioAstronomy()
|
RadioAstronomy::~RadioAstronomy()
|
||||||
{
|
{
|
||||||
qDebug("RadioAstronomy::~RadioAstronomy");
|
qDebug("RadioAstronomy::~RadioAstronomy");
|
||||||
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::featureRemoved,
|
||||||
|
this,
|
||||||
|
&RadioAstronomy::handleFeatureRemoved
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
MainCore::instance(),
|
MainCore::instance(),
|
||||||
&MainCore::featureAdded,
|
&MainCore::featureAdded,
|
||||||
@ -733,7 +746,7 @@ void RadioAstronomy::applySettings(const RadioAstronomySettings& settings, bool
|
|||||||
|
|
||||||
for (const auto& fval : m_availableFeatures)
|
for (const auto& fval : m_availableFeatures)
|
||||||
{
|
{
|
||||||
QString starTrackerText = tr("F1:%2 %3").arg(fval.m_deviceSetIndex).arg(fval.m_featureIndex).arg(fval.m_type);
|
QString starTrackerText = tr("F%1:%2 %3").arg(fval.m_featureSetIndex).arg(fval.m_featureIndex).arg(fval.m_type);
|
||||||
|
|
||||||
if (settings.m_starTracker == starTrackerText)
|
if (settings.m_starTracker == starTrackerText)
|
||||||
{
|
{
|
||||||
@ -1218,6 +1231,7 @@ void RadioAstronomy::scanAvailableFeatures()
|
|||||||
MessagePipes& messagePipes = mainCore->getMessagePipes();
|
MessagePipes& messagePipes = mainCore->getMessagePipes();
|
||||||
std::vector<FeatureSet*>& featureSets = mainCore->getFeatureeSets();
|
std::vector<FeatureSet*>& featureSets = mainCore->getFeatureeSets();
|
||||||
m_availableFeatures.clear();
|
m_availableFeatures.clear();
|
||||||
|
m_rotators.clear();
|
||||||
|
|
||||||
for (const auto& featureSet : featureSets)
|
for (const auto& featureSet : featureSets)
|
||||||
{
|
{
|
||||||
@ -1225,28 +1239,38 @@ void RadioAstronomy::scanAvailableFeatures()
|
|||||||
{
|
{
|
||||||
Feature *feature = featureSet->getFeatureAt(fei);
|
Feature *feature = featureSet->getFeatureAt(fei);
|
||||||
|
|
||||||
if (RadioAstronomySettings::m_pipeURIs.contains(feature->getURI()) && !m_availableFeatures.contains(feature))
|
if (RadioAstronomySettings::m_pipeURIs.contains(feature->getURI()))
|
||||||
{
|
{
|
||||||
qDebug("RadioAstronomy::scanAvailableFeatures: register %d:%d %s (%p)",
|
if (!m_availableFeatures.contains(feature))
|
||||||
featureSet->getIndex(), fei, qPrintable(feature->getURI()), feature);
|
{
|
||||||
ObjectPipe *pipe = messagePipes.registerProducerToConsumer(feature, this, "startracker.target");
|
qDebug("RadioAstronomy::scanAvailableFeatures: register %d:%d %s (%p)",
|
||||||
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
featureSet->getIndex(), fei, qPrintable(feature->getURI()), feature);
|
||||||
QObject::connect(
|
ObjectPipe *pipe = messagePipes.registerProducerToConsumer(feature, this, "startracker.target");
|
||||||
messageQueue,
|
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
||||||
&MessageQueue::messageEnqueued,
|
QObject::connect(
|
||||||
this,
|
messageQueue,
|
||||||
[=](){ this->handleFeatureMessageQueue(messageQueue); },
|
&MessageQueue::messageEnqueued,
|
||||||
Qt::QueuedConnection
|
this,
|
||||||
);
|
[=](){ this->handleFeatureMessageQueue(messageQueue); },
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
Qt::QueuedConnection
|
||||||
RadioAstronomySettings::AvailableFeature availableFeature =
|
);
|
||||||
|
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
||||||
|
RadioAstronomySettings::AvailableFeature availableFeature =
|
||||||
|
RadioAstronomySettings::AvailableFeature{featureSet->getIndex(), fei, feature->getIdentifier()};
|
||||||
|
m_availableFeatures[feature] = availableFeature;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (feature->getURI() == "sdrangel.feature.gs232controller")
|
||||||
|
{
|
||||||
|
RadioAstronomySettings::AvailableFeature rotator =
|
||||||
RadioAstronomySettings::AvailableFeature{featureSet->getIndex(), fei, feature->getIdentifier()};
|
RadioAstronomySettings::AvailableFeature{featureSet->getIndex(), fei, feature->getIdentifier()};
|
||||||
m_availableFeatures[feature] = availableFeature;
|
m_rotators[feature] = rotator;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyUpdateFeatures();
|
notifyUpdateFeatures();
|
||||||
|
notifyUpdateRotators();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioAstronomy::notifyUpdateFeatures()
|
void RadioAstronomy::notifyUpdateFeatures()
|
||||||
@ -1259,6 +1283,16 @@ void RadioAstronomy::notifyUpdateFeatures()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void RadioAstronomy::notifyUpdateRotators()
|
||||||
|
{
|
||||||
|
if (getMessageQueueToGUI())
|
||||||
|
{
|
||||||
|
MsgReportAvailableRotators *msg = MsgReportAvailableRotators::create();
|
||||||
|
msg->getFeatures() = m_rotators.values();
|
||||||
|
getMessageQueueToGUI()->push(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void RadioAstronomy::handleFeatureAdded(int featureSetIndex, Feature *feature)
|
void RadioAstronomy::handleFeatureAdded(int featureSetIndex, Feature *feature)
|
||||||
{
|
{
|
||||||
qDebug("RadioAstronomy::handleFeatureAdded: featureSetIndex: %d:%d feature: %s (%p)",
|
qDebug("RadioAstronomy::handleFeatureAdded: featureSetIndex: %d:%d feature: %s (%p)",
|
||||||
@ -1281,7 +1315,12 @@ void RadioAstronomy::handleFeatureAdded(int featureSetIndex, Feature *feature)
|
|||||||
[=](){ this->handleFeatureMessageQueue(messageQueue); },
|
[=](){ this->handleFeatureMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&RadioAstronomy::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
RadioAstronomySettings::AvailableFeature availableFeature =
|
RadioAstronomySettings::AvailableFeature availableFeature =
|
||||||
@ -1290,18 +1329,37 @@ void RadioAstronomy::handleFeatureAdded(int featureSetIndex, Feature *feature)
|
|||||||
|
|
||||||
notifyUpdateFeatures();
|
notifyUpdateFeatures();
|
||||||
}
|
}
|
||||||
|
else if (feature->getURI() == "sdrangel.feature.gs232controller")
|
||||||
|
{
|
||||||
|
if (!m_rotators.contains(feature))
|
||||||
|
{
|
||||||
|
RadioAstronomySettings::AvailableFeature rotator =
|
||||||
|
RadioAstronomySettings::AvailableFeature{featureSet->getIndex(), feature->getIndexInFeatureSet(), feature->getIdentifier()};
|
||||||
|
m_rotators[feature] = rotator;
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyUpdateRotators();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void RadioAstronomy::handleFeatureRemoved(int featureSetIndex, Feature *feature)
|
||||||
|
{
|
||||||
|
qDebug("RadioAstronomy::handleFeatureRemoved: featureSetIndex: %d (%p)", featureSetIndex, feature);
|
||||||
|
|
||||||
|
if (m_rotators.contains(feature))
|
||||||
|
{
|
||||||
|
m_rotators.remove(feature);
|
||||||
|
notifyUpdateRotators();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioAstronomy::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
void RadioAstronomy::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
{
|
{
|
||||||
if (reason == 0) // producer (channel)
|
if ((reason == 0) && m_availableFeatures.contains((Feature*) object)) // producer (feature)
|
||||||
{
|
{
|
||||||
if (m_availableFeatures.contains((Feature*) object))
|
qDebug("RadioAstronomy::handleMessagePipeToBeDeleted: removing feature at (%p)", object);
|
||||||
{
|
m_availableFeatures.remove((Feature*) object);
|
||||||
qDebug("RadioAstronomy::handleMessagePipeToBeDeleted: removing feature at (%p)", object);
|
notifyUpdateFeatures();
|
||||||
m_availableFeatures.remove((Feature*) object);
|
|
||||||
notifyUpdateFeatures();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -324,6 +324,24 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MsgReportAvailableRotators : public Message {
|
||||||
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
public:
|
||||||
|
QList<RadioAstronomySettings::AvailableFeature>& getFeatures() { return m_availableFeatures; }
|
||||||
|
|
||||||
|
static MsgReportAvailableRotators* create() {
|
||||||
|
return new MsgReportAvailableRotators();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QList<RadioAstronomySettings::AvailableFeature> m_availableFeatures;
|
||||||
|
|
||||||
|
MsgReportAvailableRotators() :
|
||||||
|
Message()
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
RadioAstronomy(DeviceAPI *deviceAPI);
|
RadioAstronomy(DeviceAPI *deviceAPI);
|
||||||
virtual ~RadioAstronomy();
|
virtual ~RadioAstronomy();
|
||||||
virtual void destroy() { delete this; }
|
virtual void destroy() { delete this; }
|
||||||
@ -405,6 +423,7 @@ private:
|
|||||||
qint64 m_centerFrequency;
|
qint64 m_centerFrequency;
|
||||||
|
|
||||||
QHash<Feature*, RadioAstronomySettings::AvailableFeature> m_availableFeatures;
|
QHash<Feature*, RadioAstronomySettings::AvailableFeature> m_availableFeatures;
|
||||||
|
QHash<Feature*, RadioAstronomySettings::AvailableFeature> m_rotators;
|
||||||
QObject *m_selectedPipe;
|
QObject *m_selectedPipe;
|
||||||
|
|
||||||
QNetworkAccessManager *m_networkManager;
|
QNetworkAccessManager *m_networkManager;
|
||||||
@ -440,6 +459,7 @@ private:
|
|||||||
void calComplete(MsgCalComplete* report);
|
void calComplete(MsgCalComplete* report);
|
||||||
void scanAvailableFeatures();
|
void scanAvailableFeatures();
|
||||||
void notifyUpdateFeatures();
|
void notifyUpdateFeatures();
|
||||||
|
void notifyUpdateRotators();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply);
|
||||||
@ -451,7 +471,8 @@ private slots:
|
|||||||
void sweepNext();
|
void sweepNext();
|
||||||
void sweepComplete();
|
void sweepComplete();
|
||||||
void handleIndexInDeviceSetChanged(int index);
|
void handleIndexInDeviceSetChanged(int index);
|
||||||
void handleFeatureAdded(int deviceSetIndex, Feature *feature);
|
void handleFeatureAdded(int featureSetIndex, Feature *feature);
|
||||||
|
void handleFeatureRemoved(int featureSetIndex, Feature *feature);
|
||||||
void handleMessagePipeToBeDeleted(int reason, QObject* object);
|
void handleMessagePipeToBeDeleted(int reason, QObject* object);
|
||||||
void handleFeatureMessageQueue(MessageQueue* messageQueue);
|
void handleFeatureMessageQueue(MessageQueue* messageQueue);
|
||||||
};
|
};
|
||||||
|
@ -942,7 +942,7 @@ void RadioAstronomyGUI::updateAvailableFeatures()
|
|||||||
ui->starTracker->clear();
|
ui->starTracker->clear();
|
||||||
|
|
||||||
for (const auto& feature : m_availableFeatures) {
|
for (const auto& feature : m_availableFeatures) {
|
||||||
ui->starTracker->addItem(tr("F%1:%2 %3").arg(feature.m_deviceSetIndex).arg(feature.m_featureIndex).arg(feature.m_type));
|
ui->starTracker->addItem(tr("F%1:%2 %3").arg(feature.m_featureSetIndex).arg(feature.m_featureIndex).arg(feature.m_type));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentText.isEmpty())
|
if (currentText.isEmpty())
|
||||||
@ -1073,6 +1073,12 @@ bool RadioAstronomyGUI::handleMessage(const Message& message)
|
|||||||
sensorMeasurementReceived(measurement);
|
sensorMeasurementReceived(measurement);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else if (RadioAstronomy::MsgReportAvailableRotators::match(message))
|
||||||
|
{
|
||||||
|
RadioAstronomy::MsgReportAvailableRotators& report = (RadioAstronomy::MsgReportAvailableRotators&) message;
|
||||||
|
updateRotatorList(report.getFeatures());
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -2208,8 +2214,6 @@ RadioAstronomyGUI::RadioAstronomyGUI(PluginAPI* pluginAPI, DeviceUISet *deviceUI
|
|||||||
ui->sweepStartDateTime->setMinimumDateTime(QDateTime::currentDateTime());
|
ui->sweepStartDateTime->setMinimumDateTime(QDateTime::currentDateTime());
|
||||||
ui->spectrumDateTime->setDateTime(QDateTime::currentDateTime());
|
ui->spectrumDateTime->setDateTime(QDateTime::currentDateTime());
|
||||||
|
|
||||||
updateRotatorList();
|
|
||||||
|
|
||||||
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
ui->startStop->setStyleSheet("QToolButton { background-color : blue; }");
|
||||||
|
|
||||||
displaySettings();
|
displaySettings();
|
||||||
@ -2581,52 +2585,33 @@ void RadioAstronomyGUI::tick()
|
|||||||
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
ui->channelPower->setText(QString::number(powDbAvg, 'f', 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (m_tickCount % 20 == 0) { // 1s
|
|
||||||
updateRotatorList();
|
|
||||||
}
|
|
||||||
|
|
||||||
m_tickCount++;
|
m_tickCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioAstronomyGUI::updateRotatorList()
|
void RadioAstronomyGUI::updateRotatorList(const QList<RadioAstronomySettings::AvailableFeature>& rotators)
|
||||||
{
|
{
|
||||||
// Update list of rotators
|
// Update list of rotators
|
||||||
std::vector<FeatureSet*> featureSets = MainCore::instance()->getFeatureeSets();
|
ui->rotator->blockSignals(true);
|
||||||
for (unsigned int i = 0; i < featureSets.size(); i++)
|
ui->rotator->clear();
|
||||||
|
ui->rotator->addItem("None");
|
||||||
|
|
||||||
|
for (const auto& rotator : rotators)
|
||||||
{
|
{
|
||||||
FeatureSet* featureSet = featureSets[i];
|
QString name = QString("F%1:%2 %3").arg(rotator.m_featureSetIndex).arg(rotator.m_featureIndex).arg(rotator.m_type);
|
||||||
for (int j = 0; j < featureSet->getNumberOfFeatures(); j++)
|
ui->rotator->addItem(name);
|
||||||
{
|
|
||||||
const Feature* feature = featureSet->getFeatureAt(j);
|
|
||||||
if (feature->getURI() == "sdrangel.feature.gs232controller")
|
|
||||||
{
|
|
||||||
// Add if it doesn't already exist
|
|
||||||
QString name = QString("F%1:%2 GS232Controller").arg(i).arg(j);
|
|
||||||
if (ui->rotator->findText(name) == -1)
|
|
||||||
{
|
|
||||||
ui->rotator->addItem(name);
|
|
||||||
// Rotator feature can be created after this plugin, so select it
|
|
||||||
// if the chosen rotator appears
|
|
||||||
if (name == m_settings.m_rotator) {
|
|
||||||
ui->rotator->setCurrentIndex(ui->rotator->findText(name));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Try to remove
|
|
||||||
QString prefix = QString("F%1:%2").arg(i).arg(j);
|
|
||||||
for (int k = 0; k < ui->rotator->count(); k++)
|
|
||||||
{
|
|
||||||
if (ui->rotator->itemText(k).startsWith(prefix))
|
|
||||||
{
|
|
||||||
ui->rotator->removeItem(k);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Rotator feature can be created after this plugin, so select it
|
||||||
|
// if the chosen rotator appears
|
||||||
|
int rotatorIndex = ui->rotator->findText(m_settings.m_rotator);
|
||||||
|
|
||||||
|
if (rotatorIndex >= 0) {
|
||||||
|
ui->rotator->setCurrentIndex(rotatorIndex);
|
||||||
|
} else {
|
||||||
|
ui->rotator->setCurrentIndex(0); // return to None
|
||||||
|
}
|
||||||
|
|
||||||
|
ui->rotator->blockSignals(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void RadioAstronomyGUI::on_fftSize_currentIndexChanged(int index)
|
void RadioAstronomyGUI::on_fftSize_currentIndexChanged(int index)
|
||||||
|
@ -322,7 +322,7 @@ private:
|
|||||||
void displaySpectrumLineFrequency();
|
void displaySpectrumLineFrequency();
|
||||||
void displayRunModeSettings();
|
void displayRunModeSettings();
|
||||||
void updateAvailableFeatures();
|
void updateAvailableFeatures();
|
||||||
void updateRotatorList();
|
void updateRotatorList(const QList<RadioAstronomySettings::AvailableFeature>& rotators);
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
double degreesToSteradian(double deg) const;
|
double degreesToSteradian(double deg) const;
|
||||||
double hpbwToSteradians(double hpbw) const;
|
double hpbwToSteradians(double hpbw) const;
|
||||||
|
@ -37,7 +37,7 @@ struct RadioAstronomySettings
|
|||||||
{
|
{
|
||||||
struct AvailableFeature
|
struct AvailableFeature
|
||||||
{
|
{
|
||||||
int m_deviceSetIndex;
|
int m_featureSetIndex;
|
||||||
int m_featureIndex;
|
int m_featureIndex;
|
||||||
QString m_type;
|
QString m_type;
|
||||||
|
|
||||||
@ -45,7 +45,7 @@ struct RadioAstronomySettings
|
|||||||
AvailableFeature(const AvailableFeature&) = default;
|
AvailableFeature(const AvailableFeature&) = default;
|
||||||
AvailableFeature& operator=(const AvailableFeature&) = default;
|
AvailableFeature& operator=(const AvailableFeature&) = default;
|
||||||
bool operator==(const AvailableFeature& a) const {
|
bool operator==(const AvailableFeature& a) const {
|
||||||
return (m_deviceSetIndex == a.m_deviceSetIndex) && (m_featureIndex == a.m_featureIndex) && (m_type == a.m_type);
|
return (m_featureSetIndex == a.m_featureSetIndex) && (m_featureIndex == a.m_featureIndex) && (m_type == a.m_type);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -55,12 +55,22 @@ AIS::AIS(WebAPIAdapterInterface *webAPIAdapterInterface) :
|
|||||||
&AIS::networkManagerFinished
|
&AIS::networkManagerFinished
|
||||||
);
|
);
|
||||||
scanAvailableChannels();
|
scanAvailableChannels();
|
||||||
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&AIS::handleChannelAdded
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
AIS::~AIS()
|
AIS::~AIS()
|
||||||
{
|
{
|
||||||
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&AIS::handleChannelAdded
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
&QNetworkAccessManager::finished,
|
&QNetworkAccessManager::finished,
|
||||||
@ -356,7 +366,12 @@ void AIS::scanAvailableChannels()
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&AIS::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
m_availableChannels.insert(channel);
|
m_availableChannels.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,7 +401,12 @@ void AIS::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&AIS::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
m_availableChannels.insert(channel);
|
m_availableChannels.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -394,13 +414,10 @@ void AIS::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
|
|
||||||
void AIS::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
void AIS::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
{
|
{
|
||||||
if (reason == 0) // producer (channel)
|
if ((reason == 0) && m_availableChannels.contains((ChannelAPI*) object)) // producer (channel)
|
||||||
{
|
{
|
||||||
if (m_availableChannels.contains((ChannelAPI*) object))
|
qDebug("AIS::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
||||||
{
|
m_availableChannels.remove((ChannelAPI*) object);
|
||||||
qDebug("AIS::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
|
||||||
m_availableChannels.remove((ChannelAPI*) object);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,12 +60,22 @@ APRS::APRS(WebAPIAdapterInterface *webAPIAdapterInterface) :
|
|||||||
&APRS::networkManagerFinished
|
&APRS::networkManagerFinished
|
||||||
);
|
);
|
||||||
scanAvailableChannels();
|
scanAvailableChannels();
|
||||||
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&APRS::handleChannelAdded
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
APRS::~APRS()
|
APRS::~APRS()
|
||||||
{
|
{
|
||||||
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&APRS::handleChannelAdded
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
&QNetworkAccessManager::finished,
|
&QNetworkAccessManager::finished,
|
||||||
@ -469,7 +479,12 @@ void APRS::scanAvailableChannels()
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&APRS::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
APRSSettings::AvailableChannel availableChannel =
|
APRSSettings::AvailableChannel availableChannel =
|
||||||
APRSSettings::AvailableChannel{deviceSet->getIndex(), chi, channel->getIdentifier()};
|
APRSSettings::AvailableChannel{deviceSet->getIndex(), chi, channel->getIdentifier()};
|
||||||
m_availableChannels[channel] = availableChannel;
|
m_availableChannels[channel] = availableChannel;
|
||||||
@ -514,7 +529,12 @@ void APRS::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&APRS::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
APRSSettings::AvailableChannel availableChannel =
|
APRSSettings::AvailableChannel availableChannel =
|
||||||
@ -527,14 +547,11 @@ void APRS::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
|
|
||||||
void APRS::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
void APRS::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
{
|
{
|
||||||
if (reason == 0) // producer (channel)
|
if ((reason == 0) && m_availableChannels.contains((ChannelAPI*) object)) // producer (channel)
|
||||||
{
|
{
|
||||||
if (m_availableChannels.contains((ChannelAPI*) object))
|
qDebug("APRS::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
||||||
{
|
m_availableChannels.remove((ChannelAPI*) object);
|
||||||
qDebug("APRS::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
notifyUpdateChannels();
|
||||||
m_availableChannels.remove((ChannelAPI*) object);
|
|
||||||
notifyUpdateChannels();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +43,7 @@
|
|||||||
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgConfigureGS232Controller, Message)
|
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgConfigureGS232Controller, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgStartStop, Message)
|
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgStartStop, Message)
|
||||||
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgReportWorker, Message)
|
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgReportWorker, Message)
|
||||||
|
MESSAGE_CLASS_DEFINITION(GS232Controller::MsgReportAvailableChannelOrFeatures, Message)
|
||||||
|
|
||||||
const char* const GS232Controller::m_featureIdURI = "sdrangel.feature.gs232controller";
|
const char* const GS232Controller::m_featureIdURI = "sdrangel.feature.gs232controller";
|
||||||
const char* const GS232Controller::m_featureId = "GS232Controller";
|
const char* const GS232Controller::m_featureId = "GS232Controller";
|
||||||
@ -57,8 +58,6 @@ GS232Controller::GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface)
|
|||||||
m_state = StIdle;
|
m_state = StIdle;
|
||||||
m_errorMessage = "GS232Controller error";
|
m_errorMessage = "GS232Controller error";
|
||||||
m_selectedPipe = nullptr;
|
m_selectedPipe = nullptr;
|
||||||
connect(&m_updatePipesTimer, SIGNAL(timeout()), this, SLOT(updatePipes()));
|
|
||||||
m_updatePipesTimer.start(1000);
|
|
||||||
m_networkManager = new QNetworkAccessManager();
|
m_networkManager = new QNetworkAccessManager();
|
||||||
QObject::connect(
|
QObject::connect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
@ -66,10 +65,58 @@ GS232Controller::GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface)
|
|||||||
this,
|
this,
|
||||||
&GS232Controller::networkManagerFinished
|
&GS232Controller::networkManagerFinished
|
||||||
);
|
);
|
||||||
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::featureAdded,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleFeatureAdded
|
||||||
|
);
|
||||||
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleChannelAdded
|
||||||
|
);
|
||||||
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::featureRemoved,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleFeatureRemoved
|
||||||
|
);
|
||||||
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelRemoved,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleChannelRemoved
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
GS232Controller::~GS232Controller()
|
GS232Controller::~GS232Controller()
|
||||||
{
|
{
|
||||||
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelRemoved,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleChannelRemoved
|
||||||
|
);
|
||||||
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::featureRemoved,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleFeatureRemoved
|
||||||
|
);
|
||||||
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleChannelAdded
|
||||||
|
);
|
||||||
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::featureAdded,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleFeatureAdded
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
&QNetworkAccessManager::finished,
|
&QNetworkAccessManager::finished,
|
||||||
@ -96,6 +143,8 @@ void GS232Controller::start()
|
|||||||
|
|
||||||
GS232ControllerWorker::MsgConfigureGS232ControllerWorker *msg = GS232ControllerWorker::MsgConfigureGS232ControllerWorker::create(m_settings, true);
|
GS232ControllerWorker::MsgConfigureGS232ControllerWorker *msg = GS232ControllerWorker::MsgConfigureGS232ControllerWorker::create(m_settings, true);
|
||||||
m_worker->getInputMessageQueue()->push(msg);
|
m_worker->getInputMessageQueue()->push(msg);
|
||||||
|
|
||||||
|
scanAvailableChannelsAndFeatures();
|
||||||
}
|
}
|
||||||
|
|
||||||
void GS232Controller::stop()
|
void GS232Controller::stop()
|
||||||
@ -201,24 +250,6 @@ bool GS232Controller::getOnTarget() const
|
|||||||
return onTarget;
|
return onTarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GS232Controller::updatePipes()
|
|
||||||
{
|
|
||||||
QList<AvailablePipeSource> availablePipes = updateAvailablePipeSources("target", GS232ControllerSettings::m_pipeTypes, GS232ControllerSettings::m_pipeURIs, this);
|
|
||||||
|
|
||||||
if (availablePipes != m_availablePipes)
|
|
||||||
{
|
|
||||||
m_availablePipes = availablePipes;
|
|
||||||
|
|
||||||
if (getMessageQueueToGUI())
|
|
||||||
{
|
|
||||||
MsgReportPipes *msgToGUI = MsgReportPipes::create();
|
|
||||||
QList<AvailablePipeSource>& msgAvailablePipes = msgToGUI->getAvailablePipes();
|
|
||||||
msgAvailablePipes.append(availablePipes);
|
|
||||||
getMessageQueueToGUI()->push(msgToGUI);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
QByteArray GS232Controller::serialize() const
|
QByteArray GS232Controller::serialize() const
|
||||||
{
|
{
|
||||||
return m_settings.serialize();
|
return m_settings.serialize();
|
||||||
@ -296,14 +327,49 @@ void GS232Controller::applySettings(const GS232ControllerSettings& settings, boo
|
|||||||
|| (!settings.m_source.isEmpty() && (m_selectedPipe == nullptr)) // Change in available pipes
|
|| (!settings.m_source.isEmpty() && (m_selectedPipe == nullptr)) // Change in available pipes
|
||||||
|| force)
|
|| force)
|
||||||
{
|
{
|
||||||
|
MainCore *mainCore = MainCore::instance();
|
||||||
|
MessagePipes& messagePipes = mainCore->getMessagePipes();
|
||||||
|
|
||||||
|
if (m_selectedPipe)
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::applySettings: unregister %s (%p)", qPrintable(m_selectedPipe->objectName()), m_selectedPipe);
|
||||||
|
messagePipes.unregisterProducerToConsumer(m_selectedPipe, this, "target");
|
||||||
|
}
|
||||||
|
|
||||||
if (!settings.m_source.isEmpty())
|
if (!settings.m_source.isEmpty())
|
||||||
{
|
{
|
||||||
m_selectedPipe = getPipeEndPoint(settings.m_source, m_availablePipes);
|
QObject *object = nullptr;
|
||||||
|
|
||||||
if (m_selectedPipe == nullptr) {
|
for (const auto& oval : m_availableChannelOrFeatures)
|
||||||
|
{
|
||||||
|
QString itemText = tr("%1%2:%3 %4")
|
||||||
|
.arg(oval.m_kind)
|
||||||
|
.arg(oval.m_superIndex)
|
||||||
|
.arg(oval.m_index)
|
||||||
|
.arg(oval.m_type);
|
||||||
|
|
||||||
|
if (settings.m_source == itemText)
|
||||||
|
{
|
||||||
|
object = m_availableChannelOrFeatures.key(oval);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (object)
|
||||||
|
{
|
||||||
|
registerPipe(object);
|
||||||
|
m_selectedPipe = object;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_selectedPipe = nullptr;
|
||||||
qDebug() << "GS232Controller::applySettings: No plugin corresponding to source " << settings.m_source;
|
qDebug() << "GS232Controller::applySettings: No plugin corresponding to source " << settings.m_source;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_selectedPipe = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
reverseAPIKeys.append("source");
|
reverseAPIKeys.append("source");
|
||||||
}
|
}
|
||||||
@ -663,8 +729,15 @@ void GS232Controller::webapiFormatFeatureReport(SWGSDRangel::SWGFeatureReport& r
|
|||||||
{
|
{
|
||||||
response.getGs232ControllerReport()->setSources(new QList<QString*>());
|
response.getGs232ControllerReport()->setSources(new QList<QString*>());
|
||||||
|
|
||||||
for (int i = 0; i < m_availablePipes.size(); i++) {
|
for (const auto& item : m_availableChannelOrFeatures)
|
||||||
response.getGs232ControllerReport()->getSources()->append(new QString(m_availablePipes.at(i).getName()));
|
{
|
||||||
|
QString itemText = tr("%1%2:%3 %4")
|
||||||
|
.arg(item.m_kind)
|
||||||
|
.arg(item.m_superIndex)
|
||||||
|
.arg(item.m_index)
|
||||||
|
.arg(item.m_type);
|
||||||
|
|
||||||
|
response.getGs232ControllerReport()->getSources()->append(new QString(itemText));
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<QSerialPortInfo> serialPorts = QSerialPortInfo::availablePorts();
|
QList<QSerialPortInfo> serialPorts = QSerialPortInfo::availablePorts();
|
||||||
@ -707,3 +780,172 @@ void GS232Controller::networkManagerFinished(QNetworkReply *reply)
|
|||||||
|
|
||||||
reply->deleteLater();
|
reply->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GS232Controller::scanAvailableChannelsAndFeatures()
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::scanAvailableChannelsAndFeatures");
|
||||||
|
MainCore *mainCore = MainCore::instance();
|
||||||
|
std::vector<FeatureSet*>& featureSets = mainCore->getFeatureeSets();
|
||||||
|
m_availableChannelOrFeatures.clear();
|
||||||
|
|
||||||
|
for (const auto& featureSet : featureSets)
|
||||||
|
{
|
||||||
|
for (int fei = 0; fei < featureSet->getNumberOfFeatures(); fei++)
|
||||||
|
{
|
||||||
|
Feature *feature = featureSet->getFeatureAt(fei);
|
||||||
|
|
||||||
|
if (GS232ControllerSettings::m_pipeURIs.contains(feature->getURI()) && !m_availableChannelOrFeatures.contains(feature))
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::scanAvailableChannelsAndFeatures: store feature %d:%d %s (%p)",
|
||||||
|
featureSet->getIndex(), fei, qPrintable(feature->getURI()), feature);
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature availableItem =
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature{"F", featureSet->getIndex(), fei, feature->getIdentifier()};
|
||||||
|
m_availableChannelOrFeatures[feature] = availableItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
std::vector<DeviceSet*>& deviceSets = mainCore->getDeviceSets();
|
||||||
|
|
||||||
|
for (const auto& deviceSet : deviceSets)
|
||||||
|
{
|
||||||
|
DSPDeviceSourceEngine *deviceSourceEngine = deviceSet->m_deviceSourceEngine;
|
||||||
|
|
||||||
|
if (deviceSourceEngine)
|
||||||
|
{
|
||||||
|
for (int chi = 0; chi < deviceSet->getNumberOfChannels(); chi++)
|
||||||
|
{
|
||||||
|
ChannelAPI *channel = deviceSet->getChannelAt(chi);
|
||||||
|
|
||||||
|
if (GS232ControllerSettings::m_pipeURIs.contains(channel->getURI()) && !m_availableChannelOrFeatures.contains(channel))
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::scanAvailableChannelsAndFeatures: store channel %d:%d %s (%p)",
|
||||||
|
deviceSet->getIndex(), chi, qPrintable(channel->getURI()), channel);
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature availableItem =
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature{"R", deviceSet->getIndex(), chi, channel->getIdentifier()};
|
||||||
|
m_availableChannelOrFeatures[channel] = availableItem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
notifyUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::notifyUpdate()
|
||||||
|
{
|
||||||
|
if (getMessageQueueToGUI())
|
||||||
|
{
|
||||||
|
MsgReportAvailableChannelOrFeatures *msg = MsgReportAvailableChannelOrFeatures::create();
|
||||||
|
msg->getItems() = m_availableChannelOrFeatures.values();
|
||||||
|
getMessageQueueToGUI()->push(msg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::handleFeatureAdded(int featureSetIndex, Feature *feature)
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::handleFeatureAdded: featureSetIndex: %d:%d feature: %s (%p)",
|
||||||
|
featureSetIndex, feature->getIndexInFeatureSet(), qPrintable(feature->getURI()), feature);
|
||||||
|
FeatureSet *featureSet = MainCore::instance()->getFeatureeSets()[featureSetIndex];
|
||||||
|
|
||||||
|
if (GS232ControllerSettings::m_pipeURIs.contains(feature->getURI()))
|
||||||
|
{
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature availableItem =
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature{
|
||||||
|
"F",
|
||||||
|
featureSet->getIndex(),
|
||||||
|
feature->getIndexInFeatureSet(),
|
||||||
|
feature->getIdentifier()
|
||||||
|
};
|
||||||
|
m_availableChannelOrFeatures[feature] = availableItem;
|
||||||
|
|
||||||
|
notifyUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::handleFeatureRemoved(int featureSetIndex, Feature *feature)
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::handleFeatureRemoved: featureSetIndex: %d (%p)", featureSetIndex, feature);
|
||||||
|
|
||||||
|
if (m_availableChannelOrFeatures.contains(feature))
|
||||||
|
{
|
||||||
|
m_availableChannelOrFeatures.remove(feature);
|
||||||
|
notifyUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::handleChannelAdded: deviceSetIndex: %d:%d channel: %s (%p)",
|
||||||
|
deviceSetIndex, channel->getIndexInDeviceSet(), qPrintable(channel->getURI()), channel);
|
||||||
|
DeviceSet *deviceSet = MainCore::instance()->getDeviceSets()[deviceSetIndex];
|
||||||
|
DSPDeviceSourceEngine *deviceSourceEngine = deviceSet->m_deviceSourceEngine;
|
||||||
|
|
||||||
|
if (deviceSourceEngine && GS232ControllerSettings::m_pipeURIs.contains(channel->getURI()))
|
||||||
|
{
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature availableItem =
|
||||||
|
GS232ControllerSettings::AvailableChannelOrFeature{
|
||||||
|
"R",
|
||||||
|
deviceSet->getIndex(),
|
||||||
|
channel->getIndexInDeviceSet(),
|
||||||
|
channel->getIdentifier()
|
||||||
|
};
|
||||||
|
m_availableChannelOrFeatures[channel] = availableItem;
|
||||||
|
|
||||||
|
notifyUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::handleChannelRemoved(int deviceSetIndex, ChannelAPI *channel)
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::handleChannelRemoved: deviceSetIndex: %d (%p)", deviceSetIndex, channel);
|
||||||
|
|
||||||
|
if (m_availableChannelOrFeatures.contains(channel))
|
||||||
|
{
|
||||||
|
m_availableChannelOrFeatures.remove(channel);
|
||||||
|
notifyUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::registerPipe(QObject *object)
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::registerPipe: register %s (%p)", qPrintable(object->objectName()), object);
|
||||||
|
MessagePipes& messagePipes = MainCore::instance()->getMessagePipes();
|
||||||
|
ObjectPipe *pipe = messagePipes.registerProducerToConsumer(object, this, "target");
|
||||||
|
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
||||||
|
QObject::connect(
|
||||||
|
messageQueue,
|
||||||
|
&MessageQueue::messageEnqueued,
|
||||||
|
this,
|
||||||
|
[=](){ this->handlePipeMessageQueue(messageQueue); },
|
||||||
|
Qt::QueuedConnection
|
||||||
|
);
|
||||||
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&GS232Controller::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
|
{
|
||||||
|
if ((reason == 0) && m_availableChannelOrFeatures.contains(object)) // producer
|
||||||
|
{
|
||||||
|
qDebug("GS232Controller::handleMessagePipeToBeDeleted: removing channel or feature at (%p)", object);
|
||||||
|
m_availableChannelOrFeatures.remove(object);
|
||||||
|
notifyUpdate();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void GS232Controller::handlePipeMessageQueue(MessageQueue* messageQueue)
|
||||||
|
{
|
||||||
|
Message* message;
|
||||||
|
|
||||||
|
while ((message = messageQueue->pop()) != nullptr)
|
||||||
|
{
|
||||||
|
if (handleMessage(*message)) {
|
||||||
|
delete message;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
|
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <QNetworkRequest>
|
#include <QNetworkRequest>
|
||||||
#include <QTimer>
|
#include <QHash>
|
||||||
|
|
||||||
#include "feature/feature.h"
|
#include "feature/feature.h"
|
||||||
#include "util/message.h"
|
#include "util/message.h"
|
||||||
@ -101,6 +101,24 @@ public:
|
|||||||
{}
|
{}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class MsgReportAvailableChannelOrFeatures : public Message {
|
||||||
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
|
public:
|
||||||
|
QList<GS232ControllerSettings::AvailableChannelOrFeature>& getItems() { return m_availableChannelOrFeatures; }
|
||||||
|
|
||||||
|
static MsgReportAvailableChannelOrFeatures* create() {
|
||||||
|
return new MsgReportAvailableChannelOrFeatures();
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
QList<GS232ControllerSettings::AvailableChannelOrFeature> m_availableChannelOrFeatures;
|
||||||
|
|
||||||
|
MsgReportAvailableChannelOrFeatures() :
|
||||||
|
Message()
|
||||||
|
{}
|
||||||
|
};
|
||||||
|
|
||||||
GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface);
|
GS232Controller(WebAPIAdapterInterface *webAPIAdapterInterface);
|
||||||
virtual ~GS232Controller();
|
virtual ~GS232Controller();
|
||||||
virtual void destroy() { delete this; }
|
virtual void destroy() { delete this; }
|
||||||
@ -154,9 +172,8 @@ private:
|
|||||||
QThread m_thread;
|
QThread m_thread;
|
||||||
GS232ControllerWorker *m_worker;
|
GS232ControllerWorker *m_worker;
|
||||||
GS232ControllerSettings m_settings;
|
GS232ControllerSettings m_settings;
|
||||||
QList<AvailablePipeSource> m_availablePipes;
|
QHash<QObject*, GS232ControllerSettings::AvailableChannelOrFeature> m_availableChannelOrFeatures;
|
||||||
PipeEndPoint *m_selectedPipe;
|
QObject *m_selectedPipe;
|
||||||
QTimer m_updatePipesTimer;
|
|
||||||
|
|
||||||
QNetworkAccessManager *m_networkManager;
|
QNetworkAccessManager *m_networkManager;
|
||||||
QNetworkRequest m_networkRequest;
|
QNetworkRequest m_networkRequest;
|
||||||
@ -169,10 +186,18 @@ private:
|
|||||||
void applySettings(const GS232ControllerSettings& settings, bool force = false);
|
void applySettings(const GS232ControllerSettings& settings, bool force = false);
|
||||||
void webapiReverseSendSettings(QList<QString>& featureSettingsKeys, const GS232ControllerSettings& settings, bool force);
|
void webapiReverseSendSettings(QList<QString>& featureSettingsKeys, const GS232ControllerSettings& settings, bool force);
|
||||||
void webapiFormatFeatureReport(SWGSDRangel::SWGFeatureReport& response);
|
void webapiFormatFeatureReport(SWGSDRangel::SWGFeatureReport& response);
|
||||||
|
void scanAvailableChannelsAndFeatures();
|
||||||
|
void notifyUpdate();
|
||||||
|
void registerPipe(QObject *object);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updatePipes();
|
|
||||||
void networkManagerFinished(QNetworkReply *reply);
|
void networkManagerFinished(QNetworkReply *reply);
|
||||||
|
void handleFeatureAdded(int featureSetIndex, Feature *feature);
|
||||||
|
void handleChannelAdded(int deviceSetIndex, ChannelAPI *channel);
|
||||||
|
void handleFeatureRemoved(int featureSetIndex, Feature *feature);
|
||||||
|
void handleChannelRemoved(int deviceSetIndex, ChannelAPI *feature);
|
||||||
|
void handleMessagePipeToBeDeleted(int reason, QObject* object);
|
||||||
|
void handlePipeMessageQueue(MessageQueue* messageQueue);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // INCLUDE_FEATURE_GS232CONTROLLER_H_
|
#endif // INCLUDE_FEATURE_GS232CONTROLLER_H_
|
||||||
|
@ -83,11 +83,11 @@ bool GS232ControllerGUI::handleMessage(const Message& message)
|
|||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (PipeEndPoint::MsgReportPipes::match(message))
|
else if (GS232Controller::MsgReportAvailableChannelOrFeatures::match(message))
|
||||||
{
|
{
|
||||||
PipeEndPoint::MsgReportPipes& report = (PipeEndPoint::MsgReportPipes&) message;
|
GS232Controller::MsgReportAvailableChannelOrFeatures& report =
|
||||||
m_availablePipes = report.getAvailablePipes();
|
(GS232Controller::MsgReportAvailableChannelOrFeatures&) message;
|
||||||
updatePipeList();
|
updatePipeList(report.getItems());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (GS232ControllerReport::MsgReportAzAl::match(message))
|
else if (GS232ControllerReport::MsgReportAzAl::match(message))
|
||||||
@ -232,41 +232,56 @@ void GS232ControllerGUI::updateSerialPortList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GS232ControllerGUI::updatePipeList()
|
void GS232ControllerGUI::updatePipeList(const QList<GS232ControllerSettings::AvailableChannelOrFeature>& sources)
|
||||||
{
|
{
|
||||||
QString currentText = ui->sources->currentText();
|
QString currentText = ui->sources->currentText();
|
||||||
|
QString newText;
|
||||||
ui->sources->blockSignals(true);
|
ui->sources->blockSignals(true);
|
||||||
ui->sources->clear();
|
ui->sources->clear();
|
||||||
QList<PipeEndPoint::AvailablePipeSource>::const_iterator it = m_availablePipes.begin();
|
|
||||||
|
|
||||||
for (int i = 0; it != m_availablePipes.end(); ++it, i++)
|
for (const auto& source : sources)
|
||||||
{
|
{
|
||||||
ui->sources->addItem(it->getName());
|
QString name = tr("%1%2:%3 %4")
|
||||||
|
.arg(source.m_kind)
|
||||||
|
.arg(source.m_superIndex)
|
||||||
|
.arg(source.m_index)
|
||||||
|
.arg(source.m_type);
|
||||||
|
ui->sources->addItem(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentText.isEmpty())
|
int index = ui->sources->findText(m_settings.m_source);
|
||||||
|
ui->sources->setCurrentIndex(index);
|
||||||
|
|
||||||
|
if (index < 0) // current source is not found
|
||||||
{
|
{
|
||||||
// Source feature may be loaded after this, so may not have existed when
|
m_settings.m_source = "";
|
||||||
// displaySettings was called
|
ui->targetName->setText("");
|
||||||
if (m_availablePipes.size() > 0) {
|
applySettings();
|
||||||
ui->sources->setCurrentIndex(ui->sources->findText(m_settings.m_source));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ui->sources->setCurrentIndex(ui->sources->findText(currentText));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// if (currentText.isEmpty())
|
||||||
|
// {
|
||||||
|
// // Source feature may be loaded after this, so may not have existed when
|
||||||
|
// // displaySettings was called
|
||||||
|
// if (sources.size() > 0) {
|
||||||
|
// ui->sources->setCurrentIndex(ui->sources->findText(m_settings.m_source));
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// ui->sources->setCurrentIndex(ui->sources->findText(currentText));
|
||||||
|
// }
|
||||||
|
|
||||||
ui->sources->blockSignals(false);
|
ui->sources->blockSignals(false);
|
||||||
|
|
||||||
QString newText = ui->sources->currentText();
|
// QString newText = ui->sources->currentText();
|
||||||
|
|
||||||
if (currentText != newText)
|
// if (currentText != newText)
|
||||||
{
|
// {
|
||||||
m_settings.m_source = newText;
|
// m_settings.m_source = newText;
|
||||||
ui->targetName->setText("");
|
// ui->targetName->setText("");
|
||||||
applySettings();
|
// applySettings();
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
void GS232ControllerGUI::leaveEvent(QEvent*)
|
void GS232ControllerGUI::leaveEvent(QEvent*)
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
|
|
||||||
#include "feature/featuregui.h"
|
#include "feature/featuregui.h"
|
||||||
#include "util/messagequeue.h"
|
#include "util/messagequeue.h"
|
||||||
#include "pipes/pipeendpoint.h"
|
|
||||||
#include "settings/rollupstate.h"
|
#include "settings/rollupstate.h"
|
||||||
|
|
||||||
#include "gs232controllersettings.h"
|
#include "gs232controllersettings.h"
|
||||||
@ -54,7 +53,6 @@ private:
|
|||||||
GS232ControllerSettings m_settings;
|
GS232ControllerSettings m_settings;
|
||||||
RollupState m_rollupState;
|
RollupState m_rollupState;
|
||||||
bool m_doApplySettings;
|
bool m_doApplySettings;
|
||||||
QList<PipeEndPoint::AvailablePipeSource> m_availablePipes;
|
|
||||||
|
|
||||||
GS232Controller* m_gs232Controller;
|
GS232Controller* m_gs232Controller;
|
||||||
MessageQueue m_inputMessageQueue;
|
MessageQueue m_inputMessageQueue;
|
||||||
@ -70,7 +68,7 @@ private:
|
|||||||
void displaySettings();
|
void displaySettings();
|
||||||
void updateConnectionWidgets();
|
void updateConnectionWidgets();
|
||||||
void updateDecimals(GS232ControllerSettings::Protocol protocol);
|
void updateDecimals(GS232ControllerSettings::Protocol protocol);
|
||||||
void updatePipeList();
|
void updatePipeList(const QList<GS232ControllerSettings::AvailableChannelOrFeature>& sources);
|
||||||
void updateSerialPortList();
|
void updateSerialPortList();
|
||||||
bool handleMessage(const Message& message);
|
bool handleMessage(const Message& message);
|
||||||
|
|
||||||
|
@ -28,6 +28,21 @@ class Serializable;
|
|||||||
|
|
||||||
struct GS232ControllerSettings
|
struct GS232ControllerSettings
|
||||||
{
|
{
|
||||||
|
struct AvailableChannelOrFeature
|
||||||
|
{
|
||||||
|
QString m_kind; //!< "R" for channel, "F" for feature
|
||||||
|
int m_superIndex;
|
||||||
|
int m_index;
|
||||||
|
QString m_type;
|
||||||
|
|
||||||
|
AvailableChannelOrFeature() = default;
|
||||||
|
AvailableChannelOrFeature(const AvailableChannelOrFeature&) = default;
|
||||||
|
AvailableChannelOrFeature& operator=(const AvailableChannelOrFeature&) = default;
|
||||||
|
bool operator==(const AvailableChannelOrFeature& a) const {
|
||||||
|
return (m_kind == a.m_kind) && (m_superIndex == a.m_superIndex) && (m_index == a.m_index) && (m_type == a.m_type);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
float m_azimuth;
|
float m_azimuth;
|
||||||
float m_elevation;
|
float m_elevation;
|
||||||
QString m_serialPort;
|
QString m_serialPort;
|
||||||
|
@ -18,7 +18,6 @@
|
|||||||
#include <QGeoRectangle>
|
#include <QGeoRectangle>
|
||||||
|
|
||||||
#include "channel/channelwebapiutils.h"
|
#include "channel/channelwebapiutils.h"
|
||||||
#include "pipes/messagepipeslegacy.h"
|
|
||||||
#include "maincore.h"
|
#include "maincore.h"
|
||||||
|
|
||||||
#include "mapmodel.h"
|
#include "mapmodel.h"
|
||||||
@ -358,20 +357,17 @@ void MapModel::updateTarget()
|
|||||||
azEl->calculate();
|
azEl->calculate();
|
||||||
|
|
||||||
// Send to Rotator Controllers
|
// Send to Rotator Controllers
|
||||||
MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipesLegacy();
|
QList<ObjectPipe*> rotatorPipes;
|
||||||
QList<MessageQueue*> *mapMessageQueues = messagePipes.getMessageQueues(m_gui->getMap(), "target");
|
MainCore::instance()->getMessagePipes().getMessagePipes(this, "target", rotatorPipes);
|
||||||
if (mapMessageQueues)
|
|
||||||
{
|
|
||||||
QList<MessageQueue*>::iterator it = mapMessageQueues->begin();
|
|
||||||
|
|
||||||
for (; it != mapMessageQueues->end(); ++it)
|
for (const auto& pipe : rotatorPipes)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
||||||
swgTarget->setName(new QString(m_items[m_target]->m_name));
|
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
||||||
swgTarget->setAzimuth(azEl->getAzimuth());
|
swgTarget->setName(new QString(m_items[m_target]->m_name));
|
||||||
swgTarget->setElevation(azEl->getElevation());
|
swgTarget->setAzimuth(azEl->getAzimuth());
|
||||||
(*it)->push(MainCore::MsgTargetAzimuthElevation::create(m_gui->getMap(), swgTarget));
|
swgTarget->setElevation(azEl->getElevation());
|
||||||
}
|
messageQueue->push(MainCore::MsgTargetAzimuthElevation::create(m_gui->getMap(), swgTarget));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -23,7 +23,6 @@
|
|||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
|
||||||
#include "util/azel.h"
|
#include "util/azel.h"
|
||||||
#include "pipes/pipeendpoint.h"
|
|
||||||
#include "mapsettings.h"
|
#include "mapsettings.h"
|
||||||
#include "cesiuminterface.h"
|
#include "cesiuminterface.h"
|
||||||
|
|
||||||
@ -32,6 +31,7 @@
|
|||||||
class MapModel;
|
class MapModel;
|
||||||
class MapGUI;
|
class MapGUI;
|
||||||
class CZML;
|
class CZML;
|
||||||
|
class PipeEndPoint;
|
||||||
|
|
||||||
// Information required about each item displayed on the map
|
// Information required about each item displayed on the map
|
||||||
class MapItem {
|
class MapItem {
|
||||||
|
@ -55,12 +55,22 @@ Radiosonde::Radiosonde(WebAPIAdapterInterface *webAPIAdapterInterface) :
|
|||||||
&Radiosonde::networkManagerFinished
|
&Radiosonde::networkManagerFinished
|
||||||
);
|
);
|
||||||
scanAvailableChannels();
|
scanAvailableChannels();
|
||||||
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&Radiosonde::handleChannelAdded
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
Radiosonde::~Radiosonde()
|
Radiosonde::~Radiosonde()
|
||||||
{
|
{
|
||||||
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&Radiosonde::handleChannelAdded
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
&QNetworkAccessManager::finished,
|
&QNetworkAccessManager::finished,
|
||||||
@ -356,7 +366,12 @@ void Radiosonde::scanAvailableChannels()
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&Radiosonde::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
m_availableChannels.insert(channel);
|
m_availableChannels.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -386,7 +401,12 @@ void Radiosonde::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&Radiosonde::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
m_availableChannels.insert(channel);
|
m_availableChannels.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -394,13 +414,10 @@ void Radiosonde::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
|
|
||||||
void Radiosonde::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
void Radiosonde::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
{
|
{
|
||||||
if (reason == 0) // producer (channel)
|
if ((reason == 0) && m_availableChannels.contains((ChannelAPI*) object)) // producer (channel)
|
||||||
{
|
{
|
||||||
if (m_availableChannels.contains((ChannelAPI*) object))
|
qDebug("Radiosonde::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
||||||
{
|
m_availableChannels.remove((ChannelAPI*) object);
|
||||||
qDebug("Radiosonde::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
|
||||||
m_availableChannels.remove((ChannelAPI*) object);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -405,20 +405,18 @@ void SatelliteTrackerWorker::update()
|
|||||||
azimuth = std::fmod(azimuth + 180.0, 360.0);
|
azimuth = std::fmod(azimuth + 180.0, 360.0);
|
||||||
elevation = 180.0 - elevation;
|
elevation = 180.0 - elevation;
|
||||||
}
|
}
|
||||||
MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipesLegacy();
|
|
||||||
QList<MessageQueue*> *rotatorMessageQueues = messagePipes.getMessageQueues(m_satelliteTracker, "target");
|
|
||||||
if (rotatorMessageQueues)
|
|
||||||
{
|
|
||||||
QList<MessageQueue*>::iterator it = rotatorMessageQueues->begin();
|
|
||||||
|
|
||||||
for (; it != rotatorMessageQueues->end(); ++it)
|
QList<ObjectPipe*> rotatorPipes;
|
||||||
{
|
MainCore::instance()->getMessagePipes().getMessagePipes(m_satelliteTracker, "target", rotatorPipes);
|
||||||
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
|
||||||
swgTarget->setName(new QString(m_settings.m_target));
|
for (const auto& pipe : rotatorPipes)
|
||||||
swgTarget->setAzimuth(azimuth);
|
{
|
||||||
swgTarget->setElevation(elevation);
|
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
||||||
(*it)->push(MainCore::MsgTargetAzimuthElevation::create(m_satelliteTracker, swgTarget));
|
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
||||||
}
|
swgTarget->setName(new QString(m_settings.m_target));
|
||||||
|
swgTarget->setAzimuth(azimuth);
|
||||||
|
swgTarget->setElevation(elevation);
|
||||||
|
messageQueue->push(MainCore::MsgTargetAzimuthElevation::create(m_satelliteTracker, swgTarget));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -69,12 +69,22 @@ StarTracker::StarTracker(WebAPIAdapterInterface *webAPIAdapterInterface) :
|
|||||||
m_temps.append(new FITS(":/startracker/startracker/1420mhz_ra_dec.fits"));
|
m_temps.append(new FITS(":/startracker/startracker/1420mhz_ra_dec.fits"));
|
||||||
m_spectralIndex = new FITS(":/startracker/startracker/408mhz_ra_dec_spectral_index.fits");
|
m_spectralIndex = new FITS(":/startracker/startracker/408mhz_ra_dec_spectral_index.fits");
|
||||||
scanAvailableChannels();
|
scanAvailableChannels();
|
||||||
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&StarTracker::handleChannelAdded
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
StarTracker::~StarTracker()
|
StarTracker::~StarTracker()
|
||||||
{
|
{
|
||||||
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&StarTracker::handleChannelAdded
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
&QNetworkAccessManager::finished,
|
&QNetworkAccessManager::finished,
|
||||||
@ -918,7 +928,12 @@ void StarTracker::scanAvailableChannels()
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&StarTracker::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
m_availableChannels.insert(channel);
|
m_availableChannels.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -947,7 +962,12 @@ void StarTracker::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&StarTracker::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
m_availableChannels.insert(channel);
|
m_availableChannels.insert(channel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -955,13 +975,10 @@ void StarTracker::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
|
|
||||||
void StarTracker::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
void StarTracker::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
{
|
{
|
||||||
if (reason == 0) // producer (channel)
|
if ((reason == 0) && m_availableChannels.contains((ChannelAPI*) object)) // producer (channel)
|
||||||
{
|
{
|
||||||
if (m_availableChannels.contains((ChannelAPI*) object))
|
qDebug("StarTracker::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
||||||
{
|
m_availableChannels.remove((ChannelAPI*) object);
|
||||||
qDebug("StarTracker::handleMessagePipeToBeDeleted: removing channel at (%p)", object);
|
|
||||||
m_availableChannels.remove((ChannelAPI*) object);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -580,26 +580,21 @@ void StarTrackerWorker::update()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipesLegacy();
|
|
||||||
QList<MessageQueue*>* messageQueues;
|
|
||||||
|
|
||||||
// Send Az/El to Rotator Controllers
|
// Send Az/El to Rotator Controllers
|
||||||
// Unless we're receiving settings to display from a Radio Astronomy plugins
|
// Unless we're receiving settings to display from a Radio Astronomy plugins
|
||||||
if (!m_settings.m_link)
|
if (!m_settings.m_link)
|
||||||
{
|
{
|
||||||
messageQueues = messagePipes.getMessageQueues(m_starTracker, "target");
|
QList<ObjectPipe*> rotatorPipes;
|
||||||
if (messageQueues)
|
MainCore::instance()->getMessagePipes().getMessagePipes(m_starTracker, "target", rotatorPipes);
|
||||||
{
|
|
||||||
QList<MessageQueue*>::iterator it = messageQueues->begin();
|
|
||||||
|
|
||||||
for (; it != messageQueues->end(); ++it)
|
for (const auto& pipe : rotatorPipes)
|
||||||
{
|
{
|
||||||
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
MessageQueue *messageQueue = qobject_cast<MessageQueue*>(pipe->m_element);
|
||||||
swgTarget->setName(new QString(m_settings.m_target));
|
SWGSDRangel::SWGTargetAzimuthElevation *swgTarget = new SWGSDRangel::SWGTargetAzimuthElevation();
|
||||||
swgTarget->setAzimuth(aa.az);
|
swgTarget->setName(new QString(m_settings.m_target));
|
||||||
swgTarget->setElevation(aa.alt);
|
swgTarget->setAzimuth(aa.az);
|
||||||
(*it)->push(MainCore::MsgTargetAzimuthElevation::create(m_starTracker, swgTarget));
|
swgTarget->setElevation(aa.alt);
|
||||||
}
|
messageQueue->push(MainCore::MsgTargetAzimuthElevation::create(m_starTracker, swgTarget));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -608,7 +603,7 @@ void StarTrackerWorker::update()
|
|||||||
if (!m_settings.m_link)
|
if (!m_settings.m_link)
|
||||||
{
|
{
|
||||||
QList<ObjectPipe*> starTrackerPipes;
|
QList<ObjectPipe*> starTrackerPipes;
|
||||||
MainCore::instance()->getMessagePipes().getMessagePipes(this, "startracker.target", starTrackerPipes);
|
MainCore::instance()->getMessagePipes().getMessagePipes(m_starTracker, "startracker.target", starTrackerPipes);
|
||||||
|
|
||||||
for (const auto& pipe : starTrackerPipes)
|
for (const auto& pipe : starTrackerPipes)
|
||||||
{
|
{
|
||||||
@ -641,7 +636,10 @@ void StarTrackerWorker::update()
|
|||||||
// Send to Map
|
// Send to Map
|
||||||
if (m_settings.m_drawSunOnMap || m_settings.m_drawMoonOnMap || m_settings.m_drawStarOnMap)
|
if (m_settings.m_drawSunOnMap || m_settings.m_drawMoonOnMap || m_settings.m_drawStarOnMap)
|
||||||
{
|
{
|
||||||
|
MessagePipesLegacy& messagePipes = MainCore::instance()->getMessagePipesLegacy();
|
||||||
|
QList<MessageQueue*>* messageQueues;
|
||||||
messageQueues = messagePipes.getMessageQueues(m_starTracker, "mapitems");
|
messageQueues = messagePipes.getMessageQueues(m_starTracker, "mapitems");
|
||||||
|
|
||||||
if (messageQueues)
|
if (messageQueues)
|
||||||
{
|
{
|
||||||
// Different between GMST(Lst at Greenwich) and RA
|
// Different between GMST(Lst at Greenwich) and RA
|
||||||
|
@ -62,12 +62,22 @@ VORLocalizer::VORLocalizer(WebAPIAdapterInterface *webAPIAdapterInterface) :
|
|||||||
this,
|
this,
|
||||||
&VORLocalizer::networkManagerFinished
|
&VORLocalizer::networkManagerFinished
|
||||||
);
|
);
|
||||||
connect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::connect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&VORLocalizer::handleChannelAdded
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
VORLocalizer::~VORLocalizer()
|
VORLocalizer::~VORLocalizer()
|
||||||
{
|
{
|
||||||
disconnect(MainCore::instance(), SIGNAL(channelAdded(int, ChannelAPI*)), this, SLOT(handleChannelAdded(int, ChannelAPI*)));
|
QObject::disconnect(
|
||||||
|
MainCore::instance(),
|
||||||
|
&MainCore::channelAdded,
|
||||||
|
this,
|
||||||
|
&VORLocalizer::handleChannelAdded
|
||||||
|
);
|
||||||
QObject::disconnect(
|
QObject::disconnect(
|
||||||
m_networkManager,
|
m_networkManager,
|
||||||
&QNetworkAccessManager::finished,
|
&QNetworkAccessManager::finished,
|
||||||
@ -264,13 +274,10 @@ bool VORLocalizer::handleMessage(const Message& cmd)
|
|||||||
|
|
||||||
void VORLocalizer::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
void VORLocalizer::handleMessagePipeToBeDeleted(int reason, QObject* object)
|
||||||
{
|
{
|
||||||
if (reason == 0) // producer (channel)
|
if ((reason == 0) && m_availableChannels.contains((ChannelAPI*) object)) // producer (channel)
|
||||||
{
|
{
|
||||||
if (m_availableChannels.contains((ChannelAPI*) object))
|
m_availableChannels.remove((ChannelAPI*) object);
|
||||||
{
|
updateChannels();
|
||||||
m_availableChannels.remove((ChannelAPI*) object);
|
|
||||||
updateChannels();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -679,7 +686,12 @@ void VORLocalizer::handleChannelAdded(int deviceSetIndex, ChannelAPI *channel)
|
|||||||
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
[=](){ this->handleChannelMessageQueue(messageQueue); },
|
||||||
Qt::QueuedConnection
|
Qt::QueuedConnection
|
||||||
);
|
);
|
||||||
connect(pipe, SIGNAL(toBeDeleted(int, QObject*)), this, SLOT(handleMessagePipeToBeDeleted(int, QObject*)));
|
QObject::connect(
|
||||||
|
pipe,
|
||||||
|
&ObjectPipe::toBeDeleted,
|
||||||
|
this,
|
||||||
|
&VORLocalizer::handleMessagePipeToBeDeleted
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
VORLocalizerSettings::AvailableChannel availableChannel =
|
VORLocalizerSettings::AvailableChannel availableChannel =
|
||||||
|
@ -610,19 +610,19 @@ public:
|
|||||||
MESSAGE_CLASS_DECLARATION
|
MESSAGE_CLASS_DECLARATION
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const PipeEndPoint *getPipeSource() const { return m_pipeSource; }
|
const QObject *getPipeSource() const { return m_pipeSource; }
|
||||||
SWGSDRangel::SWGTargetAzimuthElevation *getSWGTargetAzimuthElevation() const { return m_swgTargetAzimuthElevation; }
|
SWGSDRangel::SWGTargetAzimuthElevation *getSWGTargetAzimuthElevation() const { return m_swgTargetAzimuthElevation; }
|
||||||
|
|
||||||
static MsgTargetAzimuthElevation* create(const PipeEndPoint *pipeSource, SWGSDRangel::SWGTargetAzimuthElevation *swgTargetAzimuthElevation)
|
static MsgTargetAzimuthElevation* create(const QObject *pipeSource, SWGSDRangel::SWGTargetAzimuthElevation *swgTargetAzimuthElevation)
|
||||||
{
|
{
|
||||||
return new MsgTargetAzimuthElevation(pipeSource, swgTargetAzimuthElevation);
|
return new MsgTargetAzimuthElevation(pipeSource, swgTargetAzimuthElevation);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const PipeEndPoint *m_pipeSource;
|
const QObject *m_pipeSource;
|
||||||
SWGSDRangel::SWGTargetAzimuthElevation *m_swgTargetAzimuthElevation;
|
SWGSDRangel::SWGTargetAzimuthElevation *m_swgTargetAzimuthElevation;
|
||||||
|
|
||||||
MsgTargetAzimuthElevation(const PipeEndPoint *pipeSource, SWGSDRangel::SWGTargetAzimuthElevation *swgTargetAzimuthElevation) :
|
MsgTargetAzimuthElevation(const QObject *pipeSource, SWGSDRangel::SWGTargetAzimuthElevation *swgTargetAzimuthElevation) :
|
||||||
Message(),
|
Message(),
|
||||||
m_pipeSource(pipeSource),
|
m_pipeSource(pipeSource),
|
||||||
m_swgTargetAzimuthElevation(swgTargetAzimuthElevation)
|
m_swgTargetAzimuthElevation(swgTargetAzimuthElevation)
|
||||||
|
@ -58,7 +58,7 @@ MessageQueue *MessagePipesLegacy::unregisterChannelToFeature(const PipeEndPoint
|
|||||||
|
|
||||||
QList<MessageQueue*>* MessagePipesLegacy::getMessageQueues(const PipeEndPoint *source, const QString& type)
|
QList<MessageQueue*>* MessagePipesLegacy::getMessageQueues(const PipeEndPoint *source, const QString& type)
|
||||||
{
|
{
|
||||||
qDebug("MessagePipesLegacy::getMessageQueues: %p %s", source, qPrintable(type));
|
//qDebug("MessagePipesLegacy::getMessageQueues: %p %s", source, qPrintable(type));
|
||||||
return m_registrations.getElements(source, type);
|
return m_registrations.getElements(source, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,10 +28,16 @@ ObjectPipe::ObjectPipe() :
|
|||||||
|
|
||||||
void ObjectPipe::setToBeDeleted(int reason, QObject *object)
|
void ObjectPipe::setToBeDeleted(int reason, QObject *object)
|
||||||
{
|
{
|
||||||
|
qDebug("ObjectPipe::setToBeDeleted: %d (%p)", reason, object);
|
||||||
m_gcCount = 2; // will defer actual deletion by one GC pass
|
m_gcCount = 2; // will defer actual deletion by one GC pass
|
||||||
emit toBeDeleted(reason, object);
|
emit toBeDeleted(reason, object);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectPipe::unsetToBeDeleted()
|
||||||
|
{
|
||||||
|
m_gcCount = 0;
|
||||||
|
}
|
||||||
|
|
||||||
int ObjectPipe::getGCCount() const {
|
int ObjectPipe::getGCCount() const {
|
||||||
return m_gcCount;
|
return m_gcCount;
|
||||||
}
|
}
|
||||||
|
@ -31,6 +31,7 @@ public:
|
|||||||
ObjectPipe& operator=(const ObjectPipe&) = default;
|
ObjectPipe& operator=(const ObjectPipe&) = default;
|
||||||
|
|
||||||
void setToBeDeleted(int reason, QObject *object);
|
void setToBeDeleted(int reason, QObject *object);
|
||||||
|
void unsetToBeDeleted();
|
||||||
int getGCCount() const;
|
int getGCCount() const;
|
||||||
int decreaseGCCount();
|
int decreaseGCCount();
|
||||||
|
|
||||||
|
@ -45,13 +45,32 @@ ObjectPipe *ObjectPipesRegistrations::registerProducerToConsumer(const QObject *
|
|||||||
|
|
||||||
for (auto& pipe : m_pipes) // check if pipe exists already - there is a unique pipe per producer, consumer and type
|
for (auto& pipe : m_pipes) // check if pipe exists already - there is a unique pipe per producer, consumer and type
|
||||||
{
|
{
|
||||||
if ((producer == pipe->m_producer) && (consumer == pipe->m_consumer) && (typeId == pipe->m_typeId)) {
|
if ((producer == pipe->m_producer) && (consumer == pipe->m_consumer) && (typeId == pipe->m_typeId))
|
||||||
|
{
|
||||||
|
qDebug("ObjectPipesRegistrations::registerProducerToConsumer: return existing pipe %p %p %s %s",
|
||||||
|
producer, consumer, qPrintable(pipe->m_element->objectName()), qPrintable(type));
|
||||||
|
pipe->unsetToBeDeleted();
|
||||||
|
if (!m_producerPipes[producer].contains(pipe)) {
|
||||||
|
m_producerPipes[producer].push_back(pipe);
|
||||||
|
}
|
||||||
|
if (!m_consumerPipes[consumer].contains(pipe)) {
|
||||||
|
m_consumerPipes[consumer].push_back(pipe);
|
||||||
|
}
|
||||||
|
if (!m_typeIdPipes[typeId].contains(pipe)) {
|
||||||
|
m_typeIdPipes[typeId].push_back(pipe);
|
||||||
|
}
|
||||||
|
if (!m_producerAndTypeIdPipes[std::make_tuple(producer, typeId)].contains(pipe)) {
|
||||||
|
m_producerAndTypeIdPipes[std::make_tuple(producer, typeId)].push_back(pipe);
|
||||||
|
}
|
||||||
|
if (!m_pipeMap.contains(std::make_tuple(producer, consumer, typeId))) {
|
||||||
|
m_pipeMap[std::make_tuple(producer, consumer, typeId)] = pipe;
|
||||||
|
}
|
||||||
return pipe;
|
return pipe;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QObject *element = m_objectPipeElementsStore->createElement();
|
QObject *element = m_objectPipeElementsStore->createElement();
|
||||||
qDebug("ObjectPipesRegistrations::registerProducerToConsumer: %p %p %s %s",
|
qDebug("ObjectPipesRegistrations::registerProducerToConsumer: new pipe %p %p %s %s",
|
||||||
producer, consumer, qPrintable(element->objectName()), qPrintable(type));
|
producer, consumer, qPrintable(element->objectName()), qPrintable(type));
|
||||||
m_pipes.push_back(new ObjectPipe());
|
m_pipes.push_back(new ObjectPipe());
|
||||||
m_pipes.back()->m_pipeId = ++m_pipeId;
|
m_pipes.back()->m_pipeId = ++m_pipeId;
|
||||||
|
Loading…
Reference in New Issue
Block a user