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 gim_[d|f]tc.h
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS svcGimCommon SHARED ${SRCS_common})
NGL_ADD_LIBRARY2(AAR SV WS svcGimCommon SHARED ${SRCS_common})
NGL_TARGET_INCLUDE_DIRECTORIES(svcGimCommon
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -63,7 +63,7 @@ SET(SRCS_client
# generate gim_[d|f]tc.h, gim_[d|f]tc_impl.[cpp|h]
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV WS svcGimClient SHARED ${SRCS_client})
NGL_ADD_LIBRARY2(AAR SV WS svcGimClient SHARED ${SRCS_client})
NGL_TARGET_INCLUDE_DIRECTORIES(svcGimClient
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -91,7 +91,7 @@ SET(SRCS_server
# generate gim_[d|f]ts.h, gim_[d|f]ts_impl.[cpp|h]
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
NGL_ADD_LIBRARY(AAR SV svcGimServer SHARED ${SRCS_server})
NGL_ADD_LIBRARY2(AAR SV svcGimServer SHARED ${SRCS_server})
NGL_TARGET_INCLUDE_DIRECTORIES(svcGimServer
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/../
@@ -15,16 +15,15 @@ namespace GuezIedManagement
DdsHandler::DdsHandler(int domainId, int exerciseId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
, 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;
}
@@ -39,10 +38,10 @@ bool DdsHandler::init(const QStringList &qosFileList)
m_ddsFts = GuezIedManagement::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;
}
@@ -41,8 +41,6 @@ private:
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
std::shared_ptr<GuezIedManagement::Interface::Dts> m_ddsDts;
std::shared_ptr<GuezIedManagement::Interface::Fts> m_ddsFts;
NGL::INGLLogger &m_logger;
};
} // namespace GuezIedManagement
@@ -35,7 +35,6 @@ HandlerIed::HandlerIed(MainHandler *mainHandler,
, m_tabDtc(nullptr)
, m_ppmDtc(nullptr)
, m_db(db)
, m_logger(getLogger("HandlerIed"))
{}
HandlerIed::~HandlerIed()
@@ -53,17 +52,17 @@ bool HandlerIed::init()
m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsHandler->dds());
if (!m_ppmDtc->enableParticipantPosition())
{
ERROR_LOG(m_logger) << "PPM DTC enableParticipantPosition() failed.";
ERROR_LOG() << "PPM DTC enableParticipantPosition() failed.";
return false;
}
if (!m_ppmDtc->enableParticipant())
{
ERROR_LOG(m_logger) << "PPM DTC enableParticipant() failed.";
ERROR_LOG() << "PPM DTC enableParticipant() failed.";
return false;
}
if (!m_ppmDtc->enableParty())
{
ERROR_LOG(m_logger) << "PPM DTC enableParty() failed.";
ERROR_LOG() << "PPM DTC enableParty() failed.";
return false;
}
@@ -71,7 +70,7 @@ bool HandlerIed::init()
// read all Ieds from database
if (!m_db->select(dataVec))
{
ERROR_LOG(m_logger) << "Error reading data from database!";
ERROR_LOG() << "Error reading data from database!";
return false;
}
@@ -83,13 +82,13 @@ bool HandlerIed::init()
if (ret.error())
{
delete ifs;
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
return false;
}
m_iedObjMap.insert(ifs->getId(), ifs);
}
DEBUG_LOG(m_logger) << "m_exeObjMap.size() = " << m_iedObjMap.size();
DEBUG_LOG() << "m_exeObjMap.size() = " << m_iedObjMap.size();
// Initialize RecordReplay to get initial IedPosition
RecordReplayPlugin recordReplay;
@@ -102,7 +101,7 @@ bool HandlerIed::init()
// key is sampleTime -> multiMap
QMultiMap<qint64, GuezIedManagement::IedPosition> latestPositions = recordReplay.getIedPositionMap();
DEBUG_LOG(m_logger) << "Starting to read IED positions from record replay. Size: "
DEBUG_LOG() << "Starting to read IED positions from record replay. Size: "
<< latestPositions.size();
for (auto it = latestPositions.begin(); it != latestPositions.end(); ++it)
@@ -112,10 +111,10 @@ bool HandlerIed::init()
if (currentIed == nullptr)
{
INFO_LOG(m_logger) << "Got position for non existing IED-Id: " << pos.id();
INFO_LOG() << "Got position for non existing IED-Id: " << pos.id();
continue;
}
DEBUG_LOG(m_logger) << "Setting position for IED-Id " << pos.id();
DEBUG_LOG() << "Setting position for IED-Id " << pos.id();
currentIed->setPosition(it.value());
}
@@ -124,7 +123,7 @@ bool HandlerIed::init()
if (!m_tabDtc->enableDefinitionIed() ||
!m_tabDtc->enableStateIed())
{
ERROR_LOG(m_logger) << "Could not initialize TraininAreaBase data topic client";
ERROR_LOG() << "Could not initialize TraininAreaBase data topic client";
return false;
}
@@ -178,7 +177,7 @@ void HandlerIed::onDefinitionIed(const TrainingAreaBase::DefinitionIed &data, Da
if (modType != DataModification::eAdded && modType != DataModification::eModified)
return;
DEBUG_LOG(m_logger) << "onDefinitionIed: " << data;
DEBUG_LOG() << "onDefinitionIed: " << data;
Database::GimIed newData;
@@ -238,7 +237,7 @@ void HandlerIed::onDefinitionIed(const TrainingAreaBase::DefinitionIed &data, Da
if (ret.error())
{
delete ifs;
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
return;
}
m_iedObjMap.insert(ifs->getId(), ifs);
@@ -277,7 +276,7 @@ void HandlerIed::onStateIed(const TrainingAreaBase::StateIed &data, DataModifica
if (modType != DataModification::eAdded && modType != DataModification::eModified)
return;
DEBUG_LOG(m_logger) << "onStateIed: " << data;
DEBUG_LOG() << "onStateIed: " << data;
// only overwrite state for existing IEDs
if (m_iedObjMap.contains(getIdByEquipmentnumber(data.iedId())))
@@ -295,7 +294,7 @@ void HandlerIed::onStateIed(const TrainingAreaBase::StateIed &data, DataModifica
}
else
{
WARNING_LOG(m_logger) << "StateIed without an existing IED - got no DefinitionIED? " << data;
WARNING_LOG() << "StateIed without an existing IED - got no DefinitionIED? " << data;
m_orphanedStateIed.insert(data.iedId(), data);
}
}
@@ -305,7 +304,7 @@ void HandlerIed::onPairIedRequest(const rti::core::SampleIdentity &cookie,
{
Core::FunctionReplyObject ret;
INFO_LOG(m_logger) << "onPairIedRequest id = " << request.id();
INFO_LOG() << "onPairIedRequest id = " << request.id();
ObjectIed *ifs = m_iedObjMap.value(request.id());
if (ifs == nullptr)
@@ -337,7 +336,7 @@ void HandlerIed::onPairIedRequest(const rti::core::SampleIdentity &cookie,
ret = ifs->updatePairingState(data);
if (ret.error())
ERROR_LOG(m_logger) << ret();
ERROR_LOG() << ret();
m_ddsHandler->fts()->pairIedReply(cookie, ret);
}
@@ -51,7 +51,5 @@ private:
std::shared_ptr<TrainingAreaBase::Interface::Dtc> m_tabDtc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
std::shared_ptr<DatabaseInterface> m_db;
NGL::INGLLogger &m_logger;
};
}
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "gim_export.h"
#include "svcgimcommon_export.h"
namespace GuezIedManagement
{
@@ -29,7 +29,6 @@ MainHandler::MainHandler()
, m_esmService(nullptr)
, m_gmpService(nullptr)
, m_exerciseId(0)
, m_logger(getLogger("MainHandler"))
{}
MainHandler::~MainHandler()
@@ -48,7 +47,7 @@ bool MainHandler::init(int domainId, int exerciseId)
const QString errStr = initInternal(domainId, exerciseId);
if (!errStr.isEmpty())
{
ERROR_LOG(m_logger) << errStr;
ERROR_LOG() << errStr;
if (m_ddsHandler && m_ddsHandler->pacemaker())
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError, errStr);
return false;
@@ -98,7 +97,7 @@ bool MainHandler::loadFromDatabase()
return false;
if (!m_handlerIed->init())
{
ERROR_LOG(m_logger) << "Initialisation HandlerIED failed.";
ERROR_LOG() << "Initialisation HandlerIED failed.";
return false;
}
return true;
@@ -58,8 +58,5 @@ private:
GuezMinelayerProcessing::Initialization *m_gmpService;
int m_exerciseId;
NGL::INGLLogger &m_logger;
};
} // namespace GuezIedProcessing
@@ -24,7 +24,6 @@ ObjectIed::ObjectIed(const std::shared_ptr<DdsHandler> &ddsHandler,
, m_ddsHandler(ddsHandler)
, m_db(db)
, m_ppmDtc(ppmDtc)
, m_logger(getLogger("ObjectIed"))
{
}
@@ -44,10 +43,10 @@ Core::FunctionReplyObject ObjectIed::createObject(const Database::GimIed &data)
}
// Id is serial -> will be generated by db => inside m_data after db-insert
DEBUG_LOG(m_logger) << "New IED-Id: " << m_data.id;
DEBUG_LOG() << "New IED-Id: " << m_data.id;
}
INFO_LOG(m_logger) << "Ied created sucessfully.";
INFO_LOG() << "Ied created sucessfully.";
// Publish Data via DTS
onPublishData();
@@ -164,10 +163,10 @@ void ObjectIed::onPublishData()
ddsData.symbol(m_data.symbol.toStdString());
ddsData.sampleTime(m_data.sampleTime);
INFO_LOG(m_logger) << "Publish IED-data to dds (" << m_data.id << ") ...";
INFO_LOG() << "Publish IED-data to dds (" << m_data.id << ") ...";
if (!m_ddsHandler->dts()->publish(ddsData))
ERROR_LOG(m_logger) << "Error publishing IED-data to dds";
ERROR_LOG() << "Error publishing IED-data to dds";
}
void ObjectIed::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType)
@@ -220,15 +219,15 @@ Core::FunctionReplyObject ObjectIed::updateObject()
if (!isValid())
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Trying to update an already removed IED object"));
INFO_LOG(m_logger) << "Trying to updateObject IedData with id = " << m_data.id;
INFO_LOG() << "Trying to updateObject IedData with id = " << m_data.id;
if (!m_db->update(m_data))
{
ERROR_LOG(m_logger) << "Failed to update IedData with id = " << m_data.id;
ERROR_LOG() << "Failed to update IedData with id = " << m_data.id;
return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating IED-data with id %1 in database")).arg(m_data.id);
}
INFO_LOG(m_logger) << "IED-Data changed sucessfully.";
INFO_LOG() << "IED-Data changed sucessfully.";
// Publish Data via DTS
onPublishData();
@@ -239,7 +238,7 @@ Core::FunctionReplyObject ObjectIed::updateObject()
void ObjectIed::publishPosition()
{
if (!m_ddsHandler->dts()->publish(m_position))
ERROR_LOG(m_logger) << "Error publishing IED-position to dds";
ERROR_LOG() << "Error publishing IED-position to dds";
}
bool ObjectIed::isValid() const
@@ -10,7 +10,7 @@
#include "dds_handler.h"
#include "logger.h"
#include <DDS/Core/function_reply_object.h>
#include <DDS/Core/core_types.h>
#include <ParticipantManagement/ppm_dtc.h>
// Generated
@@ -59,8 +59,5 @@ private:
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_ppmDtc;
Database::GimIed m_data;
IedPosition m_position;
NGL::INGLLogger &m_logger;
};
}