Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
@@ -32,9 +32,8 @@ Connection::Connection(const dds::domain::DomainParticipant &domainParticipant,
|
||||
, m_topicsToRoute(topicsToRoute)
|
||||
, m_partition(partition)
|
||||
, m_description(desc)
|
||||
, m_logger(getLogger("Connection"))
|
||||
{
|
||||
INFO_LOG(m_logger) << "Create connection: " << partition
|
||||
INFO_LOG() << "Create connection: " << partition
|
||||
<< ", domain: " << domainParticipant.domain_id()
|
||||
<< ", direction: " << m_description
|
||||
<< " (" << this << ")";
|
||||
@@ -51,7 +50,7 @@ Connection::~Connection()
|
||||
}
|
||||
catch (const dds::core::Exception &ex)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "sub close ex: " << ex.what();
|
||||
ERROR_LOG() << "sub close ex: " << ex.what();
|
||||
}
|
||||
m_subscriber = nullptr;
|
||||
try
|
||||
@@ -61,7 +60,7 @@ Connection::~Connection()
|
||||
}
|
||||
catch (const dds::core::Exception &ex)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "pub close ex: " << ex.what();
|
||||
ERROR_LOG() << "pub close ex: " << ex.what();
|
||||
}
|
||||
m_publisher = nullptr;
|
||||
m_domainParticipant = nullptr;
|
||||
@@ -77,7 +76,7 @@ void Connection::setOutput(Connection *output)
|
||||
|
||||
bool Connection::initialize()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "initialize new connection for " << m_partition
|
||||
DEBUG_LOG() << "initialize new connection for " << m_partition
|
||||
<< ", direction: " << m_description
|
||||
<< " (" << this << ")";
|
||||
|
||||
@@ -88,7 +87,7 @@ bool Connection::initialize()
|
||||
|
||||
if (!m_output)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing connection for " << m_partition
|
||||
ERROR_LOG() << "Error initializing connection for " << m_partition
|
||||
<< ", direction: " << m_description << " - no output set!";
|
||||
return false;
|
||||
}
|
||||
@@ -104,7 +103,7 @@ void Connection::shutdown()
|
||||
QElapsedTimer timer;
|
||||
timer.start();
|
||||
|
||||
DEBUG_LOG(m_logger) << "shutting down connection for " << m_partition
|
||||
DEBUG_LOG() << "shutting down connection for " << m_partition
|
||||
<< ", direction: " << m_description
|
||||
<< " (" << this << "), dwt: " << m_dataWriterTask.get();
|
||||
|
||||
@@ -153,7 +152,7 @@ dds::sub::Subscriber Connection::subscriber() const
|
||||
|
||||
bool Connection::initTopics()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Init topics for " << m_partition
|
||||
DEBUG_LOG() << "Init topics for " << m_partition
|
||||
<< ", direction: " << m_description;
|
||||
|
||||
if (!m_output)
|
||||
|
||||
@@ -53,7 +53,6 @@ private:
|
||||
|
||||
std::string m_partition;
|
||||
std::string m_description;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace RoutingService
|
||||
@@ -12,15 +12,14 @@ namespace RoutingService
|
||||
{
|
||||
DataWriterTask::DataWriterTask()
|
||||
: m_doShutdown(false)
|
||||
, m_logger(getLogger("DataWriterTask"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << this << ": init ";
|
||||
DEBUG_LOG() << this << ": init ";
|
||||
}
|
||||
|
||||
DataWriterTask::~DataWriterTask()
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_queueLock);
|
||||
DEBUG_LOG(m_logger) << this << ": Cleaning up remaining writers: " << m_writerQueue.size();
|
||||
DEBUG_LOG() << this << ": Cleaning up remaining writers: " << m_writerQueue.size();
|
||||
while (!m_writerQueue.empty())
|
||||
{
|
||||
delete m_writerQueue.front();
|
||||
@@ -31,7 +30,7 @@ DataWriterTask::~DataWriterTask()
|
||||
void DataWriterTask::enqueue(SampleWriterInterface *swi)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(m_queueLock);
|
||||
TRACE_LOG(m_logger) << this << ": enqueue " << swi << " shutdown: " << m_doShutdown;
|
||||
TRACE_LOG() << this << ": enqueue " << swi << " shutdown: " << m_doShutdown;
|
||||
if (m_doShutdown)
|
||||
{
|
||||
delete swi;
|
||||
@@ -45,7 +44,7 @@ void DataWriterTask::shutdown()
|
||||
{
|
||||
std::lock_guard<std::mutex> l(m_queueLock);
|
||||
m_doShutdown = true;
|
||||
DEBUG_LOG(m_logger) << this << ": Cleaning up remaining writers: " << m_writerQueue.size();
|
||||
DEBUG_LOG() << this << ": Cleaning up remaining writers: " << m_writerQueue.size();
|
||||
while (!m_writerQueue.empty())
|
||||
{
|
||||
delete m_writerQueue.front();
|
||||
@@ -57,7 +56,7 @@ void DataWriterTask::shutdown()
|
||||
|
||||
bool DataWriterTask::waitForData()
|
||||
{
|
||||
TRACE_LOG(m_logger) << this << ": waiting for data ";
|
||||
TRACE_LOG() << this << ": waiting for data ";
|
||||
std::unique_lock<std::mutex> waitCondLock(m_queueLock);
|
||||
while (true)
|
||||
{
|
||||
@@ -79,7 +78,7 @@ SampleWriterInterface *DataWriterTask::getNextSampleWriter()
|
||||
if (m_writerQueue.empty())
|
||||
return nullptr;
|
||||
|
||||
TRACE_LOG(m_logger) << this << ": getData() queue size: " << m_writerQueue.size();
|
||||
TRACE_LOG() << this << ": getData() queue size: " << m_writerQueue.size();
|
||||
auto ret = m_writerQueue.front();
|
||||
m_writerQueue.pop();
|
||||
return ret;
|
||||
|
||||
@@ -35,7 +35,6 @@ private:
|
||||
std::mutex m_queueLock;
|
||||
std::condition_variable m_waitForDataCondition;
|
||||
bool m_doShutdown;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
} // namespace RoutingService
|
||||
@@ -10,7 +10,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <RoutingServiceNG/rsccommon_export.h>
|
||||
#include "rsccommon_export.h"
|
||||
|
||||
namespace RoutingService
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ bool MainHandler::init(int domainIdIn, int domainIdOut, unsigned short tcpPortOu
|
||||
|
||||
if (!DDS::QosProfile::setDefault())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error setting default QoS from xml-file ";
|
||||
ERROR_LOG() << "Error setting default QoS from xml-file ";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,7 +39,5 @@ private:
|
||||
std::unique_ptr<SessionHandler> m_sessionHandler;
|
||||
std::unique_ptr<PartitionHandler> m_partitionHandler;
|
||||
std::shared_ptr<Core::Pacemaker> m_pacemaker;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace RoutingService
|
||||
@@ -15,7 +15,6 @@ PartitionHandler::PartitionHandler(const std::shared_ptr<DDSConnector::DdsConnec
|
||||
: QObject(parent)
|
||||
, m_exmDtc(ExerciseManagement::Interface::Dtc::create(ddsConnector))
|
||||
, m_destroyTimer(new QTimer(this))
|
||||
, m_logger(getLogger("PartitionHandler"))
|
||||
{
|
||||
m_exmDtc->enableExercise();
|
||||
|
||||
@@ -69,7 +68,7 @@ void PartitionHandler::partitionRemoved(const QString &partitionName)
|
||||
void PartitionHandler::onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification modType)
|
||||
{
|
||||
const QString partitionName(QString::fromStdString(DDSConnector::DdsConnector::getPartitionString(IDL::PartitionType::Exercise, data.id())));
|
||||
DEBUG_LOG(m_logger) << "onExerciseChanged: " << data << ", modType: " << modType;
|
||||
DEBUG_LOG() << "onExerciseChanged: " << data << ", modType: " << modType;
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eRemoved:
|
||||
@@ -93,7 +92,7 @@ void PartitionHandler::onDestroyTimerTimeout()
|
||||
++it;
|
||||
continue;
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "onDestroyTimerTimeout for session " << it.key() << " triggered";
|
||||
DEBUG_LOG() << "onDestroyTimerTimeout for session " << it.key() << " triggered";
|
||||
delete et;
|
||||
m_activeSessions.remove(it.key());
|
||||
emit destroySession(it.key(), it.key());
|
||||
|
||||
@@ -42,6 +42,5 @@ private:
|
||||
QMap<QString, QElapsedTimer *> m_destroyMap;
|
||||
QSet<QString> m_activeSessions;
|
||||
QTimer *m_destroyTimer;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace RoutingService
|
||||
@@ -14,7 +14,6 @@ namespace RoutingService
|
||||
Session::Session(const QString &partitionNameSv, const QString &partitionNameWs)
|
||||
: m_partitionNameSv(partitionNameSv.toStdString())
|
||||
, m_partitionNameWs(partitionNameWs.toStdString())
|
||||
, m_logger(getLogger("Session"))
|
||||
{}
|
||||
|
||||
Session::~Session()
|
||||
@@ -27,7 +26,7 @@ bool Session::init(const dds::domain::DomainParticipant &dpIn,
|
||||
const std::vector<TopicDispatcherInterface *> &topicsToRouteToWs,
|
||||
const std::vector<TopicDispatcherInterface *> &topicsToRouteToSv)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Creating new session for " << m_partitionNameSv << "-" << m_partitionNameWs;
|
||||
DEBUG_LOG() << "Creating new session for " << m_partitionNameSv << "-" << m_partitionNameWs;
|
||||
|
||||
m_connectionSvToWs.reset(new Connection(dpIn, m_partitionNameSv, topicsToRouteToWs, "route to WS"));
|
||||
m_connectionWsToSv.reset(new Connection(dpOut, m_partitionNameWs, topicsToRouteToSv, "route from WS"));
|
||||
@@ -41,7 +40,7 @@ bool Session::init(const dds::domain::DomainParticipant &dpIn,
|
||||
|
||||
void Session::shutdown()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Shutting down session for " << m_partitionNameSv << "-" << m_partitionNameWs;
|
||||
DEBUG_LOG() << "Shutting down session for " << m_partitionNameSv << "-" << m_partitionNameWs;
|
||||
if (m_connectionSvToWs)
|
||||
{
|
||||
m_connectionSvToWs->shutdown();
|
||||
|
||||
@@ -30,7 +30,5 @@ private:
|
||||
std::string m_partitionNameWs;
|
||||
std::unique_ptr<Connection> m_connectionSvToWs;
|
||||
std::unique_ptr<Connection> m_connectionWsToSv;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace RoutingService
|
||||
@@ -21,7 +21,6 @@ SessionHandler::SessionHandler(IDL::PartitionType partitionType,
|
||||
: m_partitionType(partitionType)
|
||||
, m_ddsConnectorSv(ddsConnectorSv)
|
||||
, m_ddsConnectorWs(ddsConnectorWs)
|
||||
, m_logger(getLogger("SessionHandler"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -50,7 +49,7 @@ void SessionHandler::onCreateSession(const QString &partitionNameSv, const QStri
|
||||
const QString partitionName = partitionNameSv + QLatin1Char('-') + partitionNameWs;
|
||||
if (m_sessionMap.contains(partitionName))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got create session for " << partitionName << ", but is already created";
|
||||
WARNING_LOG() << "Got create session for " << partitionName << ", but is already created";
|
||||
return;
|
||||
}
|
||||
Session *session = new Session(partitionNameSv, partitionNameWs);
|
||||
@@ -59,12 +58,12 @@ void SessionHandler::onCreateSession(const QString &partitionNameSv, const QStri
|
||||
topicsToRouteToWs(),
|
||||
topicsToRouteToSv()))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not initialize session for " << partitionName << ", routing will not work...!";
|
||||
WARNING_LOG() << "Can not initialize session for " << partitionName << ", routing will not work...!";
|
||||
delete session;
|
||||
return;
|
||||
}
|
||||
m_sessionMap[partitionName] = session;
|
||||
INFO_LOG(m_logger) << "Successfully created session for " << partitionName;
|
||||
INFO_LOG() << "Successfully created session for " << partitionName;
|
||||
}
|
||||
|
||||
void SessionHandler::onDestroySession(const QString &partitionNameSv, const QString &partitionNameWs)
|
||||
@@ -73,14 +72,14 @@ void SessionHandler::onDestroySession(const QString &partitionNameSv, const QStr
|
||||
auto it = m_sessionMap.find(partitionName);
|
||||
if (it == m_sessionMap.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Got destroy session for " << partitionName << ", but is not created (already destroyed?)";
|
||||
WARNING_LOG() << "Got destroy session for " << partitionName << ", but is not created (already destroyed?)";
|
||||
return;
|
||||
}
|
||||
Session *session = it.value();
|
||||
session->shutdown();
|
||||
delete session;
|
||||
m_sessionMap.erase(it);
|
||||
INFO_LOG(m_logger) << "Successfully destroyed session for " << partitionName;
|
||||
INFO_LOG() << "Successfully destroyed session for " << partitionName;
|
||||
}
|
||||
|
||||
bool SessionHandler::loadPlugins()
|
||||
@@ -108,7 +107,7 @@ bool SessionHandler::loadPlugin(const LtsPluginManager::PluginInstance &pi)
|
||||
QStringLiteral("PDM"),
|
||||
});
|
||||
if (skipList.contains(pi.pluginName.toUpper()))
|
||||
DEBUG_LOG(m_logger) << "Skipping plugin " << pi.pluginName.toUpper() << " - is global";
|
||||
DEBUG_LOG() << "Skipping plugin " << pi.pluginName.toUpper() << " - is global";
|
||||
|
||||
m_topicTypePlugins.push_back(typePlugin);
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
|
||||
#include <RoutingServiceNG/rsccommon_export.h>
|
||||
#include "rsccommon_export.h"
|
||||
#include "logger.h"
|
||||
#include "session.h"
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
@@ -58,7 +58,5 @@ private:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnectorWs;
|
||||
|
||||
QMap<QString, Session *> m_sessionMap;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace RoutingService
|
||||
Reference in new issue
Block a user