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:
torstenandCopilot committed 2026-08-19 06:06:24 +02:00
1 parent 010f91928a
commit b774f4035c
2785 files changed
+18754 -18316

No files matched your search

@@ -39,7 +39,7 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
# generate pdm_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS HLA svcPdmCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY2(AAR SV WS HLA svcPdmCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -70,7 +70,7 @@ SET(SRCS_client
# generate pdm_ftc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY(WS AAR SV HLA svcPdmClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY2(WS AAR SV HLA svcPdmClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -96,7 +96,7 @@ SET(SRCS_server
# generate pdm_[d|f]ts.h, pdm_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY(WS AAR SV svcPdmServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY2(WS AAR SV svcPdmServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -22,7 +22,6 @@ PdmTests::PdmTests(QObject *parent)
, m_id(0)
, m_testId(0)
, m_bTestsSuccessful(true)
, m_logger(getLogger("Test"))
{
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
}
@@ -34,22 +33,22 @@ PdmTests::~PdmTests()
//---------------------------------------------------------------------------------
bool PdmTests::init(int domainId, int testId)
{
DEBUG_LOG(m_logger) << "init begin";
DEBUG_LOG() << "init begin";
m_testId = testId;
// initialize DDS
m_ddsConnector.reset(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Global, 0));
if (!m_ddsConnector->init())
return false;
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
m_ddsConnector->initPublisherSubscriber();
DEBUG_LOG(m_logger) << "create dtc";
DEBUG_LOG() << "create dtc";
m_dtc = ProjectDataManagement::Interface::Dtc::create(m_ddsConnector);
DEBUG_LOG(m_logger) << "create ftc";
DEBUG_LOG() << "create ftc";
m_ftc = ProjectDataManagement::Interface::Ftc::create(m_ddsConnector);
bool bRet = m_dtc->enableAll() && m_ftc->enableAll();
DEBUG_LOG(m_logger) << "init end - bRet = " << bRet;
DEBUG_LOG() << "init end - bRet = " << bRet;
return bRet;
}
@@ -57,7 +56,7 @@ bool PdmTests::init(int domainId, int testId)
//---------------------------------------------------------------------------------
void PdmTests::startTest()
{
INFO_LOG(m_logger) << "startTest";
INFO_LOG() << "startTest";
if (m_testId == 0)
{
QTimer::singleShot(1000, this, &PdmTests::tryGetAllVulnerabilityKinds);
@@ -73,7 +72,7 @@ void PdmTests::startTest()
}
else
{
ERROR_LOG(m_logger) << "Unknown test case!";
ERROR_LOG() << "Unknown test case!";
failExit();
}
QTimer::singleShot(5000, qApp, &QCoreApplication::quit);
@@ -83,21 +82,21 @@ void PdmTests::startTest()
//---------------------------------------------------------------------------------
void PdmTests::tryGetAllVulnerabilityKinds()
{
INFO_LOG(m_logger) << "trying to get all ProjectDataManagements";
INFO_LOG() << "trying to get all ProjectDataManagements";
const QMap<qint32, ProjectDataManagement::VulnerabilityKind> map = m_dtc->vulnerabilityKinds();
if (map.isEmpty())
{
ERROR_LOG(m_logger) << "Error requesting vulnerability kinds data";
ERROR_LOG() << "Error requesting vulnerability kinds data";
failExit();
}
else
{
INFO_LOG(m_logger) << "Amount of vulnerability kinds = " << map.size();
INFO_LOG() << "Amount of vulnerability kinds = " << map.size();
m_id = map.firstKey();
for(auto it = map.begin(); it != map.end(); ++it)
{
const ProjectDataManagement::VulnerabilityClass &vc = it.value().vulnerabilityClassId();
INFO_LOG(m_logger) << "VulnerabilityKind(" << it.key() << ") : " << it.value().name()
INFO_LOG() << "VulnerabilityKind(" << it.key() << ") : " << it.value().name()
<< ", translation " << m_dtc->trVulnerabilityKindName(it.key(), vc);
}
}
@@ -108,18 +107,18 @@ void PdmTests::tryGetAllVulnerabilityKinds()
//---------------------------------------------------------------------------------
void PdmTests::tryGetVulnerabilityKind()
{
INFO_LOG(m_logger) << "trying get itemData for Vulnerability kind " << m_id;
INFO_LOG() << "trying get itemData for Vulnerability kind " << m_id;
ProjectDataManagement::VulnerabilityKind data = m_dtc->vulnerabilityKind(m_id);
if (data.taVulnerabilityKind() <= 0)
{
ERROR_LOG(m_logger) << "Error receiving data for id " << m_id;
ERROR_LOG() << "Error receiving data for id " << m_id;
failExit();
}
else
{
const ProjectDataManagement::VulnerabilityClass &vc = data.vulnerabilityClassId();
INFO_LOG(m_logger) << "## VulnerabilityKind: (" << data.taVulnerabilityKind() << "), name: " << data.name()
INFO_LOG() << "## VulnerabilityKind: (" << data.taVulnerabilityKind() << "), name: " << data.name()
<< ", translation " << m_dtc->trVulnerabilityKindName(m_id, vc);
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -129,19 +128,19 @@ void PdmTests::tryGetVulnerabilityKind()
//---------------------------------------------------------------------------------
void PdmTests::tryGetAllBiteComponentTexts()
{
INFO_LOG(m_logger) << "trying to get all Bite Component Texts";
INFO_LOG() << "trying to get all Bite Component Texts";
const QMap<qint32, ProjectDataManagement::BiteComponentText> map = m_dtc->biteComponentTexts();
if (map.isEmpty())
{
ERROR_LOG(m_logger) << "Error requesting bite components text data";
ERROR_LOG() << "Error requesting bite components text data";
failExit();
}
else
{
INFO_LOG(m_logger) << "Amount of bite component texts = " << map.size();
INFO_LOG() << "Amount of bite component texts = " << map.size();
m_id = map.firstKey();
for(auto it = map.begin(); it != map.end(); ++it)
INFO_LOG(m_logger) << "BiteComponent(" << it.key() << ") : " << it.value().name()
INFO_LOG() << "BiteComponent(" << it.key() << ") : " << it.value().name()
<< ", translation " << m_dtc->trBiteComponentTextName(it.key());
}
}
@@ -17,7 +17,6 @@ ChargeTypeRename::ChargeTypeRename(const std::shared_ptr<DdsHandler> &dds, const
, Interface::Fts::UpdateChargeTypeRequestHandler(dds->fts())
, m_dds(dds)
, m_db(db)
, m_logger(getLogger("ChargeTypeRename"))
{
}
@@ -38,6 +38,5 @@ private:
private:
std::shared_ptr<DdsHandler> m_dds;
std::shared_ptr<DatabaseInterface> m_db;
NGL::INGLLogger &m_logger;
};
}
@@ -15,16 +15,15 @@ namespace ProjectDataManagement
DdsHandler::DdsHandler(int domainId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Any))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG() << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
bool DdsHandler::init(const QStringList &qosFileList)
{
if (!m_ddsConnector->init(qosFileList))
{
ERROR_LOG(m_logger) << "Error initializing dds connections - aborting";
ERROR_LOG() << "Error initializing dds connections - aborting";
return false;
}
@@ -37,11 +36,11 @@ bool DdsHandler::init(const QStringList &qosFileList)
m_ddsDts = ProjectDataManagement::Interface::Dts::create(m_ddsConnector);
bool bRet = m_ddsDts->enableAll();
INFO_LOG(m_logger) << "Dts initialised";
INFO_LOG() << "Dts initialised";
m_ddsFts = ProjectDataManagement::Interface::Fts::create(m_ddsConnector);
bRet &= m_ddsFts->enableAll();
INFO_LOG(m_logger) << "Fts initialised";
INFO_LOG() << "Fts initialised";
return bRet;
}
@@ -42,8 +42,6 @@ private:
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
std::shared_ptr<ProjectDataManagement::Interface::Dts> m_ddsDts;
std::shared_ptr<ProjectDataManagement::Interface::Fts> m_ddsFts;
NGL::INGLLogger &m_logger;
};
}
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "pdm_export.h"
#include "svcpdmcommon_export.h"
namespace ProjectDataManagement
{
@@ -37,7 +37,7 @@ bool MainHandler::init(int domainId)
m_dbHandler = std::make_shared<DbHandler>();
if (!m_dbHandler->init(0, Settings::settings()))
{
ERROR_LOG(m_logger) << "Initialisation DbHandler failed.";
ERROR_LOG() << "Initialisation DbHandler failed.";
return false;
}
@@ -45,13 +45,13 @@ bool MainHandler::init(int domainId)
m_ddsHandler = std::make_shared<DdsHandler>(domainId);
if (!m_ddsHandler->init())
{
ERROR_LOG(m_logger) << "Initialisation DdsHandler failed.";
ERROR_LOG() << "Initialisation DdsHandler failed.";
return false;
}
if(Settings::settings()->settings()->value(QLatin1String("TrainingAreaBase/UsePvSan"), false).toBool())
{
DEBUG_LOG(m_logger) << "Has PvSan so do the import";
DEBUG_LOG() << "Has PvSan so do the import";
PvSanImport(db(), m_logger);
}
@@ -36,7 +36,5 @@ private:
std::shared_ptr<DbHandler> m_dbHandler;
std::shared_ptr<Translation> m_translation;
std::shared_ptr<ChargeTypeRename> m_chargeTypeRename;
NGL::INGLLogger &m_logger;
};
} // namespace ProjectDataManagement
@@ -33,7 +33,7 @@ bool PvSanImport::publishDataPvSan()
//b->removePdmTranslation()
if (!readFile(procedures, material, injuries, kind, place1, place2))
{
ERROR_LOG(m_logger) << "Can't read pvsan file";
ERROR_LOG() << "Can't read pvsan file";
return false;
}
@@ -99,13 +99,13 @@ bool PvSanImport::readFile(QVector<QString> &procedures, QVector<QString> &mater
{
QString vbkFile = NGL::findFile(NGL::FileType::ConfigFile, QStringLiteral("vbk.csv"));
QFile csvFile(vbkFile);
DEBUG_LOG(m_logger) << "Start reading File " << vbkFile;
DEBUG_LOG() << "Start reading File " << vbkFile;
if (!csvFile.exists())
return false;
if(!csvFile.open(QIODevice::ReadOnly))
return false;
DEBUG_LOG(m_logger) << "Opened File";
DEBUG_LOG() << "Opened File";
bool skip = true;
QTextStream in(&csvFile);
@@ -118,7 +118,7 @@ bool PvSanImport::readFile(QVector<QString> &procedures, QVector<QString> &mater
if (!line.startsWith(QStringLiteral("Version")))
continue;
// ERROR_LOG(m_logger) << line;
// ERROR_LOG() << line;
QStringList versionSplit = line.split(QStringLiteral(";"));
if (versionSplit.size() > 1)
m_version = versionSplit.at(1);
@@ -161,7 +161,7 @@ bool PvSanImport::readFile(QVector<QString> &procedures, QVector<QString> &mater
skip = false;
continue;
}
//ERROR_LOG(m_logger) << line;
//ERROR_LOG() << line;
//now we read all lines until the end
if (!line.isEmpty())
@@ -265,12 +265,12 @@ bool PvSanImport::readFile(QVector<QString> &procedures, QVector<QString> &mater
csvFile.close();
// ERROR_LOG(m_logger) << "read " << procedures.size() << " procedures from file";
// ERROR_LOG(m_logger) << "read " << material.size() << " materials from file";
// ERROR_LOG(m_logger) << "read " << injuries.size() << " injuries from file";
// ERROR_LOG(m_logger) << "read " << kind.size() << " kinds from file";
// ERROR_LOG(m_logger) << "read " << place1.size() << " place1 from file";
// ERROR_LOG(m_logger) << "read " << place2.size() << " place2 from file";
// ERROR_LOG() << "read " << procedures.size() << " procedures from file";
// ERROR_LOG() << "read " << material.size() << " materials from file";
// ERROR_LOG() << "read " << injuries.size() << " injuries from file";
// ERROR_LOG() << "read " << kind.size() << " kinds from file";
// ERROR_LOG() << "read " << place1.size() << " place1 from file";
// ERROR_LOG() << "read " << place2.size() << " place2 from file";
return true;
@@ -336,7 +336,7 @@ bool PvSanImport::addProcedures(const QVector<QString> &procedures)
{
QStringList measure = entry.split(QStringLiteral(";"));
// ERROR_LOG(m_logger) << entry << " size of split: " << measure.size();
// ERROR_LOG() << entry << " size of split: " << measure.size();
if (measure.size() < 34 )
continue;
Database::PdmSanitationProcedures pros;
@@ -405,11 +405,11 @@ bool PvSanImport::addMaterial(const QVector<QString> &material)
q.prepare(stmt);
DEBUG_LOG(m_logger) << "Statement: " << stmt;
DEBUG_LOG() << "Statement: " << stmt;
if (!q.exec())
{
WARNING_LOG(m_logger) << "Could not delete sanitation materials";
WARNING_LOG() << "Could not delete sanitation materials";
return false;
}
@@ -38,6 +38,5 @@ bool addInjuries(const QVector<QString> &injuries);
QString m_version;
const std::shared_ptr<DatabaseInterface> &m_db;
NGL::INGLLogger &m_logger;
};
} // namespace ProjectDataManagement
@@ -23,9 +23,8 @@ Translation::Translation(const std::shared_ptr<DdsHandler> &dds, const std::shar
: Interface::Fts::InsertUpdateTranslationRequestHandler(dds->fts())
, m_dds(dds)
, m_db(db)
, m_logger(getLogger("Translation"))
{
DEBUG_LOG(m_logger) << "Translation ctor";
DEBUG_LOG() << "Translation ctor";
m_publishTimer.setInterval(1000);
m_publishTimer.setSingleShot(true);
m_publishTimer.setTimerType(Qt::VeryCoarseTimer);
@@ -41,7 +40,7 @@ Translation::~Translation()
void Translation::collectAndPublishData()
{
DEBUG_LOG(m_logger) << "Collecting translation data";
DEBUG_LOG() << "Collecting translation data";
m_jsonData.clear();
const auto cb = [this](const Database::PdmTranslation &data)
{
@@ -50,13 +49,13 @@ void Translation::collectAndPublishData()
if (!m_db->select(cb))
{
WARNING_LOG(m_logger) << "Error fetching translations from db";
WARNING_LOG() << "Error fetching translations from db";
return;
}
publishData();
DEBUG_LOG(m_logger) << "Collecting translation data - finished";
DEBUG_LOG() << "Collecting translation data - finished";
}
void Translation::publishData()
@@ -70,7 +69,7 @@ void Translation::publishData()
const QByteArray compressed = qCompress(data, 9);
const QByteArray md5Sum = QCryptographicHash::hash(compressed, QCryptographicHash::Md5).toHex();
INFO_LOG(m_logger) << "Created translation blob with " << arr.size() << " elements, size: " << compressed.size()
INFO_LOG() << "Created translation blob with " << arr.size() << " elements, size: " << compressed.size()
<< " (uncompressed: " << data.size() << "), md5Sum: " << md5Sum;
m_dds->dts()->publish(ProjectDataManagement::TranslationBlob(s_translationBlobId,
LtsUtils::convert<std::vector<uint8_t>>(compressed),
@@ -128,7 +127,7 @@ void Translation::onInsertUpdateTranslationRequest(const rti::core::SampleIdenti
else
{
fro = Core::FunctionReplyObject(te.id, tr_lts("dds", "Can not insert/update translation element"));
WARNING_LOG(m_logger) << fro();
WARNING_LOG() << fro();
}
m_dds->fts()->insertUpdateTranslationReply(cookie, fro);
}
@@ -38,6 +38,5 @@ private:
std::shared_ptr<DdsHandler> m_dds;
std::shared_ptr<ProjectDataManagement::DatabaseInterface> m_db;
QTimer m_publishTimer;
NGL::INGLLogger &m_logger;
};
}