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

@@ -32,7 +32,7 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
# generate pre_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS svcPreCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY2(AAR SV WS svcPreCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPreCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -60,7 +60,7 @@ SET(SRCS_client
# generate pre_[d|f]tc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS svcPreClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY2(AAR SV WS svcPreClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPreClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -100,7 +100,7 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
# Generate pre.sql, pre.xml
CODEGEN_SQL(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV svcPreServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY2(AAR SV svcPreServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcPreServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -25,7 +25,6 @@ PreTests::PreTests(QObject *parent)
, m_testId(0)
, m_presentationId(0)
, m_bTestsSuccessful(true)
, m_logger(getLogger("Test"))
{
qRegisterMetaType<Core::FunctionReply>("Core::FunctionReply");
}
@@ -33,7 +32,7 @@ PreTests::PreTests(QObject *parent)
//----------------------------------------------------------------------------------
bool PreTests::init(int domainId, int exerciseId, int testId, int presentationId)
{
INFO_LOG(m_logger) << "init begin";
INFO_LOG() << "init begin";
m_testId = testId;
m_exerciseId = exerciseId;
@@ -43,18 +42,18 @@ bool PreTests::init(int domainId, int exerciseId, int testId, int presentationId
m_ddsConnector.reset(new DDSConnector::DdsConnector(domainId, IDL::PartitionType::Exercise, m_exerciseId));
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 ftc PRE";
DEBUG_LOG() << "create ftc PRE";
m_ftc = PresentationManagement::Interface::Ftc::create(m_ddsConnector);
DEBUG_LOG(m_logger) << "init ftc PRE";
DEBUG_LOG() << "init ftc PRE";
bool bRet = m_ftc->enableAll();
DEBUG_LOG(m_logger) << "init end PRE - bRet = " << bRet;
DEBUG_LOG() << "init end PRE - bRet = " << bRet;
DEBUG_LOG(m_logger) << "Domain Id = " << domainId;
DEBUG_LOG(m_logger) << "Exercise Id = " << exerciseId;
DEBUG_LOG(m_logger) << "Test Id = " << testId;
DEBUG_LOG() << "Domain Id = " << domainId;
DEBUG_LOG() << "Exercise Id = " << exerciseId;
DEBUG_LOG() << "Test Id = " << testId;
//TODO: add connects
@@ -64,7 +63,7 @@ bool PreTests::init(int domainId, int exerciseId, int testId, int presentationId
//----------------------------------------------------------------------------------
void PreTests::startTest()
{
INFO_LOG(m_logger) << "startTest";
INFO_LOG() << "startTest";
switch (m_testId)
{
case 1:
@@ -83,18 +82,18 @@ void PreTests::startTest()
tryChangeStatus();
break;
default:
ERROR_LOG(m_logger) << "Unknown test case !";
ERROR_LOG() << "Unknown test case !";
failExit();
break;
}
INFO_LOG(m_logger) << "********* endTest **************";
INFO_LOG() << "********* endTest **************";
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
//----------------------------------------------------------------------------------
void PreTests::tryCreate()
{
INFO_LOG(m_logger) << "trying to send createRequest Presentation";
INFO_LOG() << "trying to send createRequest Presentation";
m_presentationId = -1;
PresentationModifyRequest request;
@@ -120,7 +119,7 @@ void PreTests::tryCreate()
if (!m_ftc->presentationModifyRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting create data";
ERROR_LOG() << "Error requesting create data";
failExit();
}
@@ -151,10 +150,10 @@ void PreTests::tryModify()
vectorPc[1].duration(60);
vectorPc[1].startTime(QDateTime(QDate(2017,2,14), QTime(9,45)).toMSecsSinceEpoch());
INFO_LOG(m_logger) << "trying to send modify request for presentation Id = " << m_presentationId;
INFO_LOG() << "trying to send modify request for presentation Id = " << m_presentationId;
if (!m_ftc->presentationModifyRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting modify data";
ERROR_LOG() << "Error requesting modify data";
failExit();
}
@@ -168,10 +167,10 @@ void PreTests::tryDelete()
request.id(m_presentationId);
INFO_LOG(m_logger) << "trying to send delete request for presentation Id = " << m_presentationId;
INFO_LOG() << "trying to send delete request for presentation Id = " << m_presentationId;
if (!m_ftc->presentationRemoveRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting delete data";
ERROR_LOG() << "Error requesting delete data";
failExit();
}
}
@@ -182,11 +181,11 @@ void PreTests::tryGetContent()
GetPresentationContentRequest request;
request.presentationId(m_presentationId);
INFO_LOG(m_logger) << "trying to send content request for presentation Id = " << m_presentationId;
INFO_LOG() << "trying to send content request for presentation Id = " << m_presentationId;
if (!m_ftc->getPresentationContentRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting content for presentationId: " << m_presentationId;
ERROR_LOG() << "Error requesting content for presentationId: " << m_presentationId;
failExit();
}
@@ -203,10 +202,10 @@ void PreTests::tryChangeStatus()
request.lastModified(QDateTime::currentMSecsSinceEpoch());
request.fileStatus(FileStatus::Deleted);
INFO_LOG(m_logger) << "trying to send change status request for presentation Id = " << m_presentationId;
INFO_LOG() << "trying to send change status request for presentation Id = " << m_presentationId;
if (!m_ftc->presentationChangeStatusRequest(request, this))
{
ERROR_LOG(m_logger) << "Error requesting change status";
ERROR_LOG() << "Error requesting change status";
failExit();
}
@@ -216,7 +215,7 @@ void PreTests::tryChangeStatus()
//----------------------------------------------------------------------------------
void PreTests::failExit()
{
ERROR_LOG(m_logger) << "FAIL EXIT !";
ERROR_LOG() << "FAIL EXIT !";
m_bTestsSuccessful = false;
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
}
@@ -224,14 +223,14 @@ void PreTests::failExit()
//----------------------------------------------------------------------------------
void PreTests::onPresentationCreateReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "END (onPresentationCreateReply)";
DEBUG_LOG() << "END (onPresentationCreateReply)";
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onPresentationCreateReply error: " << replyObject();
ERROR_LOG() << "Got onPresentationCreateReply error: " << replyObject();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return;
}
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
INFO_LOG() << "Got createReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_presentationId = replyObject.id();
@@ -246,15 +245,15 @@ void PreTests::onPresentationModifyReply(const Core::FunctionReplyObject &replyO
{
if (m_presentationId == -1)
return onPresentationCreateReply(replyObject);
DEBUG_LOG(m_logger) << "END (onPresentationModifyReply)";
DEBUG_LOG() << "END (onPresentationModifyReply)";
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onPresentationModifyReply error: " << replyObject();
ERROR_LOG() << "Got onPresentationModifyReply error: " << replyObject();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return;
}
INFO_LOG(m_logger) << "Got createReply with id " << replyObject.id()
INFO_LOG() << "Got createReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_presentationId = replyObject.id();
@@ -268,15 +267,15 @@ void PreTests::onPresentationModifyReply(const Core::FunctionReplyObject &replyO
//----------------------------------------------------------------------------------
void PreTests::onPresentationChangeStatusReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "END (onPresentationChangeStatusReply)";
DEBUG_LOG() << "END (onPresentationChangeStatusReply)";
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onPresentationChangeStatusReply error: " << replyObject();
ERROR_LOG() << "Got onPresentationChangeStatusReply error: " << replyObject();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return;
}
INFO_LOG(m_logger) << "Got changeStatusReply with id " << replyObject.id()
INFO_LOG() << "Got changeStatusReply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
m_presentationId = replyObject.id();
@@ -290,16 +289,16 @@ void PreTests::onPresentationChangeStatusReply(const Core::FunctionReplyObject &
//----------------------------------------------------------------------------------
void PreTests::onPresentationRemoveReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG(m_logger) << "END (onPresentationRemoveReply)";
DEBUG_LOG() << "END (onPresentationRemoveReply)";
if (replyObject.error())
{
ERROR_LOG(m_logger) << "Got onPresentationRemoveReply error: " << replyObject();
ERROR_LOG() << "Got onPresentationRemoveReply error: " << replyObject();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return;
}
INFO_LOG(m_logger) << "Got reply with id " << replyObject.id()
INFO_LOG() << "Got reply with id " << replyObject.id()
<< " and errorString " << replyObject.translated();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
@@ -308,16 +307,16 @@ void PreTests::onPresentationRemoveReply(const Core::FunctionReplyObject &replyO
//----------------------------------------------------------------------------------
void PreTests::onGetPresentationContentReply(const GetPresentationContentReply &replyObject)
{
DEBUG_LOG(m_logger) << "END (onGetPresentationContentReply)";
DEBUG_LOG() << "END (onGetPresentationContentReply)";
if (replyObject.errorString().size() > 0)
{
ERROR_LOG(m_logger) << "Got onGetPresentationContentReply error: " << replyObject.errorString();
ERROR_LOG() << "Got onGetPresentationContentReply error: " << replyObject.errorString();
QTimer::singleShot(0, qApp, &QCoreApplication::quit);
return;
}
INFO_LOG(m_logger) << "Got reply with id " << replyObject.id()
INFO_LOG() << "Got reply with id " << replyObject.id()
<< " and errorString " << replyObject.errorString()
<< " and content size " << replyObject.content().size();
@@ -13,16 +13,15 @@ namespace PresentationManagement
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
: m_ddsConnector(ddsConnector)
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
DEBUG_LOG() << "DdsHandler(" << m_ddsConnector->getDomainId() << ") 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;
}
@@ -36,10 +35,10 @@ bool DdsHandler::init(const QStringList &qosFileList)
m_ddsFts = PresentationManagement::Interface::Fts::create(m_ddsConnector);
bool bRet = m_ddsDts->enableAll();
INFO_LOG(m_logger) << "Dts initialised";
INFO_LOG() << "Dts initialised";
bRet &= m_ddsFts->enableAll();
INFO_LOG(m_logger) << "Fts initialised";
INFO_LOG() << "Fts initialised";
return bRet;
}
@@ -49,8 +49,6 @@ private:
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
std::shared_ptr<PresentationManagement::Interface::Dts> m_ddsDts;
std::shared_ptr<PresentationManagement::Interface::Fts> m_ddsFts;
NGL::INGLLogger &m_logger;
};
}
@@ -24,7 +24,6 @@ HandlerPresentation::HandlerPresentation(Initialization *mainHandler)
, Interface::Fts::GetPresentationContentRequestHandler(mainHandler->dds()->fts())
, Interface::Fts::PresentationChangeStatusRequestHandler(mainHandler->dds()->fts())
, m_mainHandler(mainHandler)
, m_logger(getLogger("HandlerPresentation"))
{
}
@@ -47,10 +46,10 @@ bool HandlerPresentation::init()
};
if (!m_mainHandler->db()->select(cb))
{
ERROR_LOG(m_logger) << "Error reading data from database!";
ERROR_LOG() << "Error reading data from database!";
return false;
}
DEBUG_LOG(m_logger) << "m_objectPresentationMap.size() = " << m_objectPresentationMap.size();
DEBUG_LOG() << "m_objectPresentationMap.size() = " << m_objectPresentationMap.size();
}
{
@@ -60,7 +59,7 @@ bool HandlerPresentation::init()
ObjectPresentation *objPre = m_objectPresentationMap.value(data.presentationId);
if (!objPre || !objPre->isValid())
{
WARNING_LOG(m_logger) << "Cannot find presentation Id = " << data.presentationId
WARNING_LOG() << "Cannot find presentation Id = " << data.presentationId
<< " for presentationContent " << data.id;
return;
}
@@ -68,7 +67,7 @@ bool HandlerPresentation::init()
};
if (!m_mainHandler->db()->select(cb))
{
ERROR_LOG(m_logger) << "Error reading data from database!";
ERROR_LOG() << "Error reading data from database!";
return false;
}
}
@@ -84,10 +83,10 @@ bool HandlerPresentation::init()
void HandlerPresentation::onPresentationModifyRequest(const rti::core::SampleIdentity &cookie,
const PresentationModifyRequest &request)
{
DEBUG_LOG(m_logger) << "onPresentationModifyRequest: " << request;
DEBUG_LOG() << "onPresentationModifyRequest: " << request;
auto ret = request.id() > 0 ? presentationModifyRequest(request) : presentationCreateRequest(request);
if (ret.error())
WARNING_LOG(m_logger) << ret();
WARNING_LOG() << ret();
m_mainHandler->dds()->fts()->presentationModifyReply(cookie, ret);
}
@@ -132,7 +131,7 @@ Core::FunctionReplyObject HandlerPresentation::presentationModifyRequest(const P
void HandlerPresentation::onPresentationRemoveRequest(const rti::core::SampleIdentity &cookie,
const Core::RemoveElementRequest &request)
{
DEBUG_LOG(m_logger) << "onPresentationRemoveRequest: " << request;
DEBUG_LOG() << "onPresentationRemoveRequest: " << request;
Core::FunctionReplyObject ret;
int presentationId = request.id();
@@ -152,10 +151,10 @@ void HandlerPresentation::onPresentationRemoveRequest(const rti::core::SampleIde
return;
}
DEBUG_LOG(m_logger) << "Deleting presentation id = " << presentationId;
DEBUG_LOG() << "Deleting presentation id = " << presentationId;
ret = ifs->removeObject(); // removes all from db due to fk
if (ret.error())
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
// delete ObjectPresentation (including Map)
delete ifs;
@@ -212,7 +211,7 @@ void HandlerPresentation::onPresentationChangeStatusRequest(const rti::core::Sam
}
Core::FunctionReplyObject ret = ifs->changeStatus(request);
if (ret.error())
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
m_mainHandler->dds()->fts()->presentationChangeStatusReply(cookie, ret);
}
@@ -58,6 +58,5 @@ private:
private:
Initialization *m_mainHandler;
QMap<int, ObjectPresentation *> m_objectPresentationMap;
NGL::INGLLogger &m_logger;
};
}
@@ -19,7 +19,6 @@ namespace PresentationManagement
Initialization::Initialization(QObject *parent)
: QObject(parent)
, m_logger(getLogger("Initialization"))
{
qsrand(time(nullptr));
}
@@ -45,6 +45,5 @@ private:
std::shared_ptr<DdsHandler> m_ddsHandler;
std::shared_ptr<DbHandler> m_dbHandler;
std::shared_ptr<HandlerPresentation> m_handlerPresentation;
LOGGER_T m_logger;
};
} // namespace AreaEffectSimulation
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "pre_export.h"
#include "svcprecommon_export.h"
namespace PresentationManagement
{
@@ -18,14 +18,12 @@ namespace PresentationManagement
//----------------------------------------------------------------------------------------------------
ObjectPresentation::ObjectPresentation(Initialization *mainHandler)
: m_mainHandler(mainHandler)
, m_logger(getLogger("ObjectPresentation"))
{
}
ObjectPresentation::ObjectPresentation(const Presentation &data, Initialization *mainHandler)
: m_mainHandler(mainHandler)
, m_data(data)
, m_logger(getLogger("ObjectPresentation"))
{
}
@@ -81,12 +79,12 @@ Core::FunctionReplyObject ObjectPresentation::createObject(const PresentationMod
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting PresentationContent-data into database"));
else
{
DEBUG_LOG(m_logger) << "New presentation content id : " << conDbData.id;
DEBUG_LOG() << "New presentation content id : " << conDbData.id;
conData.id(conDbData.id);
}
}
DEBUG_LOG(m_logger) << "New Id: " << m_data.id();
DEBUG_LOG() << "New Id: " << m_data.id();
trans.commit();
onPublishData();
@@ -116,9 +114,9 @@ Core::FunctionReplyObject ObjectPresentation::updateObject(const PresentationMod
for (const auto &content : std::as_const(m_content))
{
if (m_mainHandler->db()->removePrePresentationContent(content.id()))
DEBUG_LOG(m_logger) << "Removed presentation content id " << content.id();
DEBUG_LOG() << "Removed presentation content id " << content.id();
else
ERROR_LOG(m_logger) << "Failed to remove presentation content id " << content.id();
ERROR_LOG() << "Failed to remove presentation content id " << content.id();
}
m_content = request.content();
@@ -134,7 +132,7 @@ Core::FunctionReplyObject ObjectPresentation::updateObject(const PresentationMod
return Core::FunctionReplyObject(0, tr_lts("dds", "Error inserting PresentationContent-data into database"));
else
{
DEBUG_LOG(m_logger) << "New presentation content id : " << conDbData.id;
DEBUG_LOG() << "New presentation content id : " << conDbData.id;
conData.id(conDbData.id);
}
@@ -182,7 +180,7 @@ Core::FunctionReplyObject ObjectPresentation::changeStatus(const PresentationCha
//------------------------------------------------------------------------------------------------------------
void ObjectPresentation::onPublishData()
{
INFO_LOG(m_logger) << "Publish Presentation-data to dds (" << m_data.id() << ") ...";
INFO_LOG() << "Publish Presentation-data to dds (" << m_data.id() << ") ...";
m_mainHandler->dds()->dts()->publish(m_data);
}
@@ -10,7 +10,7 @@
#pragma once
#include <QMap>
#include <DDS/Core/function_reply_object.h>
#include <DDS/Core/core_types.h>
#include <PresentationManagement/pre_db.h>
#include <PresentationManagement/pre.hpp>
@@ -57,6 +57,5 @@ private:
Initialization *m_mainHandler;
Presentation m_data;
std::vector<PresentationContent> m_content;
NGL::INGLLogger &m_logger;
};
}