diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/CMakeLists.txt index 644839dd1..c70400de4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/CMakeLists.txt @@ -15,9 +15,6 @@ SET(SRCS_common alm_export.h logger.cpp logger.h - alm_translation.h - alm_translation.cpp - alm_types.h ) # Generate alm_enums.idl / alm.idl @@ -34,13 +31,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate alm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcAlmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcAlmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAlmCommon PRIVATE RTI::nddscpp2 @@ -51,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmCommon svcPdmCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAlmCommon) # @@ -63,14 +58,13 @@ SET(SRCS_client # generate alm_[d|f]tc.h, tlm_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcAlmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcAlmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAlmClient PRIVATE RTI::nddscpp2 @@ -80,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmClient ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAlmClient) # @@ -108,14 +101,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate alm.sql, alm.xml CODEGEN_SQL(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcAlmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcAlmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAlmServer PRIVATE RTI::nddscpp2 @@ -141,7 +133,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmServer svcAlmCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAlmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.cpp index 099b57ab0..49fc62419 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.cpp @@ -9,10 +9,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS @@ -34,6 +34,7 @@ AlmTests::AlmTests(QObject *parent) : QObject(parent) , m_testId(0) , m_bTestsSuccessful(true) + , m_logger(getLogger("AlmTests")) , m_participantIndex(0) {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.h index df00cd96b..6d2976c23 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/ModuleTests/alm_tests.h @@ -46,7 +46,6 @@ protected Q_SLOTS: void ExitSuccess(); protected: - NGL::INGLLogger &m_logger; void onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject) override final; private: @@ -61,6 +60,8 @@ private: int m_testId; bool m_bTestsSuccessful; int m_operatorId; + + NGL::INGLLogger &m_logger; int m_participantIndex; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.cpp index 03a81bb64..c9e7eaf59 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace AlarmManagement DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.h index c730377a6..c815b4b68 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/dds_handler.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include "logger.h" @@ -49,7 +49,6 @@ public: qint64 currentPartitionTime() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_topicLockMaster; @@ -64,6 +63,10 @@ private: std::shared_ptr m_dtcTab; std::shared_ptr m_dtsEmergencyCallPublisher; std::shared_ptr m_dtsEmergencyCall; + + + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.cpp index d851de5e2..624e0162c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.cpp @@ -7,12 +7,11 @@ */ #include "handler_configure_alarms.h" -#include #include "initialization.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -39,6 +38,7 @@ HandlerConfigureAlarms::HandlerConfigureAlarms(Initialization *mainHandler) : QObject() , ConfigureAlarmsRequestHandler(mainHandler->dds()->ftsAlm()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerConfigureAlarms")) , m_windowIndex(0) { } // end of ctor() @@ -245,7 +245,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event // Schleife ueber jeden Participant in der Konfiguration // Vergleich Participant-ID Event mit Konfiguration Event // Wenn ja, Alarm an operatorId schicken - for (const Database::AlmConfig &alarm : std::as_const(m_alarms)) + for (const Database::AlmConfig &alarm : qAsConst(m_alarms)) { { /*DEBUG_LOG(m_logger) << " alarmConfigItem.id=" << alarm.id @@ -267,7 +267,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event else participants.append(0); - for (int participantId : std::as_const(participants)) + for (int participantId : qAsConst(participants)) { bool allVulnerabilityStates = alarm.vulnerabilityState == -1; bool vulnerabilityCheck = vulnerabilityState == alarm.vulnerabilityState; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.h index 49c272c1c..e7a026fe8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_configure_alarms.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" #include @@ -48,8 +48,6 @@ private Q_SLOTS: void onEventChanged(const ExerciseEventManagement::Event &eventData, DataModification modType); private: // methods - -NGL::INGLLogger &m_logger; void onConfigureAlarmsRequest(const rti::core::SampleIdentity &cookie, const ConfigureAlarmsRequest &request) override; void sendWindow(const ExerciseEventManagement::Event &eventData, @@ -86,6 +84,8 @@ private: // attributes } }; QMap m_alarms; // Key = almConfig.id + + NGL::INGLLogger &m_logger; int m_windowIndex; }; } // namespace AlarmManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.cpp index 51b9c6d7f..26300d8a5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.cpp @@ -7,16 +7,15 @@ */ #include "handler_emergency_call.h" -#include #include "initialization.h" #include "handler_configure_alarms.h" #include "object_emergency_call.h" #include "alm_db.h" #include -#include -#include -#include +#include +#include +#include namespace AlarmManagement { HandlerEmergencyCall::HandlerEmergencyCall(const std::shared_ptr &configAlarmHandler, @@ -25,6 +24,7 @@ HandlerEmergencyCall::HandlerEmergencyCall(const std::shared_ptrdds()->ftsAlm()) , m_mainHandler(mainHandler) , m_configAlarmHandler(configAlarmHandler) + , m_logger(getLogger("HandlerEmergencyCall")) { } @@ -131,7 +131,7 @@ void HandlerEmergencyCall::onEmergencyCallAcknowledgeRequest(const rti::core::Sa Core::FunctionReplyObject HandlerEmergencyCall::emergencyCallAcknowledgeRequest(const EmergencyCallAcknowledgeRequest &request) { ObjectEmergencyCall *ifs = nullptr; - for(auto _ifs : std::as_const(m_emergencyObjMap)) + for(auto _ifs : qAsConst(m_emergencyObjMap)) { auto data = _ifs->getData(); if (data.issi == request.issi() @@ -182,7 +182,7 @@ bool HandlerEmergencyCall::isExerciseValidForEmergencyCall() const bool HandlerEmergencyCall::isNewEmergencyCall(const AlmEmergencyCall &newdata) { - for(const auto &ifs : std::as_const(m_emergencyObjMap)) + for(const auto &ifs : qAsConst(m_emergencyObjMap)) { const auto &data = ifs->getData(); if (data.issi == newdata.issi() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.h index fa0d51a47..d7ef7ea95 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_emergency_call.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include "dds_handler.h" #include "logger.h" @@ -33,7 +33,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; bool createEmergencyCallObject(const AlmEmergencyCall &data); void onEmergencyCallAcknowledgeRequest(const rti::core::SampleIdentity &cookie, const EmergencyCallAcknowledgeRequest &request) override final; @@ -46,9 +45,10 @@ private slots: void onAcknowledgeSOSInExercises(const AlarmManagement::AcknowledgeSOSInAllExercises &data, DataModification modType); private: - NGL::INGLLogger &m_logger; Initialization *m_mainHandler; std::shared_ptr m_configAlarmHandler; + NGL::INGLLogger &m_logger; + QMap m_emergencyObjMap; // Key = DangerAreaId }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.cpp index 7d91ebdba..5eca6b548 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.cpp @@ -11,9 +11,11 @@ using namespace AlarmManagement; -HandlerParticipant::HandlerParticipant(const std::shared_ptr &ddsHandler) : QObject() - , m_ddsHandler(ddsHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +HandlerParticipant::HandlerParticipant(const std::shared_ptr &ddsHandler) + : QObject() + , m_ddsHandler(ddsHandler) + , m_logger(getLogger("HandlerParticipant")) +{ } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.h index 4432532f3..64675e24a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/handler_participant.h @@ -8,11 +8,11 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" -#include +#include #include #include @@ -78,8 +78,6 @@ private Q_SLOTS: void onDynamicParticipantChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType); private: // methoden - -NGL::INGLLogger &m_logger; QVector getInferiorParts(int participantId) const; private: // attributes @@ -87,7 +85,7 @@ private: // attributes QMap m_partId2VulnerabilityMap; ///< Reference map participant (player) to Vulnerability QHash m_participantHierarchy; std::shared_ptr m_ddsHandler; ///< Pointer to VOM DDS handler - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace AlarmManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/initialization.h index 5250fec96..3d3299c80 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/initialization.h @@ -45,15 +45,13 @@ public: std::shared_ptr hdlParticipant() const { return m_handlerParticipant; } private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; ///< Pointer to DB handler std::shared_ptr m_handlerConfigureAlarms; std::shared_ptr m_handlerParticipant; ///< Pointer to handler for all participants std::shared_ptr m_handlerEmergencyCall; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace MessagingDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/logger.h index c3afa47f9..ccfec93fd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/logger.h @@ -9,13 +9,13 @@ #pragma once #include -#include +#include "alm_export.h" namespace AlarmManagement { using LOGGER_T = NGL::INGLLogger &; -SVCALMCOMMON_EXPORT LOGGER_T getLogger(const char *name); +ALM_COMMON_EXPORT LOGGER_T getLogger(const char *name); inline LOGGER_T getLogger(const QString &loggerName) { return getLogger(loggerName.toUtf8().constData()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.cpp index e8edc35d0..09de0e30e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.cpp @@ -4,9 +4,11 @@ namespace AlarmManagement{ -ObjectEmergencyCall::ObjectEmergencyCall(Initialization *mainHandler, QObject *parent) : QObject(parent) - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ObjectEmergencyCall::ObjectEmergencyCall(Initialization *mainHandler, QObject *parent) + : QObject(parent) + , m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectEmergencyCall")) +{ } ObjectEmergencyCall::~ObjectEmergencyCall() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.h index 1ed60ae9c..b7ab61929 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/object_emergency_call.h @@ -1,10 +1,10 @@ #pragma once -#include +#include #include #include "logger.h" -#include +#include //Generated #include @@ -32,9 +32,10 @@ protected Q_SLOTS: void onPublishData(); private: - NGL::INGLLogger &m_logger; Initialization *m_mainHandler; Database::AlmEmergencyCall m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/settings.h index 8c3bca672..aeee5386a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AlarmManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/CMakeLists.txt index 0bd772ac8..8db1c47ed 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/CMakeLists.txt @@ -70,13 +70,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate aes_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcAesCommon SHARED ${SRCS_common} ) +NGL_ADD_LIBRARY(AAR SV WS HLA svcAesCommon SHARED ${SRCS_common} ) NGL_TARGET_INCLUDE_DIRECTORIES(svcAesCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAesCommon PRIVATE RTI::nddscpp2 @@ -95,7 +94,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAesCommon Trajectory ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAesCommon) # @@ -109,14 +107,13 @@ SET(SRCS_client # generate aes_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) # SV wegen ft unit test -NGL_ADD_LIBRARY2(AAR SV HLA WS svcAesClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV HLA WS svcAesClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAesClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAesClient PRIVATE RTI::nddscpp2 @@ -127,7 +124,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAesClient ngltools ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAesClient) # @@ -143,14 +139,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) #WS for Record Replay plugin stand alone build -NGL_ADD_LIBRARY2(AAR SV WS svcAesServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV WS svcAesServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAesServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAesServer PRIVATE RTI::nddscpp2 @@ -160,7 +155,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAesServer svcAesCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAesServer) # @@ -324,7 +318,6 @@ CODEGEN_SQL(SRCS_exe ${xml_FILE}) NGL_ADD_SVC_ICON(SRCS_exe) NGL_ADD_EXECUTABLE(AAR SV svcAreaEffectSimulation ${SRCS_exe}) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation svcAesServer svcCesClient @@ -352,7 +345,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation ngltools saaTelegrams ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAreaEffectSimulation) NGL_INSTALL(AAR SV FILES log4cxx_aes.props DESTINATION bin) NGL_ADD_TARGET_LINK(svcAreaEffectSimulation sAES) @@ -410,7 +402,6 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_utils_test Utils/test_main.cpp ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(aes_utils_test Qt6::Core Qt6::Widgets @@ -418,9 +409,9 @@ NGL_TARGET_LINK_LIBRARIES(aes_utils_test svcAesCommon ProjectConfig ddsconnector + nglapplication LtsCoordTrans ) -ENDIF(BUILD_RTI) NGL_INSTALL(AAR SV TARGETS aes_utils_test DESTINATION bin/test) # @@ -430,7 +421,6 @@ NGL_ADD_EXECUTABLE(SV NO_TRANSLATION aes_convert_mine_area ModuleTests/aes_convert_mine_area.cpp ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area Qt6::Core # Qt6::Widgets @@ -445,7 +435,6 @@ NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area nglsettings ngltools ) -ENDIF(BUILD_RTI) NGL_INSTALL(SV TARGETS aes_convert_mine_area DESTINATION bin/test) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.cpp index 757edc309..8d0bbf588 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.cpp @@ -7,7 +7,6 @@ */ #include "abstract_firing_strategy.h" -#include #include "object_effector.h" #include "main_handler.h" @@ -16,9 +15,9 @@ #include #include "Trajectory/trajectory_transform.h" #include -#include +#include -#include +#include #include namespace AreaEffectSimulation @@ -26,17 +25,19 @@ namespace AreaEffectSimulation -AbstractFiringStrategy::AbstractFiringStrategy(ObjectEffector *parent) : QObject(parent) - , m_effector(parent), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; +AbstractFiringStrategy::AbstractFiringStrategy(ObjectEffector *parent) + : QObject(parent) + , m_effector(parent) + , m_logger(getLogger("FiringStrategy")) +{ + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } AbstractFiringStrategy::~AbstractFiringStrategy() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } void AbstractFiringStrategy::calculateDispersionTrajectory() @@ -49,7 +50,7 @@ void AbstractFiringStrategy::calculateDispersionTrajectory() // sanity check: if (intendendTrajectory.size() < 2) { - ERROR_LOG(m_logger) << Q_FUNC_INFO + ERROR_LOG(m_logger) << LOGFUNCTION << " size of intendendTrajectory not sufficiant, size=" << intendendTrajectory.size(); return; } @@ -72,7 +73,7 @@ std::vector AbstractFiringStrategy::buildTrajecto // sanity check: if (relativeTrajectory.size() < 2) { - ERROR_LOG(m_logger) << Q_FUNC_INFO + ERROR_LOG(m_logger) << LOGFUNCTION << " size of relativeTrajectory not sufficiant, size=" << relativeTrajectory.size(); return {}; } @@ -86,7 +87,7 @@ std::vector AbstractFiringStrategy::buildTrajecto geometry.reserve(relativeTrajectory.size()); // Aehnlich wie Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/aes_handler.cpp Zeile 365 - for (const TrajectoryPoint &trajPntRelPos : std::as_const(relativeTrajectory)) + for (const TrajectoryPoint &trajPntRelPos : qAsConst(relativeTrajectory)) { DEBUG_LOG(m_logger) << "Flugbahnpunkt: trajPntRelPos :" << trajPntRelPos; // benefit from operator<<: @@ -114,7 +115,7 @@ TrajectoryTimeAware AbstractFiringStrategy::buildTrajectoryTimeAware(const std:: // sanity check: if (trajectoryGeometry.size() < 2) { - ERROR_LOG(m_logger) << Q_FUNC_INFO + ERROR_LOG(m_logger) << LOGFUNCTION << " size of trajectoryGeometry not sufficiant, size=" << trajectoryGeometry.size(); return {}; } @@ -139,7 +140,7 @@ int AbstractFiringStrategy::sendChargeEffect(const TrajectoryTimeAware &trajecto // sanity check: if (trajGeometry.size() < 2) { - ERROR_LOG(m_logger) << Q_FUNC_INFO + ERROR_LOG(m_logger) << LOGFUNCTION << " size of trajectoryTimeAware.geometry not sufficiant, size=" << trajGeometry.size(); return -1; } @@ -186,7 +187,7 @@ int32_t AbstractFiringStrategy::gearTypeId(int chargeTypeId, int participantId) DEBUG_LOG(m_logger) << "gearSize " << dynamicParticipantData.gear().size(); const auto& participantData_gear = dynamicParticipantData.gear(); - for (const auto &gear : std::as_const(participantData_gear)) + for (const auto &gear : qAsConst(participantData_gear)) { DEBUG_LOG(m_logger) << "gear.chargeTypeId(): " << gear.chargeTypeId() << ", chargeTypeId:" << chargeTypeId; if (gear.chargeTypeId() == chargeTypeId) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.h index fb1849040..a8d254220 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/abstract_firing_strategy.h @@ -21,9 +21,9 @@ #pragma once #include -#include +#include #include -#include +#include namespace Core { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/dm72_firing_strategy.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/dm72_firing_strategy.cpp index cc91996f2..f6d544a05 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/dm72_firing_strategy.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/dm72_firing_strategy.cpp @@ -7,7 +7,6 @@ */ #include "dm72_firing_strategy.h" -#include #include "main_handler.h" #include "object_effector.h" @@ -16,10 +15,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include namespace AreaEffectSimulation @@ -73,7 +72,7 @@ void Dm72FiringStrategy::init() QVector tempUtmTreffpunkte; tempUtmTreffpunkte.reserve(wirkmittel.geschoss.anzahl); - for (const Treffpunkt &treffpunkt : std::as_const(wirkmittel.treffpunkte)) + for (const Treffpunkt &treffpunkt : qAsConst(wirkmittel.treffpunkte)) { const UtmCoordinate utmTreffpunkt = UtmCoordinate::fromGeographic(treffpunkt.koordinate.koordinate.longitude * deg2rad(), treffpunkt.koordinate.koordinate.latitude * deg2rad(), diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.cpp index 75bee49a3..1b4ddc6b2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.cpp @@ -7,15 +7,14 @@ */ #include "gmlrs_firing_strategy.h" -#include #include "object_effector.h" #include #include #include -#include -#include +#include +#include namespace AreaEffectSimulation { @@ -69,7 +68,7 @@ void GmlrsFiringStrategy::init() WirkmittelFeuerkommandoRakete wirkmittel; wirkmittelFeuerkommandoRaketeFromJson(properties, wirkmittel, bOk); - for (const Treffpunkt &treffpunkt : std::as_const(wirkmittel.treffpunkte)) + for (const Treffpunkt &treffpunkt : qAsConst(wirkmittel.treffpunkte)) { const LtsCoordTrans::UtmCoordinate utmTreffpunkt = LtsCoordTrans::UtmCoordinate::fromGeographic(treffpunkt.koordinate.koordinate.longitude * LtsCoordTrans::deg2rad(), diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.h index edc9ca50f..b162edc1a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/gmlrs_firing_strategy.h @@ -9,7 +9,7 @@ #pragma once #include "abstract_firing_strategy.h" -#include +#include namespace Core { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/smart_firing_strategy.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/smart_firing_strategy.cpp index 68a43f2d6..9cdee395a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/smart_firing_strategy.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/EffectorFiringStrategy/smart_firing_strategy.cpp @@ -13,8 +13,8 @@ #include #include -#include -#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/CMakeLists.txt index 9d26df77a..65b82b5ef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/CMakeLists.txt @@ -13,12 +13,6 @@ SET(UnitTestSources IF(BUILD_TESTING) ADD_EXECUTABLE(aesModuleTestEffectCluster ${LinkedSources} ${UnitTestSources} ) - NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestEffectCluster - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ) - TARGET_LINK_LIBRARIES(aesModuleTestEffectCluster NGLLogger nglcoreapplication diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp index 1f52a994c..c2b5c57a8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.cpp @@ -7,7 +7,6 @@ */ #include "effect_cluster_module_test.h" -#include #include #include @@ -18,14 +17,14 @@ // PPM #include "ParticipantManagement/ppm_ftc_types.h" #include "TrainingAreaBase/tab.hpp" -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include @@ -75,6 +74,7 @@ double distanceMeter(const Core::GeoPosition2D &geoPos2D, const LtsCoordTrans::U ModuleTestEffectCluster::ModuleTestEffectCluster(int domainId, int exerciseId) : m_domainId(domainId) , m_exerciseId(exerciseId) + , m_logger(getLogger("ModuleTestEffectCluster")) { m_timer = new QTimer(this); m_timer->setSingleShot(true); @@ -241,7 +241,7 @@ void ModuleTestEffectCluster::onTrajectoryTimeAwareChanged(const TrajectoryTimeA void ModuleTestEffectCluster::dumpCnt() { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Counter: " + DEBUG_LOG(m_logger) << LOGFUNCTION << " Counter: " << " cntEffectCluster = " << m_counterDds.cntEffectCluster << ", cntAtEffectCluster = " << m_counterDds.cntAtEffectCluster << ", cntGunToTargetLine = " << m_counterDds.cntAtEffectClusterGunToTargetLine << ", cntClusterEffects = " << m_counterDds.cntEffectClusterEffects << ", cntTrajectory = " << m_counterDds.cntTrajectory; @@ -507,7 +507,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared; }, durPrep)) { ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber; @@ -515,7 +515,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated; }, durAct)) { ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber; @@ -523,7 +523,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired; }, durExp)) { ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber; @@ -934,7 +934,7 @@ int main(int argc, char *argv[]) --argc; const QStringList &slPositionalArgs = options.positionalArguments(); - for (const QString &item : std::as_const(slPositionalArgs)) + for (const QString &item : qAsConst(slPositionalArgs)) std::cout << " item = " << item << std::endl; ModuleTestEffectCluster tc(options.domainId(), options.exerciseId()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.h index eaa094900..f3fec2dac 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_EffectCluster/effect_cluster_module_test.h @@ -25,12 +25,12 @@ #include #include -#include +#include #include #include -#include +#include #include @@ -61,8 +61,6 @@ public: ModuleTestEffectCluster(int domainId, int exerciseId); protected: - -NGL::INGLLogger &m_logger; void onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject) override; void onAcknowledgeExternalAesItemReply(const Core::FunctionReplyObject &replyObject) override; void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override; @@ -187,6 +185,8 @@ private: } } m_counterDds; + + LOGGER_T m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/CMakeLists.txt index 182d8ca37..aee78e85a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/CMakeLists.txt @@ -13,12 +13,6 @@ SET(UnitTestSources IF(BUILD_TESTING) ADD_EXECUTABLE(aesModuleTestExplosionCluster ${LinkedSources} ${UnitTestSources} ) - NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestExplosionCluster - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ) - TARGET_LINK_LIBRARIES(aesModuleTestExplosionCluster NGLLogger nglcoreapplication diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp index a12bc3677..72abda6d2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.cpp @@ -7,7 +7,6 @@ */ #include "explosion_cluster_module_test.h" -#include #include #include @@ -20,8 +19,8 @@ #include -#include -#include +#include +#include #include @@ -95,6 +94,7 @@ double distanceMeter(const Core::GeoPosition2D &geoPos2D , const LtsCoordTrans:: ModuleTestExplosionCluster::ModuleTestExplosionCluster(int domainId, int exerciseId) : m_domainId(domainId) , m_exerciseId(exerciseId) + , m_logger(getLogger("ModuleTestExplosionCluster")) { } @@ -253,7 +253,7 @@ void ModuleTestExplosionCluster::onTrajectoryTimeAwareChanged(const TrajectoryTi void ModuleTestExplosionCluster::dumpCnt() { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " Counter: " + NOTICE_LOG(m_logger) << LOGFUNCTION << " Counter: " << " cntExplosionCluster = " << m_counterDds.cntExplosionCluster << ", cntAtExplosionCluster = " << m_counterDds.cntAtExplosionCluster << ", cntGunToTargetLine = " << m_counterDds.cntAtExplosionClusterGunToTargetLine @@ -265,7 +265,7 @@ void ModuleTestExplosionCluster::dumpCnt() void ModuleTestExplosionCluster::dumpBldgStates() { NOTICE_LOG(m_logger) << " m_buildingStateVec.size() = " << m_buildingStateVec.size(); - for (const Buildings::BuildingState &bldgState : std::as_const(m_buildingStateVec)) + for (const Buildings::BuildingState &bldgState : qAsConst(m_buildingStateVec)) NOTICE_LOG(m_logger) << " bldgState: " << ", id = " << bldgState.id() << ", damagePercent = " << bldgState.damagePercent() @@ -336,7 +336,7 @@ bool ModuleTestExplosionCluster::checkBldgStates(const QVector &damagePerce QVector damagePercentIst; damagePercentIst.reserve(m_buildingStateVec.size()); - for (const Buildings::BuildingState &bldgState : std::as_const(m_buildingStateVec)) + for (const Buildings::BuildingState &bldgState : qAsConst(m_buildingStateVec)) damagePercentIst.append(bldgState.damagePercent()); bool same = damagePercentIst == damagePercent; @@ -715,7 +715,7 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep)) { ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id() @@ -724,7 +724,7 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct)) { ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id() @@ -733,7 +733,7 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp)) { ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id() @@ -877,7 +877,7 @@ bool ModuleTestExplosionCluster::checkParticipant_89() const LtsUtils::QPoint3D ¢erCoordGeo = Polygons::calculateFiringUnitCenterNonRecursive(m_ppmDtc, partId, singlePositionsOut_unused, m_logger); if (centerCoordGeo.isNull() || std::isnan(centerCoordGeo.x())) { - WARNING_LOG(m_logger) << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId; + WARNING_LOG(m_logger) << LOGFUNCTION << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId; return false; } @@ -896,7 +896,7 @@ bool ModuleTestExplosionCluster::checkParticipant_99() const LtsUtils::QPoint3D ¢erCoordGeo = Polygons::calculateFiringUnitCenterNonRecursive(m_ppmDtc, partId, singlePositionsOut_unused, m_logger); if (centerCoordGeo.isNull() || std::isnan(centerCoordGeo.x())) { - WARNING_LOG(m_logger) << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId; + WARNING_LOG(m_logger) << LOGFUNCTION << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId; return false; } @@ -935,7 +935,7 @@ void ModuleTestExplosionCluster::resetBldgs() std::vector buildingsVec; buildingsVec.reserve(m_bldgIdToName.size()); auto bldgIds = m_bldgIdToName.keys(); - for (int bldgId : std::as_const(bldgIds)) + for (int bldgId : qAsConst(bldgIds)) buildingsVec.push_back( Buildings::Building(bldgId, {}) ); Buildings::SetBuildingStatesRequest requestData; @@ -951,7 +951,7 @@ void ModuleTestExplosionCluster::resetBldgs() QTest::qWait(100); // check states: - for (int bldgId : std::as_const(bldgIds)) + for (int bldgId : qAsConst(bldgIds)) { const ProjectDataManagement::VulnerabilityState& bldgState = m_bldDtc->buildingState(bldgId).vulnerabilityState(); INFO_LOG(m_logger) << "resetBldgs: bldgId " << bldgId @@ -1175,19 +1175,19 @@ void ModuleTestExplosionCluster::init() void ModuleTestExplosionCluster::test_justSetupParticipants() { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START"; setupParticipants(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_TneVerificationBremen_00() { if (m_traingAreaId != s_TraingAreaId_Bremen) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; // AXXX Zentrale/DDS ToSFM (compassDegree + 90.0) @@ -1231,11 +1231,11 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01() { if (m_traingAreaId != s_TraingAreaId_Bremen) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; // // !!!!! ModuleTest_TneVerification -> randomNumber = 32767; !!!!!!!!!!! @@ -1292,7 +1292,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01() << ", m_data.mhPoints().size()=" << m_data.mhPoints().size(); const std::vector &formRef = itemView.form(); - for (const Core::GeoPosition &geoCoord : std::as_const(formRef)) + for (const Core::GeoPosition &geoCoord : qAsConst(formRef)) { const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat()); INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord; @@ -1323,17 +1323,17 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01() QVERIFY2(distanceMeter(formRef[i++], LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32U MD 97002 78004"))) < 1, "ERROR, distanceMeter failed!!"); dumpCnt(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_TneVerificationBremen_02() { if (m_traingAreaId != s_TraingAreaId_Bremen) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; // // !!!!! ModuleTest_TneVerification -> randomNumber = 32767; !!!!!!!!!!! @@ -1391,7 +1391,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_02() << ", m_data.mhPoints().size()=" << m_data.mhPoints().size(); const std::vector &formRef = itemView.form(); - for (const Core::GeoPosition &geoCoord : std::as_const(formRef)) + for (const Core::GeoPosition &geoCoord : qAsConst(formRef)) { const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat()); INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord; @@ -1431,7 +1431,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_Proximity() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } @@ -1441,7 +1441,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_Proximity() const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -1484,17 +1484,17 @@ void ModuleTestExplosionCluster::test_bldg_1104_Proximity() QVERIFY2(bOk, "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_1104_Impact() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -1522,17 +1522,17 @@ void ModuleTestExplosionCluster::test_bldg_1104_Impact() // UNABHÄNGIG von [GUEZE-2766] Zünderarten Freifläche: QVERIFY2(checkBldgStates({14, 32, 49, 63}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_1104_Delay() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -1562,7 +1562,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_Delay() // UNABHÄNGIG von [GUEZE-2766] Zünderarten Freifläche: QVERIFY2(checkBldgStates({30, 56, 74, 90}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } @@ -1573,12 +1573,12 @@ void ModuleTestExplosionCluster::test_bldg_1106_Proximity() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1106")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_6(), "ERROR, checkParticipant_6 failed!!"); setFilterForBldgState(bldgName); @@ -1599,7 +1599,7 @@ void ModuleTestExplosionCluster::test_bldg_1106_Proximity() // Maybe Kanaele cover bldg_1106 from impact due to very simple algorithm: // CES/Plugins/Buildings/handler_aes_data.cpp:674 / findBuildingsBetween(impactPos, footprint) const bool bIsKanaeleAssigned = isKanaeleAssigned(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " bIsKanaeleAssigned = " << bIsKanaeleAssigned; + NOTICE_LOG(m_logger) << LOGFUNCTION << " bIsKanaeleAssigned = " << bIsKanaeleAssigned; if (bIsKanaeleAssigned) // QVERIFY2(checkBldgStates({14, 22, 29, 37}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); // since 13.11.2024 ; [GUEZE-2766] Zünderarten Freifläche: @@ -1607,18 +1607,18 @@ void ModuleTestExplosionCluster::test_bldg_1106_Proximity() else QVERIFY2(checkBldgStates({14, 30, 45, 61}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_1106_Impact() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1106")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_6(), "ERROR, checkParticipant_6 failed!!"); setFilterForBldgState(bldgName); @@ -1640,23 +1640,23 @@ void ModuleTestExplosionCluster::test_bldg_1106_Impact() // Maybe Kanaele cover bldg_1106 from impact due to very simple algorithm: // CES/Plugins/Buildings/handler_aes_data.cpp:674 / findBuildingsBetween(impactPos, footprint) const bool bIsKanaeleAssigned = isKanaeleAssigned(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " bIsKanaeleAssigned = " << bIsKanaeleAssigned; + NOTICE_LOG(m_logger) << LOGFUNCTION << " bIsKanaeleAssigned = " << bIsKanaeleAssigned; if (bIsKanaeleAssigned) QVERIFY2(checkBldgStates({14, 28, 41, 56}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); else QVERIFY2(checkBldgStates({14, 41, 68, 88}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_1106_Delay() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1106")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_6(), "ERROR, checkParticipant_6 failed!!"); setFilterForBldgState(bldgName); @@ -1678,24 +1678,24 @@ void ModuleTestExplosionCluster::test_bldg_1106_Delay() // Maybe Kanaele cover bldg_1106 from impact due to very simple algorithm: // CES/Plugins/Buildings/handler_aes_data.cpp:674 / findBuildingsBetween(impactPos, footprint) const bool bIsKanaeleAssigned = isKanaeleAssigned(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " bIsKanaeleAssigned = " << bIsKanaeleAssigned; + NOTICE_LOG(m_logger) << LOGFUNCTION << " bIsKanaeleAssigned = " << bIsKanaeleAssigned; if (bIsKanaeleAssigned) QVERIFY2(checkBldgStates({14, 43, 72, 86 }, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); else QVERIFY2(checkBldgStates({14, 71, 90, 99}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_UBAHN_Proximity() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_U_Bahn")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -1717,7 +1717,7 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Proximity() // since 13.11.2024 ; [GUEZE-2766] Zünderarten Freifläche: QVERIFY2(checkBldgStates({2, 4, 7, 7}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; // participantId(5) // Schuss 1: nearestWall.roomId = 2303 @@ -1731,11 +1731,11 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Impact() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_U_Bahn")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -1761,7 +1761,7 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Impact() QVERIFY2(bCheckBldgOk, "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; // participantId(5) // Schuss 1: nearestWall.roomId = 2303 @@ -1775,11 +1775,11 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Delay() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_U_Bahn")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -1800,7 +1800,7 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Delay() QVERIFY2(checkBldgStates({8, 11, 13, 13}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; // participantId(5) // Schuss 1: nearestWall.roomId = 2132 @@ -1814,11 +1814,11 @@ void ModuleTestExplosionCluster::test_bldg_3101_Proximity() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_3101")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!"); setFilterForBldgState(bldgName); @@ -1841,7 +1841,7 @@ void ModuleTestExplosionCluster::test_bldg_3101_Proximity() // since 13.11.2024 ; [GUEZE-2766] Zünderarten Freifläche: QVERIFY2(checkBldgStates({7, 14, 21, 28}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; // participantId(89) @@ -1856,11 +1856,11 @@ void ModuleTestExplosionCluster::test_bldg_3101_Impact() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_3101")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!"); setFilterForBldgState(bldgName); @@ -1881,7 +1881,7 @@ void ModuleTestExplosionCluster::test_bldg_3101_Impact() QVERIFY2(checkBldgStates({7, 13, 25, 36}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; // participantId(89) // Schuss 1: @@ -1895,11 +1895,11 @@ void ModuleTestExplosionCluster::test_bldg_3101_Delay() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_3101")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!"); setFilterForBldgState(bldgName); @@ -1920,7 +1920,7 @@ void ModuleTestExplosionCluster::test_bldg_3101_Delay() QVERIFY2(checkBldgStates({7, 13, 37, 58}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; // participantId(89) // Schuss 1: @@ -1934,10 +1934,10 @@ void ModuleTestExplosionCluster::test_remove_effect_start() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); AreaEffectSimulation::ExplosionCluster eaData = getEcFor1104(QStringLiteral("ModuleTest_RemoveEffectStart_ec__")); @@ -1964,7 +1964,7 @@ void ModuleTestExplosionCluster::test_remove_effect_start() return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared..."; if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, 2)) { ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id(); @@ -1979,19 +1979,19 @@ void ModuleTestExplosionCluster::test_remove_effect_start() QTimer::singleShot(waitSec*1000, this, [this, eaData] { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " ACTION: prepared back to created ... "; + NOTICE_LOG(m_logger) << LOGFUNCTION << " ACTION: prepared back to created ... "; AreaEffectSimulation::ExplosionCluster copy = eaData; copy.id(m_data.id()); copy.effectStart().reset(); // 'remove' -> prepared back to created int ret = doExplosionClusterModifyRequest(copy); QVERIFY2(ret != 0, "ERROR, explosionClusterModifyRequest failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " ACTION: prepared back to created ... DONE"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " ACTION: prepared back to created ... DONE"; }); } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting to make sure, that next step is never reached:"; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting to make sure, that next step is never reached:"; if (waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, 60)) { ERROR_LOG(m_logger) << "Next step is accidentically reached of explosion cluster with id " << m_data.id(); @@ -1999,27 +1999,27 @@ void ModuleTestExplosionCluster::test_remove_effect_start() return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " object effectState: " << m_data.effectStateId(); + INFO_LOG(m_logger) << LOGFUNCTION << " object effectState: " << m_data.effectStateId(); QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsCreated, "ERROR, ExplosionCluster in wrong state"); dumpCnt(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_create_bulk() { if (!ModuleTestExplosionCluster::m_enable_create_bulk) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase, has to be call explicitly called by user"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase, has to be call explicitly called by user"; return; } if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!"); @@ -2048,19 +2048,19 @@ void ModuleTestExplosionCluster::test_create_bulk() QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired, "ERROR, effectStateId failed!!"); dumpCnt(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_point_geometry_bldg_1104() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -2099,7 +2099,7 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104() QVERIFY2(checkBldgStates({29}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity() @@ -2111,12 +2111,12 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity() if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104_SMArt")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -2126,10 +2126,10 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity() eaData.chargeStruct().igniterTypeId(s_IgniterTypeImpact); eaData.chargeStruct().chargeTypeId(374); // 374: isSMArt=true ; radius == 25, diameter == 50m - NOTICE_LOG(m_logger) << Q_FUNC_INFO << "Vor eaData.flightCurve().is_set()"; + NOTICE_LOG(m_logger) << LOGFUNCTION << "Vor eaData.flightCurve().is_set()"; QVERIFY2(eaData.flightCurve().is_set(), "ERROR, flightCurve() not set !!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << "Nach eaData.flightCurve().is_set()"; + NOTICE_LOG(m_logger) << LOGFUNCTION << "Nach eaData.flightCurve().is_set()"; eaData.flightCurve().get().requestedRelativePeakHeight(500); @@ -2163,19 +2163,19 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity() QVERIFY2(checkBldgStates({29}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_1104_OC() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; // QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); // setFilterForBldgState(bldgName); @@ -2209,7 +2209,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_OC() waitForEffectStates(__LINE__, 5, 60, 30); QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired, "ERROR, effectStateId failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } // light -> no curve @@ -2217,12 +2217,12 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_light() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -2267,19 +2267,19 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_light() // QVERIFY2(checkBldgStates({29}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster:: test_point_geometry_bldg_1104_single_effect_only() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; // // QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -2298,7 +2298,7 @@ void ModuleTestExplosionCluster:: test_point_geometry_bldg_1104_single_effect_on const QPointF impactPointF(0.20256382834808495, 0.9161105453111705); request.impactPosition(Core::GeoPosition2D(impactPointF.x(), impactPointF.y())); - INFO_LOG(m_logger) << Q_FUNC_INFO << " requested impact position = " << LtsCoordTrans::UtmCoordinate::fromGeographic(impactPointF).mgrs(); + INFO_LOG(m_logger) << LOGFUNCTION << " requested impact position = " << LtsCoordTrans::UtmCoordinate::fromGeographic(impactPointF).mgrs(); request.chargeTypeId(371); request.externalId(815); @@ -2313,19 +2313,19 @@ void ModuleTestExplosionCluster:: test_point_geometry_bldg_1104_single_effect_on QVERIFY2(checkBldgStates({29}, QString::fromStdString(request.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_bldg_1104_effects_only() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; // QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!"); setFilterForBldgState(bldgName); @@ -2364,7 +2364,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_effects_only() QVERIFY2(m_counterDds.cntTrajectory == 0, "ERROR, cnt failed!!"); // 4 impacts -> 4 trajectory std::vector&singleEffects = m_effects.singleEffects(); - for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffects)) + for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffects)) { // Since there is no trajectory, no intersection is calculated. // Therefore the impacts are on the ground. @@ -2376,7 +2376,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_effects_only() QVERIFY2(checkBldgStates({29, 59, 82, 94}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } @@ -2385,12 +2385,12 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104_VULCANO")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_99(), "ERROR, checkParticipant_99 failed!!"); @@ -2435,19 +2435,19 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104() QVERIFY2(m_counterDds.cntAtExplosionClusterGunToTargetLine == 1, "ERROR, cnt failed!!"); QVERIFY2(m_counterDds.cntExplosionClusterEffects == 1, "ERROR, cnt failed!!"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104_VULCANO")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_99(), "ERROR, checkParticipant_99 failed!!"); @@ -2494,7 +2494,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify() const qint64 nowMsec = QDateTime::currentMSecsSinceEpoch(); const qint64 distMsec = startTimeMsec - nowMsec; - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 1 " + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 1 " << ", effectStart (impactTime) = " << startTimeMsec << ", nowMsec = " << nowMsec << ", distMsec = " << distMsec; @@ -2503,7 +2503,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify() int delayMsec = 5000; // distMsec - 5000; QTimer::singleShot(distMsec - delayMsec, this, [this] () { // local static is captured implicit by gcc and for MSVS - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2 "; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2 "; QPointF newTargetPosGeo = s_newTargetPosUtm_1.geographic(); @@ -2511,9 +2511,9 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify() request.aesItemId(m_data.id()); request.positions().emplace_back(Core::GeoPosition(newTargetPosGeo.x(), newTargetPosGeo.y(), 123)); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ..."; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ..."; doExplosionClusterTargetPositionsModify(request); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE"; }); }); @@ -2536,22 +2536,22 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify() const LtsCoordTrans::UtmCoordinate &seUtmPos = LtsCoordTrans::UtmCoordinate::fromGeographic(seGeoPos.lon(), seGeoPos.lat()); int dist = LtsCoordTrans::distance(s_newTargetPosUtm_1, seUtmPos); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " dist = " << dist; + NOTICE_LOG(m_logger) << LOGFUNCTION << " dist = " << dist; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } const QString bldgName(QStringLiteral("bldg_1104_VULCANO")); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_99(), "ERROR, checkParticipant_99 failed!!"); @@ -2601,7 +2601,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() const qint64 nowMsec = QDateTime::currentMSecsSinceEpoch(); const qint64 distMsec = startTimeMsec - nowMsec; - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 1 " + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 1 " << ", effectStart (impactTime) = " << startTimeMsec << ", nowMsec = " << nowMsec << ", distMsec = " << distMsec; @@ -2612,7 +2612,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() // Timer _BEFORE_ EffectStart const int delayMsec_1 = distMsec - offset; QTimer::singleShot(delayMsec_1, this, [this] () { // local static is captured implicit by gcc and for MSVS - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2 "; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2 "; QPointF newTargetPosGeo = s_newTargetPosUtm_1.geographic(); // ^ @@ -2621,15 +2621,15 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() request.aesItemId(m_data.id()); request.positions().emplace_back(Core::GeoPosition(newTargetPosGeo.x(), newTargetPosGeo.y(), 123)); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ..."; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ..."; doExplosionClusterTargetPositionsModify(request); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE"; }); // Timer _AFTER_ EffectStart const int delayMsec_2 = distMsec + offset; QTimer::singleShot(delayMsec_2, this, [this] () { // local static is captured implicit by gcc and for MSVS - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 3 "; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 3 "; QPointF newTargetPosGeo = s_newTargetPosUtm_2.geographic(); // ^ @@ -2638,9 +2638,9 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() request.aesItemId(m_data.id()); request.positions().emplace_back(Core::GeoPosition(newTargetPosGeo.x(), newTargetPosGeo.y(), 124)); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 3, doExplosionClusterTargetPositionsModify ..."; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 3, doExplosionClusterTargetPositionsModify ..."; doExplosionClusterTargetPositionsModify(request); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 3, doExplosionClusterTargetPositionsModify ... DONE"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 3, doExplosionClusterTargetPositionsModify ... DONE"; }); }); @@ -2670,7 +2670,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() // compare with s_newTargetPosUtm_1, not s_newTargetPosUtm_2: int dist = LtsCoordTrans::distance(s_newTargetPosUtm_1, seUtmPos); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " dist = " << dist; + NOTICE_LOG(m_logger) << LOGFUNCTION << " dist = " << dist; QVERIFY2(dist < 100, "ERROR, m_effects failed"); } @@ -2687,11 +2687,11 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2() const LtsCoordTrans::UtmCoordinate &bottomLeftUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(bottomLeftGeo.lon(), bottomLeftGeo.lat()); const int distBL = LtsCoordTrans::distance(s_newTargetPosUtm_1, bottomLeftUtm); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " itemViewBoundary.dist = " << distBL; + NOTICE_LOG(m_logger) << LOGFUNCTION << " itemViewBoundary.dist = " << distBL; QVERIFY2(distBL < 100, "ERROR, itemViewBoundary failed"); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } @@ -2741,7 +2741,7 @@ int main(int argc, char *argv[]) --argc; const QStringList &slPositionalArgs = options.positionalArguments(); - for (const QString &item : std::as_const(slPositionalArgs)) + for (const QString &item : qAsConst(slPositionalArgs)) std::cout << " item = " << item << std::endl; // enable_create_bulk only if it´s explicitly called by user: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.h index 73c59bfd9..052546d5e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_ExplosionCluster/explosion_cluster_module_test.h @@ -21,11 +21,11 @@ #include #include -#include +#include #include -#include +#include #include #include @@ -59,8 +59,6 @@ public: ModuleTestExplosionCluster(int domainId, int exerciseId); protected: - -NGL::INGLLogger &m_logger; void onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject) override; void onSetSimulatedParticipantFormationReply(const Core::FunctionReplyObject &replyObject) override; void onExplosionClusterModifyReply(const Core::FunctionReplyObject &replyObject) override; @@ -241,4 +239,6 @@ private: } } m_counterDds; + + LOGGER_T m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/CMakeLists.txt index 734bf0639..efd195804 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/CMakeLists.txt @@ -12,12 +12,6 @@ SET(UnitTestSources NGL_ADD_EXECUTABLE(SV aesModuleTestLimits ${LinkedSources} ${UnitTestSources} ) -NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestLimits - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ -) - NGL_TARGET_LINK_LIBRARIES(aesModuleTestLimits NGLLogger nglcoreapplication diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.cpp index e1d82addf..f6e957516 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.cpp @@ -7,19 +7,18 @@ */ #include "limits_module_test.h" -#include #include "qtestcase.h" #include #include // AES #include -#include +#include #include -#include -#include +#include +#include #include @@ -39,6 +38,7 @@ static const int s_pauseTimeInSec = 5; ModuleTestLimits::ModuleTestLimits(int domainId, int exerciseId) : m_domainId(domainId) , m_exerciseId(exerciseId) + , m_logger(getLogger("ModuleTestLimits")) { } @@ -71,7 +71,7 @@ void ModuleTestLimits::testExplosionClusterCentral() int counter = 0; const auto &items = m_aesDtc->explosionClusters(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true) ++counter; @@ -104,7 +104,7 @@ void ModuleTestLimits::testExplosionClusterDecentral() int counter = 0; const auto &items = m_aesDtc->explosionClusters(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if ((item.effectStateId() == AesEffectState::EsPrepared) && (item.isCentral() == false)) ++counter; @@ -140,7 +140,7 @@ void ModuleTestLimits::testAirSupports() int counter = 0; const auto &items = m_aesDtc->explosionClusters(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass::AirSupport) ++counter; @@ -173,7 +173,7 @@ void ModuleTestLimits::testMineAreaCentral() int counter = 0; const auto &items = m_aesDtc->mineAreas(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if ((item.effectStateId() == AesEffectState::EsPrepared) && (item.isCentral() == true)) ++counter; @@ -207,7 +207,7 @@ void ModuleTestLimits::testMineAreaDecentral() int counter = 0; const auto &items = m_aesDtc->mineAreas(); - for (const auto &curMineArea : std::as_const(items)) + for (const auto &curMineArea : qAsConst(items)) { if ((curMineArea.effectStateId() == AesEffectState::EsPrepared) && (curMineArea.isCentral() == false)) ++counter; @@ -234,7 +234,7 @@ void ModuleTestLimits::testMineAreaDecentral() int counter2 = 0; const auto &mineAreas = m_aesDtc->mineAreas(); - for (const auto &item : std::as_const(mineAreas)) + for (const auto &item : qAsConst(mineAreas)) { if ((item.effectStateId() == AesEffectState::EsPrepared) && !item.isCentral() && @@ -270,7 +270,7 @@ void ModuleTestLimits::testNBCCentral() int counter = 0; const auto &items = m_aesDtc->nContaminations(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true) ++counter; @@ -305,7 +305,7 @@ void ModuleTestLimits::testNBCDecentral() int counter = 0; const auto &items = m_aesDtc->nContaminations(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false) ++counter; @@ -337,7 +337,7 @@ void ModuleTestLimits::testOffRouteMines() int counter = 0; const auto &items = m_aesDtc->offRouteMines(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true) ++counter; @@ -369,7 +369,7 @@ void ModuleTestLimits::testBoobyTraps() int counter = 0; const auto &items = m_aesDtc->boobyTraps(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true) ++counter; @@ -404,7 +404,7 @@ void ModuleTestLimits::testBCCCentral() int counter = 0; const auto &items = m_aesDtc->bCContaminations(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true) ++counter; @@ -439,7 +439,7 @@ void ModuleTestLimits::testBCCDecentral() int counter = 0; const auto &items = m_aesDtc->bCContaminations(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false) ++counter; @@ -474,7 +474,7 @@ void ModuleTestLimits::testFADecentral() int counter = 0; const auto &items = m_aesDtc->functionalAreas(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false) ++counter; @@ -511,7 +511,7 @@ void ModuleTestLimits::testFACentral() int counter = 0; const auto &items = m_aesDtc->functionalAreas(); - for (const auto &item : std::as_const(items)) + for (const auto &item : qAsConst(items)) { if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true) ++counter; @@ -1192,7 +1192,7 @@ void ModuleTestLimits::deleteAesAreas() const QVector sts = {AesEffectState::EsExpired, AesEffectState::EsRemoved, AesEffectState::EsActivated}; auto clusters = m_aesDtc->explosionClusters(); - for (auto cluster : std::as_const(clusters)) + for (auto cluster : qAsConst(clusters)) { if (!sts.contains(cluster.effectStateId().underlying())) { @@ -1202,7 +1202,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto nbcs = m_aesDtc->nContaminations(); - for (auto nbc : std::as_const(nbcs)) + for (auto nbc : qAsConst(nbcs)) { if (!sts.contains(nbc.effectStateId().underlying())) { @@ -1212,7 +1212,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto orms = m_aesDtc->offRouteMines(); - for (auto orm : std::as_const(orms)) + for (auto orm : qAsConst(orms)) { if (!sts.contains(orm.effectStateId().underlying())) { @@ -1222,7 +1222,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto bts = m_aesDtc->boobyTraps(); - for (auto bt : std::as_const(bts)) + for (auto bt : qAsConst(bts)) { if (!sts.contains(bt.effectStateId().underlying())) { @@ -1232,7 +1232,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto mas = m_aesDtc->mineAreas(); - for (auto ma : std::as_const(mas)) + for (auto ma : qAsConst(mas)) { if (!sts.contains(ma.effectStateId().underlying())) { @@ -1242,7 +1242,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto bccs = m_aesDtc->bCContaminations(); - for (auto bcc : std::as_const(bccs)) + for (auto bcc : qAsConst(bccs)) { if (!sts.contains(bcc.effectStateId().underlying())) { @@ -1252,7 +1252,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto fas = m_aesDtc->functionalAreas(); - for (auto fa : std::as_const(fas)) + for (auto fa : qAsConst(fas)) { if (!sts.contains(fa.effectStateId().underlying())) { @@ -1262,7 +1262,7 @@ void ModuleTestLimits::deleteAesAreas() } } auto tas = m_aesDtc->technicalAreas(); - for (auto ta : std::as_const(tas)) + for (auto ta : qAsConst(tas)) { if (!sts.contains(ta.effectStateId().underlying())) { @@ -1273,7 +1273,7 @@ void ModuleTestLimits::deleteAesAreas() } auto eas = m_aesDtc->explosionAreas(); - for (auto ea : std::as_const(eas)) + for (auto ea : qAsConst(eas)) { if (!sts.contains(ea.effectStateId().underlying())) { @@ -1284,7 +1284,7 @@ void ModuleTestLimits::deleteAesAreas() } auto ess = m_aesDtc->explosionSingles(); - for (auto es : std::as_const(ess)) + for (auto es : qAsConst(ess)) { if (!sts.contains(es.effectStateId().underlying())) { @@ -1360,7 +1360,7 @@ int main(int argc, char *argv[]) const QStringList &slPositionalArgs = options.positionalArguments(); - for (const QString &item : std::as_const(slPositionalArgs)) + for (const QString &item : qAsConst(slPositionalArgs)) std::cout << " item = " << item << std::endl; // enable_create_bulk only if it´s explicitly called by user: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.h index 42cdc168a..a93e9d81e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_Limits/limits_module_test.h @@ -19,12 +19,12 @@ #include #include -#include +#include #include #include -#include +#include #include #include @@ -224,6 +224,9 @@ private: } } m_counterDds; + + LOGGER_T m_logger; + public: void onMineAreaModifyReply(const Core::FunctionReplyObject &reply) override { Q_UNUSED(reply);} void onExplosionAreaModifyReply(const Core::FunctionReplyObject &reply) override { Q_UNUSED(reply);} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/CMakeLists.txt index 739c21182..f0e0a7d68 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/CMakeLists.txt @@ -13,12 +13,6 @@ SET(UnitTestSources IF(BUILD_TESTING) ADD_EXECUTABLE(aesModuleTestOthers ${LinkedSources} ${UnitTestSources} ) - NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestOthers - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ) - TARGET_LINK_LIBRARIES(aesModuleTestOthers NGLLogger nglcoreapplication diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp index ffe831d66..c6dfe0171 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.cpp @@ -7,7 +7,6 @@ */ #include "aes_others_module_test.h" -#include #include #include @@ -17,8 +16,8 @@ #include -#include -#include +#include +#include #include @@ -73,6 +72,7 @@ double distanceMeter(const Core::GeoPosition2D &geoPos2D, const LtsCoordTrans::U ModuleTestAesOthers::ModuleTestAesOthers(int domainId, int exerciseId) : m_domainId(domainId) , m_exerciseId(exerciseId) + , m_logger(getLogger("ModuleTestAesOthers")) { } @@ -177,7 +177,7 @@ void ModuleTestAesOthers::onAesItemViewChanged(const AesItemView &aesItemView, D void ModuleTestAesOthers::dumpCnt() { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " Counter: " + NOTICE_LOG(m_logger) << LOGFUNCTION << " Counter: " << " cntBoobyTrap = " << m_counterDds.cntBoobyTrap << " cntOffRouteMine = " << m_counterDds.cntOffRouteMine << ", cntItemView = " << m_counterDds.cntItemView; @@ -214,7 +214,7 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared..."; if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep)) { ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of m_dataBoobyTrap with id " << m_dataBoobyTrap.id() @@ -223,7 +223,7 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated..."; if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct)) { ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of m_dataBoobyTrapr with id " << m_dataBoobyTrap.id() @@ -234,7 +234,7 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int if (durExp > 0) { - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired..."; if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp)) { ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of m_dataBoobyTrap with id " << m_dataBoobyTrap.id() @@ -254,7 +254,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared..."; if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep)) { ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of m_dataOffRouteMine with id " << m_dataOffRouteMine.id() @@ -263,7 +263,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated..."; if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct)) { ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of m_dataOffRouteMine with id " << m_dataOffRouteMine.id() @@ -274,7 +274,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in if (durExp > 0) { - INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired..."; + INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired..."; if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp)) { ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of m_dataOffRouteMine with id " << m_dataOffRouteMine.id() @@ -529,9 +529,9 @@ void ModuleTestAesOthers::init() void ModuleTestAesOthers::test_justSetupParticipants() { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START"; setupParticipants(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } // @@ -541,11 +541,11 @@ void ModuleTestAesOthers::test_boobyTrap_01() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_18(), "ERROR, checkParticipant_5 failed!!"); AreaEffectSimulation::BoobyTrap bt; @@ -595,7 +595,7 @@ void ModuleTestAesOthers::test_boobyTrap_01() // wait to let it disappear: waitForData([]() { return false; }, 15); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " END"; } @@ -606,11 +606,11 @@ void ModuleTestAesOthers::test_boobyTrap_02_IMPL(const QString &name, { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId + INFO_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId << ", name =" << name << "'" << ", impactCoord= " << impactCoord.mgrs() << ", rotationAngle = " << rotationAngle @@ -666,7 +666,7 @@ void ModuleTestAesOthers::test_boobyTrap_02_IMPL(const QString &name, // wait to let it disappear: waitForData([]() { return false; }, 15); - INFO_LOG(m_logger) << Q_FUNC_INFO << " END" + INFO_LOG(m_logger) << LOGFUNCTION << " END" << ", name =" << name << "'" << ", impactCoord= " << impactCoord.mgrs() << ", rotationAngle = " << rotationAngle @@ -709,11 +709,11 @@ void ModuleTestAesOthers::test_offRouteMine_02() { if (m_traingAreaId != s_TraingAreaId_Altmark) { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId; return; } - INFO_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId; + INFO_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId; QVERIFY2(checkParticipant_18(), "ERROR, checkParticipant_5 failed!!"); @@ -767,7 +767,7 @@ void ModuleTestAesOthers::test_offRouteMine_02() // wait to let it disappear: waitForData([]() { return false; }, 15); - INFO_LOG(m_logger) << Q_FUNC_INFO << " END" << ", name =" << orm.name() << "'"; + INFO_LOG(m_logger) << LOGFUNCTION << " END" << ", name =" << orm.name() << "'"; } void ModuleTestAesOthers::cleanupTestCase() @@ -812,7 +812,7 @@ int main(int argc, char *argv[]) --argc; const QStringList &slPositionalArgs = options.positionalArguments(); - for (const QString &item : std::as_const(slPositionalArgs)) + for (const QString &item : qAsConst(slPositionalArgs)) std::cout << " item = " << item << std::endl; // // enable_create_bulk only if it´s explicitly called by user: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.h index 25b3747b6..b64e3e72d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTest_others/aes_others_module_test.h @@ -19,11 +19,11 @@ #include #include -#include +#include #include -#include +#include #include #include @@ -54,8 +54,6 @@ public: ModuleTestAesOthers(int domainId, int exerciseId); protected: - -NGL::INGLLogger &m_logger; void onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject) override; void onBoobyTrapModifyReply(const Core::FunctionReplyObject &replyObject) override; @@ -171,4 +169,6 @@ private: } } m_counterDds; + + LOGGER_T m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.cpp index 5f414c07b..e0923ca03 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.cpp @@ -7,8 +7,8 @@ #include "aes_convert_mine_area.h" -#include -#include +#include +#include #include #include @@ -17,7 +17,7 @@ #include #include #include -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.h index a20c70f24..a0969b527 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_convert_mine_area.h @@ -9,8 +9,8 @@ #include "aes_test_base.h" -#include -#include +#include +#include #include #include @@ -47,8 +47,6 @@ public: QSqlError getLastError() const; private: - -NGL::INGLLogger &m_logger; QSqlDatabase m_dbConnection; NSqlQuery *m_query; QSqlError m_lastError; @@ -56,6 +54,10 @@ NGL::INGLLogger &m_logger; bool m_bEmitMessageOnError; bool m_bCanHandleSchemas; bool m_ownDatabaseConnection; + + LOGGER_T m_logger; + + }; } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_air_support_impact.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_air_support_impact.cpp index 02682d0ff..137295b31 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_air_support_impact.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_air_support_impact.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_air_support_impact.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.cpp index 48e1904ef..2f40badbb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.cpp @@ -8,7 +8,7 @@ #include "aes_test_base.h" #include #include -#include +#include #include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.h index aa2c07c39..5e348ef29 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_base.h @@ -10,11 +10,11 @@ #include #include #include -#include +#include #include #include -#include "aes_test_base_export.h" +#include namespace AreaEffectSimulation { @@ -73,6 +73,8 @@ protected: bool m_bTestsSuccessful; int m_testId; QString m_aesTypeName; + + LOGGER_T m_logger; }; int AES_TEST_BASE_EXPORT mainBase(int argc, char **argv, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_bccontamination.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_bccontamination.cpp index 35172b2c3..34de10ff7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_bccontamination.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_bccontamination.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_bccontamination.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_booby_trap.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_booby_trap.cpp index 0e918f948..a8fe0de07 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_booby_trap.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_booby_trap.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_booby_trap.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_charge_administration.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_charge_administration.cpp index ca86bb4a8..053e6c0ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_charge_administration.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_charge_administration.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_charge_administration.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_danger_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_danger_area.cpp index c96f2f38a..dec731263 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_danger_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_danger_area.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_danger_area.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area.cpp index cea4083f5..bd3a0b197 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_explosion_area.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area_bulk.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area_bulk.cpp index f904d2cfa..00db34429 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area_bulk.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_area_bulk.cpp @@ -7,9 +7,9 @@ */ #include "aes_test_explosion_area_bulk.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_cluster.cpp index 42443920f..6a9d5af3a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_cluster.cpp @@ -8,9 +8,9 @@ #include "aes_test_explosion_cluster.h" #include -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_single.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_single.cpp index de49b4885..d8cc9f1d6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_single.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_explosion_single.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_explosion_single.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.cpp index 9f60e4cbc..5f6adf98a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_gas_pipe.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.h index a7683dc77..7d7a3cd83 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_gas_pipe.h @@ -9,7 +9,7 @@ #include "aes_test_base.h" #include -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_mine_area.cpp index 0698ac221..5bb04bf73 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_mine_area.cpp @@ -8,10 +8,10 @@ #include "aes_test_mine_area.h" #include "Utils/polygons.h" #include "qjsonobject.h" -#include -#include -#include -#include +#include +#include +#include +#include #include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_ncontamination.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_ncontamination.cpp index c1bf72de1..77f33283e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_ncontamination.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_ncontamination.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_ncontamination.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_off_route_mine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_off_route_mine.cpp index 31dbb7946..ed86d16c2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_off_route_mine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/ModuleTests/aes_test_off_route_mine.cpp @@ -6,9 +6,9 @@ */ #include "aes_test_off_route_mine.h" -#include -#include -#include +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/CMakeLists.txt index 3c5fd00a8..ddd9ff763 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/CMakeLists.txt @@ -20,7 +20,6 @@ NGL_ADD_LIBRARY2(WS SV HLA Trajectory SHARED ) NGL_TARGET_INCLUDE_DIRECTORIES(Trajectory INTERFACE - ${CMAKE_CURRENT_SOURCE_DIR}/../../ ${CMAKE_CURRENT_SOURCE_DIR}/../ ) NGL_TARGET_LINK_LIBRARIES(Trajectory diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/CMakeLists.txt index b9c6e5d81..d901ffb7d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/CMakeLists.txt @@ -15,22 +15,12 @@ SET(UnitTestSources ) IF(BUILD_TESTING) - NGL_ADD_EXECUTABLE(SV aesUnitTestTrajectory ${LinkedSources} ${UnitTestSources} ) - - NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTrajectory - PRIVATE - ${CMAKE_CURRENT_SOURCE_DIR}/../../ - ${CMAKE_SOURCE_DIR}/Lts/Services/AreaEffectSimulation - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ - ) + ADD_EXECUTABLE(aesUnitTestTrajectory ${LinkedSources} ${UnitTestSources} ) TARGET_LINK_LIBRARIES(aesUnitTestTrajectory NGLLogger nglcoreapplication svcAesCommon - Trajectory Qt6::Core Qt6::Gui Qt6::Test) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.cpp index 0a78a75bd..0d1dec52a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.cpp @@ -7,7 +7,6 @@ */ #include "trajectory_unit_test.h" -#include #include #include #include @@ -16,7 +15,7 @@ #include #include #include -#include +#include #include #include @@ -992,7 +991,7 @@ void UnitTestTrajectory::test_vulcano_trajectory() } int i=0; - for (auto &item : std::as_const(trajectoryOut)) + for (auto &item : qAsConst(trajectoryOut)) INFO_LOG(m_logger) << "i = " << i++ << ", item " << item; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.h index c115c79b9..bd8176550 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/UnitTest_Trajectory/trajectory_unit_test.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include @@ -78,5 +78,6 @@ private Q_SLOTS: private: -NGL::INGLLogger &m_logger; + LOGGER_T m_logger; + }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.cpp index e16ff3099..2ebe301c4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.cpp @@ -8,14 +8,13 @@ */ #include "trajectory_generator.h" -#include #include "trajectory_generator_vulcano.h" #include #include #include -#include +#include #ifdef NEVER // for csv file # include @@ -61,7 +60,7 @@ TrajectoryGenerator *TrajectoryGenerator::getInstance(int exerciseId, if (ltsElevationManager) { ltsElevationManager->waitForInitialization(); - DEBUG_LOG(logger) << Q_FUNC_INFO << ", ltsElevationManager->waitForInitialization() ... DONE, isValid = " << ltsElevationManager->isValid(); + DEBUG_LOG(logger) << LOGFUNCTION << ", ltsElevationManager->waitForInitialization() ... DONE, isValid = " << ltsElevationManager->isValid(); } s_trajectoryGenerator->initElevation(ltsElevationManager); } @@ -85,22 +84,22 @@ void TrajectoryGenerator::cleanup() void TrajectoryGenerator::initElevation(LtsElevation::LtsElevationManager *ltsElevationManager) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; m_ltsElevationManager = ltsElevationManager; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } LtsElevation::LtsElevationManager *TrajectoryGenerator::getElevationManager() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return m_ltsElevationManager; } bool TrajectoryGenerator::hasElevationManager() const { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return m_ltsElevationManager; } @@ -200,7 +199,7 @@ bool TrajectoryGenerator::generateTrajectoryVulcano(const QPoint3D &originatorPo { QPoint4D startPoint = trajectoryMetricOut.first(); - for (const QPoint4D &p4D : std::as_const(trajectoryMetricOut)) + for (const QPoint4D &p4D : qAsConst(trajectoryMetricOut)) { output << p4D.x() - startPoint.x() << ";" << p4D.y() - startPoint.y() << ";" @@ -232,7 +231,7 @@ bool TrajectoryGenerator::generateTrajectoryVulcano(const QPoint3D &originatorPo trajectoryTimeAwareOut.clear(); trajectoryTimeAwareOut.reserve(trajectoryMetricOut.size()); - for (const QPoint4D& pnt4d : std::as_const(trajectoryMetricOut)) + for (const QPoint4D& pnt4d : qAsConst(trajectoryMetricOut)) { LtsCoordTrans::UtmCoordinate pntUtm(idealHitUtm.zone, pnt4d.x(), pnt4d.y()); const QPointF &pntGeo = pntUtm.geographic(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.h index 3354104ea..46c241138 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator.h @@ -13,11 +13,11 @@ #include "trajectory_generator_vulcano.h" #include // Lts/DDS/Core/core.hpp for Core::GeoPosition #include -#include -#include "trajectory_export.h" +#include +#include -#include -#include +#include +#include #include #include @@ -89,7 +89,6 @@ class TRAJECTORY_EXPORT TrajectoryGenerator : public QObject QString *reasonOut); protected: - NGL::INGLLogger &m_logger; /*! \name Ideal trajectory */ template bool generateTrajectoryBiedziak(const LtsUtils::QPoint3D &originatorPosition_geo, @@ -98,7 +97,6 @@ class TRAJECTORY_EXPORT TrajectoryGenerator : public QObject CONT_T &trajectoryOut); protected: - NGL::INGLLogger &m_logger; explicit TrajectoryGenerator(); public: @@ -111,6 +109,7 @@ class TRAJECTORY_EXPORT TrajectoryGenerator : public QObject static const QString string4poly(const QPair> &pair); LtsElevation::LtsElevationManager *m_ltsElevationManager{nullptr}; + LOGGER_T m_logger; }; } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.cpp index 17022a657..87286b86d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.cpp @@ -8,10 +8,9 @@ */ #include "trajectory_generator_vulcano.h" -#include -#include -#include +#include +#include namespace AreaEffectSimulation { @@ -172,7 +171,7 @@ bool TrajectoryGeneratorVulcano::trajectoryVulcano(const QPoint3D &origin, const trajectoryOut.reserve(phase1_bal.size()+5); int cnt = 0; - for (const QPointF &xyVertex : std::as_const(phase1_bal)) + for (const QPointF &xyVertex : qAsConst(phase1_bal)) { // translate from XY to XYZ const QPoint3D p3d_offset(xyVertex.x() * factorX, // xyVertex.x() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.h index 7a5c2caa6..cac30eb63 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_generator_vulcano.h @@ -11,11 +11,11 @@ #pragma once #include "../logger.h" -#include "trajectory_export.h" +#include #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.cpp index 773e78fe9..8530ae7c7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.cpp @@ -10,11 +10,11 @@ #include "trajectory_helper.h" #include "../logger.h" -#include +#include -#include -#include -#include +#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.h index 35ed87a20..5d093ebf3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_helper.h @@ -10,8 +10,8 @@ #pragma once -#include "trajectory_export.h" -#include "trajectory_export.h" +#include +#include // Forward namespace LtsUtils { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_point.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_point.h index b2ea46469..6d0940db3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_point.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_point.h @@ -7,9 +7,9 @@ #pragma once -#include -#include -#include "trajectory_export.h" +#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_transform.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_transform.h index 82fa71a5e..a970cbf3a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_transform.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Trajectory/trajectory_transform.h @@ -1,10 +1,10 @@ #pragma once #include "trajectory_point.h" -#include "trajectory_export.h" +#include -#include -#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/CMakeLists.txt index 8062977e4..80e7f5ab2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/CMakeLists.txt @@ -15,14 +15,7 @@ SET(UnitTestSources SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} ) IF(BUILD_TESTING) - NGL_ADD_EXECUTABLE(SV aesUnitTestTrajectorySplitter ${LinkedSources} ${UnitTestSources} ) - - NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTrajectorySplitter - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ - ) + ADD_EXECUTABLE(aesUnitTestTrajectorySplitter ${LinkedSources} ${UnitTestSources} ) TARGET_LINK_LIBRARIES(aesUnitTestTrajectorySplitter NGLLogger diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/trajectory_splitter_unit_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/trajectory_splitter_unit_test.h index fc7adc6b7..bae0e50b9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/trajectory_splitter_unit_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/UnitTest_TrajectorySplitter/trajectory_splitter_unit_test.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.cpp index 2880712e8..56458cafb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.cpp @@ -10,7 +10,7 @@ #include "trajectory_splitter.h" -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.h index 51c4a57c3..4ba53f642 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/TrajectorySplitter/trajectory_splitter.h @@ -9,10 +9,10 @@ #pragma once -//#include "svcaescommon_export.h" +//#include #include -#include +#include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/CMakeLists.txt index 5110e72eb..5fde4b53a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/CMakeLists.txt @@ -11,14 +11,7 @@ SET(UnitTestSources ) IF(BUILD_TESTING) - NGL_ADD_EXECUTABLE(SV aesUnitTestFireAutomaton ${LinkedSources} ${UnitTestSources} ) - - NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestFireAutomaton - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ - ) + ADD_EXECUTABLE(aesUnitTestFireAutomaton ${LinkedSources} ${UnitTestSources} ) TARGET_LINK_LIBRARIES(aesUnitTestFireAutomaton NGLLogger diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp index 588e2e16e..3892bc9d8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.cpp @@ -6,11 +6,11 @@ */ -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.h index f3dac4217..8c95f0380 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTest_FireAutomaton/aes_test_fire_automaton.h @@ -9,7 +9,7 @@ #include #include -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/CMakeLists.txt index 48a370081..ca599a19c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/CMakeLists.txt @@ -19,9 +19,6 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_statemachine_test NGL_TARGET_INCLUDE_DIRECTORIES( aes_statemachine_test PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/.. - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ ) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/CMakeLists.txt index 3fef8ea49..f955beef5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/CMakeLists.txt @@ -13,14 +13,7 @@ SET(UnitTestSources SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} ) IF(BUILD_TESTING) - NGL_ADD_EXECUTABLE(SV aesUnitTestBasics ${LinkedSources} ${UnitTestSources} ) - - NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestBasics - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ - ) + ADD_EXECUTABLE(aesUnitTestBasics ${LinkedSources} ${UnitTestSources} ) TARGET_LINK_LIBRARIES(aesUnitTestBasics NGLLogger diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.cpp index 1df01e1eb..03a22c77a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.cpp @@ -7,13 +7,12 @@ */ #include "basics_unit_test.h" -#include #include #include #include -#include -#include +#include +#include #include #include @@ -247,7 +246,7 @@ void UnitTestBasics::test_fireTimer10() QStringList logSl1 = ft.getLogHistorie(); QVERIFY2(logSl1.size() == 1, "getCommandHistorie failed"); - for (const auto &log : std::as_const(logSl1)) + for (const auto &log : qAsConst(logSl1)) NOTICE_LOG(m_logger) << "log ='" << log << "'"; } @@ -320,7 +319,7 @@ void UnitTestBasics::test_fireTimer20() // QList arguments = spyStateChanged.takeFirst(); // take the first signal // NOTICE_LOG(m_logger) << " spyStateChanged.count() " << spyStateChanged.count(); - // for (const QList &argument : std::as_const(spyStateChanged)) + // for (const QList &argument : qAsConst(spyStateChanged)) // NOTICE_LOG(m_logger) << " spyStateChanged . argument " << argument.first().toInt(); // check order of signal paramter: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.h index a21441ef5..1b7af9ff0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Basics/basics_unit_test.h @@ -9,7 +9,7 @@ #pragma once #include <../../logger.h> -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/CMakeLists.txt index 3441bdd16..3e95ab85e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/CMakeLists.txt @@ -13,14 +13,7 @@ SET(UnitTestSources SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} ) IF(BUILD_TESTING) - NGL_ADD_EXECUTABLE(SV aesUnitTestPolygons ${LinkedSources} ${UnitTestSources} ) - - NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestPolygons - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ - ) + ADD_EXECUTABLE(aesUnitTestPolygons ${LinkedSources} ${UnitTestSources} ) TARGET_LINK_LIBRARIES(aesUnitTestPolygons NGLLogger diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.cpp index 3daea55ab..5c2e90c7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.cpp @@ -7,15 +7,14 @@ */ #include "polygons_unit_test.h" -#include #include #include #include #include -#include // +#include // #include -#include +#include #include @@ -211,7 +210,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp() qCritical() << "rotation_deg = " << rotation_deg << ", mtpRotationNorthDegree = " << mtpRotationNorthDegree << ", explosionClusterDb = " << singleExplosions; - for (const auto &singleExplosion : std::as_const(singleExplosions)) + for (const auto &singleExplosion : qAsConst(singleExplosions)) qDebug() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs(); size_t i = 0; @@ -243,7 +242,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp() qCritical() << "rotation_deg = " << rotation_deg << ", mtpRotationNorthDegree = " << mtpRotationNorthDegree << " explosionClusterDb = " << singleExplosions; - for (const auto &singleExplosion : std::as_const(singleExplosions)) + for (const auto &singleExplosion : qAsConst(singleExplosions)) qCritical() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs(); size_t i = 0; @@ -280,7 +279,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp() << ", zog = " << zog << ", mtpRotationNorthDegree = " << mtpRotationNorthDegree << " explosionClusterDb = " << singleExplosions; - for (const auto &singleExplosion : std::as_const(singleExplosions)) + for (const auto &singleExplosion : qAsConst(singleExplosions)) qCritical() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs(); size_t i = 0; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.h index 2bc019d95..affe39519 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_Polygons/polygons_unit_test.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/CMakeLists.txt index b143f5dff..27f4a0ce8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/CMakeLists.txt @@ -13,14 +13,7 @@ SET(UnitTestSources SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} ) IF(BUILD_TESTING) - NGL_ADD_EXECUTABLE(SV aesUnitTestTneAlgorithmen ${UnitTestSources} ) - - NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTneAlgorithmen - PUBLIC - ${CMAKE_SOURCE_DIR}/Lts/ - ${CMAKE_SOURCE_DIR}/Lts/Services/ - ${CMAKE_BINARY_DIR}/Lts/ - ) + ADD_EXECUTABLE(aesUnitTestTneAlgorithmen ${LinkedSources} ${UnitTestSources} ) TARGET_LINK_LIBRARIES(aesUnitTestTneAlgorithmen NGLLogger diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.cpp index 87ed154fd..230f418ef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.h index 02c9de459..64f139aef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/UnitTest_TneAlgo/tne_algo_unit_test.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/aes_statemachine_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/aes_statemachine_test.cpp index 320786655..d37126bd1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/aes_statemachine_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/UnitTests/aes_statemachine_test.cpp @@ -6,9 +6,9 @@ */ #include "aes_statemachine_test.h" -#include +#include #include -#include +#include #include using namespace AreaEffectSimulation; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.cpp index b70438475..f4e028b7f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.cpp @@ -8,8 +8,8 @@ #include "aes_helper.h" -#include -#include +#include +#include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.h index 1ebed26fc..85cc49666 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/aes_helper.h @@ -8,16 +8,16 @@ #pragma once -#include "svcaescommon_export.h" +#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include #include "aes_db.h" namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp index e60e62622..091529294 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.cpp @@ -6,9 +6,9 @@ */ #include -#include -#include -#include +#include +#include +#include #include #include @@ -26,6 +26,7 @@ FireAutomaton::FireAutomaton(QObject *parent) , m_intervalMSecs(0) , m_remainingTickMSecs(0) , m_state(State::Uninitialized) + , m_logger(getLogger("Utils.FireAutomaton")) { m_timer.setSingleShot(true); connect(&m_timer, &QTimer::timeout, this, &FireAutomaton::nextTick, Qt::UniqueConnection); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h index f808d700c..40622b38a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/fire_automaton.h @@ -6,10 +6,10 @@ */ #include -#include -#include -#include -#include +#include +#include +#include +#include #include "../logger.h" @@ -72,7 +72,6 @@ private slots: void nextTick(); private: - NGL::INGLLogger &m_logger; enum class PatternElement { All, AllFill, @@ -90,7 +89,6 @@ private: QVector getEffectorIds(int32_t tick) const; private: - NGL::INGLLogger &m_logger; QVector m_effectorIds; QVector m_pattern; QVector> m_schedule; @@ -101,6 +99,8 @@ private: int32_t m_intervalMSecs; int32_t m_remainingTickMSecs; State m_state; + + LOGGER_T m_logger; }; } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp index 5ea996cec..603527b95 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.cpp @@ -10,13 +10,13 @@ #include "firing_timer.h" #include "../logger.h" -#include +#include -#include -#include +#include +#include #include -#include -#include +#include +#include #include #include @@ -27,7 +27,7 @@ namespace AreaEffectSimulation // To be able to aesily differentiate between different instances: -#define MY_Q_FUNC_INFO "debugInfo='" << d->m_debugInfo << "' " << Q_FUNC_INFO +#define MY_LOGFUNCTION "debugInfo='" << d->m_debugInfo << "' " << Q_FUNC_INFO static long s_counter{0}; @@ -129,21 +129,22 @@ public: FiringTimer::FiringTimer(const QString &debugInfo) : BaseClass(nullptr) , d(new Private) + , m_logger(getLogger("Utils.FiringTimer")) { ++s_counter; d->m_debugInfo = debugInfo; - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this; - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this; } FiringTimer::~FiringTimer() { --s_counter; - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this; QString debugInfoSave = d->m_debugInfo; delete d; - //DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this; - DEBUG_LOG(m_logger) << "debugInfo='" << debugInfoSave << "'" << Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this; + //DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this; + DEBUG_LOG(m_logger) << "debugInfo='" << debugInfoSave << "'" << LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this; } void FiringTimer::setDebugInfo(const QString &debugInfo) @@ -153,14 +154,14 @@ void FiringTimer::setDebugInfo(const QString &debugInfo) void FiringTimer::reset() { - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START"; d->reset(); - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END"; } bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDurationMsec) { - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START," + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START," << ", effectDurationMsec=" << effectDurationMsec << ", ammoCount=" << ammoCount << ", ammoFlightDurationMsec=" << ammoFlightDurationMsec; @@ -170,7 +171,7 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu d->m_ammoCount = ammoCount; d->m_ammoFlightDurationMsec = ammoFlightDurationMsec; d->m_intervallMsec = static_cast(d->m_effectDurationMsec) / d->m_ammoCount; // ensure float calculation - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " m_intervallMsec " << d->m_intervallMsec; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " m_intervallMsec " << d->m_intervallMsec; d->m_firingTimer->stop(); d->m_firingTimer->setSingleShot(false); @@ -178,24 +179,24 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu connect(d->m_firingTimer, &QTimer::timeout, this, &FiringTimer::onFiringTimout, Qt::UniqueConnection); - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END"; return true; } bool FiringTimer::startFiring() { - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START"; if ((d->m_currentFiringMode != FiringMode::FM_Undefined) && (d->m_currentFiringMode != FiringMode::FM_Paused)) { - ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " wrong firingMode, cur = " << (int)d->m_currentFiringMode; + ERROR_LOG(m_logger) << MY_LOGFUNCTION << " wrong firingMode, cur = " << (int)d->m_currentFiringMode; return false; } if (remainingAmmoCount() <= 0) { - ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " no ammo left" + ERROR_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left" << " (total ammoCount was: " << d->m_ammoCount << " cur firingMode = " << (int)d->m_currentFiringMode; return false; @@ -213,7 +214,7 @@ bool FiringTimer::startFiring() #endif // SUPPORT_STATE_CHANGE_DELAYED - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " start firing with m_firedAmmoCount = " << d->m_firedAmmoCount; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " start firing with m_firedAmmoCount = " << d->m_firedAmmoCount; d->m_firingTimer->start(); d->m_currentFiringMode = FiringMode::FM_Active; @@ -227,7 +228,7 @@ bool FiringTimer::startFiring() d->m_pausedMsec += pausedElapsedMsec; d->m_etPaused->invalidate(); } - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " start firing after [ms]: " << pausedElapsedMsec + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " start firing after [ms]: " << pausedElapsedMsec << ", m_activeMsec in total = " << d->m_activeMsec << ", m_pausedMsec in total = " << d->m_pausedMsec; @@ -256,7 +257,7 @@ bool FiringTimer::startFiring() // to fire at the beginning of the interval: onFiringTimout(); - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END"; return true; } @@ -270,17 +271,17 @@ bool FiringTimer::startFiringDelay(qint64 delayMsec) bool FiringTimer::pauseFiring() { - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START"; if (d->m_currentFiringMode != FiringMode::FM_Active) { - ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " wrong firingMode"; + ERROR_LOG(m_logger) << MY_LOGFUNCTION << " wrong firingMode"; return false; } if (remainingAmmoCount() <= 0) { - ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " no ammo left" + ERROR_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left" << " (total ammoCount was: " << d->m_ammoCount; return false; } @@ -293,7 +294,7 @@ bool FiringTimer::pauseFiring() #endif // SUPPORT_STATE_CHANGE_DELAYED - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing at m_firedAmmoCount = " << d->m_firedAmmoCount; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing at m_firedAmmoCount = " << d->m_firedAmmoCount; d->m_firingTimer->stop(); d->m_currentFiringMode = FiringMode::FM_Paused; d->m_etPaused->start(); @@ -305,14 +306,14 @@ bool FiringTimer::pauseFiring() const qint64 activeElapsedMsec = d->m_etActive->elapsed(); d->m_activeMsec += activeElapsedMsec; d->m_etActive->invalidate(); - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing after [ms]: " << activeElapsedMsec + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing after [ms]: " << activeElapsedMsec << ", m_activeMsec in total = " << d->m_activeMsec << ", m_pausedMsec in total = " << d->m_pausedMsec; QString log = QString(QStringLiteral("pauseFiring_at_%1")).arg(QDateTime::currentMSecsSinceEpoch()) ; d->m_logHistorie.append(log); - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END"; return true; } @@ -346,7 +347,7 @@ long FiringTimer::intervallMsec() const #ifdef SUPPORT_STATE_CHANGE_DELAYED void FiringTimer::emitStateChangeDelayed(AreaEffectSimulation::FiringTimer::CMD cmd, int firedAmmoCount) { - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " SUPPORT_STATE_CHANGE_DELAYED: " << cmd + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " SUPPORT_STATE_CHANGE_DELAYED: " << cmd << ", firedAmmoCount = " << firedAmmoCount; emit stateChangeDelayedAsInt(static_cast(cmd), firedAmmoCount); } @@ -380,11 +381,11 @@ QString FiringTimer::toString(const CMD cmd) void FiringTimer::onFiringTimout() { - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START"; ++d->m_firedAmmoCount; - INFO_LOG(m_logger) << MY_Q_FUNC_INFO << " emit firing with: " << d->m_firedAmmoCount + INFO_LOG(m_logger) << MY_LOGFUNCTION << " emit firing with: " << d->m_firedAmmoCount << " of total ammoCount = " << d->m_ammoCount; emit firing(d->m_firedAmmoCount, d->m_ammoCount); @@ -396,7 +397,7 @@ void FiringTimer::onFiringTimout() int currentFiringNumber = d->m_firedAmmoCount; int totalFiringNumber = d->m_ammoCount; - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " XXXXXXXXX schedule 'emit impact' " << currentFiringNumber; + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " XXXXXXXXX schedule 'emit impact' " << currentFiringNumber; QTimer::singleShot(d->m_ammoFlightDurationMsec, this, [this, currentFiringNumber, totalFiringNumber]() { @@ -408,7 +409,7 @@ void FiringTimer::onFiringTimout() } #endif // SUPPORT_STATE_CHANGE_DELAYED - INFO_LOG(m_logger) << MY_Q_FUNC_INFO << " emit impact " << currentFiringNumber + INFO_LOG(m_logger) << MY_LOGFUNCTION << " emit impact " << currentFiringNumber << " of total = " << totalFiringNumber; emit impact(currentFiringNumber, totalFiringNumber); @@ -430,7 +431,7 @@ void FiringTimer::onFiringTimout() if (d->m_firedAmmoCount >= d->m_ammoCount) { - INFO_LOG(m_logger) << MY_Q_FUNC_INFO << " no ammo left, finishing firing" + INFO_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left, finishing firing" << ", " << d->m_firedAmmoCount << " of total ammoCount = " << d->m_ammoCount << " are fired"; d->m_firingTimer->stop(); @@ -440,7 +441,7 @@ void FiringTimer::onFiringTimout() // !! Attention: do pauseFiring() WITHIN the intervall will reduce amount of time the firing is active !! - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing after [ms]: " << activeElapsedMsec + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing after [ms]: " << activeElapsedMsec << ", m_activeMsec in total = " << d->m_activeMsec << ", m_pausedMsec in total = " << d->m_pausedMsec << " now FiringTimoutExpiredPlus ..."; @@ -465,12 +466,12 @@ void FiringTimer::onFiringTimout() d->m_firingTimer->start(); } - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END" << ", m_firedAmmoCount " << d->m_firedAmmoCount; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END" << ", m_firedAmmoCount " << d->m_firedAmmoCount; } void FiringTimer::onFiringTimoutExpiredPlus() { - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START"; d->m_currentFiringMode = FiringMode::FM_ExpiredPlus; @@ -480,7 +481,7 @@ void FiringTimer::onFiringTimoutExpiredPlus() // !! Attention: do pauseFiring() WITHIN the intervall will reduce amount of time the firing is active !! - DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing2 after [ms]: " << activeElapsedMsec + DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing2 after [ms]: " << activeElapsedMsec << ", m_activeMsec in total = " << d->m_activeMsec << ", m_pausedMsec in total = " << d->m_pausedMsec; @@ -488,7 +489,7 @@ void FiringTimer::onFiringTimoutExpiredPlus() emit firingFinishedPlus(); - TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END"; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.h index 0593478ad..c73f18b75 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/firing_timer.h @@ -9,11 +9,11 @@ #pragma once -#include "svcaescommon_export.h" +#include "aes_export.h" #include "../logger.h" -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/icons.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/icons.cpp index d81575888..7131e88fe 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/icons.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/icons.cpp @@ -6,15 +6,14 @@ */ #include "icons.h" -#include #include "polygons.h" #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include namespace AreaEffectSimulation @@ -55,7 +54,7 @@ static QPixmap pixmapFromPolygons(const QVector &datas, for (const PolygonData &data : datas) { polyUtm.clear(); - for (const QPointF &point : std::as_const(data.poly)) + for (const QPointF &point : qAsConst(data.poly)) { LtsCoordTrans::UtmCoordinate pointUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(point, zone); polyUtm << QPointF(pointUtm.x, pointUtm.y); @@ -67,7 +66,7 @@ static QPixmap pixmapFromPolygons(const QVector &datas, bounding.reserve(4 * datas.size()); // Does not matter, how the total polygon looks as we just need the bounding rect. // << is cheaper than .united() - for (const QPolygonF &polyUtmLocal : std::as_const(polysUtm)) + for (const QPolygonF &polyUtmLocal : qAsConst(polysUtm)) bounding << polyUtmLocal; // center to center / Todo:: Does it always work? @@ -90,7 +89,7 @@ static QPixmap pixmapFromPolygons(const QVector &datas, QPainter p(&pix); int i = 0; - for (const PolygonData &d : std::as_const(datas)) + for (const PolygonData &d : qAsConst(datas)) { QPolygonF mPoly = mTrans.map(polysUtm.at(i++)); mPoly = mScale.map(mPoly); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/polygons.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/polygons.cpp index dbbb73480..6029ef915 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/polygons.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/polygons.cpp @@ -6,7 +6,6 @@ */ #include "polygons.h" -#include #include "tne_algorithmen.h" #include @@ -15,8 +14,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -113,7 +112,7 @@ static QPolygonF utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordTrans::U { QPolygonF poly; poly.reserve(polyUtm.size()); - for (const QPointF &point : std::as_const(polyUtm)) + for (const QPointF &point : qAsConst(polyUtm)) poly << base.geographic(point); return poly; } @@ -477,7 +476,7 @@ QVector effectClusterSingleExplosionsGAUSS(const Database::AesEffectClu vec.reserve(impactCount); const QTransform trans(fromRotation(-effectCluster.rotationAngle)); // Compass, not mathematical! - for (const QPointF &point : std::as_const(impactsGAUSS)) + for (const QPointF &point : qAsConst(impactsGAUSS)) { QPointF p = impactPositionUtm.geographic(trans.map(point)); DEBUG_LOG(logger) << "Point = " << p; @@ -553,7 +552,7 @@ QVector effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec QVector mtps_asRealUtm; mtps_asRealUtm.reserve(mtps_asUtm.size()); - for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm)) + for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm)) { // convert QPointF back to UtmCoordinate: pay attention to order!!! const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y()); @@ -592,7 +591,7 @@ QVector effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec int idx = 0; const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical! - for (const QPointF &point : std::as_const(impactsGAUSS)) + for (const QPointF &point : qAsConst(impactsGAUSS)) { // which mtp: int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo @@ -607,7 +606,7 @@ QVector effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec << ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut << " rot=" << explosionCluster.rotationAngle; - for (auto item : std::as_const(finalVec)) + for (auto item : qAsConst(finalVec)) { const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item); qCritical() << " TNE VERIFICATION: CHECK:" @@ -901,7 +900,7 @@ QVector explosionClusterSingleExplosionsGAUSS(const Database::AesExplos vec.reserve(impactCount); const QTransform trans(fromRotation(-explosionCluster.rotationAngle)); // Compass, not mathematical! - for (const QPointF &point : std::as_const(impactsGAUSS)) + for (const QPointF &point : qAsConst(impactsGAUSS)) { QPointF p = impactPositionUtm.geographic(trans.map(point)); DEBUG_LOG(logger) << "Point = " << p; @@ -978,7 +977,7 @@ QVector explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx QVector mtps_asRealUtm; mtps_asRealUtm.reserve(mtps_asUtm.size()); - for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm)) + for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm)) { // convert QPointF back to UtmCoordinate: pay attention to order!!! const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y()); @@ -1017,7 +1016,7 @@ QVector explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx int idx = 0; const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical! - for (const QPointF &point : std::as_const(impactsGAUSS)) + for (const QPointF &point : qAsConst(impactsGAUSS)) { // which mtp: int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo @@ -1032,7 +1031,7 @@ QVector explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx << ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut << " rot=" << explosionCluster.rotationAngle; - for (auto item : std::as_const(finalVec)) + for (auto item : qAsConst(finalVec)) { const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item); qCritical() << " TNE VERIFICATION: CHECK:" @@ -1649,7 +1648,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr

&singlePositionsOut, NGL::INGLLogger &logger) { - TRACE_LOG(logger) << Q_FUNC_INFO << " START, participantId=" << unitParticipantId; + TRACE_LOG(logger) << LOGFUNCTION << " START, participantId=" << unitParticipantId; static const LtsUtils::QPoint3D s_invalidPos(std::nan(""), std::nan(""), std::nan("")); @@ -1657,7 +1656,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr

waitForHistoricalDataParticipant(1000); @@ -1665,7 +1664,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr

participant(unitParticipantId); if (partData.id() != unitParticipantId) { - ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, participant failed for id =" << unitParticipantId; + ERROR_LOG(logger) << LOGFUNCTION << " ERROR, participant failed for id =" << unitParticipantId; return s_invalidPos; } ppmDtc->waitForHistoricalDataParticipantPosition(1000); @@ -1679,13 +1678,13 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr

participantPosition(childId); if (childPos.participantId() != childId) { // may happen in real life: so ERROR_LOG to DEBUG_LOG - DEBUG_LOG(logger) << Q_FUNC_INFO << " ERROR, participantPosition failed for id =" << childId; + DEBUG_LOG(logger) << LOGFUNCTION << " ERROR, participantPosition failed for id =" << childId; return s_invalidPos; } const Core::GeoPosition &childGeoPos = childPos.pos(); @@ -1710,7 +1709,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr

-#include -#include +#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/tne_algorithmen.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/tne_algorithmen.h index 7abf544c1..1d626b866 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/tne_algorithmen.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/Utils/tne_algorithmen.h @@ -8,10 +8,10 @@ #pragma once -#include "svcaescommon_export.h" +#include -#include -#include +#include +#include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.cpp index 3cb5e34f9..cf33c0bf7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.cpp @@ -6,14 +6,13 @@ */ #include "handler_explosion_single_central.h" -#include #include "main_handler.h" #include #include #include -#include +#include namespace AreaEffectSimulation @@ -36,7 +35,7 @@ bool HandlerExplosionSingleCentral::init() return true; } // create indirect fire single objects - for (const Database::AesExplosionSingleCentral &dbData : std::as_const(dataVec)) + for (const Database::AesExplosionSingleCentral &dbData : qAsConst(dataVec)) { ObjectExplosionSingleCentral *ifs(new ObjectExplosionSingleCentral(m_mainHandler, this)); connect(ifs, &ObjectExplosionSingleCentral::effectStateChanged, this, &HandlerExplosionSingleCentral::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.h index 5b7bea572..a9e92a424 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_handler_explosion_single_central.h @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include namespace SituationMap diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_object_explosion_single_central.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_object_explosion_single_central.h index 438a98ab9..219f9fc6e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_object_explosion_single_central.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/_object_explosion_single_central.h @@ -10,9 +10,9 @@ #include "object_base.h" #include -#include +#include -#include +#include using Trajectory = QPair>; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/aes_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/aes_dtc_impl_custom.cpp index 4c62c9138..a9cad7814 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/aes_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/aes_dtc_impl_custom.cpp @@ -6,7 +6,6 @@ * $Author$ */ #include "aes_dtc_impl_custom.h" -#include #include #include #include @@ -121,7 +120,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e QMap bcConts = bCContaminations(); aesItemId = 0; - for (const AreaEffectSimulation::BCContamination &bcCont : std::as_const(bcConts)) + for (const AreaEffectSimulation::BCContamination &bcCont : qAsConst(bcConts)) { if (bcCont.externalId() == externalId) { @@ -133,7 +132,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e return AreaEffectSimulation::AesType_def::AtBCContamination; QMap nConts = nContaminations(); - for (const AreaEffectSimulation::NContamination &nCont: std::as_const(nConts)) + for (const AreaEffectSimulation::NContamination &nCont: qAsConst(nConts)) { if (nCont.externalId() == externalId) { @@ -145,7 +144,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e return AreaEffectSimulation::AesType_def::AtNContamination; QMap explAreas = explosionAreas(); - for (const AreaEffectSimulation::ExplosionArea &explArea : std::as_const(explAreas)) + for (const AreaEffectSimulation::ExplosionArea &explArea : qAsConst(explAreas)) { if (explArea.externalId() == externalId) { @@ -157,7 +156,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e return AreaEffectSimulation::AesType_def::AtExplosionArea; QMap explSingles = explosionSingles(); - for (const AreaEffectSimulation::ExplosionSingle &explSingle : std::as_const(explSingles)) + for (const AreaEffectSimulation::ExplosionSingle &explSingle : qAsConst(explSingles)) { if (explSingle.externalId() == externalId) { @@ -169,7 +168,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e return AreaEffectSimulation::AesType_def::AtExplosionSingle; QMap mAreas = mineAreas(); - for(const AreaEffectSimulation::MineArea &mArea : std::as_const(mAreas)) + for(const AreaEffectSimulation::MineArea &mArea : qAsConst(mAreas)) { if (mArea.externalId() == externalId) { @@ -181,7 +180,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e return AreaEffectSimulation::AesType_def::AtMineArea; QMap mCorridors = mineCorridors(); - for (const AreaEffectSimulation::MineCorridor &mCorridor : std::as_const(mCorridors)) + for (const AreaEffectSimulation::MineCorridor &mCorridor : qAsConst(mCorridors)) { if (mCorridor.externalId() == externalId) { @@ -353,7 +352,7 @@ QVector DtcImplCustom::trajectoriesTimeAwareFromOriginatorI const QMap &trajectoryTimeAwareMap = trajectoryTimeAwares(); - for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : std::as_const(trajectoryTimeAwareMap)) + for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : qAsConst(trajectoryTimeAwareMap)) { // be aware of: [E01562-259] use originatorId, originatorTypeId (instead of aesItemId, aesTypeId) if ((trajectoryTimeAware.originatorId() == originatorId) && @@ -402,7 +401,7 @@ void DtcImplCustom::initDAO() // // We don´t realy know, how many to reserve: // trajectoriesFromAesIdVec.reserve(120); // 2024-09 N.Thoden: 120 ist maximum per area -// for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : std::as_const(trajectoryTimeAwareMap)) +// for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : qAsConst(trajectoryTimeAwareMap)) // { // if (trajectoryTimeAware.aesItemId() == aesId) // trajectoriesFromAesIdVec.push_back(trajectoryTimeAware); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.cpp index 4934e9e92..c1dd61033 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.cpp @@ -12,16 +12,18 @@ #include #include #include -#include -#include +#include +#include namespace AreaEffectSimulation { -DdsHandler::DdsHandler(int domainId, int exerciseId, QObject *parent) : QObject(parent) +DdsHandler::DdsHandler(int domainId, int exerciseId, QObject *parent) + : QObject(parent) , m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) - , m_currentTimeMSec(-1), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_currentTimeMSec(-1) + , m_logger(getLogger("DdsInterface")) +{ DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.h index 0d879c489..22d4a536a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/dds_handler.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include #include // For Elevation @@ -20,7 +20,7 @@ #include #include "logger.h" -#include +#include #include namespace Core @@ -78,7 +78,6 @@ private slots: void onPartitionTimeChanged(const Core::PartitionTime ¤tTime); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_pacemaker; @@ -96,6 +95,8 @@ private: QElapsedTimer m_elapsedTimer; qint64 m_currentTimeMSec; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.cpp index 498e9de41..3f418e802 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.cpp @@ -7,9 +7,9 @@ #include "effector_state_machine.h" #include "settings.h" -#include -#include -#include +#include +#include +#include #include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.h index f127bb3ee..900ebfd33 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/effector_state_machine.h @@ -6,9 +6,9 @@ // */ #pragma once -#include -#include -#include +#include +#include +#include #include #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_air_support_impact.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_air_support_impact.cpp index 3009db1b1..7303ae3ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_air_support_impact.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_air_support_impact.cpp @@ -6,7 +6,6 @@ */ #include "handler_air_support_impact.h" -#include #include "main_handler.h" namespace AreaEffectSimulation @@ -29,7 +28,7 @@ bool HandlerAirSupportImpact::init() } // create air support impact objects - for (const Database::AesAirSupportImpact &dbData : std::as_const(dataVec)) + for (const Database::AesAirSupportImpact &dbData : qAsConst(dataVec)) { ObjectAirSupportImpact *ifs(new ObjectAirSupportImpact(m_mainHandler, this)); connect(ifs, &ObjectAirSupportImpact::effectStateChanged, this, &HandlerAirSupportImpact::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.cpp index 112462edf..b3c6e2342 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.cpp @@ -9,7 +9,7 @@ #include "main_handler.h" #include "settings.h" #include -#include +#include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.h index 767c5b527..afe5df158 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_base.h @@ -8,10 +8,9 @@ #pragma once #include "main_handler.h" -#include #include "logger.h" -#include +#include namespace AreaEffectSimulation { @@ -133,7 +132,7 @@ public: { m_areaCount = 0; m_areaCountCentral = 0; - for (const Obj *area : std::as_const(m_objectMap)) + for (const Obj *area : qAsConst(m_objectMap)) { if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_bccontamination.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_bccontamination.h index f50c7e5ab..b4a615a1f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_bccontamination.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_bccontamination.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "object_bccontamination.h" #include "object_danger_area.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_booby_trap.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_booby_trap.h index 27d996a05..532119541 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_booby_trap.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_booby_trap.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "object_booby_trap.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.cpp index fafceb92a..0c8fc8a27 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.cpp @@ -7,7 +7,6 @@ */ #include "handler_borderline.h" -#include #include "object_borderline.h" @@ -48,13 +47,13 @@ bool HandlerBorderline::init() // contains all segments of an borderline in ascending order QVector dbBorderlineSegments; - for (const Database::AesBorderline &dbBorderline : std::as_const(borderlineVec)) + for (const Database::AesBorderline &dbBorderline : qAsConst(borderlineVec)) { if (dbBorderline.effectStateId == AesEffectState_def::EsRemoved) continue; dbBorderlineSegments.clear(); - for (const Database::AesBorderlineSegment &segment : std::as_const(segmentVec)) + for (const Database::AesBorderlineSegment &segment : qAsConst(segmentVec)) { if (segment.borderlineId == dbBorderline.privBorderlineId) dbBorderlineSegments.insert(segment.positionIndex, segment); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.h index ed67248c9..52d1112ab 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_borderline.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "object_borderline.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.cpp index fdf4fdd53..8a2a47f9a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.cpp @@ -7,7 +7,6 @@ */ #include "handler_charge_administration.h" -#include #include "object_charge_administration.h" namespace AreaEffectSimulation @@ -53,7 +52,7 @@ bool HandlerChargeAdministration::init() int HandlerChargeAdministration::getObjectChargeAdministrationId(int partyId, int chargeTypeId, ProjectDataManagement::EffectSource effectSourceId) { - for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap)) + for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap)) { if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId && val->data().effectSourceId == effectSourceId) return val->id(); @@ -118,7 +117,7 @@ Core::FunctionReplyObject HandlerChargeAdministration::chargeAdministrationModif Core::FunctionReplyObject HandlerChargeAdministration::claimPlannedCharge(int chargeTypeId, int partyId, int count) { - for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap)) + for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap)) { if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId) return val->claimPlannedCharge(count); @@ -141,7 +140,7 @@ Core::FunctionReplyObject HandlerChargeAdministration::consumeCharge(int chargeT DEBUG_LOG(m_logger) << "effectSource: " << effectSource; - for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap)) + for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap)) { if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId && val->data().effectSourceId == effectSource) { @@ -156,7 +155,7 @@ Core::FunctionReplyObject HandlerChargeAdministration::consumeCharge(int chargeT int HandlerChargeAdministration::availableCharge(int chargeTypeId, int partyId) const { - for (ObjectChargeAdministration *val : std::as_const(m_chargeAdminObjMap)) + for (ObjectChargeAdministration *val : qAsConst(m_chargeAdminObjMap)) { if (val->data().partyId == partyId && val->data().chargeTypeId == chargeTypeId) return val->availableCharge(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.h index 8e314dcf9..aff577410 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_administration.h @@ -8,7 +8,7 @@ #pragma once #include "handler_base.h" -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.cpp index 3657d3a30..a561dd5b9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.cpp @@ -1,5 +1,4 @@ #include "handler_charge_effect.h" -#include #include "handler_charge_administration.h" #include "handler_effect_cluster.h" @@ -53,7 +52,7 @@ bool HandlerChargeEffect::init() ObjectChargeEffect::s_afterglowMsecs = Settings::getChargeEffectAfterGlow(); - for (const Database::AesChargeEffect ¤tChargeEffectData : std::as_const(chargeEffectDbData)) + for (const Database::AesChargeEffect ¤tChargeEffectData : qAsConst(chargeEffectDbData)) { ObjectChargeEffect *newChargeEffect = new ObjectChargeEffect(currentChargeEffectData, m_mainHandler, this); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.h index a10f732c4..7a8fac708 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_charge_effect.h @@ -1,10 +1,10 @@ #pragma once -#include +#include #include "aes_fts.h" #include "logger.h" -#include +#include namespace AreaEffectSimulation { @@ -39,8 +39,6 @@ public: void onChargeEffectStateChanged(const int id, AesEffectState newState); private: // methods - -NGL::INGLLogger &m_logger; Core::FunctionReplyObject updateChargeEffect(const ChargeEffectModifyRequest &request); private: // attributes @@ -48,5 +46,7 @@ private: // attributes QHash m_chargeEffects; QHash m_trajObjIds; // HandlerTrajectory *m_trajectoryHandler{nullptr}; + + LOGGER_T m_logger; }; // class HandlerChargeEffect } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.cpp index 80afb9290..eeaa709ba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.cpp @@ -7,12 +7,11 @@ */ #include "handler_danger_area.h" -#include #include "object_danger_area.h" #include #include -#include +#include namespace AreaEffectSimulation { @@ -43,11 +42,11 @@ bool HandlerDangerArea::init() // create area mine objects QVector mySegments; - for (const Database::AesDangerArea &area : std::as_const(areaVec)) + for (const Database::AesDangerArea &area : qAsConst(areaVec)) { // Gather segments mySegments.clear(); - for (const Database::AesDangerSegment &mas : std::as_const(segmentVec)) + for (const Database::AesDangerSegment &mas : qAsConst(segmentVec)) { if (mas.dangerAreaId == area.privDangerAreaId) mySegments << mas; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.h index 5c2bd586a..3c1f0623b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_danger_area.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.cpp index 3e037ccc8..769cf9446 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.cpp @@ -11,7 +11,7 @@ #include "settings.h" #include "aes_db.h" -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.h index afb750524..e0c018b36 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_dus_single_mine.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.cpp index acf2b9a3d..acf143cba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.cpp @@ -8,12 +8,11 @@ */ #include "handler_effect_cluster.h" -#include #include "handler_charge_administration.h" #include "object_effect_cluster.h" #include "settings.h" -#include -#include +#include +#include #include #include #include @@ -633,7 +632,7 @@ Core::FunctionReplyObject HandlerEffectCluster::effectClusterModifyRequest(const void HandlerEffectCluster::recountActiveAreas() { s_currentAirSupportCount = 0; - for (const auto *area : std::as_const(m_objectMap)) + for (const auto *area : qAsConst(m_objectMap)) { if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused { @@ -682,7 +681,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl QMap effectClusterPartyMap; - for (const auto *area : std::as_const(m_objectMap)) + for (const auto *area : qAsConst(m_objectMap)) { if (area->data().partyId == request.partyId()) { @@ -702,7 +701,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl case ProjectDataManagement::L22_FireHaltCategory::A: // Feuer Halt Allgemein { // all control operations are halted - for (auto *ifs : std::as_const(effectClusterPartyMap)) + for (auto *ifs : qAsConst(effectClusterPartyMap)) { EffectClusterPauseResumeRequest req; @@ -719,7 +718,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl { // Ongoing combat operations are halted after comparing the extent of // the fire hold with the corresponding target coordinate and circular area. - for (auto *ifs : std::as_const(effectClusterPartyMap)) + for (auto *ifs : qAsConst(effectClusterPartyMap)) { const double lonRad = request.longitude().is_set() ? request.longitude().get() * LtsCoordTrans::deg2rad() : 0.0; const double latRad = request.latitude().is_set() ? request.latitude().get() * LtsCoordTrans::deg2rad() : 0.0; @@ -747,7 +746,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl // Unlike "Check Fire" (Feuer Halt), any rounds already loaded in a Panzerhaubitze (PzH) are still fired, // followed by an EX-FQ(FN) report. Once the weapon system confirms execution, // the engagement is closed and the target area status is set to "expired." - for (auto *ifs : std::as_const(effectClusterPartyMap)) + for (auto *ifs : qAsConst(effectClusterPartyMap)) { DEBUG_LOG(m_logger) << "[Feuer Einstellen ----- markAsExpired] " << "effectClusterId: " << ifs->data().id; @@ -756,7 +755,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl break; } case ProjectDataManagement::L22_FireHaltCategory::C: // Aufheben Feuer Halt Allgemein - for (auto *ifs : std::as_const(effectClusterPartyMap)) + for (auto *ifs : qAsConst(effectClusterPartyMap)) { DEBUG_LOG(m_logger) << "[Aufheben Feuer Halt Allgemein] " << "effectClusterId: " << ifs->data().id; @@ -769,7 +768,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl break; case ProjectDataManagement::L22_FireHaltCategory::F: // Aufheben Feuer Halt Referenziert { - for (auto *ifs : std::as_const(effectClusterPartyMap)) + for (auto *ifs : qAsConst(effectClusterPartyMap)) { const double lonRad = request.longitude().is_set() ? request.longitude().get() * LtsCoordTrans::deg2rad() : 0.0; // optional const double latRad = request.latitude().is_set() ? request.latitude().get() * LtsCoordTrans::deg2rad() : 0.0; // optional diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.h index 44b3191a2..23876bd8a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effect_cluster.h @@ -8,14 +8,14 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" #include "object_effect_cluster.h" -#include // qAddPostRoutine -#include +#include // qAddPostRoutine +#include // TAB #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effector.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effector.h index 76ccc503c..94c48059e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effector.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_effector.h @@ -7,10 +7,10 @@ #pragma once #include "logger.h" -#include +#include -#include -#include +#include +#include namespace AreaEffectSimulation { @@ -29,8 +29,6 @@ namespace AreaEffectSimulation ObjectEffector* getObjectEffector (int participantId) {return m_effectors.value(participantId);}; private: // methods - - NGL::INGLLogger &m_logger; void createEffector(int participantId); void deleteEffector(int participantId); @@ -41,5 +39,6 @@ namespace AreaEffectSimulation MainHandler *m_mainHandler {nullptr}; std::shared_ptr m_ppmDtc; QHash m_effectors; // key = participantId + LOGGER_T m_logger; }; // class HandlerEffector } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_area.h index 8c9ce87d5..aa2c4f279 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_area.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.cpp index 19ebfab2f..32c349019 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.cpp @@ -8,13 +8,12 @@ */ #include "handler_explosion_cluster.h" -#include #include "handler_charge_administration.h" #include #include #include -#include -#include +#include +#include // for TrajectoryGenerator #include @@ -612,7 +611,7 @@ Core::FunctionReplyObject HandlerExplosionCluster::modifyPartyParticipant(qint32 void HandlerExplosionCluster::recountActiveAreas() { s_currentAirSupportCount = 0; - for (const auto *area : std::as_const(m_objectMap)) + for (const auto *area : qAsConst(m_objectMap)) { if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.h index 91ac2e6d3..5da53f6ee 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_cluster.h @@ -8,14 +8,14 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" #include "object_explosion_cluster.h" -#include // qAddPostRoutine -#include +#include // qAddPostRoutine +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.cpp index 9938a03ee..8d80c2486 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.cpp @@ -6,7 +6,6 @@ */ #include "handler_explosion_single.h" -#include #include "main_handler.h" #include @@ -31,7 +30,7 @@ bool HandlerExplosionSingle::init() return true; } // create indirect fire single objects - for (const Database::AesExplosionSingle &dbData : std::as_const(dataVec)) + for (const Database::AesExplosionSingle &dbData : qAsConst(dataVec)) { ObjectExplosionSingle *ifs(new ObjectExplosionSingle(m_mainHandler, this)); connect(ifs, &ObjectExplosionSingle::effectStateChanged, this, &HandlerExplosionSingle::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.h index 824efc3ba..e670adae6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_explosion_single.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.cpp index c849c45d4..b51c53555 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.cpp @@ -7,7 +7,6 @@ */ #include "handler_functional_area.h" -#include #include "Utils/polygons.h" #include @@ -52,7 +51,7 @@ bool HandlerFunctionalArea::init() return false; } - for (const Database::AesFunctionalAreaType ¤tFunctionalAreaType : std::as_const(functionalAreaTypeVec)) + for (const Database::AesFunctionalAreaType ¤tFunctionalAreaType : qAsConst(functionalAreaTypeVec)) { FunctionalAreaType *ddsData = new FunctionalAreaType(currentFunctionalAreaType.id, @@ -75,7 +74,7 @@ bool HandlerFunctionalArea::init() // create functional area objects - for (const Database::AesFunctionalArea &dbData : std::as_const(dataVec)) + for (const Database::AesFunctionalArea &dbData : qAsConst(dataVec)) { ObjectFunctionalArea *ifs(new ObjectFunctionalArea(m_mainHandler, this)); connect(ifs, &ObjectFunctionalArea::effectStateChanged, this, &HandlerFunctionalArea::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.h index 15f88edba..e6f8528d3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_functional_area.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.cpp index 4204a4de2..613114801 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.cpp @@ -7,9 +7,8 @@ */ #include "handler_gas_pipe.h" -#include #include "object_gas_pipe.h" -#include +#include #include "Utils/polygons.h" #include @@ -51,13 +50,13 @@ bool HandlerGasPipe::init() // contains all segments of an gasPipe in ascending order QVector dbGasPipeSegments; - for (const Database::AesGasPipe &dbGasPipe : std::as_const(gasPipeVec)) + for (const Database::AesGasPipe &dbGasPipe : qAsConst(gasPipeVec)) { if (dbGasPipe.effectStateId == AesEffectState_def::EsRemoved) continue; dbGasPipeSegments.clear(); - for (const Database::AesGasPipeSegment &segment : std::as_const(segmentVec)) + for (const Database::AesGasPipeSegment &segment : qAsConst(segmentVec)) { if (segment.gasPipeId == dbGasPipe.privGasPipeId) dbGasPipeSegments.insert(segment.positionIndex, segment); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.h index 2c846ad2b..eaa10ce30 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_gas_pipe.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "object_gas_pipe.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.cpp index f4ee58cc7..0a5d5a41e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.cpp @@ -7,7 +7,6 @@ */ #include "handler_mine_area.h" -#include #include "Utils/polygons.h" #include "handler_effect_cluster.h" #include "handler_mine_corridor.h" @@ -15,7 +14,7 @@ #include "settings.h" #include #include -#include +#include #include #include @@ -70,7 +69,7 @@ bool HandlerMineArea::init() } // create area mine objects - for (const Database::AesMineArea &area : std::as_const(areaVec)) + for (const Database::AesMineArea &area : qAsConst(areaVec)) { if (area.layingProcedureTypeId == AesMaLayingProcedureType::LptArtillery && !area.isCentral @@ -160,7 +159,7 @@ void HandlerMineArea::redistributeMines(int aesId, QListid() != aesId) { @@ -186,7 +185,7 @@ void HandlerMineArea::redistributeMines(int aesId, QListisDusMineArea() && mineArea->hasMine(mineId)) { @@ -622,7 +621,7 @@ Core::FunctionReplyObject HandlerMineArea::mineResetRequest(const MineResetReque DEBUG_LOG(m_logger) << "Resetting all unassociated DUS mines (NullArea) and all DUS mine areas"; // Do this first! m_nullArea->resetMines(); - for (auto mineAreaObj : std::as_const(m_objectMap)) + for (auto mineAreaObj : qAsConst(m_objectMap)) { if (!mineAreaObj->isDusMineArea() && !mineAreaObj->isConcreteMine()) continue; @@ -806,7 +805,7 @@ void HandlerMineArea::onNewMineCorridor(const AesItemView &aiv) if (aiv.effectStateId() != AesEffectState::EsActivated) return; - for (ObjectMineArea *ma : std::as_const(m_objectMap)) + for (ObjectMineArea *ma : qAsConst(m_objectMap)) { if (intersects(ma->boundingRect(), aiv.form())) ma->clearCorridor(aiv); @@ -1184,7 +1183,7 @@ void HandlerMineArea::onTimeoutEquipNo(int equipNo, int chargeTypeId) std::vector vec; vec.reserve(points.size()); - for (QPointF bbPoint : std::as_const(points)) + for (QPointF bbPoint : qAsConst(points)) { Core::GeoPosition2D pos; pos.lon(bbPoint.x()); @@ -1193,7 +1192,7 @@ void HandlerMineArea::onTimeoutEquipNo(int equipNo, int chargeTypeId) vec.push_back(pos); } // vec.reserve(boundingBox.size()); - // for( QPointF bbPoint : std::as_const(boundingBox)) + // for( QPointF bbPoint : qAsConst(boundingBox)) // { // Core::GeoPosition2D pos; // LtsCoordTrans::UtmCoordinate utm; @@ -1260,7 +1259,7 @@ bool HandlerMineArea::checkIfNullMineIsInArea(const std::vector vecSeg; vecSeg.reserve(segments.size()); - for (const AreaEffectSimulation::MineSegment &seg : std::as_const(segments)) + for (const AreaEffectSimulation::MineSegment &seg : qAsConst(segments)) { Database::AesMineAreaSegment dbSeg; dbSeg.startPosition = QPointF(seg.positionStart().lon(), seg.positionStart().lat()); @@ -1304,7 +1303,7 @@ bool HandlerMineArea::containsPointInExpandedMinefield(const QPointF &positionGe mineAreaPolygonUtm.push_back(QPointF(pointMineAreaUtm.x, pointMineAreaUtm.y)); } - for (const QPointF &mineAreaPointUTM : std::as_const(mineAreaPolygonUtm)) + for (const QPointF &mineAreaPointUTM : qAsConst(mineAreaPolygonUtm)) { double x = pointUtm.x - mineAreaPointUTM.x(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.h index 407d97ad1..590c9e46e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_area.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.cpp index 28396b5f2..8620d6b4a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.cpp @@ -7,7 +7,6 @@ */ #include "handler_mine_corridor.h" -#include #include "object_mine_corridor.h" #include "mine_corridor_creator.h" @@ -48,11 +47,11 @@ bool HandlerMineCorridor::init() // create area mine objects QVector mySegments; - for (const Database::AesMineCorridor &area : std::as_const(areaVec)) + for (const Database::AesMineCorridor &area : qAsConst(areaVec)) { // Gather segments mySegments.clear(); - for (const Database::AesMineCorridorSegment &mas : std::as_const(segmentVec)) + for (const Database::AesMineCorridorSegment &mas : qAsConst(segmentVec)) { if (mas.mineCorridorId == area.id) mySegments << mas; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.h index 23c43bf6a..677121313 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_mine_corridor.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "object_mine_corridor.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.cpp index 82fb09aac..bfec26bd0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.cpp @@ -7,7 +7,6 @@ */ #include "handler_ncontamination.h" -#include #include "Utils/polygons.h" #include @@ -34,7 +33,7 @@ bool HandlerNContamination::init() DEBUG_LOG(m_logger) << "TotalC: " << totalAreasCentral() << " Total: " << totalAreas(); - for (const Database::AesNContamination &dbData : std::as_const(dataVec)) + for (const Database::AesNContamination &dbData : qAsConst(dataVec)) { ObjectNContamination *ifs(new ObjectNContamination(m_mainHandler, this)); connect(ifs, &ObjectNContamination::effectStateChanged, this, &HandlerNContamination::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.h index 54a60e093..d9c8a8070 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_ncontamination.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_off_route_mine.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_off_route_mine.h index 932959479..2a528fc9f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_off_route_mine.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_off_route_mine.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "object_off_route_mine.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.cpp index 60d719398..b631eedfe 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.cpp @@ -7,7 +7,6 @@ */ #include "handler_recon_area.h" -#include #include #include @@ -32,7 +31,7 @@ bool HandlerReconArea::init() } // create Recon area objects - for (const Database::AesReconArea &dbData : std::as_const(dataVec)) + for (const Database::AesReconArea &dbData : qAsConst(dataVec)) { ObjectReconArea *ifs(new ObjectReconArea(m_mainHandler, this)); connect(ifs, &ObjectReconArea::effectStateChanged, this, &HandlerReconArea::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.h index 416d04e23..e376afe3e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_recon_area.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.cpp index c6b928534..714542e36 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.cpp @@ -7,7 +7,6 @@ */ #include "handler_technical_area.h" -#include #include @@ -32,7 +31,7 @@ bool HandlerTechnicalArea::init() } // create Technical area objects - for (const Database::AesTechnicalArea &dbData : std::as_const(dataVec)) + for (const Database::AesTechnicalArea &dbData : qAsConst(dataVec)) { ObjectTechnicalArea *ifs(new ObjectTechnicalArea(m_mainHandler, this)); connect(ifs, &ObjectTechnicalArea::effectStateChanged, this, &HandlerTechnicalArea::onEffectStateChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.h index 738d300ec..a06452253 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_technical_area.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "handler_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_trajectory.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_trajectory.cpp index 478ec2a32..bbb939791 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_trajectory.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/handler_trajectory.cpp @@ -9,7 +9,7 @@ #include "handler_trajectory.h" #include "object_trajectory.h" -#include +#include namespace AreaEffectSimulation { @@ -30,27 +30,28 @@ public: HandlerTrajectory::HandlerTrajectory(MainHandler *mainHandler) : d(new Private) + , m_logger(getLogger("HandlerTrajectory")) { d->m_mainHandler = mainHandler; } HandlerTrajectory::~HandlerTrajectory() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; delete d; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } int HandlerTrajectory::create(const TrajectoryData &providedData) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; int newId = -1; auto *ifs = new ObjectTrajectory(d->m_mainHandler); if (!ifs) { ERROR_LOG(m_logger)<<" couldn't create ObjectTrajectory!"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return -1; } @@ -66,17 +67,17 @@ int HandlerTrajectory::create(const TrajectoryData &providedData) ifs->publish(); } - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, newId = " << newId; + TRACE_LOG(m_logger) << LOGFUNCTION << " END, newId = " << newId; return newId; } bool HandlerTrajectory::update(const TrajectoryData &providedData) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, id = " << providedData.id; + TRACE_LOG(m_logger) << LOGFUNCTION << " START, id = " << providedData.id; bool success = false; if (!providedData.isIdValid()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END "; + TRACE_LOG(m_logger) << LOGFUNCTION << " END "; return false; } @@ -87,18 +88,18 @@ bool HandlerTrajectory::update(const TrajectoryData &providedData) success = true; } - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, success = " << success; + TRACE_LOG(m_logger) << LOGFUNCTION << " END, success = " << success; return success; } bool HandlerTrajectory::remove(const int trajId) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, id = " << trajId; + TRACE_LOG(m_logger) << LOGFUNCTION << " START, id = " << trajId; if (trajId <= 0) { ERROR_LOG(m_logger) << " remove topic: got Invalid trajectory Id: "<pointer to not break BC when changing internals of this class */ Private *d = nullptr; + + LOGGER_T m_logger; }; } // Namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/logger.h index 08a812238..fbc67628a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcaescommon_export.h" +#include "aes_export.h" namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.cpp index d3ad7ea11..267f22e7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.cpp @@ -46,8 +46,10 @@ namespace AreaEffectSimulation { -MainHandler::MainHandler(QObject *parent) : QObject(parent), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +MainHandler::MainHandler(QObject *parent) + : QObject(parent) + , m_logger(getLogger("MainHandler")) +{ #if QT_VERSION >= QT_VERSION_CHECK(5, 10, 0) QRandomGenerator(time(nullptr)); #else @@ -157,7 +159,7 @@ bool MainHandler::initAESHandler() // prepare some basics for HandlerExplosionCluster // - TrajectoryGenerator // - LtsElevationManager - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ****** std::make_sharedexerciseId(); LtsElevation::LTS_ELEVATION_MANAGER_TYPE ltsElevationManager = LtsElevation::LtsElevationManager::createInstance(exerciseId, dds()->exmDtc(), @@ -175,7 +177,7 @@ bool MainHandler::initAESHandler() #ifndef Q_OS_WIN // GUEZE-2195 if (!ltsElevationManager) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " LtsElevation::createInstance failed."; + ERROR_LOG(m_logger) << LOGFUNCTION << " LtsElevation::createInstance failed."; m_ddsHandler->pacemaker()->setNewState(Core::RunningState::inner_enum::StoppedError); return false; } @@ -187,7 +189,7 @@ bool MainHandler::initAESHandler() this->dds()->asmDtc()); if (!trajectoryGenerator) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " TrajectoryGenerator::getInstance failed."; + ERROR_LOG(m_logger) << LOGFUNCTION << " TrajectoryGenerator::getInstance failed."; m_ddsHandler->pacemaker()->setNewState(Core::RunningState::inner_enum::StoppedError); return false; } @@ -195,7 +197,7 @@ bool MainHandler::initAESHandler() m_handlerExplosionCluster = std::make_shared(this); if (!m_handlerExplosionCluster->init()) return false; - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ****** std::make_shared(this); if (!m_handlerFunctionalArea->init()) @@ -247,7 +249,7 @@ bool MainHandler::initAESHandler() m_handlerBorderline = std::make_shared(this); if (!m_handlerBorderline->init()) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Initialisation HandlerBorderline failed."; + ERROR_LOG(m_logger) << LOGFUNCTION << " Initialisation HandlerBorderline failed."; m_ddsHandler->pacemaker()->setNewState(Core::RunningState::inner_enum::StoppedError); return false; } @@ -256,7 +258,7 @@ bool MainHandler::initAESHandler() m_handlerGasPipe = std::make_shared(this); if (!m_handlerGasPipe->init()) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Initialisation HandlerGasPipe failed."; + ERROR_LOG(m_logger) << LOGFUNCTION << " Initialisation HandlerGasPipe failed."; m_ddsHandler->pacemaker()->setNewState(Core::RunningState::inner_enum::StoppedError); return false; } @@ -265,7 +267,7 @@ bool MainHandler::initAESHandler() m_handlerChargeEffect = std::make_shared(this); if (!m_handlerChargeEffect->init()) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Initialisation HandlerChargeEffect failed."; + ERROR_LOG(m_logger) << LOGFUNCTION << " Initialisation HandlerChargeEffect failed."; m_ddsHandler->pacemaker()->setNewState(Core::RunningState::inner_enum::StoppedError); return false; } @@ -278,7 +280,7 @@ bool MainHandler::initAESHandler() m_handlerEffector = std::make_shared(this); if (!m_handlerEffector->init()) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Initialisation HandlerChargeEffect failed."; + ERROR_LOG(m_logger) << LOGFUNCTION << " Initialisation HandlerChargeEffect failed."; m_ddsHandler->pacemaker()->setNewState(Core::RunningState::inner_enum::StoppedError); return false; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.h index 4928925f5..39777ee0b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include @@ -115,10 +115,8 @@ public: private: - NGL::INGLLogger &m_logger; bool initAESHandler(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_handlerAirSupportImpact; std::shared_ptr m_handlerExplosionSingle; std::shared_ptr m_handlerExplosionArea; @@ -146,5 +144,7 @@ private: std::shared_ptr m_dbHandlerEx0; std::shared_ptr m_meteoData; std::shared_ptr m_specialAreaProvider; + + LOGGER_T m_logger; }; } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.cpp index aa3c57554..647eeeb34 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.cpp @@ -6,7 +6,6 @@ */ #include "meteo_data_provider.h" -#include #include "main_handler.h" #include #include "settings.h" @@ -56,7 +55,7 @@ MeteoDataManagement::MeteoData MeteoDataProvider::getNearestWeather(const Core:: LtsCoordTrans::UtmCoordinate utm(LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat())); double nearestDistanceSquared = std::numeric_limits::max(); MeteoDataManagement::MeteoData retMd; - for (const auto &md : std::as_const(m_meteoData)) + for (const auto &md : qAsConst(m_meteoData)) { if (md.isStaticMeteoData()) continue; @@ -96,7 +95,7 @@ void MeteoDataProvider::initWeatherData() return; m_mdmDtc->waitForHistoricalDataMeteoData(); m_meteoData = m_mdmDtc->meteoDatas(); - for (const auto &data : std::as_const(m_meteoData)) + for (const auto &data : qAsConst(m_meteoData)) if (data.isStaticMeteoData()) { m_staticWeatherId = data.id(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.h index f68726192..6f4e96625 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/meteo_data_provider.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include #include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.cpp index 7645c9a02..ff64b1c21 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.cpp @@ -7,13 +7,12 @@ */ #include "mine_corridor_creator.h" -#include #include "object_mine_corridor.h" #include #include -#include -#include +#include +#include namespace AreaEffectSimulation { @@ -21,11 +20,13 @@ namespace AreaEffectSimulation static const int s_samePointDistance = 10; // 10m static const int s_smoothDistance = 10; // 10m static const int s_timeoutInterval = 10 * 60 * 1000; // 10min -MineCorridorCreator::MineCorridorCreator(int equipNo, ObjectMineCorridor *omc) : m_timer(new QTimer(this)) +MineCorridorCreator::MineCorridorCreator(int equipNo, ObjectMineCorridor *omc) + : m_timer(new QTimer(this)) , m_timeoutTimer(new QTimer(this)) , m_omc(omc) - , m_equipNo(equipNo), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_equipNo(equipNo) + , m_logger(getLogger("MineCorridorCreator")) +{ m_timeoutTimer->setInterval(s_timeoutInterval); m_timeoutTimer->setSingleShot(true); connect(m_timeoutTimer, &QTimer::timeout, this, &MineCorridorCreator::timeout, Qt::QueuedConnection); @@ -96,7 +97,7 @@ void MineCorridorCreator::checkCorridorData(bool bFinished) DEBUG_LOG(m_logger) << "Checking corridor data (finished: " << bFinished << ") for equipment " << m_equipNo; std::vector coords; coords.reserve(m_sortedCorridorData.size()); - for (const auto &c : std::as_const(m_sortedCorridorData)) + for (const auto &c : qAsConst(m_sortedCorridorData)) coords.push_back(c); const auto coordsSmoothed = ramerDouglasPeucker(coords, s_smoothDistance); DEBUG_LOG(m_logger) << "Calculated points:"; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.h index ccb1b0689..d5f1dc5bb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/mine_corridor_creator.h @@ -7,9 +7,9 @@ */ #pragma once -#include -#include -#include +#include +#include +#include #include #include @@ -33,7 +33,6 @@ Q_SIGNALS: private Q_SLOTS: void onCheckCorridorData(); private: - NGL::INGLLogger &m_logger; void checkCorridorData(bool bFinished); static bool isSamePoint(const LtsCoordTrans::UtmCoordinate &p1, const LtsCoordTrans::UtmCoordinate &p2, double epsilon); static double perpendicularDistance(const LtsCoordTrans::UtmCoordinate &pt, @@ -42,12 +41,12 @@ private: std::vector ramerDouglasPeucker(const std::vector &pointList, double epsilon) const; private: - NGL::INGLLogger &m_logger; QMap m_sortedCorridorData; QTimer *m_timer; QTimer *m_timeoutTimer; ObjectMineCorridor *m_omc; int m_equipNo; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_air_support_impact.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_air_support_impact.h index b199c71a2..0b89938ff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_air_support_impact.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_air_support_impact.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "object_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.cpp index 71ddbedd7..3fe84b313 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.cpp @@ -7,8 +7,8 @@ #include "object_base.h" -#include -#include +#include +#include using namespace AreaEffectSimulation; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.h index b9044a964..2b3ad543e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_base.h @@ -7,17 +7,16 @@ #pragma once -#include -#include +#include #include -#include +#include #include "aes_enums.hpp" #include "main_handler.h" #include "special_area_provider.h" #include "logger.h" -#include +#include #include #include @@ -149,7 +148,7 @@ class ObjectBase : public QObject { QPolygonF out; out.reserve(in.size()); - for (const auto &pos : std::as_const(in)) + for (const auto &pos : qAsConst(in)) out.push_back(QPointF(pos.lon(), pos.lat())); return out; @@ -169,6 +168,7 @@ class ObjectBase : public QObject MainHandler *m_mainHandler; bool m_bSupportsPausing; // can this entity be paused (e.g. artillery) QString m_typeName; + LOGGER_T m_logger; }; template class ObjectBaseTmpl : public ObjectBase diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_bccontamination.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_bccontamination.cpp index 0d1a9205a..f1d4ec1f5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_bccontamination.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_bccontamination.cpp @@ -11,7 +11,7 @@ #include "Utils/polygons.h" #include -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_booby_trap.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_booby_trap.cpp index 1bb94c752..29515ab1c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_booby_trap.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_booby_trap.cpp @@ -10,7 +10,7 @@ #include "Utils/polygons.h" #include -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.cpp index a783c9c47..8c2f65cf0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.cpp @@ -7,7 +7,6 @@ */ #include "object_borderline.h" -#include #include "special_area_provider.h" #include @@ -126,7 +125,7 @@ Core::FunctionReplyObject ObjectBorderline::updateObject(const Database::AesBord } // update all AesBorderlineSegments in database - for (const Database::AesBorderlineSegment &segment : std::as_const(tmpDbSegments)) + for (const Database::AesBorderlineSegment &segment : qAsConst(tmpDbSegments)) { if (!m_mainHandler->db()->update(segment)) return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating AesBorderlineSegment-data in database.")); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.h index 7374450bc..8a7019cc0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_borderline.h @@ -7,10 +7,10 @@ */ #pragma once -#include +#include #include "object_base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.cpp index fb6155241..f0f37f3b8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.cpp @@ -15,6 +15,7 @@ namespace AreaEffectSimulation ObjectChargeAdministration::ObjectChargeAdministration(MainHandler *mainHandler, QObject *parent) : QObject(parent) , m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectChargeAdministration")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.h index b458f3401..624da8eff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_administration.h @@ -32,10 +32,10 @@ class ObjectChargeAdministration final : public QObject void onPublishData(); protected: - NGL::INGLLogger &m_logger; private: MainHandler *m_mainHandler; Database::AesChargeAdministration m_data; bool m_isAdlerChargeType = false; + NGL::INGLLogger &m_logger; }; } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.cpp index 8dea2972d..d029edf87 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.cpp @@ -1,7 +1,7 @@ #include "object_charge_effect.h" #include "object_base.h" -#include -#include +#include +#include #include "main_handler.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.h index 69ed8f018..c1defb550 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_charge_effect.h @@ -7,11 +7,11 @@ #pragma once -#include +#include #include "logger.h" -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.cpp index 9a5c258c4..cd2cd241a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.cpp @@ -6,11 +6,10 @@ */ #include "object_danger_area.h" -#include #include "special_area_provider.h" #include "Utils/polygons.h" -#include +#include #include "handler_bccontamination.h" #include @@ -131,7 +130,7 @@ Core::FunctionReplyObject ObjectDangerArea::updateObject(const Database::AesDang for (size_t i = 0; i < segments.size(); ++i) tmpSegments[i].position = QPointF(segments[i].lon(), segments[i].lat()); - for (const Database::AesDangerSegment &segment : std::as_const(tmpSegments)) + for (const Database::AesDangerSegment &segment : qAsConst(tmpSegments)) { if (!m_mainHandler->db()->update(segment)) return Core::FunctionReplyObject(data.id, tr_lts("dds", "Error updating AesDangerSegment-data in database.")); @@ -242,7 +241,7 @@ void ObjectDangerArea::removeTopics() auto dts = m_mainHandler->dds()->dts(); dts->removeDangerAreaByKey(m_data.id); dts->removeAesItemViewByKey(1000 * m_data.id + AesType::inner_enum::AtDangerArea); - for (int idx : std::as_const(m_correlatedAesItems)) + for (int idx : qAsConst(m_correlatedAesItems)) dts->removeDangerAreaCorrelatedAesItemByKey(idForCorrelatedItem(idx)); m_correlatedAesItems.clear(); emit removeAiv(m_data.id); @@ -255,7 +254,7 @@ void ObjectDangerArea::onUpdateCorrelation() // If Danger Area is not active, remove correlations and return if (effectState() != AesEffectState::EsActivated) { - for(int oldItem : std::as_const(m_correlatedAesItems)) + for(int oldItem : qAsConst(m_correlatedAesItems)) m_mainHandler->dds()->dts()->removeDangerAreaCorrelatedAesItemByKey(idForCorrelatedItem(oldItem)); m_correlatedAesItems.clear(); return; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.h index c1c442b40..8bad2ce1b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_danger_area.h @@ -8,7 +8,7 @@ #include "aes_db.h" #include "object_base.h" -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp index 1a8a3688a..be96eea03 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effect_cluster.cpp @@ -7,7 +7,6 @@ */ #include "object_effect_cluster.h" -#include #include "Utils/polygons.h" #include "handler_charge_administration.h" #include "handler_charge_effect.h" @@ -24,14 +23,14 @@ #include #include -#include +#include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include // ToDo: mark the end of aes enum and update following (check Endemarke) @@ -462,9 +461,9 @@ Core::FunctionReplyObject ObjectEffectCluster::updateObject(const Database::AesE int oldImpactCount = 0; int newImpactCount = 0; - for (const auto &oldEffector : std::as_const(m_effectorData)) + for (const auto &oldEffector : qAsConst(m_effectorData)) oldImpactCount += oldEffector.chargeAmount; - for (const auto &newEffector : std::as_const(effectorDatas)) + for (const auto &newEffector : qAsConst(effectorDatas)) newImpactCount += newEffector.chargeAmount; if (oldImpactCount != newImpactCount) @@ -687,7 +686,7 @@ bool ObjectEffectCluster::initialCalculations(QString *reasonOut) mtps_asUtm.resize(m_data.impactCount); m_temporaryData.mhPoints.reserve(mtps_asUtm.size()); - for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm)) + for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm)) { LtsCoordTrans::UtmCoordinate temp(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y()); m_temporaryData.mhPoints.emplace_back(Core::GeoPosition2D(temp.geographic().x(), temp.geographic().y())); @@ -1436,7 +1435,7 @@ void ObjectEffectCluster::publishAiv() const QVector &singleExplosions = Polygons::effectClusterSingleExplosionsGAUSS_Mtp(m_data, m_effectorData); singleEffectsRef.reserve(singleExplosions.size()); - for (const QPointF &singleExplosion : std::as_const(singleExplosions)) + for (const QPointF &singleExplosion : qAsConst(singleExplosions)) { SingleEffect se; se.singleEffectState(AesSingleEffectState_def::SesScheduled); @@ -1617,7 +1616,7 @@ void ObjectEffectCluster::markAsExpired(bool fireLoadedRound) DEBUG_LOG(m_logger) << "TimerTimeout we will now send Confirmation for " << m_data.id; // send confirmation for all Effectors then mark as expired (with false) - for (const auto effector : std::as_const(m_effectorData)) + for (const auto effector : qAsConst(m_effectorData)) { onSendConfirmationReportToTab(effector.participantId); } @@ -2037,7 +2036,7 @@ void ObjectEffectCluster::onEffectorFired(int participantId, int aesItemId, cons if (chargeEffectIds.size() > 1) // we need to find the last and first one { - for (const auto id : std::as_const(chargeEffectIds)) + for (const auto id : qAsConst(chargeEffectIds)) { const auto &chargeEffect = m_mainHandler->chargeEffectHandler()->getChargeEffectById(id); if (chargeEffect->getEffectStart() > lastChargeEffect.second) @@ -2548,7 +2547,7 @@ bool ObjectEffectCluster::generateTrajectoryVulcanoSpecific(int explosionNumber, // "convert" from time-aware curve 'back' to time-unaware trajectoryGeometry tdRef.trajectoryGeometry.clear(); - for (const Core::GeoPositionRelativeTime &geoPosRelTime : std::as_const(tdRef.trajectoryTimeAware.geometry())) + for (const Core::GeoPositionRelativeTime &geoPosRelTime : qAsConst(tdRef.trajectoryTimeAware.geometry())) tdRef.trajectoryGeometry.emplace_back(geoPosRelTime); // implicit // downcast tdRef.peakHeightAbs = peakHeightRelToOrigin + originatorPosition_geo.z(); @@ -2723,7 +2722,7 @@ void ObjectEffectCluster::sendCalculateTrajectoryAdlerRequest(const QVector +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effector.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effector.h index f87bdbc7a..4c053fbb7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effector.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_effector.h @@ -7,7 +7,7 @@ #pragma once -#include +#include #include "logger.h" #include "effector_state_machine.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_area.cpp index 60bf4b8c3..6fd839c97 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_area.cpp @@ -9,11 +9,11 @@ #include "special_area_provider.h" #include "Utils/polygons.h" -#include +#include #include "handler_charge_administration.h" #include -#include -#include +#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp index 48f28b2a6..b024f0ace 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.cpp @@ -7,23 +7,22 @@ */ #include "object_explosion_cluster.h" -#include #include "Utils/polygons.h" #include "handler_charge_administration.h" #include "handler_trajectory.h" #include "special_area_provider.h" #include -#include +#include #include #include #include -#include -#include -#include +#include +#include +#include #include -#include +#include #include /* @@ -300,7 +299,7 @@ Core::FunctionReplyObject ObjectExplosionCluster::createObject(const Database::A // DEBUG_LOG(m_logger) << "data.damagePercent() > 80. Check, if m_trajectoryCont contains building:" << data.id() // << " aesItemId=" << m_aiv.aesItemId(); -// for (const TracjectoryData &tracjectoryData : std::as_const(m_trajectoryCont)) +// for (const TracjectoryData &tracjectoryData : qAsConst(m_trajectoryCont)) // { // DEBUG_LOG(m_logger) << "print_m_trajectory" // << " value: index=" << tracjectoryData.index @@ -515,7 +514,7 @@ bool ObjectExplosionCluster::initialCalculations(QString *reasonOut) mtps_asUtm.resize(m_data.impactCount); m_temporaryData.mhPoints.reserve(mtps_asUtm.size()); - for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm)) + for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm)) { LtsCoordTrans::UtmCoordinate temp(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y()); m_temporaryData.mhPoints.emplace_back(Core::GeoPosition2D(temp.geographic().x(), temp.geographic().y())); @@ -1516,7 +1515,7 @@ void ObjectExplosionCluster::publishAiv() int explosionIndex = 0; singleEffectsRef.reserve(singleExplosions.size()); - for (const QPointF &singleExplosion : std::as_const(singleExplosions)) + for (const QPointF &singleExplosion : qAsConst(singleExplosions)) { SingleEffect se; se.singleEffectState(AesSingleEffectState_def::SesScheduled); @@ -1653,7 +1652,7 @@ void ObjectExplosionCluster::removeTopics() #ifdef USE_TRAJECTORY_VIA_HANDLER // remove TrajectoryTimeAware created via Handler: // topicIds are stored at m_trajectoryHandlerExplosionIndexToTopicId - for (int topicId : std::as_const(m_trajectoryHandlerExplosionIndexToTopicId)) + for (int topicId : qAsConst(m_trajectoryHandlerExplosionIndexToTopicId)) { dts->removeTrajectoryTimeAwareByKey(topicId); } @@ -2479,7 +2478,7 @@ bool ObjectExplosionCluster::generateTrajectoryVulcanoSpecific(int explosionNumb // "convert" from time-aware curve 'back' to time-unaware trajectoryGeometry tdRef.trajectoryGeometry.clear(); - for (const Core::GeoPositionRelativeTime &geoPosRelTime : std::as_const(tdRef.trajectoryTimeAware.geometry())) + for (const Core::GeoPositionRelativeTime &geoPosRelTime : qAsConst(tdRef.trajectoryTimeAware.geometry())) tdRef.trajectoryGeometry.emplace_back(geoPosRelTime); // implicit // downcast tdRef.peakHeightAbs = peakHeightRelToOrigin + originatorPosition_geo.z(); @@ -2750,7 +2749,7 @@ void ObjectExplosionCluster::publishTrajectory(int explosionIndex) #define REDUCED_DISTRIBUTION // [GUEZE-2462] Darstellung Flugparabel Steilfeuer #ifdef REDUCED_DISTRIBUTION const int trajSize = trajectoryGeometry.size(); - for (const Core::GeoPosition &pos3D : std::as_const(trajectoryGeometry)) + for (const Core::GeoPosition &pos3D : qAsConst(trajectoryGeometry)) { // if (!m_isAirSupportSource) { @@ -2778,7 +2777,7 @@ void ObjectExplosionCluster::publishTrajectory(int explosionIndex) } // for #else - for (const Core::GeoPosition &pos3D : std::as_const(trajectoryGeometry)) + for (const Core::GeoPosition &pos3D : qAsConst(trajectoryGeometry)) { geometryRef.emplace_back(Core::GeoPositionRelativeTime(pos3D.lon(), pos3D.lat(), pos3D.z(), idx * flightDurationMSecSeg)); ++idx; @@ -2931,7 +2930,7 @@ void ObjectExplosionCluster::dump(const char *file, int lineNo) const DEBUG_LOG(m_logger) << m_data.id << ", DUMP: m_trajectoryCont.keys()= " << trajectoryContKeys; DEBUG_LOG(m_logger) << m_data.id << ", DUMP: m_publisedTrajectoriesForDebug.size = " << m_publisedTrajectoriesForDebug.size(); - for (const auto &item : std::as_const(m_publisedTrajectoriesForDebug)) + for (const auto &item : qAsConst(m_publisedTrajectoriesForDebug)) DEBUG_LOG(m_logger) << m_data.id << ", DUMP: m_publisedTrajectoriesForDebug = " << item; DEBUG_LOG(m_logger) << "END ******* DUMP: id = " << m_data.id << ", name = '" << m_data.name << "' **************"; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.h index d1c93896b..a316f7235 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_cluster.h @@ -12,12 +12,12 @@ #include #include #include -#include +#include #include #include #include -#include +#include using DetonationLocationRequest = CentralEffectSimulation::DetonationLocationRequest; using DetonationLocationReply = CentralEffectSimulation::DetonationLocationReply; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_single.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_single.h index 02b3945a7..d724976cd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_single.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_explosion_single.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "aes_db.h" #include "object_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp index b717dc6e3..a39754a5a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include #include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.h index 26ecc0fd9..bca266659 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_functional_area.h @@ -9,7 +9,7 @@ #include "aes_db.h" #include "object_base.h" -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.cpp index 7d21b4fc4..ab00b511f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.cpp @@ -7,7 +7,6 @@ */ #include "object_gas_pipe.h" -#include #include "special_area_provider.h" #include @@ -134,7 +133,7 @@ Core::FunctionReplyObject ObjectGasPipe::updateObject(const Database::AesGasPipe } // update all AesGasPipeSegments in database - for (const Database::AesGasPipeSegment &segment : std::as_const(tmpDbSegments)) + for (const Database::AesGasPipeSegment &segment : qAsConst(tmpDbSegments)) { if (!m_mainHandler->db()->update(segment)) return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating AesGasPipeSegment-data in database.")); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.h index 78e64852b..ded756091 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_gas_pipe.h @@ -7,10 +7,10 @@ */ #pragma once -#include +#include #include "object_base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area.cpp index 40b1e7468..9418dfcfe 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area.cpp @@ -6,7 +6,6 @@ */ #include "object_mine_area.h" -#include #include "handler_mine_area.h" #include "qtransform.h" #include "special_area_provider.h" @@ -15,10 +14,10 @@ #include -#include +#include #include -#include // LtsUtils::toOptional -#include +#include // LtsUtils::toOptional +#include #include namespace AreaEffectSimulation @@ -117,7 +116,7 @@ int ObjectMineArea::getMineIdByIndex(int index) const DEBUG_LOG(m_logger) << "getMineIdByIndex index: " << index; int count = 0; - for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines)) + for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines)) { DEBUG_LOG(m_logger) << "tm: mineId: " << tm.mineId; if (count == index) @@ -151,7 +150,7 @@ void ObjectMineArea::clearCorridor(const AesItemView &aiv) QVector minesToTrigger; minesToTrigger.reserve(m_triggeredMines.size()); - for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines)) + for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines)) { LtsCoordTrans::UtmCoordinate utmMinePos = LtsCoordTrans::UtmCoordinate::fromGeographic(tm.position, zone); if (aivUtmPoly.containsPoint(QPointF(utmMinePos.x, utmMinePos.y), Qt::OddEvenFill)) @@ -171,14 +170,14 @@ void ObjectMineArea::clearBuildings() DEBUG_LOG(m_logger) << "mseIds size: " << mseIds.size(); QVector minesToTrigger; - for (int mseId : std::as_const(mseIds)) + for (int mseId : qAsConst(mseIds)) { DEBUG_LOG(m_logger) << "mseId: " << mseId; const QPolygonF &footprint = m_mainHandler->dds()->ismDtc()->getUtmFootprintById(mseId, zoneOut, isGroundLevel); minesToTrigger.clear(); minesToTrigger.reserve(m_triggeredMines.size()); - for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines)) + for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines)) { const LtsCoordTrans::UtmCoordinate &utmMinePos = LtsCoordTrans::UtmCoordinate::fromGeographic(tm.position, zoneOut); if (footprint.containsPoint(QPointF(utmMinePos.x, utmMinePos.y), Qt::OddEvenFill)) @@ -350,7 +349,7 @@ bool ObjectMineArea::publishTriggeredImpacts() tis.bitfield().resize((m_triggeredMines.size() + 7) / 8); int i = 0; - for (const auto &mine : std::as_const(m_triggeredMines)) + for (const auto &mine : qAsConst(m_triggeredMines)) { // Triggered Impact == 0, if mine is disarmed/exploded LtsUtils::BitArray::setBit(tis.bitfield(), i++, !mine.isTriggered); @@ -374,7 +373,7 @@ bool ObjectMineArea::publishDusMineStatus() dms.mines().resize(m_triggeredMines.size()); int i = 0; - for (const auto &mine : std::as_const(m_triggeredMines)) + for (const auto &mine : qAsConst(m_triggeredMines)) { const DusMine entry(mine.mineId, mine.isTriggered, mine.chargeTypeId, {mine.position.x(), mine.position.y()}); dms.mines()[i++] = entry; @@ -400,7 +399,7 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines) QVector polyUtm; polyUtm.reserve(m_mineAreaPolygon.size()); - for (const QPointF &point : std::as_const(m_mineAreaPolygon)) + for (const QPointF &point : qAsConst(m_mineAreaPolygon)) { LtsCoordTrans::UtmCoordinate posUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(point.x(), point.y()); DEBUG_LOG(m_logger) << "mineArea Polygon: " << posUtm.mgrs(); @@ -409,14 +408,14 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines) QVector minesUtm; minesUtm.reserve(m_triggeredMines.size()); - for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines)) + for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines)) { LtsCoordTrans::UtmCoordinate posUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(tm.position.x(), tm.position.y()); DEBUG_LOG(m_logger) << "triggeredMines: " << posUtm.mgrs(); minesUtm.append(posUtm); } - for (const Database::AesMineAreaTriggeredMines &tm : std::as_const(m_triggeredMines)) + for (const Database::AesMineAreaTriggeredMines &tm : qAsConst(m_triggeredMines)) { Core::GeoPosition2D geoPos = Core::GeoPosition2D(tm.position.x(), tm.position.y()); vec.append(geoPos); @@ -435,7 +434,7 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines) // In case of MineLayerPoisition (Not Sorting) with DUS Mines and more than 2 Mines (1 Segment) we // ignore the mines and just use the segments positions (Start is the startingPos of the the first segment // then add all end Positions of all segments - for (const auto &segment : std::as_const(m_segments)) + for (const auto &segment : qAsConst(m_segments)) { if (vecSorted.empty()) vecSorted.push_back(Core::GeoPosition2D(segment.startPosition.x(), segment.startPosition.y())); @@ -473,7 +472,7 @@ Core::FunctionReplyObject ObjectMineArea::changeSegmentsToLine(bool sortMines) DEBUG_LOG(m_logger) << "Distance between startPos and pos: " << length; Core::GeoPosition2D newPos = pos; - for (const Core::GeoPosition2D &pos2 : std::as_const(vec)) + for (const Core::GeoPosition2D &pos2 : qAsConst(vec)) { if (pos2 == pos || pos2 == startPos) continue; @@ -1035,7 +1034,7 @@ bool ObjectMineArea::containsPointInExpandedMinefield(const QPointF &positionGeo const double distance = 0.5; - for (const QPointF &mineAreaPointUTM : std::as_const(mineAreaPolygonUtm)) + for (const QPointF &mineAreaPointUTM : qAsConst(mineAreaPolygonUtm)) { double x = pointUtm.x - mineAreaPointUTM.x(); @@ -1139,7 +1138,7 @@ void ObjectMineArea::updateMineByOldMineId(Database::AesMineAreaTriggeredMines & int ObjectMineArea::mineCount() { double totalLength = 0.0; - for (const Database::AesMineAreaSegment &segment : std::as_const(m_segments)) + for (const Database::AesMineAreaSegment &segment : qAsConst(m_segments)) { LtsCoordTrans::UtmCoordinate startPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(segment.startPosition); LtsCoordTrans::UtmCoordinate endPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(segment.endPosition, startPositionUtm.zone); @@ -1352,7 +1351,7 @@ void ObjectMineArea::onPublishData() std::vector segVec; segVec.reserve(m_segments.size()); - for (const auto &segment : std::as_const(m_segments)) + for (const auto &segment : qAsConst(m_segments)) segVec.emplace_back( MineSegment(Core::GeoPosition2D(segment.startPosition.x(), segment.startPosition.y()), Core::GeoPosition2D(segment.endPosition.x(), segment.endPosition.y()))); @@ -1443,7 +1442,7 @@ void ObjectMineArea::publishAiv() aiv2.effectStart(toMSec(m_data.effectStart)); aiv2.form().clear(); aiv2.form().reserve(m_triggeredMines.size()); - for (const auto &tm : std::as_const(m_triggeredMines)) + for (const auto &tm : qAsConst(m_triggeredMines)) aiv2.form().resize(aiv2.form().size() + 1, Core::GeoPosition(tm.position.x(), tm.position.y(), 0.0)); aiv2.boundingBoxBottomLeft(aiv.boundingBoxBottomLeft()); aiv2.boundingBoxTopRight(aiv.boundingBoxTopRight()); @@ -1494,7 +1493,7 @@ Core::FunctionReplyObject ObjectMineArea::createGeoSegmentsFromMineData(double & std::vector tempMinePos; tempMinePos.reserve(m_triggeredMines.size() + mineData.size()); - for (const auto &t : std::as_const(m_triggeredMines)) + for (const auto &t : qAsConst(m_triggeredMines)) tempMinePos.emplace_back(Core::GeoPosition2D(t.position.x(), t.position.y())); for (const auto &md : mineData) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.cpp index 78be68241..1e51fb42b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.cpp @@ -6,11 +6,10 @@ */ #include "object_mine_area_null.h" -#include #include "special_area_provider.h" #include -#include +#include #include namespace AreaEffectSimulation @@ -74,7 +73,7 @@ bool ObjectMineAreaNull::isVirtualMine() const int ObjectMineAreaNull::lastConcreteMineNo() { int lastMineNo = 0; - for (const Database::AesMineAreaTriggeredMines &mine : std::as_const(m_triggeredMines)) + for (const Database::AesMineAreaTriggeredMines &mine : qAsConst(m_triggeredMines)) { // NOTE: igniterType/IgniterFunciton = 0 as long as AesMineAreaTriggeredMines does not contain values DEBUG_LOG(m_logger) << "mine: chargeTypeId " << mine.chargeTypeId << ", mineId: " << mine.mineId; @@ -246,7 +245,7 @@ void ObjectMineAreaNull::publishAiv() vec.reserve(m_triggeredMines.size()); QPolygonF tmp; tmp.reserve(m_triggeredMines.size()); - for (const auto &mine : std::as_const(m_triggeredMines)) + for (const auto &mine : qAsConst(m_triggeredMines)) { vec.emplace_back(Core::GeoPosition(mine.position.x(), mine.position.y(), 0)); tmp.push_back(mine.position); @@ -286,7 +285,7 @@ bool ObjectMineAreaNull::publishTriggeredImpacts() tis.setId(dds::core::optional(m_setId)); int i = 0; - for (const auto &mine : std::as_const(m_triggeredMines)) + for (const auto &mine : qAsConst(m_triggeredMines)) { // Triggered Impact == 0, if mine is disarmed/exploded LtsUtils::BitArray::setBit(tis.bitfield(), i++, !mine.isTriggered); @@ -308,7 +307,7 @@ bool ObjectMineAreaNull::publishDusMineStatus() dms.mines().resize(m_triggeredMines.size()); dms.setId(dds::core::optional(m_setId)); int i = 0; - for (const auto &mine : std::as_const(m_triggeredMines)) + for (const auto &mine : qAsConst(m_triggeredMines)) { const DusMine entry(mine.mineId, mine.isTriggered, mine.chargeTypeId, {mine.position.x(), mine.position.y()}); dms.mines()[i++] = entry; @@ -329,7 +328,7 @@ QPolygonF ObjectMineAreaNull::generateForm() vec.reserve(m_triggeredMines.size()); QPolygonF tmp; tmp.reserve(m_triggeredMines.size()); - for (const auto &mine : std::as_const(m_triggeredMines)) + for (const auto &mine : qAsConst(m_triggeredMines)) { vec.emplace_back(Core::GeoPosition(mine.position.x(), mine.position.y(), 0)); tmp.push_back(mine.position); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.h index 622d951bd..57a4b21e5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_area_null.h @@ -7,7 +7,7 @@ #pragma once -#include +#include #include "aes_db.h" #include "object_base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.cpp index 507f5c391..f8401ba84 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.cpp @@ -6,11 +6,10 @@ */ #include "object_mine_corridor.h" -#include #include "special_area_provider.h" #include "Utils/polygons.h" -#include +#include #include #include @@ -141,7 +140,7 @@ Core::FunctionReplyObject ObjectMineCorridor::updateObject(const Database::AesMi for (size_t i = 0; i < segments.size(); ++i) tmpSegments[i].position = QPointF(segments[i].lon(), segments[i].lat()); - for (const Database::AesMineCorridorSegment &segment : std::as_const(tmpSegments)) + for (const Database::AesMineCorridorSegment &segment : qAsConst(tmpSegments)) { if (!m_mainHandler->db()->update(segment)) return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "Error updating AesMineCorridorSegment-data in database.")); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.h index 2ff6ec441..11b0f6589 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_mine_corridor.h @@ -8,7 +8,7 @@ #include "aes_db.h" #include "object_base.h" -#include +#include #include namespace AreaEffectSimulation @@ -41,8 +41,6 @@ protected Q_SLOTS: private: - -NGL::INGLLogger &m_logger; Core::FunctionReplyObject createObject(const Database::AesMineCorridor &data, const std::vector &segmentsDds, const QVector &segmentsDb); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_off_route_mine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_off_route_mine.cpp index e7c45d593..5acb8dd29 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_off_route_mine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_off_route_mine.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_recon_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_recon_area.cpp index ce16fac15..7350ebb06 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_recon_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_recon_area.cpp @@ -11,7 +11,7 @@ #include "Utils/polygons.h" #include -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_technical_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_technical_area.cpp index d71dd7942..7355a2254 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_technical_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/object_technical_area.cpp @@ -12,7 +12,7 @@ #include "Utils/polygons.h" #include "handler_charge_administration.h" #include -#include +#include namespace AreaEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/settings.h index 825715c40..03fd8c1f8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/settings.h @@ -8,7 +8,7 @@ #pragma once #include -#include "svcaescommon_export.h" +#include "aes_export.h" namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/special_area_provider.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/special_area_provider.h index 41894568e..50cd89ab6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/special_area_provider.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AreaEffectSimulation/special_area_provider.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include #include namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/CMakeLists.txt index 8dc534831..b8f3cd5ad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate asm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcAsmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcAsmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAsmCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAsmCommon) # @@ -62,14 +60,13 @@ SET(SRCS_client # generate asm_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcAsmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(WS AAR SV svcAsmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAsmClient PRIVATE RTI::nddscpp2 @@ -78,7 +75,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmClient svcAsmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAsmClient) # @@ -91,14 +87,13 @@ SET(SRCS_server # generate asm_[d|f]ts.h, asm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcAsmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(WS AAR SV svcAsmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAsmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcAsmServer PRIVATE RTI::nddscpp2 @@ -108,7 +103,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAsmServer svcAsmCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcAsmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp index ae11bcdbd..8a6014dcc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.cpp @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #include @@ -32,6 +32,7 @@ AsmTests::AsmTests(QObject *parent) , m_trainingAreaId(0) , m_testId(0) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.h index 76d69fedf..73a4797d6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/ModuleTests/asm_tests.h @@ -12,7 +12,7 @@ #include #include -#include +#include namespace AssetManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/client_message.cpp index 59d22d55a..0c50a34f8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/client_message.cpp @@ -47,12 +47,14 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS ClientMessage::ClientMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) : LtsWebSocket::AbstractClientMessage(client, type, typeId, uuid, data) , m_dataManager(dataManager) + , m_logger(getLogger("ClientMessage")) {} // ####### ClientMessage end ####### // ####### BaseDlRequest begin ####### -BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid) : ClientMessage(dataManager, client, type, typeId, uuid), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid) + : ClientMessage(dataManager, client, type, typeId, uuid) +{} void BaseDlRequest::process() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/reply_message.h index 33f80650c..fe4bc153a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/Messages/reply_message.h @@ -10,8 +10,8 @@ #include -#include -#include +#include +#include namespace AssetManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/json_keys.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/json_keys.h index ee4a9328c..bd8d6e3e1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/json_keys.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/json_keys.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/websocket_interface_handler.cpp index c8840af20..ef71b4f1c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h index 2239c69a0..4836aa24d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/convert_db_to_dds.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace AssetManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.cpp index 0465abc4e..533614944 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace AssetManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.h index 231554c1f..74c561772 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/dds_handler.h @@ -37,12 +37,13 @@ public: std::shared_ptr fts() const { return m_ddsFts; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp index 7a84f741f..816fe6f45 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.cpp @@ -18,6 +18,7 @@ HandlerAsset::HandlerAsset(MainHandler *mainHandler, QObject *parent) , Interface::Fts::AssetModifyRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::AssetRemoveRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerAsset")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.h index ecbd23ecd..f4c1c24bc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_asset.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "logger.h" @@ -30,7 +30,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onAssetModifyRequest(const rti::core::SampleIdentity &cookie, const Asset &request) override; Core::FunctionReplyObject assetModifyRequest(const Asset &request); @@ -38,8 +37,9 @@ private: const Core::RemoveElementRequest &request) override; private: - NGL::INGLLogger &m_logger; QHash m_objectAssetMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp index 1e0cf2ef8..85451a530 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.cpp @@ -31,6 +31,7 @@ static inline Location toDdsData(const Database::AsmLocation &dbData) HandlerLocation::HandlerLocation(MainHandler *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerLocation")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.h index 85b190944..a235c397e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_location.h @@ -19,7 +19,8 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp index 3813cee11..d324e8064 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.cpp @@ -18,6 +18,7 @@ HandlerRelayInfo::HandlerRelayInfo(MainHandler *mainHandler, QObject *parent) , Interface::Fts::RelayInfoModifyRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::RelayInfoRemoveRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerRelayInfo")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.h index 26a8c7ec3..21d54a9f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_relay_info.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "logger.h" @@ -30,7 +30,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onRelayInfoModifyRequest(const rti::core::SampleIdentity &cookie, const RelayInfo &request) override; Core::FunctionReplyObject relayInfoModifyRequest(const RelayInfo &request); @@ -38,8 +37,9 @@ private: const Core::RemoveElementRequest &request) override; private: - NGL::INGLLogger &m_logger; QHash m_objectRelayInfoMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp index 084382386..65330903b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.cpp @@ -7,7 +7,6 @@ */ #include "handler_training_area.h" -#include #include "object_training_area.h" #include "main_handler.h" #include "convert_db_to_dds.h" @@ -23,6 +22,7 @@ HandlerTrainingArea::HandlerTrainingArea(MainHandler *mainHandler, QObject *pare , Interface::Fts::MapDescriptionModifyRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::MapDescriptionRemoveRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerTrainingArea")) { } @@ -46,7 +46,7 @@ bool HandlerTrainingArea::init() return false; } - for (const Database::AsmMapDescription &data : std::as_const(dataVecMD)) + for (const Database::AsmMapDescription &data : qAsConst(dataVecMD)) { ObjectMapDescription *ifs(new ObjectMapDescription(m_mainHandler)); Core::FunctionReplyObject ret = ifs->createObject(convert(data), data.objOrder); @@ -94,7 +94,7 @@ bool HandlerTrainingArea::init() } // create asm_training_area - for (const Database::AsmTrainingArea &data : std::as_const(dataVec)) + for (const Database::AsmTrainingArea &data : qAsConst(dataVec)) { // insert sequences of map descriptions in data ObjectTrainingArea *ifs(new ObjectTrainingArea(m_mainHandler)); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.h index 164649867..051bd3fb7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_training_area.h @@ -7,9 +7,9 @@ */ #pragma once -#include -#include -#include +#include +#include +#include #include "asm_db_structs.h" #include "object_map_description.h" @@ -45,7 +45,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onTrainingAreaModifyRequest(const rti::core::SampleIdentity &cookie, const TrainingArea &request) override; Core::FunctionReplyObject trainingAreaModifyRequest(const TrainingArea &request); @@ -59,9 +58,10 @@ private: const Core::RemoveElementRequest &request) override; private: - NGL::INGLLogger &m_logger; QMap m_objectTrainingAreaMap; QMap m_objectMapDescriptionMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp index ebacfca30..b8bfd988d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.cpp @@ -11,7 +11,7 @@ #include "main_handler.h" #include "dds_handler.h" -#include +#include namespace AssetManagement { @@ -21,6 +21,7 @@ constexpr int MAX_DATATOPIC_LIFETIME = 10 * 1000; //10 sec HandlerWorkstationLogout::HandlerWorkstationLogout(MainHandler *mainHandler, QObject *parent) : QObject(parent) , Interface::Fts::WorkstationLogoutRequestHandler(mainHandler->dds()->fts()) + , m_logger(getLogger("HandlerWorkstationLogout")) , m_mainHandler(mainHandler) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.h index 3bed9591a..351504846 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/handler_workstation_logout.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "logger.h" @@ -34,8 +34,7 @@ public: void onWorkstationLogoutRequest(const rti::core::SampleIdentity &cookie, const WorkstationLogout &request) override final; private: - -NGL::INGLLogger &m_logger; + NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; QMap m_logoutRequestMap; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/logger.h index 8230e4d4e..1507f8911 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcasmcommon_export.h" +#include "asm_export.h" namespace AssetManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp index 37924394a..100983a50 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.cpp @@ -21,7 +21,8 @@ namespace AssetManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_handlerTrainingArea(nullptr) , m_handlerWorkstationLogout(nullptr) , m_handlerAsset(nullptr) @@ -29,8 +30,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent) , m_handlerRelayInfo(nullptr) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) - , m_handlerWebSocket(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_handlerWebSocket(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.h index dc3eb22bb..3aab5151b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include "dds_handler.h" @@ -44,10 +44,8 @@ public: int exerciseId() const; private: - NGL::INGLLogger &m_logger; bool initAsmHandler(); private: - NGL::INGLLogger &m_logger; // std::shared_ptr m_handlerMapDesc; std::shared_ptr m_handlerTrainingArea; std::shared_ptr m_handlerWorkstationLogout; @@ -57,5 +55,8 @@ private: std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_handlerWebSocket; + + NGL::INGLLogger &m_logger; + }; } // namespace AssetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp index ace6875ee..05ba823bd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.cpp @@ -15,8 +15,10 @@ //------------------------------------------------------------------------------ namespace AssetManagement { -ObjectAsset::ObjectAsset(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ObjectAsset::ObjectAsset(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectAsset")) +{ } //------------------------------------------------------------------------------ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h index e98f76941..1a97a53bb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_asset.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -47,11 +47,12 @@ public: static Asset toDdsData(const Database::AsmAsset &dbData); // db -> dds protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; Asset m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp index 2e879d192..1cc934f58 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.cpp @@ -12,9 +12,11 @@ namespace AssetManagement { -ObjectMapDescription::ObjectMapDescription(MainHandler *mainHandler) : m_mainHandler(mainHandler) - , m_order(-1), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ObjectMapDescription::ObjectMapDescription(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_order(-1) + , m_logger(getLogger("ObjectMapDescription")) +{ } bool ObjectMapDescription::isValid() const diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h index 938d3462e..3f45ebc2c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_map_description.h @@ -8,7 +8,7 @@ #pragma once #include "logger.h" -#include +#include // Generated #include @@ -38,9 +38,9 @@ public: static MapDescription toDdsData(const Database::AsmMapDescription &dbData); // db -> dds private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; MapDescription m_data; int m_order; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp index 5c54592fd..36047b281 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.cpp @@ -15,8 +15,10 @@ //------------------------------------------------------------------------------ namespace AssetManagement { -ObjectRelayInfo::ObjectRelayInfo(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ObjectRelayInfo::ObjectRelayInfo(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectRelayInfo")) +{ } //------------------------------------------------------------------------------ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h index 78b53f7d4..ae48cba13 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_relay_info.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -47,11 +47,12 @@ public: static RelayInfo toDdsData(const Database::AsmEgcuRelayInfo &dbData); // db -> dds protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; RelayInfo m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp index 7a88048d7..77517decd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.cpp @@ -14,8 +14,10 @@ //------------------------------------------------------------------------------ namespace AssetManagement { -ObjectTrainingArea::ObjectTrainingArea(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ObjectTrainingArea::ObjectTrainingArea(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectTrainingArea")) +{ } //------------------------------------------------------------------------------ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h index 4e23b19fa..e2503bc9c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/object_training_area.h @@ -7,10 +7,10 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -46,11 +46,12 @@ public: static Database::AsmTrainingArea toDbData(const TrainingArea &ddsData); // dds -> db protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; TrainingArea m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/settings.h index c9b6b3fb2..2aae0a0b1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AssetManagement/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/change_rt_profile_circuit_name.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/change_rt_profile_circuit_name.cpp index ae474098f..d38bd1ae8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/change_rt_profile_circuit_name.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/change_rt_profile_circuit_name.cpp @@ -9,7 +9,7 @@ #include "change_rt_profile_circuit_name.h" #include -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/choose_stream.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/choose_stream.h index 0e7a2315e..f36ee054c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/choose_stream.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/choose_stream.h @@ -11,8 +11,8 @@ #include #include -#include "svcavmcommon_export.h" -#include +#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_eloka_list.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_eloka_list.h index 0b5d2cedf..b96d8f1a6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_eloka_list.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_eloka_list.h @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_stream_list.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_stream_list.h index 12d93ae9b..77e9b543c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_stream_list.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/get_stream_list.h @@ -12,7 +12,7 @@ #include "icommand.h" #include #include -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_eloka.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_eloka.h index bd3d217df..344d48e47 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_eloka.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_eloka.h @@ -12,7 +12,7 @@ #include "icommand.h" #include #include -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_timeline.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_timeline.h index 51b2683d7..bfa16f6c5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_timeline.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/query_timeline.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_abs_position.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_abs_position.h index f50b665f3..b37c5de69 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_abs_position.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_abs_position.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_announcement_profile.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_announcement_profile.h index a4325db6f..f816e6f7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_announcement_profile.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_announcement_profile.h @@ -12,8 +12,8 @@ #include "icommand.h" #include #include -#include -#include +#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile.cpp index 8af08739a..b62c2823d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile.cpp @@ -9,7 +9,7 @@ #include "set_rt_profile.h" #include -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile_base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile_base.h index d3432dc42..ec1aa3402 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile_base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_rt_profile_base.h @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.cpp index 08649a2b1..4927ec85a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.cpp @@ -11,7 +11,7 @@ #include "iava_comm.h" #include "iava_command_done_observer.h" -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.h index e35fc9db4..f71fb226a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_script.h @@ -11,7 +11,7 @@ #include "icommand.h" #include -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_video_profile.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_video_profile.h index a1f5ddbdb..31acd4f38 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_video_profile.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/set_video_profile.h @@ -11,10 +11,10 @@ #include "icommand.h" #include -#include -#include -#include -#include +#include +#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.cpp index 3b985f441..b57041ced 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.cpp @@ -11,7 +11,7 @@ #include "iava_comm.h" #include "iava_command_done_observer.h" -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.h index d48bac4db..6fb25bf9c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/start_script.h @@ -11,7 +11,7 @@ #include "icommand.h" #include -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/vd_set_script.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/vd_set_script.h index fa96797cb..fc7a08a48 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/vd_set_script.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/AvsCommands/vd_set_script.h @@ -11,7 +11,7 @@ #include "icommand.h" #include -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/CMakeLists.txt index 2c17d0aa0..38d9bb40c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/CMakeLists.txt @@ -4,8 +4,6 @@ # $Author$ # -IF(BUILD_RTI) - IF(${CMAKE_VERSION} VERSION_LESS "3.6.0") FIND_PACKAGE(Boost REQUIRED COMPONENTS system) # system wird nicht gebraucht, aber ohne Komponente wird das Boost::boost imported Target nicht angelegt (cmake <= 3.5.2) ELSE() @@ -132,7 +130,7 @@ CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) # Generate avm_db_structs.cpp/.h CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcAvmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcAvmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAvmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ @@ -165,7 +163,7 @@ SET(SRCS_client # generate avm_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcAvmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcAvmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAvmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ @@ -191,7 +189,7 @@ SET(SRCS_server # generate avm_[d|f]ts.h, avm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcAvmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcAvmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcAvmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ @@ -309,5 +307,3 @@ NGL_ADD_TARGET_LINK(svcAudioVideoManagement sAVM) # Uncomment if necessary ADD_SUBDIRECTORY(ModuleTests) ADD_SUBDIRECTORY(UnitTests) - -ENDIF(BUILD_RTI) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.cpp index 6cd6338f0..872fab003 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include @@ -25,6 +25,7 @@ AvmFtTests::AvmFtTests(QObject *parent) , m_testId(0) , m_mountingPointId(100) , m_bTestsSuccessful(true) + , m_logger(getLogger("FtTest")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.h index 1985b29b7..e58434b4f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_ft_tests.h @@ -26,7 +26,7 @@ #include #include -#include +#include namespace AudioVideoManagement { @@ -50,7 +50,6 @@ protected Q_SLOTS: void tryModify(); void tryDelete(); protected: - NGL::INGLLogger &m_logger; void onModifyMenuStructReply(const Core::FunctionReplyObject &replyObject) override final; void createMenuStructReply(const Core::FunctionReplyObject &replyObject); void modifyMenuStructReply(const Core::FunctionReplyObject &replyObject); @@ -65,6 +64,8 @@ private: int m_testId; int m_mountingPointId; bool m_bTestsSuccessful; + NGL::INGLLogger &m_logger; + }; } // namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.cpp index 98f280d0d..549d5590c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.cpp @@ -21,15 +21,14 @@ */ #include "avm_vca_tests.h" -#include #include #include #include #include -#include +#include #include -#include -#include +#include +#include #include #include #include @@ -41,7 +40,7 @@ AvmVcaTests::AvmVcaTests(int domainId, int exerciseId, int operatorId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise)) , m_exerciseId(exerciseId) , m_operatorId(operatorId) - .getNGLLogger("VcaTest")) + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("VcaTest")) { Q_ASSERT(exerciseId > 0); Q_ASSERT(operatorId > 0); @@ -194,14 +193,14 @@ void AvmVcaTests::createCnrConfig() void AvmVcaTests::removeTvcConfig() { - for (auto id: std::as_const(m_tvcConfigIds)) + for (auto id: qAsConst(m_tvcConfigIds)) m_ftc->removeTvcConfigRequest(RemoveTvcConfigRequest{id}, this); QTRY_VERIFY(m_tvcConfigIds.isEmpty()); } void AvmVcaTests::removeCnrConfig() { - for (auto id: std::as_const(m_cnrConfigIds)) + for (auto id: qAsConst(m_cnrConfigIds)) m_ftc->removeCnrConfigRequest(RemoveCnrConfigRequest{id}, this); QTRY_VERIFY(m_cnrConfigIds.isEmpty()); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.h index 3cc83473c..8dad98c54 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/avm_vca_tests.h @@ -14,8 +14,8 @@ #include #include #include -#include -#include +#include +#include namespace AudioVideoManagement { @@ -43,8 +43,6 @@ private slots: void test(); private: - -NGL::INGLLogger &m_logger; void create(); void modify(); void remove(); @@ -74,6 +72,7 @@ NGL::INGLLogger &m_logger; bool m_removeReplyReceived{false}; QVector m_tvcConfigIds; QVector m_cnrConfigIds; + NGL::INGLLogger &m_logger; }; } // namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp index 4f3e64fa9..cad6c7711 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include @@ -27,6 +27,7 @@ MvsTests::MvsTests(QObject *parent) , m_radioStationId(200) , m_exerciseId(0) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.h index 12641c83d..523ed3c11 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ModuleTests/mvs_tests.h @@ -25,7 +25,7 @@ #include #include -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.cpp index 11e6fae75..f7469a90f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.cpp @@ -13,8 +13,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.h index 148fbf1ec..50a29dfb9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/asset_assignment_manager_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/audio_video_handler_impl_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/audio_video_handler_impl_test.h index 095bdf416..0c02cd3a5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/audio_video_handler_impl_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/audio_video_handler_impl_test.h @@ -10,7 +10,7 @@ #pragma once #include -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.cpp index 7c3a57d00..ab5c12839 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.cpp @@ -9,8 +9,8 @@ #include "av_helper_test.h" #include -#include -#include +#include +#include #include using namespace AudioVideoManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.h index 372717d87..dcc83db23 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/av_helper_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.cpp index 8d7243792..22d1ad508 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.cpp @@ -12,11 +12,11 @@ #include #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include using namespace AudioVideoManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.h index 02c75c55a..8e429d366 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_comm_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.cpp index 1c8ccef1d..a04996072 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.cpp @@ -15,9 +15,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.h index 14a79db4c..d27685a6f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_control_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server.cpp index 59509d271..e72ace175 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server.cpp @@ -8,9 +8,9 @@ */ #include -#include #include -#include +#include +#include #include "ava_test_server.h" namespace AudioVideoManagement @@ -325,7 +325,7 @@ AvaTestServer::AvaTestServer() AvaTestServer::~AvaTestServer() { - for (QTcpSocket *conn : std::as_const(m_Conns)) + for (QTcpSocket *conn : qAsConst(m_Conns)) { // disconnect before we delete as otherwise closedConnection() would be called wich would // also delete the socket. diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server_main.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server_main.cpp index 0809f9953..6353631c5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server_main.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_test_server_main.cpp @@ -8,7 +8,7 @@ */ #include "ava_test_server.h" -#include +#include int main(int argc, char** argv) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_timeline_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_timeline_test.h index e6ccfc870..2723bdaf8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_timeline_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/ava_timeline_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.cpp index 99415024a..784c90fd6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.cpp @@ -10,7 +10,7 @@ #include "avs_command_queue_test.h" #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.h index e2c0b5c86..b732bdf05 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/avs_command_queue_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/choose_stream_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/choose_stream_test.h index 4f02317c9..1e42dcb8e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/choose_stream_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/choose_stream_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.cpp index a52f958f7..a41951908 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.cpp @@ -12,8 +12,8 @@ #include #include #include -#include -#include +#include +#include using namespace AudioVideoManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.h index 5792a01af..e8cbea09f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/list_response_collector_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/main.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/main.cpp index 58a760cd9..8dd942c18 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/main.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/main.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/parse_line_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/parse_line_test.h index 1d92061d9..8b2cd138c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/parse_line_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/parse_line_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/rt_state_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/rt_state_test.h index b5b47d175..40acb642e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/rt_state_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/UnitTests/rt_state_test.h @@ -9,7 +9,7 @@ #pragma once -#include +#include /** * @author Christian Fröbel diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/active_exercises.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/active_exercises.h index bb0b0f797..0cd4bbb7c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/active_exercises.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/active_exercises.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset.h index 9aca6aa61..fd25687e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset.h @@ -9,8 +9,8 @@ #pragma once -#include "svcavmcommon_export.h" -#include +#include "avm_export.h" +#include #include namespace InfrastructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset_assignment_manager.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset_assignment_manager.h index 2b534343b..cd4fd79ad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset_assignment_manager.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/asset_assignment_manager.h @@ -10,9 +10,9 @@ #pragma once #include "exercise_context.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "logger.h" -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler.h index 545823de8..e22a6eb05 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler.h @@ -10,7 +10,7 @@ #pragma once #include -#include +#include class QString; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.cpp index 97f5e62b2..dc235a97c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include @@ -222,6 +222,7 @@ AudioVideoHandlerImpl::AudioVideoHandlerImpl(Exercise *exercise, IDbProxy *dbPro , m_exercise(exercise) , m_dbProxy(dbProxy) , m_dtsProxy(dtsProxy) + , m_logger(getLogger("AudioVideoHandler")) { Q_ASSERT(exercise); Q_ASSERT(dbProxy); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.h index 9ca8ae800..21db3b168 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/audio_video_handler_impl.h @@ -11,10 +11,10 @@ #include "exercise_context.h" #include "logger.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_control.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_control.cpp index 9eafe5f60..39a2be53d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_control.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_control.cpp @@ -6,8 +6,8 @@ */ #include "av_control.h" -#include -#include +#include +#include #include // TODO: on reconnect operatingmode abgleichen! diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.cpp index b6ed6516f..cdd66a0b4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.cpp @@ -8,8 +8,8 @@ */ #include "av_helper.h" -#include -#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.h index ea60d1384..5da48ae7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_helper.h @@ -9,7 +9,7 @@ #pragma once -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "ava_types.h" #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_socket.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_socket.h index 723479809..5bef46647 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_socket.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/av_socket.h @@ -7,13 +7,13 @@ #pragma once -#include -#include -#include +#include +#include +#include #include #include "logger.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" namespace AudioVideoManagement { @@ -55,6 +55,7 @@ protected: QTimer *m_rcpLoginTimer; QTimer *m_reconnectTimer; std::queue m_commandQueueForErrorHandling; + NGL::INGLLogger &m_logger; NGL::INGLLogger &m_loggerIO; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.cpp index 6c74b44d6..ee783ead8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.cpp @@ -10,12 +10,12 @@ #include "ava_comm.h" #include "av_helper.h" #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include @@ -24,6 +24,7 @@ namespace AudioVideoManagement AvaComm::AvaComm(const QString &avaHost, quint16 avaPort) : m_avSocket(avaHost, avaPort, getLogger("AvaComm"), getLogger("AvaComm.IO")) + , m_logger(getLogger("AvaComm")) , m_loggerIO(getLogger("AvaComm.IO")) { connect(&m_avSocket, &AVSocketWrapper::readyRead, this, &AvaComm::onReadyRead); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.h index eb3bb801b..d14adeb9b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_comm.h @@ -11,10 +11,10 @@ #include "iava_comm.h" #include "ava_types.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "logger.h" #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.cpp index 64058fc80..65c202bb2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.cpp @@ -27,13 +27,13 @@ #include "AvsCommands/set_abs_position.h" #include "AvsCommands/set_volume.h" #include "AvsCommands/keep_alive.h" -#include -#include -#include +#include +#include +#include #include #include -#include +#include namespace AudioVideoManagement { @@ -42,6 +42,7 @@ AvaControl::AvaControl(IAvaComm *comm, StreamNameMapping *streamNameMapping, std : m_comm(comm) , m_streamNameMapping(streamNameMapping) , m_queue(commandTimeout) + , m_logger(getLogger("AvaControl")) { Q_ASSERT(comm); Q_ASSERT(streamNameMapping); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.h index c11f82f1d..8ee010691 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_control.h @@ -10,18 +10,19 @@ #pragma once #include "iava_command_done_observer.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "ava_types.h" #include "rt_state.h" #include "avs_command_queue.h" #include "logger.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include #include +class QStringList; + namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.cpp index 2d6789782..a36e906d8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.cpp @@ -25,6 +25,7 @@ AvaSession::AvaSession(AvaControl *ctrl, int exerciseId, const QString &operator , m_timezone(timezone) , m_guiStyle(guiStyle) , m_keepAliveEnabled(keepAliveEnabled) + , m_logger(getLogger("AvaSession")) { Q_ASSERT(ctrl); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.h index 3a6c39b2b..8ce57b28c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_session.h @@ -9,12 +9,12 @@ #pragma once -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "ava_types.h" #include "logger.h" -#include -#include -#include +#include +#include +#include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.cpp index b2f065d68..226e2b096 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.cpp @@ -8,7 +8,6 @@ */ #include "ava_state.h" -#include #include "ava_session.h" #include "ava_control.h" #include "av_helper.h" @@ -41,7 +40,7 @@ AvaState::AvaState(AvaSession *session) QStringList AvaState::currentLiveVideoStreams() const { QStringList streams; - for (const QMap &map : std::as_const(m_videoState)) + for (const QMap &map : qAsConst(m_videoState)) { const QList streamNames = map.keys(); for (const QString &streamName : streamNames) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.h index 382bb4427..4ec8c5f48 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_state.h @@ -11,11 +11,11 @@ #include "ava_types.h" #include "rt_state.h" -#include "svcavmcommon_export.h" -#include -#include -#include -#include +#include "avm_export.h" +#include +#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.cpp index 18d1a4e45..6a1e37944 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.cpp @@ -13,9 +13,9 @@ #include -#include +#include #include -#include +#include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.h index ab556b844..9b57f31aa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ava_types.h @@ -9,11 +9,11 @@ #pragma once -#include -#include "svcavmcommon_export.h" -#include -#include -#include +#include +#include "avm_export.h" +#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.cpp index 06b4f49de..dd2c49e03 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.cpp @@ -9,7 +9,7 @@ #include "avs_command_queue.h" #include "icommand.h" -#include +#include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.h index e6139ed1d..fa8515d85 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_command_queue.h @@ -10,9 +10,9 @@ #pragma once #include "logger.h" -#include "svcavmcommon_export.h" -#include -#include +#include "avm_export.h" +#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_dialog.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_dialog.h index f2334e9a5..648f224b4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_dialog.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_dialog.h @@ -9,9 +9,9 @@ #pragma once -#include "svcavmcommon_export.h" +#include "avm_export.h" -#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.cpp index 7c00dddb3..f87501136 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.cpp @@ -13,9 +13,9 @@ #include #include #include -#include +#include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.h index f06e5b7d1..2ee764a2e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/avs_menus.h @@ -9,8 +9,8 @@ #pragma once -#include "svcavmcommon_export.h" -#include +#include "avm_export.h" +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.cpp index 38ee9f708..ed11e6446 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.cpp @@ -8,7 +8,6 @@ */ #include "cnr_handler.h" -#include #include "avm_dts.h" #include "dds_handler.h" #include "exercise_context.h" @@ -20,7 +19,7 @@ #include #include #include -#include +#include #include namespace AudioVideoManagement @@ -178,6 +177,7 @@ private: CnrHandler *m_handler; DatabaseInterface *m_db; QHash m_cache; //!< cnrConfig-Id -> AvmDeviceConfig + LOGGER_T m_logger; }; @@ -189,6 +189,7 @@ CnrHandler::CnrHandler(Interface::Dts *dts, Interface::Fts *fts, InfrastructureM , m_frequencyPlanningHandler(frequencyPlanningHandler) , m_db(db) , m_activeExercises(activeExercises) + , m_logger(getLogger("CombatNetRadioHandler")) , m_deviceConfig(new DeviceConfig(this, db, m_logger)) { Q_ASSERT(dts); @@ -234,7 +235,7 @@ bool CnrHandler::init() return false; } - for (const AvmCnrChannel ¤tChannel : std::as_const(m_channels)) + for (const AvmCnrChannel ¤tChannel : qAsConst(m_channels)) m_dts->publish(::AudioVideoManagement::toDds(currentChannel)); // Don't use select with callback here as addConfig() uses the DB, too. @@ -245,7 +246,7 @@ bool CnrHandler::init() return false; } - for (const AvmCnrConfig ¤tConfig : std::as_const(cnrConfigs)) + for (const AvmCnrConfig ¤tConfig : qAsConst(cnrConfigs)) { auto reply = createCnrConfig(toRequest(currentConfig, 0), currentConfig.id); if (reply.error()) @@ -398,7 +399,7 @@ void CnrHandler::updateDeviceConfig() { DBTransaction trans(m_db->database()); - for (const auto &config : std::as_const(m_cache)) + for (const auto &config : qAsConst(m_cache)) if (config.isActive()) m_deviceConfig->update(config); @@ -480,7 +481,7 @@ Core::FunctionReplyObject CnrHandler::validateRequest(const ModifyCnrConfigReque */ bool CnrHandler::checkConstraint(const std::function &constraint, const boost::optional &exerciseId, const boost::optional &excludeId) const { - for (const CnrConfig &config : std::as_const(m_cache)) + for (const CnrConfig &config : qAsConst(m_cache)) { if (excludeId == config.id()) continue; @@ -706,7 +707,7 @@ QString CnrHandler::exerciseList(const CnrConfig &config) const // Global - all active exercises, no matter if they have active plannings or not QStringList exerciseList; - for (const auto &context : std::as_const(m_activeExercises->allContexts())) + for (const auto &context : qAsConst(m_activeExercises->allContexts())) exerciseList.append(context.toString()); return exerciseList.join(QLatin1Char(',')); } @@ -743,7 +744,7 @@ int CnrHandler::normalizedAddacChannel(int addacChannel) const Database::AvmCnrChannel CnrHandler::channelById(int32_t id) const { - for (const Database::AvmCnrChannel &channel : std::as_const(m_channels)) + for (const Database::AvmCnrChannel &channel : qAsConst(m_channels)) if (channel.id == id) return channel; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.h index 644ab21d2..b87f8bad7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_handler.h @@ -11,11 +11,11 @@ #include "logger.h" #include "avm_fts.h" #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.cpp index 05f896622..8bc69eedc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.cpp @@ -8,7 +8,6 @@ */ #include "cnr_tvc_profile_handler.h" -#include #include "cnr_handler.h" #include "tvc_handler.h" #include @@ -50,7 +49,7 @@ CnrTvcProfile toDds(const Database::AvmCnrTvcProfile &circuitContainerDb, T circ CnrTvcProfile circuitContainerDds(circuitContainerDb.id, circuitContainerDb.operatorId, circuitContainerDb.exerciseId, {}); circuitContainerDds.data().reserve(circuitsDb.size()); - for (const auto ¤tCircuitDb : std::as_const(circuitsDb)) + for (const auto ¤tCircuitDb : qAsConst(circuitsDb)) circuitContainerDds.data().push_back(toDds(currentCircuitDb)); return circuitContainerDds; } @@ -117,6 +116,7 @@ CnrTvcProfileHandler::CnrTvcProfileHandler(DatabaseInterface *db, Interface::Dts , m_fts(fts) , m_cnrHandler(cnrHandler) , m_tvcHandler(tvcHandler) + , m_logger(getLogger("CnrTvcProfileHandler")) { Q_ASSERT(db); Q_ASSERT(dts); @@ -148,7 +148,7 @@ bool CnrTvcProfileHandler::init() return false; } - for (const auto ¤tCircuitContainer: std::as_const(circuitContainersDb)) + for (const auto ¤tCircuitContainer: qAsConst(circuitContainersDb)) status &= collectAndPublish(currentCircuitContainer); return status; @@ -570,7 +570,7 @@ void CnrTvcProfileHandler::onConfigChanged(int32_t configId, RadioSystem type) // Find all CnrTvcProfiles where this config is referenced and reload those. // Hint: reloading might modify m_cache. Thus the reloading is done in a separate loop. - for (const auto &profile : std::as_const(m_cache)) + for (const auto &profile : qAsConst(m_cache)) for (const auto &data : profile.data()) if (data.radioSystemId() == type && data.radioCircuitId() == configId) { @@ -578,7 +578,7 @@ void CnrTvcProfileHandler::onConfigChanged(int32_t configId, RadioSystem type) break; } - for (const auto &profile : std::as_const(toBeReloaded)) + for (const auto &profile : qAsConst(toBeReloaded)) { Database::AvmCnrTvcProfile profileDb = toDb(profile); const bool isReload = true; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.h index ee20abce7..b820ba841 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/cnr_tvc_profile_handler.h @@ -11,9 +11,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.cpp index c6cf89c34..c297a26e2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.cpp @@ -18,9 +18,7 @@ #include #include -#if BUILD_RTI #include -#endif namespace AudioVideoManagement @@ -28,6 +26,7 @@ namespace AudioVideoManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } @@ -40,7 +39,6 @@ bool DdsHandler::init(const QStringList &qosFileList) return false; } -#if BUILD_RTI // default initialize Publisher and Subscriber m_ddsConnector->initPublisherSubscriber(); // no batched writer possible until frequency set data is no longer that big (currently 1800rows) @@ -60,9 +58,6 @@ bool DdsHandler::init(const QStringList &qosFileList) bRet &= m_fts->enableAll(); return bRet; -#else - return true; -#endif } bool DdsHandler::enableDtcClients() @@ -70,7 +65,6 @@ bool DdsHandler::enableDtcClients() Q_ASSERT(m_exmDtc); Q_ASSERT(m_ismDtc); Q_ASSERT(m_asmDtc); -#if BUILD_RTI bool status = m_exmDtc->enableExercise() && m_ismDtc->enableInstrumentationAsset() && m_ismDtc->enableMainStructureElement() && @@ -79,16 +73,11 @@ bool DdsHandler::enableDtcClients() Q_ASSERT(status); return status; -#else - return true; -#endif } -#if BUILD_RTI dds::domain::DomainParticipant DdsHandler::domainParticipant() const { return m_ddsConnector->getDomainParticipant(); } -#endif } // Namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.h index 4f2622543..9c58179cd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/dds_handler.h @@ -8,11 +8,9 @@ #pragma once #include "logger.h" -#if BUILD_RTI #include -#endif #include -#include +#include #include #include @@ -75,11 +73,7 @@ public: */ bool enableDtcClients(); -#if BUILD_RTI dds::domain::DomainParticipant domainParticipant() const; -#else - void* domainParticipant() const { return nullptr; } -#endif std::shared_ptr pacemaker() const { return m_pacemaker; } std::shared_ptr topicLockMaster() const { return m_topicLockMaster; } @@ -93,7 +87,6 @@ public: std::shared_ptr ddsConnector() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; @@ -102,6 +95,8 @@ private: std::shared_ptr m_ismDtc; std::shared_ptr m_asmDtc; std::shared_ptr m_fts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.cpp index b54c68695..f3aad0a6a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.cpp @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include #include @@ -70,13 +70,15 @@ bool isStreamOfInterest(const AudioVideoManagement::Stream &stream, bool isAudio namespace AudioVideoManagement { -DefaultAvMenus::DefaultAvMenus(const ExerciseContext &context, Interface::Dts *dts, HandlerVideoTeam *handlerVideoTeams, InfrastructureManagement::Interface::Dtc *ismDtc) : m_context(context) +DefaultAvMenus::DefaultAvMenus(const ExerciseContext &context, Interface::Dts *dts, HandlerVideoTeam *handlerVideoTeams, InfrastructureManagement::Interface::Dtc *ismDtc) + : m_context(context) , m_dts(dts) , m_videoTeamHandler(handlerVideoTeams) , m_ismDtc(ismDtc) , m_timer(new QTimer) - , m_isInitialized(false), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_logger(getLogger("DefaultAvMenus")) + , m_isInitialized(false) +{ Q_ASSERT(dts); Q_ASSERT(ismDtc); if(!m_ismDtc->isMainStructureElementEnabled()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.h index dab6db7e8..40af7d9f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/default_av_menus.h @@ -13,7 +13,7 @@ #include "handler_video_team.h" #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise.h index 9c4ccc8ba..e7b794722 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise.h @@ -10,10 +10,10 @@ #pragma once #include "exercise_context.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "asset.h" #include "mounting_point.h" -#include +#include #include #include #include @@ -69,8 +69,6 @@ signals: void assetUnassigned(Asset *asset); private: - -NGL::INGLLogger &m_logger; ExerciseContext m_context; std::map> m_assets; std::map> m_mountingPoints; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.cpp index 6f1e5e3c2..b19ade1af 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.cpp @@ -8,7 +8,7 @@ */ #include "exercise_context.h" -#include +#include namespace { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.h index 40f5477aa..e6f754172 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_context.h @@ -9,7 +9,7 @@ #pragma once -#include "svcavmcommon_export.h" +#include "avm_export.h" #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.cpp index ded967160..d36000e2f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.cpp @@ -35,15 +35,17 @@ bool isActive(ExerciseManagement::ExerciseState state) namespace AudioVideoManagement { -ExerciseHandler::ExerciseHandler(MainHandler *mainHandler, int exerciseId) : QObject() +ExerciseHandler::ExerciseHandler(MainHandler *mainHandler, int exerciseId) + : QObject() , m_exContext(exerciseId) , m_curExerciseState(ExerciseManagement::ExerciseState::Unknown) , m_curAVOperatingMode(AVControl::OperatingMode::Unknown) , m_mainHandler(mainHandler) , m_updateTimer(new QTimer(this)) , m_lastSeenTimer(new QTimer(this)) - , m_bWarnedOnce(false), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_bWarnedOnce(false) + , m_logger(getLogger("ExerciseHandler")) +{ m_updateTimer->setSingleShot(true); connect(m_updateTimer, &QTimer::timeout, this, &ExerciseHandler::onUpdateTimerTimeout); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.h index b2dd13fb1..5c91c3834 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercise_handler.h @@ -8,9 +8,9 @@ #pragma once -#include +#include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.cpp index 55fd45373..e9231f662 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.cpp @@ -7,7 +7,6 @@ */ #include "exercises_handler.h" -#include #include "dds_handler.h" #include "dds_handler_exercise.h" #include "main_handler.h" @@ -52,10 +51,12 @@ private: }; -ExercisesHandler::ExercisesHandler(MainHandler *mainHandler) : m_mainHandler(mainHandler) +ExercisesHandler::ExercisesHandler(MainHandler *mainHandler) + : m_mainHandler(mainHandler) , m_triggerAvUpdateTimer(new QTimer(this)) - , m_assetAssignmentManager(AssetAssignmentManager::create(mainHandler->ddsHandler()->ismDtc())), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_assetAssignmentManager(AssetAssignmentManager::create(mainHandler->ddsHandler()->ismDtc())) + , m_logger(getLogger("ExercisesHandler")) +{ m_triggerAvUpdateTimer->setSingleShot(true); m_triggerAvUpdateTimer->setInterval(1000); connect(m_triggerAvUpdateTimer, &QTimer::timeout, @@ -79,7 +80,7 @@ bool ExercisesHandler::init() return false; DBTransaction trans(db()->database()); - for (const Database::AvmDeviceConfig &dc : std::as_const(avmDeviceConfig)) + for (const Database::AvmDeviceConfig &dc : qAsConst(avmDeviceConfig)) { // nur hinzufuegen, wenn es record/replay session ist // alle anderen -> aus DB loeschen @@ -97,7 +98,7 @@ bool ExercisesHandler::init() connect(exmDtc(), &ExerciseManagement::Interface::Dtc::exerciseChanged, this, &ExercisesHandler::onExerciseChanged); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " done"; + DEBUG_LOG(m_logger) << LOGFUNCTION << " done"; return true; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.h index 48f775153..734412d43 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/exercises_handler.h @@ -78,7 +78,6 @@ public slots: void onAvDbReloadNeeded(); private: - NGL::INGLLogger &m_logger; void createExerciseHandlerFromLastSeen(const Database::AvmExerciseLastSeen &lastSeen); ExerciseHandler *getOrCreateExerciseHandler(int exerciseId); ExerciseHandler *createExerciseHandler(int exerciseId); @@ -93,12 +92,13 @@ private slots: void exerciseFinished(int exerciseId); private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; QTimer *m_triggerAvUpdateTimer; std::unique_ptr m_assetAssignmentManager; class ExerciseParts; std::map m_exercises; + + NGL::INGLLogger &m_logger; }; } // namespace WarehouseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.cpp index 3745f2d55..7b0a78081 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.cpp @@ -7,7 +7,6 @@ */ #include "frequency_planning_handler.h" -#include #include #include "frequency_set_handler.h" @@ -18,7 +17,7 @@ #include #include #include -#include +#include namespace AudioVideoManagement { @@ -118,6 +117,7 @@ FrequencyPlanningHandler::FrequencyPlanningHandler(Interface::Dts *dts, Interfac , m_db(db) , m_frequencySetHandler(frequencySetHandler) , m_activeExercises(activeExercises) + , m_logger(getLogger("FrequencyPlanningHandler")) { Q_ASSERT(dts); Q_ASSERT(fts); @@ -160,7 +160,7 @@ bool FrequencyPlanningHandler::init() return false; } - for (const Database::AvmFrequencyPlanning &planContainerDb : std::as_const(frequencyPlannings)) + for (const Database::AvmFrequencyPlanning &planContainerDb : qAsConst(frequencyPlannings)) collectAndPublish(planContainerDb); auto cbAfp = [this] (const Database::AvmActiveFrequencyPlanning ¤tDbData) @@ -360,7 +360,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::validateRequest(const Modify for (const FrequencyPlanningData &entry : request.data()) { QSet frequencySetEntries = AudioVideoManagement::frequencySetDataIds(entry.properties()); - for(const int &setEntry : std::as_const(frequencySetEntries)) + for(const int &setEntry : qAsConst(frequencySetEntries)) { if (setEntry != 0 && !m_frequencySetHandler->isValid(request.frequencySetId(), setEntry)) return reply.setStr(tr_lts("dds", "FrequencySetData %1 does not belong to FrequencySet %2")).arg(setEntry).arg(request.frequencySetId()); @@ -556,7 +556,7 @@ Core::FunctionReplyObject FrequencyPlanningHandler::testActivation(const std::ve for (const FrequencyPlanningData &fpdEntry : entries) { QSet frequencySetEntries = AudioVideoManagement::frequencySetDataIds(fpdEntry.properties()); - for(const int &setEntry : std::as_const(frequencySetEntries)) + for(const int &setEntry : qAsConst(frequencySetEntries)) { if(takenSetEntries.contains(setEntry)) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.h index b01d87c6c..ec81c5c20 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_planning_handler.h @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.cpp index 8caedc6df..1f3e413df 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.cpp @@ -8,7 +8,6 @@ */ #include "frequency_set_handler.h" -#include #include "dds_handler.h" #include "main_handler.h" #include @@ -16,16 +15,18 @@ namespace AudioVideoManagement { -FrequencySetHandler::FrequencySetHandler(Interface::Dts *dts, DatabaseInterface *db) : m_dts(dts) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +FrequencySetHandler::FrequencySetHandler(Interface::Dts *dts, DatabaseInterface *db) + : m_dts(dts) + , m_db(db) + , m_logger(getLogger("FrequencySetHandler")) +{ Q_ASSERT(dts); Q_ASSERT(db); } bool FrequencySetHandler::init() { - DEBUG_LOG(m_logger) << Q_FUNC_INFO; + DEBUG_LOG(m_logger) << LOGFUNCTION; QVector frequencySets; // Don't use select() with callback here as the callback (body of for-loop below) would use the DB, too. @@ -36,7 +37,7 @@ bool FrequencySetHandler::init() } DEBUG_LOG(m_logger) << "Found " << frequencySets.size() << " Frequency Sets"; - for (const Database::AvmFrequencySet ¤tfrequencySet : std::as_const(frequencySets)) + for (const Database::AvmFrequencySet ¤tfrequencySet : qAsConst(frequencySets)) addFrequencySet(toDdsFrequencySet(currentfrequencySet)); return true; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.h index 48f6dc843..68e5bd1c7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/frequency_set_handler.h @@ -11,8 +11,8 @@ #include #include #include -#include -#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.cpp index ddda69dd7..83c33cbff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.cpp @@ -7,7 +7,6 @@ */ #include "handler_frequency_planning_status.h" -#include #include "object_frequency_planning_status.h" #include "avm_db.h" @@ -54,6 +53,7 @@ HandlerFrequencyPlanningStatus::HandlerFrequencyPlanningStatus(Interface::Dts *d , m_dts(dts) , m_fts(fts) , m_db(db) + , m_logger(getLogger("HandlerFrequencyPlanningStatus")) { Q_ASSERT(dts); Q_ASSERT(fts); @@ -81,7 +81,7 @@ bool HandlerFrequencyPlanningStatus::init() } // create objects - for (const Database::AvmFrequencyPlanningStatus &data : std::as_const(dataVec)) + for (const Database::AvmFrequencyPlanningStatus &data : qAsConst(dataVec)) { FrequencyPlanningStatus ddsData = ObjectFrequencyPlanningStatus::toDdsData(data); ObjectFrequencyPlanningStatus *ifs(new ObjectFrequencyPlanningStatus(m_dts, m_db)); @@ -112,7 +112,7 @@ void HandlerFrequencyPlanningStatus::onClearFrequencyPlanningStatusRequest(const { Q_UNUSED(request); Core::FunctionReplyObject ret; - for (ObjectFrequencyPlanningStatus *ifs : std::as_const(m_data)) + for (ObjectFrequencyPlanningStatus *ifs : qAsConst(m_data)) { ret = ifs->clearValues(); if (ret.error()) @@ -125,7 +125,7 @@ void HandlerFrequencyPlanningStatus::onRemoveFrequencyPlanningStatusByClientRequ { Core::FunctionReplyObject ret; QVector clients; - for (ObjectFrequencyPlanningStatus *ifs : std::as_const(m_data)) + for (ObjectFrequencyPlanningStatus *ifs : qAsConst(m_data)) { if (request.client() == 0 || ifs->getData().client() == request.client()) { @@ -137,7 +137,7 @@ void HandlerFrequencyPlanningStatus::onRemoveFrequencyPlanningStatusByClientRequ clients << client; } } - for (int client : std::as_const(clients)) + for (int client : qAsConst(clients)) { // delete ObjectVideoReceiver delete m_data[client]; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.h index 80a363e69..04e86d13b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_frequency_planning_status.h @@ -12,8 +12,8 @@ #include "main_handler.h" #include #include -#include -#include +#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.cpp index 170d7dd7c..074200592 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.cpp @@ -11,7 +11,7 @@ #include "object_menu_struct.h" #include "audio_video_handler_impl.h" #include -#include +#include #include namespace @@ -106,6 +106,7 @@ HandlerMenuStruct::HandlerMenuStruct(Interface::Dts *dts, Interface::Fts *fts, D , m_dts(dts) , m_fts(fts) , m_db(db) + , m_logger(getLogger("HandlerMenuStruct")) { Q_ASSERT(dts); Q_ASSERT(fts); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.h index b4e2c34d7..66f08f3f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_menu_struct.h @@ -9,9 +9,9 @@ #include "logger.h" #include #include -#include -#include -#include +#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.cpp index a6021f08e..cd8e87e28 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.cpp @@ -7,12 +7,11 @@ */ #include "handler_video_receiver.h" -#include #include "object_video_receiver.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -34,6 +33,7 @@ HandlerVideoReceiver::HandlerVideoReceiver(MainHandler *mainHandler, , m_dts(dts) , m_fts(fts) , m_db(db) + , m_logger(getLogger("HandlerVideoReceiver")) { m_fts->setVideoReceiverModifyActiveRequestHandler(this); m_fts->setVideoReceiverModifyAvsRequestHandler(this); @@ -68,7 +68,7 @@ bool HandlerVideoReceiver::init() } // create objects - for (const Database::AvmVideoReceiver &data : std::as_const(dataVec)) + for (const Database::AvmVideoReceiver &data : qAsConst(dataVec)) { AudioVideoManagement::VideoReceiver ddsData = ObjectVideoReceiver::toDdsData(data); ObjectVideoReceiver *ifs(new ObjectVideoReceiver(m_dts, m_db)); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.h index c43c6a64b..d8ee426f6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_receiver.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "logger.h" @@ -16,8 +16,8 @@ #include // HTTP Request -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.cpp index 0da276176..117601f15 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.cpp @@ -7,7 +7,6 @@ */ #include "handler_video_team.h" -#include #include "object_video_team.h" #include "default_av_menus.h" @@ -101,6 +100,7 @@ private: QMap m_cache; //!< HandlerVideoTeam *m_handler; DatabaseInterface *m_db; + LOGGER_T m_logger; }; @@ -111,6 +111,7 @@ HandlerVideoTeam::HandlerVideoTeam(Interface::Dts *dts, Interface::Fts *fts, Dat , m_fts(fts) , m_db(db) , m_activeExercises(activeExercises) + , m_logger(getLogger("HandlerVideoTeam")) , m_deviceConfig(new DeviceConfig(this, db, m_logger)) { Q_ASSERT(dts); @@ -142,7 +143,7 @@ bool HandlerVideoTeam::init() } // create objects - for (const Database::AvmVideoTeam &data : std::as_const(dataVec)) + for (const Database::AvmVideoTeam &data : qAsConst(dataVec)) { VideoTeam ddsData = ObjectVideoTeam::toDdsData(data); ObjectVideoTeam *ifs(new ObjectVideoTeam(m_dts, m_db)); @@ -167,7 +168,7 @@ bool HandlerVideoTeam::init() QMap HandlerVideoTeam::videoTeams() const { QMap ret; - for (const auto &videoTeam : std::as_const(m_videoTeamObjMap)) + for (const auto &videoTeam : qAsConst(m_videoTeamObjMap)) ret.insert(videoTeam->getId(), videoTeam->getData()); return ret; } @@ -192,7 +193,7 @@ bool HandlerVideoTeam::needDeviceConfig(const VideoTeam &videoTeam) const void HandlerVideoTeam::onContextActivated(const ExerciseContext &context) { - for (const auto *ifs : std::as_const(m_videoTeamObjMap)) + for (const auto *ifs : qAsConst(m_videoTeamObjMap)) { VideoTeam ddsData = ifs->getData(); if (ddsData.exerciseId() == context.id()) @@ -202,7 +203,7 @@ void HandlerVideoTeam::onContextActivated(const ExerciseContext &context) void HandlerVideoTeam::onContextDeactivated(const ExerciseContext &context) { - for (ObjectVideoTeam *ifs : std::as_const(m_videoTeamObjMap)) + for (ObjectVideoTeam *ifs : qAsConst(m_videoTeamObjMap)) { if (ifs->exerciseId() == context.id()) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.h index d0d02b148..698b71c31 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/handler_video_team.h @@ -12,8 +12,8 @@ #include "main_handler.h" #include #include -#include -#include +#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/iava_comm.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/iava_comm.h index a168d6518..b5179c290 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/iava_comm.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/iava_comm.h @@ -10,12 +10,12 @@ #pragma once #include "ava_types.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/icommand.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/icommand.h index 54abc00e2..4cd491353 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/icommand.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/icommand.h @@ -9,8 +9,8 @@ #pragma once -#include "svcavmcommon_export.h" -#include +#include +#include namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/import_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/import_handler.h index 96c5b176b..4074b3a7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/import_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/import_handler.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ivd_comm.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ivd_comm.h index c9e0fa253..e85f646a1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ivd_comm.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/ivd_comm.h @@ -10,9 +10,9 @@ #pragma once #include "ava_types.h" -#include "svcavmcommon_export.h" -#include -#include +#include "avm_export.h" +#include +#include #include class QString; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.cpp index 88e93cbba..4eeab312b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.cpp @@ -9,8 +9,8 @@ #include "list_response_collector.h" #include "av_helper.h" -#include -#include +#include +#include #include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.h index 3461daa1a..915529cae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/list_response_collector.h @@ -11,10 +11,10 @@ #include "iava_comm.h" #include "ava_types.h" -#include "svcavmcommon_export.h" -#include -#include -#include +#include "avm_export.h" +#include +#include +#include #include class QString; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/logger.h index 27059ccb1..2f7d6e646 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcavmcommon_export.h" +#include "avm_export.h" namespace AudioVideoManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.cpp index c181a7189..ff4d9decb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.cpp @@ -36,8 +36,10 @@ using namespace AudioVideoManagement; -MainHandler::MainHandler(QObject *parent) : QObject(parent), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +MainHandler::MainHandler(QObject *parent) + : QObject(parent) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() = default; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.h index d782b35d8..cacdeb224 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "logger.h" #include "avm_db.h" #include @@ -61,7 +61,6 @@ public: CnrHandler *cnrHandler() { return m_cnrHandler.get(); } private: - NGL::INGLLogger &m_logger; std::unique_ptr m_ddsHandler; std::unique_ptr m_dbHandler; std::shared_ptr m_dbInterface; //!< just to make sure we own a reference to it; we can then simply forward a plain pointer to our clients @@ -79,6 +78,8 @@ private: std::unique_ptr m_videoReceiverHandler; std::unique_ptr m_videoTeamHandler; std::unique_ptr m_frequencyPlanningStatusHandler; + + NGL::INGLLogger &m_logger; }; } // namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/mounting_point.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/mounting_point.h index 65cf8e9f1..3200713c1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/mounting_point.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/mounting_point.h @@ -9,8 +9,8 @@ #pragma once -#include "svcavmcommon_export.h" -#include +#include "avm_export.h" +#include #include namespace InfrastructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_frequency_planning_status.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_frequency_planning_status.cpp index f535d8685..aea6df61f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_frequency_planning_status.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_frequency_planning_status.cpp @@ -13,9 +13,11 @@ namespace AudioVideoManagement { //------------------------------------------------------------------------------------------------------------- ObjectFrequencyPlanningStatus::ObjectFrequencyPlanningStatus(Interface::Dts *dts, - DatabaseInterface *db) : m_dts(dts) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + DatabaseInterface *db) + : m_dts(dts) + , m_db(db) + , m_logger(getLogger("ObjectVideoTeam")) +{ } //------------------------------------------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.cpp index 957aea94b..71b151119 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.cpp @@ -13,7 +13,7 @@ #include "logger.h" #include #include -#include +#include #include #include #include @@ -75,9 +75,11 @@ void checkHierarchy(const std::vector &entrie namespace AudioVideoManagement { -ObjectMenuStruct::ObjectMenuStruct(Interface::Dts *dts, DatabaseInterface *db) : m_dts(dts) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ObjectMenuStruct::ObjectMenuStruct(Interface::Dts *dts, DatabaseInterface *db) + : m_dts(dts) + , m_db(db) + , m_logger(getLogger("ObjectMenuStruct")) +{ Q_ASSERT(dts); Q_ASSERT(db); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.h index ff6cc33bb..0b77d9cfb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_menu_struct.h @@ -50,7 +50,6 @@ public: long getId() const { return m_data.id(); } private: - NGL::INGLLogger &m_logger; void onPublishData(); Core::FunctionReplyObject insertUpdateDb(const MenuStruct &data); @@ -60,10 +59,11 @@ private: std::vector &contToAdd); private: - NGL::INGLLogger &m_logger; Interface::Dts *m_dts; DatabaseInterface *m_db; MenuStruct m_data; + + NGL::INGLLogger &m_logger; }; } // namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_receiver.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_receiver.cpp index 13f11e52a..81716640f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_receiver.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_receiver.cpp @@ -14,9 +14,11 @@ namespace AudioVideoManagement { //------------------------------------------------------------------------------------------------------------- ObjectVideoReceiver::ObjectVideoReceiver(Interface::Dts *dts, - DatabaseInterface *db) : m_dts(dts) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + DatabaseInterface *db) + : m_dts(dts) + , m_db(db) + , m_logger(getLogger("ObjectVideoReceiver")) +{ } //------------------------------------------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_team.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_team.cpp index b06ef6050..1967355e9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_team.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/object_video_team.cpp @@ -13,9 +13,11 @@ namespace AudioVideoManagement { //------------------------------------------------------------------------------------------------------------- ObjectVideoTeam::ObjectVideoTeam(Interface::Dts *dts, - DatabaseInterface *db) : m_dts(dts) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + DatabaseInterface *db) + : m_dts(dts) + , m_db(db) + , m_logger(getLogger("ObjectVideoTeam")) +{ } //------------------------------------------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.cpp index f5957e604..8d49c8ceb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.cpp @@ -8,13 +8,13 @@ */ #include "rt_state.h" -#include +#include #include #include #include #include -#include +#include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.h index 147ad3485..d84e6d83d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/rt_state.h @@ -9,7 +9,7 @@ #pragma once -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "ava_types.h" #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/settings.h index 47b79e5b2..f09e37fd6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.cpp index 6ae61ef2e..9ad355e1d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.cpp @@ -11,10 +11,9 @@ #include "audio_video_handler_impl.h" #include #include -#include +#include #include -#include -#include +#include namespace { @@ -78,10 +77,9 @@ QString StreamNameMapping::internalName(const QString &displayName) QString StreamNameMapping::displayName(const QString &internalName) const { - const QRegularExpressionMatch match = m_extractor.match(internalName); - const bool matched = match.hasMatch(); - const QString effectiveStreamName = matched ? match.captured(1) : internalName; - const QString sourceSpecifier = matched ? match.captured(2) : QString(); + bool matched = m_extractor.exactMatch(internalName); + const QString effectiveStreamName = matched ? m_extractor.cap(1) : internalName; + const QString sourceSpecifier = matched ? m_extractor.cap(2) : QString(); const auto &found = m_internalToDisplay.find(effectiveStreamName); if (found == m_internalToDisplay.end()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.h index b8062f8bc..8ca9e37ab 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping.h @@ -9,10 +9,10 @@ #pragma once -#include "svcavmcommon_export.h" -#include -#include -#include +#include "avm_export.h" +#include +#include +#include #include #include #include @@ -85,7 +85,7 @@ private: void remove(int32_t mountingPointId); /** Used to extract the effective streamName if it contains a source specifier "(S)" or "(L)". */ - const QRegularExpression m_extractor{QStringLiteral("(.*)(\\([SL]\\))")}; + const QRegExp m_extractor{QStringLiteral("(.*)(\\([SL]\\))"), Qt::CaseInsensitive}; std::map m_mpToNames; //!< MountingPoint-Id -> internal AVS name std::map m_internalToDisplay; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.cpp index 812d3e1c6..fefc8d2e1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.cpp @@ -12,7 +12,7 @@ #include #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.h index bb429ed34..bd829c775 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_publisher.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include class QString; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.cpp index c9a6c0f53..bd71bd0eb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.cpp @@ -11,7 +11,7 @@ #include "stream_name_mapping.h" #include "ava_session.h" #include "ava_control.h" -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.h index 3caa4af45..0e4666d1e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/stream_name_mapping_to_ava.h @@ -9,8 +9,8 @@ #pragma once -#include "svcavmcommon_export.h" -#include +#include "avm_export.h" +#include #include class QString; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.cpp index ce1c33906..88cebbb08 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.cpp @@ -8,14 +8,13 @@ */ #include "tvc_handler.h" -#include #include "dds_handler.h" #include "exercise_context.h" #include "active_exercises.h" #include "av_helper.h" #include #include -#include +#include namespace AudioVideoManagement { @@ -156,6 +155,7 @@ private: TvcHandler *m_handler; DatabaseInterface *m_db; QMap m_cache; // + LOGGER_T m_logger; }; @@ -166,6 +166,7 @@ TvcHandler::TvcHandler(Interface::Dts *dts, Interface::Fts *fts, DatabaseInterfa , m_fts(fts) , m_db(db) , m_activeExercises(activeExercises) + , m_logger(getLogger("TrainingVoiceCommunicationHandler")) , m_deviceConfig(new DeviceConfig(this, m_db, m_logger)) { Q_ASSERT(dts); @@ -200,7 +201,7 @@ bool TvcHandler::init() return false; } - for (const AvmTvcChannel ¤tChannel : std::as_const(m_channels)) + for (const AvmTvcChannel ¤tChannel : qAsConst(m_channels)) m_dts->publish(toDds(currentChannel)); QVector tvcConfigs; @@ -211,7 +212,7 @@ bool TvcHandler::init() return false; } - for (const AvmTvcConfig ¤tConfig : std::as_const(tvcConfigs)) + for (const AvmTvcConfig ¤tConfig : qAsConst(tvcConfigs)) createTvcConfig(toRequest(currentConfig, 0), currentConfig.id); return true; @@ -411,7 +412,7 @@ Database::AvmDeviceConfig TvcHandler::toDeviceConfig(const TvcConfig &tvcConfig) Database::AvmTvcChannel TvcHandler::channelById(int32_t id) const { - for (const Database::AvmTvcChannel &channel : std::as_const(m_channels)) + for (const Database::AvmTvcChannel &channel : qAsConst(m_channels)) if (channel.id == id) return channel; @@ -423,7 +424,7 @@ void TvcHandler::onContextActivated(const ExerciseContext &context) { bool isFirstActiveExercise = m_activeExercises->count() == 1; - for (const TvcConfig &tvcConfig : std::as_const(m_cache)) + for (const TvcConfig &tvcConfig : qAsConst(m_cache)) { bool isLocal = tvcConfig.exerciseId().is_set(); if (isLocal) @@ -445,7 +446,7 @@ void TvcHandler::onContextDeactivated(const ExerciseContext &context) { bool haveActiveExercise = m_activeExercises->count() > 0; - for (const TvcConfig &tvcConfig : std::as_const(m_cache)) + for (const TvcConfig &tvcConfig : qAsConst(m_cache)) { bool isLocal = tvcConfig.exerciseId().is_set(); @@ -525,7 +526,7 @@ Core::FunctionReplyObject TvcHandler::validateRequest(const ModifyTvcConfigReque */ bool TvcHandler::checkConstraint(const std::function &constraint, const boost::optional &exerciseId, const boost::optional &excludeId) const { - for (const TvcConfig &config : std::as_const(m_cache)) + for (const TvcConfig &config : qAsConst(m_cache)) { if (excludeId == config.id()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.h index be2ec8b9a..74ff0f9ba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/tvc_handler.h @@ -12,8 +12,8 @@ #include #include "logger.h" #include -#include -#include +#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.cpp index 18dbde5ec..fb454d6b3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.cpp @@ -10,11 +10,11 @@ #include "vd_comm.h" #include "av_helper.h" #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include namespace AudioVideoManagement @@ -22,6 +22,7 @@ namespace AudioVideoManagement VdComm::VdComm(const QString &vdHost, quint16 vdPort) : m_avSocket(vdHost, vdPort, getLogger("VdComm"), getLogger("VdComm.IO")) + , m_logger(getLogger("VdComm")) , m_loggerIO(getLogger("VdComm.IO")) { connect(&m_avSocket, &AVSocketWrapper::readyRead, this, &VdComm::onReadyRead); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.h index 082833b72..23050f075 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_comm.h @@ -11,10 +11,10 @@ #include "ivd_comm.h" #include "ava_types.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "logger.h" #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.cpp index 2db4f70d6..3d9177e6a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.cpp @@ -13,8 +13,8 @@ #include "AvsCommands/simple_command.h" #include "AvsCommands/vd_set_script.h" #include "AvsCommands/keep_alive.h" -#include -#include +#include +#include #include #include #include @@ -25,6 +25,7 @@ namespace AudioVideoManagement VdControl::VdControl(IVdComm *comm, std::chrono::milliseconds commandTimeout) : m_comm(comm) , m_queue(commandTimeout) + , m_logger(getLogger("VdControl")) { Q_ASSERT(comm); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.h index 07d7986cf..8566d74ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_control.h @@ -10,15 +10,15 @@ #pragma once #include "ivd_command_done_observer.h" -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "ava_types.h" #include "avs_command_queue.h" #include "logger.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include class QStringList; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.cpp index d0fab325b..24ee3c0dd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.cpp @@ -18,6 +18,7 @@ VdSession::VdSession(VdControl *ctrl, int exerciseId, bool keepAliveEnabled) : m_ctrl(ctrl) , m_exerciseId(exerciseId) , m_keepAliveEnabled(keepAliveEnabled) + , m_logger(getLogger("AvaSession")) { Q_ASSERT(ctrl); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.h b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.h index da3593ee2..347d596c2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/AudioVideoManagement/vd_session.h @@ -9,11 +9,11 @@ #pragma once -#include "svcavmcommon_export.h" +#include "avm_export.h" #include "logger.h" -#include -#include -#include +#include +#include +#include namespace AudioVideoManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/CMakeLists.txt index 23f90b1ee..414e16791 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CMakeLists.txt @@ -6,9 +6,7 @@ ADD_SUBDIRECTORY(AlarmManagement) ADD_SUBDIRECTORY(AreaEffectSimulation) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(AudioVideoManagement) -ENDIF() +ADD_SUBDIRECTORY(AudioVideoManagement) ADD_SUBDIRECTORY(AssetManagement) ADD_SUBDIRECTORY(CentralEffectSimulation) ADD_SUBDIRECTORY(CodificationManagement) @@ -18,33 +16,23 @@ ADD_SUBDIRECTORY(Evaluations) ADD_SUBDIRECTORY(ExerciseManagement) ADD_SUBDIRECTORY(ExerciseEventManagement) ADD_SUBDIRECTORY(FileManagement) -IF(BUILD_FILTERMANAGEMENT) - ADD_SUBDIRECTORY(FilterManagement) -ENDIF() +ADD_SUBDIRECTORY(FilterManagement) ADD_SUBDIRECTORY(GuezIedManagement) ADD_SUBDIRECTORY(GuezMinelayerProcessing) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(InfrastructureManagement) -ENDIF() +ADD_SUBDIRECTORY(InfrastructureManagement) ADD_SUBDIRECTORY(MarkerManagement) ADD_SUBDIRECTORY(Messaging) ADD_SUBDIRECTORY(MeteoDataManagement) ADD_SUBDIRECTORY(NotificationManagement) #ADD_SUBDIRECTORY(NmeaManagement) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(OcBaseDownload) -ENDIF() +ADD_SUBDIRECTORY(OcBaseDownload) ADD_SUBDIRECTORY(OcSituationClient) ADD_SUBDIRECTORY(OcSituationServer) ADD_SUBDIRECTORY(OnlineReports) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(OperatorManagement) -ENDIF() +ADD_SUBDIRECTORY(OperatorManagement) ADD_SUBDIRECTORY(ParticipantManagement) ADD_SUBDIRECTORY(PlanEditor) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(PresentationManagement) -ENDIF() +ADD_SUBDIRECTORY(PresentationManagement) ADD_SUBDIRECTORY(ProjectDataManagement) ADD_SUBDIRECTORY(ProjectionWorkstation) ADD_SUBDIRECTORY(RecordingManagement) @@ -54,22 +42,14 @@ ADD_SUBDIRECTORY(ServiceManagement) ADD_SUBDIRECTORY(ScreenRecording) ADD_SUBDIRECTORY(ServiceMonitor) ADD_SUBDIRECTORY(SituationMap) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(SituationReplayManagement) -ENDIF() +ADD_SUBDIRECTORY(SituationReplayManagement) ADD_SUBDIRECTORY(SituationReplay) -IF(BUILD_RTI) - ADD_SUBDIRECTORY(SoundManagement) -ENDIF() -IF(BUILD_RTI) - ADD_SUBDIRECTORY(TargetManagement) -ENDIF() +ADD_SUBDIRECTORY(SoundManagement) +ADD_SUBDIRECTORY(TargetManagement) IF (NOT BUILD_RPM) ADD_SUBDIRECTORY(VideoOverlayManagement) ENDIF() IF(GUEZ_MODE) - IF(BUILD_RTI) - ADD_SUBDIRECTORY(WarehouseGuez) - ENDIF() + ADD_SUBDIRECTORY(WarehouseGuez) ENDIF() NGL_INSTALL(AAR SV FILES "alias" DESTINATION "." RENAME ".alias") diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/CMakeLists.txt index 9425207a8..033b9748a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/CMakeLists.txt @@ -4,12 +4,8 @@ # $Author$ # -FIND_PACKAGE(Schusstafel) -FIND_PACKAGE(ArcGIS) -IF (NOT Schusstafel_FOUND OR NOT ArcGIS_FOUND) - MESSAGE(WARNING "Schusstafel or ArcGIS not found; skipping CentralEffectSimulation") - RETURN() -ENDIF() +FIND_PACKAGE(Schusstafel REQUIRED) +FIND_PACKAGE(ArcGIS REQUIRED) INCLUDE(MacroRTIDDSGen) INCLUDE(MacroCodeGenIdl) @@ -41,13 +37,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate ces_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcCesCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcCesCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcCesCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCesCommon PRIVATE RTI::nddscpp2 @@ -59,7 +54,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCesCommon svcAesCommon #for FuseType in DetonationLocationRequest svcPdmCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCesCommon) @@ -88,7 +82,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcCesDDSCommon ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCesDDSCommon PRIVATE ddsconnector @@ -121,7 +114,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCesDDSCommon ArcGISQt5Hack ArcGIS::ArcGIS ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCesDDSCommon) @@ -161,14 +153,13 @@ SET(SRCS_client # generate ces_[d|f]tc.h, tlm_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcCesClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcCesClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcCesClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCesClient PRIVATE RTI::nddscpp2 @@ -178,7 +169,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCesClient ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCesClient) # @@ -191,14 +181,13 @@ SET(SRCS_server # generate ces_[d|f]ts.h, ces_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV HLA svcCesServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV HLA svcCesServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcCesServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCesServer PRIVATE RTI::nddscpp2 @@ -208,7 +197,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCesServer svcCesCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCesServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.cpp index d87133e5a..582f26146 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.cpp @@ -9,10 +9,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS (example) @@ -59,6 +59,7 @@ CesTests::CesTests(QObject *parent) , TrainingAreaBase::Interface::Fts::SendCesHitRequestHandler(nullptr) , m_bTestsSuccessful(true) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("CesTests")) , m_testId(0) , m_buildingId(0) , m_roomId(0) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.h index 7f0aa33f9..b83f2c9ef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests.h @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include namespace CentralEffectSimulation { @@ -77,7 +77,6 @@ protected Q_SLOTS: void testTimeout() { failExit("Test timeout"); } void ExitSuccess(); private: - NGL::INGLLogger &m_logger; void onSendCesHitOnBuildingRequest(const rti::core::SampleIdentity &cookie, const Buildings::SendCesHitOnBuildingRequest &request) override; void onSendCesHitRequest(const rti::core::SampleIdentity &cookie, @@ -95,7 +94,6 @@ private: // structs }; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsConnector42; @@ -112,6 +110,7 @@ private: LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; int m_buildingId; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.cpp index f8edfac02..fb6e06fc9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.cpp @@ -11,8 +11,8 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include /* ---------------------------------------------------------------------------------- @@ -33,13 +33,15 @@ namespace CentralEffectSimulation { -CesTestsBlockedAreas::CesTestsBlockedAreas(QObject *parent) : QObject(parent) +CesTestsBlockedAreas::CesTestsBlockedAreas(QObject *parent) + : QObject(parent) , m_bTestsSuccessful(true) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("CesTestsBlockedAreas")) , m_testId(0) , m_participantIndex(0) - , m_DynamicParticipantIndex(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_DynamicParticipantIndex(0) +{} CesTestsBlockedAreas::~CesTestsBlockedAreas() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.h index 653556a83..f66428792 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_blocked_areas.h @@ -65,7 +65,6 @@ private: // structs }; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsConnector42; @@ -79,6 +78,7 @@ private: LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_DynamicParticipantIndex; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.cpp index e6d007ef3..37f0d3582 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.cpp @@ -11,10 +11,10 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include -#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS (example) @@ -29,10 +29,12 @@ namespace CentralEffectSimulation { -CesTestsBoobyTrap::CesTestsBoobyTrap(QObject *parent) : QObject(parent) +CesTestsBoobyTrap::CesTestsBoobyTrap(QObject *parent) + : QObject(parent) , m_bTestsSuccessful(true) //, m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) , m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD9387781202"))) + , m_logger(getLogger("CesTest")) , m_testId(0) , m_participantIndex(0) , m_id(20) @@ -40,8 +42,8 @@ CesTestsBoobyTrap::CesTestsBoobyTrap(QObject *parent) : QObject(parent) , m_DynamicParticipantIndex(0) , m_aesItemId(5) , m_chargeTypeId(252) // Verdeckte Ladung - , m_countEventBoobyTrap(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_countEventBoobyTrap(0) +{} CesTestsBoobyTrap::~CesTestsBoobyTrap() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.h index 2d379d0df..5aca05899 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_booby_trap.h @@ -17,7 +17,7 @@ #include #include -#include +#include namespace CentralEffectSimulation { @@ -54,7 +54,6 @@ protected Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: // methods void checkParticipantEvent(); @@ -88,6 +87,7 @@ private: bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_refPos; + NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_id; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.cpp index eee03f275..d4cf1b5d2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.cpp @@ -11,10 +11,10 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include -#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS (example) @@ -29,9 +29,11 @@ namespace CentralEffectSimulation { -CesTestsGasPipe::CesTestsGasPipe(QObject *parent) : QObject(parent) +CesTestsGasPipe::CesTestsGasPipe(QObject *parent) + : QObject(parent) , m_bTestsSuccessful(true) , m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("CesTestGasPipe")) , m_testId(0) , m_participantIndex(0) , m_id(20) @@ -39,8 +41,8 @@ CesTestsGasPipe::CesTestsGasPipe(QObject *parent) : QObject(parent) , m_DynamicParticipantIndex(0) , m_aesItemId(5) , m_chargeTypeId(374) // SMART - , m_countEventGasPipe(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_countEventGasPipe(0) +{} CesTestsGasPipe::~CesTestsGasPipe() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.h index 52fd11536..8ab9c8a2d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_gas_pipe.h @@ -17,7 +17,7 @@ #include #include -#include +#include namespace CentralEffectSimulation { @@ -57,7 +57,6 @@ protected Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: // methods void checkParticipantEvent(); @@ -91,6 +90,7 @@ private: bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_refPos; + NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_id; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.cpp index 1cb80e024..6c3c35830 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.cpp @@ -11,8 +11,8 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include /* ---------------------------------------------------------------------------------- @@ -32,11 +32,13 @@ namespace CentralEffectSimulation { -CesTestsGeopairing::CesTestsGeopairing(QObject *parent) : QObject(parent) +CesTestsGeopairing::CesTestsGeopairing(QObject *parent) + : QObject(parent) , m_bTestsSuccessful(true) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) - , m_testId(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_logger(getLogger("CesTestsGeopairing")) + , m_testId(0) +{} CesTestsGeopairing::~CesTestsGeopairing() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.h index b282d3966..5c9794ba5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing.h @@ -52,8 +52,6 @@ protected Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; void checkParicipantEvent(); private: @@ -70,6 +68,7 @@ private: bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.cpp index d0dd6eb02..92bdcd859 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.cpp @@ -11,8 +11,8 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include /* ---------------------------------------------------------------------------------- @@ -32,11 +32,13 @@ namespace CentralEffectSimulation { -CesTestsGeopairing::CesTestsGeopairing(QObject *parent) : QObject(parent) +CesTestsGeopairing::CesTestsGeopairing(QObject *parent) + : QObject(parent) , m_bTestsSuccessful(true) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) - , m_testId(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_logger(getLogger("CesTestsGeopairing")) + , m_testId(0) +{} CesTestsGeopairing::~CesTestsGeopairing() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.h index b1a46bb33..c350065c3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_geo_pairing_bsp.h @@ -52,8 +52,6 @@ protected Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; void checkParicipantEvent(); private: @@ -70,6 +68,7 @@ private: bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.cpp index 71742d379..16644cb0c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.cpp @@ -11,10 +11,10 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include -#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS (example) @@ -68,9 +68,11 @@ namespace CentralEffectSimulation { -CesTestsMineAreas::CesTestsMineAreas(QObject *parent) : QObject(parent) +CesTestsMineAreas::CesTestsMineAreas(QObject *parent) + : QObject(parent) , m_bTestsSuccessful(true) , m_refPos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("CesTestMineAreas")) , m_testId(0) , m_participantIndex(0) , m_id(20) @@ -78,8 +80,8 @@ CesTestsMineAreas::CesTestsMineAreas(QObject *parent) : QObject(parent) , m_DynamicParticipantIndex(0) , m_aesItemId(5) , m_chargeTypeId(374) // SMART - , m_countEventMineAreas(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_countEventMineAreas(0) +{} CesTestsMineAreas::~CesTestsMineAreas() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.h index eea95aa7b..ecb025cf8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_mine_areas.h @@ -17,7 +17,7 @@ #include #include -#include +#include namespace CentralEffectSimulation { @@ -57,7 +57,6 @@ protected Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: // methods void checkParticipantEvent(); @@ -91,6 +90,7 @@ private: bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_refPos; + NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_id; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.cpp index 325426a16..33cf71120 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.cpp @@ -11,8 +11,8 @@ #include "CentralEffectSimulation/ces_ftc.h" #include #include -#include -#include +#include +#include #include /* ---------------------------------------------------------------------------------- @@ -37,6 +37,7 @@ CesTestsOwnership::CesTestsOwnership(QObject *parent) : QObject(parent) , m_bTestsSuccessful(true) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("CesTestsOwnership")) , m_testId(0) , m_participantIndex(0) , m_DynamicParticipantIndex(0) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.h index 070d79f89..8027b9518 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_ownership.h @@ -49,7 +49,6 @@ protected Q_SLOTS: void ExitSuccess(); protected: - NGL::INGLLogger &m_logger; void onSetOwnershipReply(const Core::FunctionReplyObject &replyObject) override final; private: // methods @@ -82,6 +81,7 @@ private: LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_DynamicParticipantIndex; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.cpp index 6f017f236..d43735a63 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.cpp @@ -12,10 +12,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS (example) @@ -37,6 +37,7 @@ cesTestsSimulatedMovement::cesTestsSimulatedMovement(QObject *parent) , m_participantId(20) , m_repeat(false) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("cesTestsSimulatedMovement")) , m_testId(0) {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.h index 61fc4b88d..c2ccefa21 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_simulated_movement.h @@ -50,7 +50,6 @@ protected Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: // methods void checkParticipantEvent(); @@ -73,6 +72,7 @@ private: bool m_repeat; LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.cpp index 9d972a640..43e039fe5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.cpp @@ -12,10 +12,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include /* ---------------------------------------------------------------------------------- * HOW TO RUN THE TESTS (example) @@ -35,6 +35,7 @@ CesTestsSmart::CesTestsSmart(QObject *parent) , TrainingAreaBase::Interface::Fts::SendCesHitRequestHandler(nullptr) , m_bTestsSuccessful(true) , m_housePos(LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32UMD8000090000"))) + , m_logger(getLogger("CesTestsSmart")) , m_testId(0) , m_participantIndex(0) , m_DynamicParticipantIndex(0) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.h index 6e8124a73..bccd182a5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ModuleTests/ces_tests_smart.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CentralEffectSimulation { @@ -59,7 +59,6 @@ protected Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: // methods void checkParticipantEvent(); @@ -97,6 +96,7 @@ private: bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_housePos; + NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_DynamicParticipantIndex; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.cpp index e7239fe65..89af757b5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.cpp @@ -11,7 +11,7 @@ #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.h index d84fe0143..ea684a2c6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/handler_artillerie_sound.h @@ -13,13 +13,13 @@ #include #include #include -#include +#include #include #include // HTTP Request -#include +#include namespace CesArtillerySound { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/plugin.h index a32c4e01d..3675986c2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/plugin.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CesArtillerySound @@ -78,7 +78,6 @@ private Q_SLOTS: bool init(int domainId, int exerciseId) override; private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp; std::shared_ptr m_ddsConnector; @@ -88,6 +87,10 @@ private: std::shared_ptr m_handlerBuildingData; ///< Pointer to AES Building handler std::shared_ptr m_handlerParticipant; ///< Pointer to handler for all participants std::shared_ptr m_handlerArtillerieSound; /// < Pointer to handler for Artillerie Sound + + + + NGL::INGLLogger &m_logger; int m_domainId = 0; int m_exerciseId = 0; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/settings.h index 4cb7f617a..56dd9c69d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ArtillerySound/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.cpp index 55c3e3ee5..7dfe6a02b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.cpp @@ -7,10 +7,9 @@ */ #include "handler_participant_borderline.h" -#include -#include -#include +#include +#include #include @@ -127,7 +126,7 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff << " participantTypeId=" << partPos.participantTypeId() << " Anzahl Borderlines=" << m_borderlines.size(); - for (const BorderlineUtm &borderline : std::as_const(m_borderlines)) + for (const BorderlineUtm &borderline : qAsConst(m_borderlines)) { DEBUG_LOG(m_logger) << "borderline id = " << borderline.id << ", Box bottomLeft = " << CentralEffectSimulation::debug(borderline.boundingBox.bottomLeft()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.h index 5501c9d11..9f5a37fe8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_participant_borderline.h @@ -15,8 +15,8 @@ #include -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.cpp index 675f66c15..018637cfd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.cpp @@ -6,10 +6,9 @@ * Created by gr, SLSE, 2017-02-20 */ #include "handler_simulated_movement.h" -#include #include -#include +#include #include #include @@ -66,7 +65,7 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb() DEBUG_LOG(m_logger) << "loadSimulatedMovementSegmentsFromDb size =" << simMoveSegVec.size(); // add to internal buffer - for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : std::as_const(simMoveVec)) + for (const CentralEffectSimulation::Database::CesSimulatedMovement &data : qAsConst(simMoveVec)) { CentralEffectSimulation::SimulatedMovement request; request.id(data.id); @@ -78,14 +77,14 @@ bool HandlerSimulatedMovement::loadSimulatedMovementFromDb() DEBUG_LOG(m_logger) << "Loading SimulatedMovement: " << request; QMap segDbMap; // QMap to get it sorted - for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : std::as_const(simMoveSegVec)) + for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segData : qAsConst(simMoveSegVec)) { if (segData.simulatedMovementId == data.id) segDbMap.insert(segData.positionIndex, segData); } request.segments().reserve(segDbMap.size()); CentralEffectSimulation::SimulatedMovementSegment seg; - for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segDb : std::as_const(segDbMap)) + for (const CentralEffectSimulation::Database::CesSimulatedMovementSegment &segDb : qAsConst(segDbMap)) { seg.delay(segDb.delay); seg.name(segDb.name.toStdString()); @@ -281,7 +280,7 @@ void HandlerSimulatedMovement::onSimulatedMovementRemoveByParticipantIdRequest(c DEBUG_LOG(m_logger) << "onSimulatedMovementRemoveByParticipantIdRequest: " << request; int id = 0; - for (const SimulationMovement *simMovement : std::as_const(m_simulationMovements)) + for (const SimulationMovement *simMovement : qAsConst(m_simulationMovements)) { if (simMovement->participantId() == request.participantId()) { @@ -300,7 +299,7 @@ SimulationMovement *HandlerSimulatedMovement::findSimulationMovement(int id, int { if (id) return m_simulationMovements.value(id); - for (SimulationMovement *s : std::as_const(m_simulationMovements)) + for (SimulationMovement *s : qAsConst(m_simulationMovements)) { if (s->participantId() == participantId) return s; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.h index cf965279e..d209e9ea3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/handler_simulated_movement.h @@ -18,7 +18,7 @@ #include #include -#include +#include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/plugin.h index 798706437..52982f68a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/plugin.h @@ -16,7 +16,7 @@ #include #include -#include +#include //namespace NGLDB @@ -63,7 +63,6 @@ private Q_SLOTS: bool init(int domainId, int exerciseId) override; private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp{nullptr}; std::shared_ptr m_ddsConnector; @@ -74,6 +73,10 @@ private: std::shared_ptr m_handlerParticipant; ///< Pointer to handler for all participants std::shared_ptr m_handlerParticipantBorderline; ///< Pointer to handler for check participants cross Borderline std::shared_ptr m_handlerSimulatedMovement; ///< Pointer to handler for Simulated Movement + + + + NGL::INGLLogger &m_logger; int m_domainId = 0; int m_exerciseId = 0; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.cpp index 72695f0bf..fe7c4fe59 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.cpp @@ -8,7 +8,7 @@ #include "simulation_movement.h" #include -#include +#include namespace CentralEffectSimulationBasic { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.h index 3ee740e30..90b7cc444 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Basic/simulation_movement.h @@ -12,9 +12,9 @@ #include #include -#include -#include -#include +#include +#include +#include namespace CentralEffectSimulationBasic diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.cpp index 564ecb47e..fe1e28cae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.cpp @@ -7,16 +7,15 @@ */ #include "ces_building_model.h" -#include #include #include -#include +#include #include -#include -#include +#include +#include #if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) @@ -91,20 +90,20 @@ bool BuildingModel::init( ) { m_buildingId = buildingId; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId; + TRACE_LOG(m_logger) << LOGFUNCTION << " START, m_buildingId=" << m_buildingId; m_angle = mse.angle() * M_PI / 180.; m_refPosGeo = mse.geoPosition(); m_refPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(mse.geoPosition().lon(), mse.geoPosition().lat()); m_refPos = {m_refPosUtm.x, m_refPosUtm.y, m_refPosGeo.z()}; - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, m_buildingId=" << m_buildingId + DEBUG_LOG(m_logger) << LOGFUNCTION << " START, m_buildingId=" << m_buildingId << ", m_angle=" << m_angle << ", m_refPosGeo=" << m_refPosGeo << ", m_refPos=" << m_refPos; - for (const InfrastructureManagement::FootprintElement &footprintElement : std::as_const(mfp.elements())) + for (const InfrastructureManagement::FootprintElement &footprintElement : qAsConst(mfp.elements())) m_footprint << QPointF(footprintElement.relPosition().offsetX(), footprintElement.relPosition().offsetY()); if (m_footprint.isEmpty()) { @@ -123,14 +122,14 @@ bool BuildingModel::init( m_height = DBL_MIN; const QMap &roomMap = rooms(); - for (const BuildingControlUnit::VWM::Room &room : std::as_const(roomMap)) - for (const BuildingControlUnit::VWM::OuterWall &outerWall : std::as_const(room.outerWalls())) - for (const BuildingControlUnit::VWM::WallElement &wallElement : std::as_const(outerWall.elements())) - for (const LtsUtils::QPoint3D &point : std::as_const(wallElement)) + for (const BuildingControlUnit::VWM::Room &room : qAsConst(roomMap)) + for (const BuildingControlUnit::VWM::OuterWall &outerWall : qAsConst(room.outerWalls())) + for (const BuildingControlUnit::VWM::WallElement &wallElement : qAsConst(outerWall.elements())) + for (const LtsUtils::QPoint3D &point : qAsConst(wallElement)) if (point.z() > m_height) m_height = point.z(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, m_buildingId=" << m_buildingId; + TRACE_LOG(m_logger) << LOGFUNCTION << " END, m_buildingId=" << m_buildingId; return true; } @@ -141,7 +140,7 @@ bool BuildingModel::init( bool BuildingModel::hasIntersectionSimplified(const LtsUtils::QPoint3D &start, const LtsUtils::QPoint3D &end) const { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId + DEBUG_LOG(m_logger) << LOGFUNCTION << " m_buildingId=" << m_buildingId << ", start=" << start << ", end=" << end; // keep origin of QRect (topLeft) in mind: @@ -230,7 +229,7 @@ bool BuildingModel::hasIntersection(const LtsUtils::QPoint3D &start, const LtsUt bool bHasIntersection = BuildingControlUnit::VWM::Math::hasIntersection(start, end, rooms()); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " m_buildingId=" << m_buildingId + DEBUG_LOG(m_logger) << LOGFUNCTION << " m_buildingId=" << m_buildingId << ", start=" << start << ", end=" << end << ", rooms().size()" << rooms().size() << ", bHasIntersection=" << bHasIntersection; @@ -312,7 +311,7 @@ QVector BuildingModel::fromGeographic(const std::vector ret; ret.reserve(points.size()); - for (const Core::GeoPosition &point : std::as_const(points)) + for (const Core::GeoPosition &point : qAsConst(points)) ret.append(fromGeographic(point)); return ret; } @@ -327,7 +326,7 @@ std::vector BuildingModel::toGeographic(const QVector ret; ret.reserve(points.size()); - for (const LtsUtils::QPoint3D &point : std::as_const(points)) + for (const LtsUtils::QPoint3D &point : qAsConst(points)) ret.push_back(toGeographic(point)); return ret; } @@ -342,7 +341,7 @@ QVector BuildingModel::fromReference(const QVector ret; ret.reserve(points.size()); - for (const LtsUtils::QPoint3D &point : std::as_const(points)) + for (const LtsUtils::QPoint3D &point : qAsConst(points)) ret.append(fromReference(point)); return ret; } @@ -356,7 +355,7 @@ QVector BuildingModel::toReference(const QVector ret; ret.reserve(points.size()); - for (const LtsUtils::QPoint3D &point : std::as_const(points)) + for (const LtsUtils::QPoint3D &point : qAsConst(points)) ret.append(toReference(point)); return ret; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.h index 467c0aec2..a872a1d71 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/ces_building_model.h @@ -15,7 +15,7 @@ #include #include -#include +#include #include using namespace CentralEffectSimulation; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp index f9e0b57a6..807554f88 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.cpp @@ -7,19 +7,18 @@ */ #include "handler_aes_data.h" -#include #include #include #include -#include +#include #include -#include +#include #include -#include -#include +#include +#include #include #define TIMEDIFFVALID 3000 @@ -235,7 +234,7 @@ void HandlerAesData::calculateBuildingExplosion(const AreaEffectSimulation::Char // Bounding-Box-Check // QMap m_handlerBuildingData.getFootprints(); - for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints)) + for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints)) { const Core::GeoPosition2D impactPosition2D(impactPosition.lon(), impactPosition.lat()); @@ -407,7 +406,7 @@ void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effec // calculate for every building of our exercise: const QHash &footprints = m_handlerBuildingData->getFootprints(); - for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints)) + for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints)) { calculateImpacts(effects, footprint); } @@ -494,7 +493,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm // Vulnerability should be calculated const QHash &footprints = m_handlerBuildingData->getFootprints(); - for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : std::as_const(footprints)) + for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint : qAsConst(footprints)) { calculateImpacts(data, aesItemView, footprint); } // for @@ -586,7 +585,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac CentralEffectSimulation::BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId]; QSet &bitfieldState = bitfieldStates[aesItemId]; - for (int i : std::as_const(bitfieldState)) + for (int i : qAsConst(bitfieldState)) DEBUG_LOG(m_logger) << "bitfieldState for " << aesItemId << ": " << i; for (int32_t bitFieldIdx = 0; bitFieldIdx < data.impactCount(); ++bitFieldIdx) @@ -600,7 +599,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac continue; const Core::GeoPosition &impactPosition = aesItemView.form()[bitFieldIdx]; - DEBUG_LOG(m_logger) << Q_FUNC_INFO + DEBUG_LOG(m_logger) << LOGFUNCTION << " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon() << " z=" << impactPosition.z() << " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition)); @@ -711,7 +710,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec const std::vector &singleEffectsRef = effects.singleEffects(); int indexBitFieldIdx = -1; - for (const AreaEffectSimulation::SingleEffect &singleEffect : std::as_const(singleEffectsRef)) + for (const AreaEffectSimulation::SingleEffect &singleEffect : qAsConst(singleEffectsRef)) { ++indexBitFieldIdx; @@ -856,7 +855,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView & DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary data.form().size()=" << data.form().size(); // BoobyTrap polyGeo.reserve(data.form().size()); - for (const auto &pointGeo : std::as_const(data.form())) + for (const auto &pointGeo : qAsConst(data.form())) { QPointF point; point.setX(pointGeo.lon()); @@ -873,7 +872,7 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView & << " exerciseId=" << exerciseId; // only include buildings within the radius - for (const int buildingId : std::as_const(buildingIdsInside)) + for (const int buildingId : qAsConst(buildingIdsInside)) { DEBUG_LOG(m_logger) << " BuildingId=" << buildingId; Buildings::Building tmpBldg; @@ -959,7 +958,7 @@ QVector HandlerAesData::findBuildingsBetween(const LtsCoordTrans::LtsCoordi // check all exercise specific footprints except our: const QHash &allFootprintsOfEx = m_handlerBuildingData->getFootprints(); buildingIdsInBetween.reserve(allFootprintsOfEx.size()); - for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : std::as_const(allFootprintsOfEx)) + for (const CentralEffectSimulation::HandlerBuildingData::Footprint &footprintToCheck : qAsConst(allFootprintsOfEx)) { // do not check ourself if (footprintToCheck.mseId == targetFootprint.mseId) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.h index 80a95ca29..699f8840e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_aes_data.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include namespace LtsUtils { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.cpp index 2cc336d34..c70135519 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.cpp @@ -7,14 +7,13 @@ */ #include "handler_building_model.h" -#include #include #include -#include -#include +#include +#include #include // operator<< @@ -52,19 +51,19 @@ HandlerBuildingModel::HandlerBuildingModel( , m_aesDataHandler(aesDataHandler) , m_logger(CentralEffectSimulation::getLogger("Plugin.Buildings.HandlerBuildingModel")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } HandlerBuildingModel::~HandlerBuildingModel() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } bool HandlerBuildingModel::init() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; std::shared_ptr dtcIsm = m_ddsHandler->dtcIsm(); dtcIsm->waitForHistoricalDataMainStructureElement(1000); @@ -79,14 +78,14 @@ bool HandlerBuildingModel::init() INFO_LOG(m_logger) << "HandlerBuildingModel is running." << ", m_buildingModels.size() = " << m_buildingModels.size(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return true; } HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingModel::getLineBuildingIntersection( const std::vector &line, const std::string &requestIdOpt) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest; newRequest.line(line); @@ -105,13 +104,13 @@ HandlerBuildingModelInterface::LineBuildingIntersectionResult HandlerBuildingMod result.errorParams = reply.errorParams(); result.intersection = reply.intersection(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return result; } HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel::getLineBuildingIntersects(const std::vector &line, const std::string &requestIdOpt) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; CentralEffectSimulation::GetLineBuildingIntersectionRequest newRequest; newRequest.line(line); @@ -130,7 +129,7 @@ HandlerBuildingModelInterface::LineBuildingIntersectsResult HandlerBuildingModel result.errorParams = reply.errorParams(); result.intersects = ! std::isnan(reply.intersection().lat()); // ! std::isnan - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return result; } @@ -322,7 +321,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel:: QPolygonF polygon2D; polygon2D.reserve(polylineRef.size()); - for (const Core::GeoPosition &geoPos : std::as_const(polylineRef)) + for (const Core::GeoPosition &geoPos : qAsConst(polylineRef)) polygon2D << QPointF(geoPos.lon(), geoPos.lat()); // Only the buildings where the line/trajectory flies over the building footprint are taken into account. @@ -333,7 +332,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel:: if (m_logger.isDebugEnabled()) { DEBUG_LOG(m_logger) << "relevantBuildings.size=" << relevantBuildings.size(); - for (const int bldgId : std::as_const(relevantBuildings)) + for (const int bldgId : qAsConst(relevantBuildings)) DEBUG_LOG(m_logger) << "relevantBuilding: bldgId = " << bldgId; } @@ -369,8 +368,8 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel:: << " , end=" << segEnd; int buildingId = -1; // for debugging purposes - //for (BuildingModel *buildingModel : std::as_const(m_buildingModels)) - for (const int bldgId : std::as_const(relevantBuildings)) + //for (BuildingModel *buildingModel : qAsConst(m_buildingModels)) + for (const int bldgId : qAsConst(relevantBuildings)) { BuildingModel *buildingModel = m_buildingModels.value(bldgId, nullptr); if (!buildingModel) @@ -488,7 +487,7 @@ CentralEffectSimulation::GetLineBuildingIntersectionReply HandlerBuildingModel:: } // if - } // for (const int bldgId : std::as_const(relevantBuildings)) + } // for (const int bldgId : qAsConst(relevantBuildings)) } // for(lineIt = polylineRef.begin(); lineIt != polylineRef.end()-1; ++lineIt) DEBUG_LOG(m_logger) << "END getLineBuildingIntersectionInternal, request '" << request.requestId() << "'" @@ -661,12 +660,12 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet Core::GeoPosition HandlerBuildingModel::calculateDetonationLocation(const std::vector &trajectoryGeometry, double detonationDistance) const { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START"; + DEBUG_LOG(m_logger) << LOGFUNCTION << " START"; const int geometrySize = trajectoryGeometry.size(); if (geometrySize < 3) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << ", trajectoryGeometry not sufficiant"; + ERROR_LOG(m_logger) << LOGFUNCTION << ", trajectoryGeometry not sufficiant"; return {}; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.h index 42e7246fa..4b69085b2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_model.h @@ -16,8 +16,8 @@ #include -#include -#include +#include +#include namespace NGL diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_ownership.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_ownership.cpp index cb46bc143..26f9aba31 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_ownership.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_building_ownership.cpp @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include namespace CesBuildings diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_contamination.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_contamination.cpp index d8cb12c5d..166652698 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_contamination.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/handler_contamination.cpp @@ -7,7 +7,6 @@ */ #include "handler_contamination.h" -#include #include #include @@ -157,7 +156,7 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI bool isGroundLevel = false; const QVector &buildingIds = dtcIsm.get()->getBuildingByPolygon(exerciseId, polygonGeo, completeEnclosed, isGroundLevel); DEBUG_LOG(m_logger) << "buildingIds.size=" << buildingIds.size(); - for (int buildingId : std::as_const(buildingIds)) + for (int buildingId : qAsConst(buildingIds)) { calculateBuilding(buildingId, data, chargeHeight, chargeDepression); } @@ -193,7 +192,7 @@ void HandlerContamination::calculateBuilding(int buildingId, DEBUG_LOG(m_logger) << "buildingId=" << buildingId; effectedRooms.clear(); effectedFloors = getEffectedFloors(buildingId, chargeHeight, chargeDepression); - for (int effectedFloor : std::as_const(effectedFloors)) + for (int effectedFloor : qAsConst(effectedFloors)) effectedRooms += dtcIsm.get()->getRoomIdsFromFloorId(buildingId, effectedFloor); if (!effectedRooms.empty()) { @@ -256,7 +255,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState // Buildings that have been reset or decontaminated will be recontaminated as long as the nuclear weapon is still present const auto aesItemViews = m_ddsHandler->dtcAes()->aesItemViews(); - for (const auto &aesItemView : std::as_const(aesItemViews)) + for (const auto &aesItemView : qAsConst(aesItemViews)) { if (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated) { @@ -371,7 +370,7 @@ QVector HandlerContamination::getEffectedFloors(const int buildingId, const const QVector &floorIds = dtcIsm->getFloorIdsFromBuilding(buildingId); QVector effectedFloorIds; effectedFloorIds.reserve(floorIds.size()); - for (int floorId : std::as_const(floorIds)) + for (int floorId : qAsConst(floorIds)) { double halfFloorHeight = dtcIsm->getHalfFloorHeight(buildingId, floorId); DEBUG_LOG(m_logger) << " floorId=" << floorId diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.cpp index 49c5c868e..67628f464 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.cpp @@ -10,7 +10,7 @@ #include -#include +#include namespace CesBuildings { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.h index a0f13f876..c90ac0f5f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Buildings/plugin.h @@ -22,7 +22,7 @@ #include #include -#include +#include namespace CesBuildings @@ -64,7 +64,6 @@ private Q_SLOTS: bool init(int domainId, int exerciseId) override; private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp{nullptr}; std::shared_ptr m_ddsConnector; @@ -80,7 +79,7 @@ private: std::shared_ptr m_handlerBuildingModel; - CentralEffectSimulation:: + CentralEffectSimulation::LOGGER_T m_logger; int m_domainId{0}; int m_exerciseId{0}; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.cpp index aadbb8ede..88a19675e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.cpp @@ -7,20 +7,19 @@ */ #include "handler_aes_data.h" -#include #include "settings.h" #include #include #include -#include +#include #include -#include +#include #include -#include -#include +#include +#include #include @@ -34,6 +33,7 @@ HandlerAesData::HandlerAesData(const std::shared_ptr m_footprints; - for (const Footprint &footprint : std::as_const(m_footprints)) + for (const Footprint &footprint : qAsConst(m_footprints)) { const QPointF impactPos(CentralEffectSimulation::geographic2Utm(data.impactPosition(), footprint.zone)); const QPolygonF polyBldgRadius({QPointF(footprint.boundingBoxPolyUtm.bottomLeft().rx() - impactRadius, @@ -304,7 +304,7 @@ void HandlerAesData::calculateFootprint(const InfrastructureManagement::MainFoot footprint.geoPosition = mse.geoPosition(); const QPointF utmFpPosition = CentralEffectSimulation::geographic2Utm(footprint.geoPosition, &footprint.zone); footprint.polyUtm.reserve(poly.size()); - for (const QPointF &point : std::as_const(poly)) + for (const QPointF &point : qAsConst(poly)) footprint.polyUtm.push_back(utmFpPosition + point); footprint.boundingBoxPolyUtm = footprint.polyUtm.boundingRect(); @@ -351,7 +351,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm } // Bounding-Box-Check // QMap m_footprints; - for (const Footprint &footprint : std::as_const(m_footprints)) + for (const Footprint &footprint : qAsConst(m_footprints)) { //if (boundingBoxImpact.contains(footprint.boundingBoxPolyUtm)) calculateImpacts(data, footprint); @@ -407,7 +407,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId]; QSet &bitfieldState = bitfieldStates[data.aesItemId()]; - for (int i : std::as_const(bitfieldState)) + for (int i : qAsConst(bitfieldState)) DEBUG_LOG(m_logger) << "bitfieldState for " << data.aesItemId() << ": " << i; const AreaEffectSimulation::AesItemView &aesItemView = *it; @@ -422,7 +422,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac continue; const Core::GeoPosition2D &impactPosition = aesItemView.form()[bitFieldIdx]; - DEBUG_LOG(m_logger) << Q_FUNC_INFO + DEBUG_LOG(m_logger) << LOGFUNCTION << " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon() << " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition)); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.h index 9093e8dcf..0f9543bad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_aes_data.h @@ -55,7 +55,6 @@ public: AreaEffectSimulation::AesItemView itemView(const int &aesId) const { return m_aesItemViews.value(aesId); } protected: - NGL::INGLLogger &m_logger; void onSendCesHitOnBuildingReply(const Core::FunctionReplyObject &replyObject) override final; void onSendCesHitInformationReply(const Core::FunctionReplyObject &reply) override final; @@ -113,7 +112,7 @@ private: // attributes QHash m_aesItemViews; // key = aesItemId QHash m_explosionSingleState; // key = id value = state - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.cpp index 2fd8fccb8..42d9bbdc3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.cpp @@ -7,18 +7,17 @@ */ #include "handler_participant_area.h" -#include #include "settings.h" #include "CentralEffectSimulation/handler_participant.h" -#include +#include #include #include #include -#include -#include +#include +#include namespace dds { @@ -73,6 +72,7 @@ HandlerParticipantArea::HandlerParticipantArea(const std::shared_ptr(EffectType::ExplosionSingle) & 0xffff; const QMap buildingModels = m_handlerBuildingModel->buildingModels(); const QList participantPositions = m_handlerParticipant->positions().values(); - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : qAsConst(participantPositions)) { if (participantPosition.insideBuilding()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.h index 8080ffd3e..d45ab6057 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/handler_participant_area.h @@ -70,7 +70,6 @@ public: bool init(); protected: - NGL::INGLLogger &m_logger; void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final; private Q_SLOTS: @@ -158,7 +157,7 @@ private: // attributes QHash>> m_effectTypeStates; // QHash>> QHash>> m_effectTypeBitFieldIndexes; // QHash>> - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace Ces2D diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/logger.h index 036a1624d..cf099dc8c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "cespluginces2d_export.h" +#include "ces_export.h" namespace Ces2D { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.cpp index a7456cc5c..9d932f17b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.cpp @@ -40,7 +40,7 @@ Ces2DInterfaceImpl::Ces2DInterfaceImpl(CentralEffectSimulation::Plugin::DataProv , m_db(db) , m_handlerBuildingData(handlerBuildingData) , m_handlerParticipant(handlerParticipant) - .getNGLLogger("CES.Plugin.CentralEffectSimulation2DInterfaceImpl")) + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.CentralEffectSimulation2DInterfaceImpl")) { Q_UNUSED(settings) } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.h index 19424bbfc..bbfbcd998 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/plugin.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace Ces2D @@ -65,7 +65,6 @@ private Q_SLOTS: bool init(int domainId, int exerciseId) override; private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp; std::shared_ptr m_ddsConnector; @@ -77,6 +76,9 @@ private: std::shared_ptr m_handlerBuildingModel; ///< Pointer to Building Model Handler std::shared_ptr m_handlerParticipant; ///< Pointer to handler for all participants std::shared_ptr m_handlerParticipantArea; ///< Pointer to handler for participant outside from Buildings + + + NGL::INGLLogger &m_logger; int m_domainId = 0; int m_exerciseId = 0; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/settings.h index d9ce3e374..ea9137847 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Ces2D/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.cpp index 4b0f208a5..061d46086 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.cpp @@ -7,7 +7,7 @@ */ #include "echoplugin.h" -#include +#include #include namespace Echo @@ -27,7 +27,7 @@ EchoInterfaceImpl::EchoInterfaceImpl(CentralEffectSimulation::Plugin::DataProvid NGL::Settings *settings) : m_pdp(pdp) - .getNGLLogger("CES.Plugin.EchoInterfaceImpl")) + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.EchoInterfaceImpl")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.h index 8bba919e9..19b4c8d84 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ECHO/echoplugin.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include @@ -45,9 +45,9 @@ public: private Q_SLOTS: private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp; + NGL::INGLLogger &m_logger; }; } // namespace Echo diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.cpp index ea0920103..eae735baa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.cpp @@ -7,7 +7,6 @@ */ #include "expand_polygon.h" -#include #include @@ -29,7 +28,7 @@ QPolygonF bufferUtmPolygon(const QPolygonF &polygonUtmIn, const int zone, const Esri::ArcGISRuntime::PolygonBuilder polygonBuilder(Esri::ArcGISRuntime::SpatialReference(32600 + zone)); DEBUG_LOG(logger) << "ExpandPolygon::bufferUtmPolygon"; - for (const QPointF &pointUtm : std::as_const(polygonUtmIn)) + for (const QPointF &pointUtm : qAsConst(polygonUtmIn)) polygonBuilder.addPoint(Esri::ArcGISRuntime::Point(pointUtm.x(), pointUtm.y(), 0)); const Esri::ArcGISRuntime::Geometry &esriGeometry = polygonBuilder.toGeometry(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.h index 1fdfae62a..b1e2f9408 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/expand_polygon.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include namespace CesExplosions { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_artillery_l.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_artillery_l.h index 82825f949..3eae25d1f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_artillery_l.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_artillery_l.h @@ -17,8 +17,8 @@ //#include -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp index de6839a68..876a2b7f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.cpp @@ -7,11 +7,10 @@ */ #include "handler_explosions.h" -#include #include "expand_polygon.h" -#include -#include +#include +#include #include #include @@ -19,11 +18,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include using namespace CentralEffectSimulation; @@ -224,7 +223,7 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem const int remaining = 1; // ICD GUEZSB60_ICD-0052_Zentrale_Tne.doc Wirkfeldtyp Gefahrenbereich Steilfeuer const auto &participantPositions = m_handlerParticipant->positions(); - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions)) { if (!allParticipantIdsInArea.contains(pPos.participantId())) continue; @@ -353,7 +352,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect AreaEffectSimulation::ChargeStruct chargeStruct(data.chargeTypeId(),data.igniterTypeId(), data.igniterFunctionId()); const double impactRadius = m_ddsHandler->chargeTypeRadius(chargeStruct); - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions)) { if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number continue; @@ -543,7 +542,7 @@ void HandlerExplosions::onExplosionSingleChanged(const AreaEffectSimulation::Exp return; } - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions)) { if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number continue; @@ -634,7 +633,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef triggeredEffectsLtsCoord.reserve(singleEffectsRef.size()); int curSeIndex = -1; - for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffectsRef)) + for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffectsRef)) { ++curSeIndex; if (se.singleEffectState() != AreaEffectSimulation::AesSingleEffectState_def::SesTriggered) @@ -658,7 +657,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef // Now call calculateImpacts() (createEvent if in circle...) const auto &participantPositions = m_handlerParticipant->positions(); - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions)) { if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill) continue; @@ -894,9 +893,9 @@ void HandlerExplosions::calculateSmartEffect(const AreaEffectSimulation::Effects bool itemAvailable = m_ddsHandler->dtcAes()->aesItemFromId(effects.aesItemId(), aesItem); if ( itemAvailable) { - for (const AreaEffectSimulation::SingleEffect &se : std::as_const(effects.singleEffects())) + for (const AreaEffectSimulation::SingleEffect &se : qAsConst(effects.singleEffects())) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ---> singleEffect=" << se + DEBUG_LOG(m_logger) << LOGFUNCTION << " ---> singleEffect=" << se << ", aesItem= " << aesItem; calculateSmartExplosion(effects.aesItemId(), aesItem.chargeStruct(), @@ -935,7 +934,7 @@ void HandlerExplosions::calculateSmartExplosion(const int32_t aesItemId, bool bHumanFound = false; const auto &participantPositions = m_handlerParticipant->positions(); - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition : qAsConst(participantPositions)) { if (m_handlerParticipant->isOutdated(participantPosition)) // Participant Position is not valid Todo Magic Number continue; @@ -1078,7 +1077,7 @@ void HandlerExplosions::calculateImpacts(const AreaEffectSimulation::TriggeredIm return; const auto &participantPositions = m_handlerParticipant->positions(); - for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : std::as_const(participantPositions)) + for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions)) { if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number continue; @@ -1108,7 +1107,7 @@ void HandlerExplosions::calculateImpacts(const CentralEffectSimulation::AesItemV DEBUG_LOG(m_logger) << "XXXXXXXXXXXX calculateImpacts2a impactsToCheck.size " << impactsToCheck.size(); - for (int bitFieldIdx : std::as_const(impactsToCheck)) + for (int bitFieldIdx : qAsConst(impactsToCheck)) { if (itemView.form.size() <= bitFieldIdx) continue; @@ -1166,7 +1165,7 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae DEBUG_LOG(m_logger) << "shiftedParticipantLtsCoord = " << shiftedParticipantLtsCoord.toString(true); - for (const LtsCoordinate &newTriggeredImpactLtsCoord : std::as_const(triggeredEffectsLtsCoord)) + for (const LtsCoordinate &newTriggeredImpactLtsCoord : qAsConst(triggeredEffectsLtsCoord)) { // const int zoneToUse = itemView.zone; // 2D or 3D?? @@ -1293,7 +1292,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul { const LtsCoordTrans::LtsCoordinate &partLtsCoordinate = participantPosition.ltsCoordinate(); // WITH zValue - INFO_LOG(m_logger) << Q_FUNC_INFO << " START" + INFO_LOG(m_logger) << LOGFUNCTION << " START" << " participantId = " << participantPosition.participantId() << " participantPosition.ltsCoordinate = '" << participantPosition.ltsCoordinate().toString() << "'" << ", triggeredEffectsGeoPos.size() = " << triggeredEffectsGeoPos.size() @@ -1302,7 +1301,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul << ", -> partLtsCoordinate " << partLtsCoordinate << ", lineOfSightOptions " << lineOfSightOptions; - INFO_LOG(m_logger) << Q_FUNC_INFO << participantPosition; + INFO_LOG(m_logger) << LOGFUNCTION << participantPosition; if (triggeredEffectsGeoPos.empty()) return; @@ -1331,7 +1330,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul DEBUG_LOG(m_logger) << "calculateImpactsEffect 1 triggeredEffectsUtmPos.size " << triggeredEffectsUtmPos.size(); int idx = -1; - for (const QPointF &newTriggeredImpactUtm : std::as_const(triggeredEffectsUtmPos)) + for (const QPointF &newTriggeredImpactUtm : qAsConst(triggeredEffectsUtmPos)) { ++idx; @@ -1353,7 +1352,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul const int exerciseId = m_ddsHandler->getExerciseId(); QElapsedTimer timer; - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " vor lineOfSightOptions start"; + DEBUG_LOG(m_logger) << LOGFUNCTION << " vor lineOfSightOptions start"; if (m_logger.isInfoEnabled()) timer.start(); @@ -1368,7 +1367,7 @@ void HandlerExplosions::calculateImpactsEffect_outdated(const CentralEffectSimul << " success=" << success; // check LOS / LineOfSight - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " check LOS / LineOfSight bLOS=" << bLOS + DEBUG_LOG(m_logger) << LOGFUNCTION << " check LOS / LineOfSight bLOS=" << bLOS << " participantId=" << participantPosition.participantId(); if (bLOS) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.h index 94ac3c3d7..b0a9ca6ef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_explosions.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include // AES-Handling for Explosions diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.cpp index ad35db289..7dca732c6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.cpp @@ -7,24 +7,23 @@ */ #include "handler_vulcano.h" -#include #include "expand_polygon.h" #include "isInCone.h" #include "settings.h" -#include -#include +#include +#include #include #include #include -#include +#include #include -#include -#include +#include +#include #include -#include -#include +#include +#include namespace CesExplosions @@ -245,7 +244,7 @@ void HandlerVulcano::onTrajectoryTimeAwareTimeout() const auto &designationsVec = dpd.designations(); DEBUG_LOG(m_logger) << "onTimerTimeout participantId=" << participantId; - for (const auto &designation : std::as_const(designationsVec)) + for (const auto &designation : qAsConst(designationsVec)) { if (designation.code() == prf && designation.outputPower() > 0) { @@ -369,7 +368,7 @@ Core::GeoPosition HandlerVulcano::getTrajectoryPosFromTime(int aesId, long long Core::GeoPosition result; int i = 0; - for (const auto &point : std::as_const(trajectoryTimeAwareValue.geometry())) + for (const auto &point : qAsConst(trajectoryTimeAwareValue.geometry())) { DEBUG_LOG(m_logger) << "time=" << point.relativeTime(); if ( (point.relativeTime() > relTime) && (i > 0)) @@ -405,7 +404,7 @@ void HandlerVulcano::onDynamicParticipantChanged(const ParticipantManagement::Dy << data.designations().size(); if (data.designations().size() > 0) { - for (const ParticipantManagement::LaserDesignation &designation : std::as_const(data.designations())) + for (const ParticipantManagement::LaserDesignation &designation : qAsConst(data.designations())) { DEBUG_LOG(m_logger) << "gearId=" << designation.gearId() << " code=" << designation.code() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.h index b10042443..3a410f5df 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/handler_vulcano.h @@ -23,8 +23,8 @@ #include #include #include -#include -#include +#include +#include namespace LtsUtils { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/line_of_sight.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/line_of_sight.h index 4e034597f..ffeca0b91 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/line_of_sight.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/line_of_sight.h @@ -11,7 +11,7 @@ #include #include -#include +#include #pragma once namespace CesExplosions diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/plugin.h index 115aa828c..081fe3440 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/plugin.h @@ -17,7 +17,7 @@ #include #include -#include +#include namespace CesExplosions diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/settings.h index 755b897e4..64d5e776f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Explosions/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.cpp index a0a32ab3e..c750d1381 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.cpp @@ -7,12 +7,11 @@ */ #include "handler_functional_area.h" -#include -#include -#include +#include +#include -#include +#include #include #include @@ -303,7 +302,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat } DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId(); - for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews)) + for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews)) { DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId; switch (itemView.aesTypeId.underlying()) @@ -346,7 +345,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS } DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId(); - for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews)) + for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews)) { DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId; switch (itemView.aesTypeId.underlying()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.h index 304f8f9db..796f09fd4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/handler_functional_area.h @@ -78,8 +78,6 @@ public: bool init(); protected: - -NGL::INGLLogger &m_logger; void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final; void onDemandInitReply(const Core::FunctionReplyObject &replyObject) override final; @@ -139,7 +137,7 @@ private: // attributes QHash> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form int m_requestId = 1; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace CES_FUNCTIONAL_AREA diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/plugin.h index c0c16d973..3e130de56 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/plugin.h @@ -16,7 +16,7 @@ #include #include -#include +#include namespace CES_FUNCTIONAL_AREA diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/supplytimer.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/supplytimer.h index cb32fcc8a..35f75a35d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/supplytimer.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/FunctionalAreas/supplytimer.h @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include +#include namespace CES_FUNCTIONAL_AREA { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.cpp index 14e9a3258..bdd92f04e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.cpp @@ -7,19 +7,18 @@ */ #include "handler_aes_data.h" -#include #include //#include "main_handler.h" #include "settings.h" #include -#include +#include #include -#include +#include #include -#include -#include +#include +#include #include @@ -32,6 +31,7 @@ HandlerAesData::HandlerAesData(const std::shared_ptr m_footprints; - for (const Footprint &footprint : std::as_const(m_footprints)) + for (const Footprint &footprint : qAsConst(m_footprints)) { const QPointF impactPos(CentralEffectSimulation::geographic2Utm(data.impactPosition(), footprint.zone)); const QPolygonF polyBldgRadius({QPointF(footprint.boundingBoxPolyUtm.bottomLeft().rx() - impactRadius, @@ -258,7 +258,7 @@ void HandlerAesData::calculateFootprint(const InfrastructureManagement::MainFoot footprint.geoPosition = mse.geoPosition(); const QPointF utmFpPosition = CentralEffectSimulation::geographic2Utm(footprint.geoPosition, &footprint.zone); footprint.polyUtm.reserve(poly.size()); - for (const QPointF &point : std::as_const(poly)) + for (const QPointF &point : qAsConst(poly)) footprint.polyUtm.push_back(utmFpPosition + point); footprint.boundingBoxPolyUtm = footprint.polyUtm.boundingRect(); @@ -305,7 +305,7 @@ void HandlerAesData::preCalculateImpacts(const AreaEffectSimulation::TriggeredIm } // Bounding-Box-Check // QMap m_footprints; - for (const Footprint &footprint : std::as_const(m_footprints)) + for (const Footprint &footprint : qAsConst(m_footprints)) { //if (boundingBoxImpact.contains(footprint.boundingBoxPolyUtm)) calculateImpacts(data, footprint); @@ -361,7 +361,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac BitfieldStates &bitfieldStates = m_bitfieldStatesBld[footprint.mseId]; QSet &bitfieldState = bitfieldStates[data.aesItemId()]; - for (int i : std::as_const(bitfieldState)) + for (int i : qAsConst(bitfieldState)) DEBUG_LOG(m_logger) << "bitfieldState for " << data.aesItemId() << ": " << i; const AreaEffectSimulation::AesItemView &aesItemView = *it; @@ -376,7 +376,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac continue; const Core::GeoPosition2D &impactPosition = aesItemView.form()[bitFieldIdx]; - DEBUG_LOG(m_logger) << Q_FUNC_INFO + DEBUG_LOG(m_logger) << LOGFUNCTION << " impactPosition: lat/lon" << impactPosition.lat() << "/" << impactPosition.lon() << " UTM=" << CentralEffectSimulation::debug(CentralEffectSimulation::geographic2Utm(impactPosition)); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.h index be0cf6b2c..6dae5ebdc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_aes_data.h @@ -50,7 +50,6 @@ public: AreaEffectSimulation::AesItemView itemView(const int &aesId) const { return m_aesItemViews.value(aesId); } protected: - NGL::INGLLogger &m_logger; void onSendCesHitInformationReply(const Core::FunctionReplyObject &reply) override final; private slots: @@ -105,7 +104,7 @@ private: // attributes QHash m_aesItemViews; // key = aesItemId QHash m_explosionSingleState; // key = id value = state - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.cpp index c461dd511..5a4351300 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.cpp @@ -7,10 +7,9 @@ */ #include "handler_participant_gas_pipe.h" -#include -#include -#include +#include +#include #include @@ -203,7 +202,7 @@ void HandlerParticipantGasPipe::onParticipantPositionChanged(const CentralEffect << " Anzahl GasPipes=" << m_gasPipes.size(); - for (const CentralEffectSimulation::AesItemViewUtm &gasPipe : std::as_const(m_gasPipes)) + for (const CentralEffectSimulation::AesItemViewUtm &gasPipe : qAsConst(m_gasPipes)) { calculateGasPipeParticipant(gasPipe, partPos); @@ -318,7 +317,7 @@ void HandlerParticipantGasPipe::onSendCesHitReply(const Core::FunctionReplyObjec void HandlerParticipantGasPipe::sendFtcCesHitRequestTimeout() { auto ftcTab = m_ddsHandler->ftcTab(); - for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap)) + for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap)) { DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr; ftcTab->sendCesHitRequest(hr, this); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.h index 9cf08545c..709f2d42f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/handler_participant_gas_pipe.h @@ -8,9 +8,9 @@ #pragma once -#include -#include -#include +#include +#include +#include #include #include @@ -20,7 +20,7 @@ #include #include -#include +#include // AES-Handling for participants namespace CentralEffectSimulationGasPipes diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/plugin.h index c5ab2fc63..cf8d7827b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GasPipes/plugin.h @@ -16,7 +16,7 @@ #include #include -#include +#include namespace CesGasPipes diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/BallisticService.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/BallisticService.hpp index b234d2e2f..c8767c673 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/BallisticService.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/BallisticService.hpp @@ -97,7 +97,7 @@ private: QString m_ammunitionFile; N_ConfigSystem::AmmuConfig *m_ammuConfig = nullptr; - CesGeoPairing:: + CesGeoPairing::LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/FireControlBase.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/FireControlBase.hpp index f1dccd49b..be28c9f0c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/FireControlBase.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/FireControlBase.hpp @@ -140,6 +140,9 @@ protected: /** * logger object */ + NGL::INGLLogger &m_logger; + + /** * deinitializes class */ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/TrajectoryBase.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/TrajectoryBase.hpp index ce7a15d02..da590bdb0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/TrajectoryBase.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/FW_Ballistic/TrajectoryBase.hpp @@ -224,6 +224,8 @@ protected: /** * logger object */ + NGL::INGLLogger &m_logger; + /** * deinitializes the class */ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.cpp index 07cd2c02e..f3daecfaf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.cpp @@ -7,7 +7,7 @@ */ #include "ammuconfig.h" -#include +#include namespace N_ConfigSystem { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.h index 7f8cb5e3f..565462dc1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/ammuconfig.h @@ -1,7 +1,7 @@ #pragma once -#include -#include +#include +#include #include "configsettings.h" #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/configsettings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/configsettings.h index 282821508..4d9b77270 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/configsettings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/configsettings.h @@ -1,10 +1,10 @@ #ifndef CONFIGSETTINGS_H #define CONFIGSETTINGS_H -#include -#include -#include -#include +#include +#include +#include +#include class ConfigSettings { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.cpp index 148f208e0..abcad5544 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.cpp @@ -7,7 +7,7 @@ */ #include "geoconfig.h" -#include +#include namespace N_ConfigSystem { @@ -30,7 +30,7 @@ GeoConfig *GeoConfig::getInstance() bool GeoConfig::initFilename(const QString &fileName) { // const QFileInfo qFileInfo(fileName); -// INFO_LOG(m_logger) << Q_FUNC_INFO << " START, GeoConfig::absoluteFilePath ='" << qFileInfo.absoluteFilePath() << "'"; +// INFO_LOG(m_logger) << LOGFUNCTION << " START, GeoConfig::absoluteFilePath ='" << qFileInfo.absoluteFilePath() << "'"; // AmmunitionMap ConfigSettings::initFilename(fileName); @@ -41,7 +41,7 @@ bool GeoConfig::initFilename(const QString &fileName) const QStringList &filePaths_rough_to_fine = elevationName.split(QStringLiteral(";")); -// INFO_LOG(m_logger) << Q_FUNC_INFO << " use following file(s) for ElevationMap: '" << elevationName << "'"; +// INFO_LOG(m_logger) << LOGFUNCTION << " use following file(s) for ElevationMap: '" << elevationName << "'"; if (!m_elevationMapManager) { @@ -49,7 +49,7 @@ bool GeoConfig::initFilename(const QString &fileName) m_elevationMapManager->init(filePaths_rough_to_fine); } -// TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, filename ='" << fileName << "'"; +// TRACE_LOG(m_logger) << LOGFUNCTION << " END, filename ='" << fileName << "'"; return true; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.h index 5240975fb..377d3c142 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_ConfigSystem/geoconfig.h @@ -13,7 +13,7 @@ //#include "../logger.h" #include -#include +#include #include // std::cout, std::endl, std::cin #include // EXIT_SUCCESS @@ -37,7 +37,6 @@ namespace N_ConfigSystem class GeoConfig: public ConfigSettings { private: - NGL::INGLLogger &m_logger; explicit GeoConfig(); ~GeoConfig(); public: @@ -49,7 +48,6 @@ public: double getElevation(const double lon, const double lat) const; private: - NGL::INGLLogger &m_logger; friend class CesGeoPairing::HandlerGeoPairing; // for initFilename bool initFilename(const QString &fileName); @@ -59,6 +57,6 @@ private: std::shared_ptr m_elevationMapManager; -// CesGeoPairing:: +// CesGeoPairing::LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_Types/GeoCoord.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_Types/GeoCoord.cpp index a55bff11e..c62179bf1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_Types/GeoCoord.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GBL_Types/GeoCoord.cpp @@ -13,7 +13,7 @@ #include "GeoCoord.hpp" #include -#include +#include namespace N_Math { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.cpp index bfe43776a..5cb8da5e8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include #include "../settings.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.hpp index da968a383..d1b3d27a9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairing/GeoPairing.hpp @@ -181,6 +181,9 @@ private: SingleFireToCtas m_singleFireToCtas; AreaFireToCtas m_areaFireToCtas; ReportTarget m_reportTarget; + + NGL::INGLLogger &m_logger; + void calculateAirFire(const QByteArray &transparentData, const QHash &aircrafts); void calculateAreaFire(const QByteArray &transparentData, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/CMakeLists.txt index bdc15d96b..2509adf0b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/CMakeLists.txt @@ -45,7 +45,6 @@ NGL_TARGET_INCLUDE_DIRECTORIES(svcCesGeoPairingImpl ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCesGeoPairingImpl PRIVATE RTI::nddscpp2 @@ -59,4 +58,3 @@ NGL_TARGET_LINK_LIBRARIES(svcCesGeoPairingImpl FW_Ballistic NGLLogger ) -ENDIF(BUILD_RTI) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingDataBase.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingDataBase.hpp index 503396d23..aefc73914 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingDataBase.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingDataBase.hpp @@ -94,6 +94,8 @@ public: protected: int m_Size = 2; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.cpp index 1b5699942..705352019 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.cpp @@ -22,7 +22,7 @@ #include "GeoPairingImplAirTargetCacheData.hpp" #include "GeoPairingDataFireReport.hpp" -#include +#include #define PAN_AMMU_TIMEPROG(ammunition) (ammunition & 0x01) #define PAN_AMMU_INDEX(ammunition) ((ammunition >> 1) & 0x03) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.hpp index 2d054d434..512e62913 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImpl.hpp @@ -99,6 +99,7 @@ protected: GeoPairingImplMeteoData m_MeteoData; CacheType m_CacheData; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTarget.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTarget.hpp index 84be5141c..0211b0630 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTarget.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTarget.hpp @@ -70,6 +70,8 @@ public: protected: private: + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetCache.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetCache.hpp index 302908e68..cf199f3b0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetCache.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetCache.hpp @@ -85,6 +85,9 @@ private: CacheType *m_CacheData; SInt32 m_PlayerID; UInt32 m_Timeout; + NGL::INGLLogger &m_logger; + + /** * * @param a_targetID diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetTracker.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetTracker.hpp index 606ca05f6..92771707b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetTracker.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetTracker.hpp @@ -86,6 +86,8 @@ protected: UInt64 m_Time = 0; private: + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetUpdater.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetUpdater.hpp index 5fa147b1b..29af07389 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetUpdater.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplAirTargetUpdater.hpp @@ -61,6 +61,8 @@ protected: private: SInt32 m_UpdateCount = 0; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.cpp index f4ba3d6e2..aa635c627 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #ifdef WIN32 #define RAND48_SEED_0 (0x330e) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.hpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.hpp index 63b6b4e42..1b8534b75 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.hpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/GeoPairingImplFiredBullet.hpp @@ -121,6 +121,9 @@ protected: GeoPairingImplMeteoData m_MeteoData; GeoPairingImplImpactData m_ImpactData; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/geo_settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/geo_settings.h index c15d4d0e2..000446819 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/geo_settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/GeoPairingImpl/geo_settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.cpp index 32f77c2f4..f016f10b8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.cpp @@ -7,7 +7,6 @@ */ #include "handler_geopairing.h" -#include #include "settings.h" #include "GBL_ConfigSystem/geoconfig.h" #include "GeoPairingImpl/GeoPairingImpl.hpp" @@ -16,12 +15,12 @@ #include "GeoPairingImpl/GeoPairingImplBalistic.hpp" #include -#include +#include #include -#include -#include -#include +#include +#include +#include using namespace N_ConfigSystem; @@ -39,6 +38,7 @@ HandlerGeoPairing::HandlerGeoPairing(const std::shared_ptrsetSingleShot(true); @@ -116,7 +116,7 @@ bool HandlerGeoPairing::init() { // Fehlerfall: const QFileInfo qFileInfo(fileName); - ERROR_LOG(m_logger) << Q_FUNC_INFO << " initFilename failed: '" << qFileInfo.absoluteFilePath() << "'"; + ERROR_LOG(m_logger) << LOGFUNCTION << " initFilename failed: '" << qFileInfo.absoluteFilePath() << "'"; return false; } @@ -539,7 +539,7 @@ void HandlerGeoPairing::onSendGeopairingDataReply(const Core::FunctionReplyObjec void HandlerGeoPairing::sendFtcCesHitRequestTimeout() { auto ftcTab = m_ddsHandlerAes->ftcTab(); - for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap)) + for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap)) { DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr; ftcTab->sendCesHitRequest(hr, this); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.h index 73b8a39a2..015347cdd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/handler_geopairing.h @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include @@ -42,7 +42,6 @@ public: eElevationBelowZero = 3 }; private: -NGL::INGLLogger &m_logger; struct GeoPCharge { @@ -146,7 +145,7 @@ private: // attributes GeoPMunitonMap m_geoPMunMap; GeoPairing *m_geoPairingPtr; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace CesGeoPairing diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/logger.h index 2973d6f5c..885a10cc7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/logger.h @@ -9,7 +9,7 @@ #pragma once #include -// #include "cesplugingeopairing_export.h" // export macro not needed since it´s only WITHIN the lib/module +// #include "ces_export.h" // export macro not needed since it´s only WITHIN the lib/module namespace CesGeoPairing { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.cpp index 10fe12150..cdb50e4d7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.cpp @@ -32,7 +32,7 @@ CesGeoPairingInterfaceImpl::CesGeoPairingInterfaceImpl(CentralEffectSimulation:: , m_ddsHandler(m_mainHandler->dds()) , m_db(m_mainHandler->db()) , m_handlerParticipant(m_mainHandler->handlerParticipant()) - .getNGLLogger("CES.Plugin.GeoPairingInterfaceImpl")) + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.GeoPairingInterfaceImpl")) { Q_UNUSED(settings) } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.h index 44e554d03..f66843e03 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/plugin.h @@ -17,7 +17,7 @@ #include #include -#include +#include namespace CesGeoPairing { @@ -63,7 +63,6 @@ private Q_SLOTS: bool init(int domainId, int exerciseId) override; private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp{nullptr}; std::shared_ptr m_ddsConnector; @@ -75,6 +74,9 @@ private: std::shared_ptr m_handlerGeoPairing; ///< Pointer to handler for GeoPairing std::shared_ptr m_ballisticService; ///< Pointer Ballistic Service + + + NGL::INGLLogger &m_logger; int m_domainId = 0; int m_exerciseId = 0; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/settings.h index e6940b9d7..a5e93f1a2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/GeoPairing/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.cpp index 001c27618..a49f101ce 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.cpp @@ -8,11 +8,11 @@ #include "handler_jamming.h" -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.h index c13b68038..e95fffe5d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/handler_jamming.h @@ -57,7 +57,6 @@ public: bool init(); protected: - NGL::INGLLogger &m_logger; void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final; private Q_SLOTS: @@ -94,7 +93,7 @@ private: // attributes QHash> m_aesPolygonEncloseBuilding; // key = aesItemId value = BuildingIds inside form int m_requestId = 1; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace CES_JAMMING diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/plugin.h index f2fb353c9..09cf1f193 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/Jamming/plugin.h @@ -16,7 +16,7 @@ #include #include -#include +#include namespace CES_JAMMING diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/handler_mine_areas.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/handler_mine_areas.cpp index 47a158fa2..efc65d139 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/handler_mine_areas.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/handler_mine_areas.cpp @@ -7,17 +7,16 @@ */ #include "handler_mine_areas.h" -#include #include "CentralEffectSimulation/handler_participant.h" #include "settings.h" -#include -#include +#include +#include #include #include -#include -#include +#include +#include namespace dds { @@ -374,7 +373,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl // const QVector utmStepPoly = m_handlerParticipant->getParticipantStep(participantPos.participantId(), m_zone); - for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews)) + for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews)) { int remaining = m_ddsHandler->remainingTasCode(itemView.chargeStruct); DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/plugin.h index 190ee8f3b..afaf3b88e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/plugin.h @@ -15,7 +15,7 @@ #include #include -#include +#include namespace CesMineAreas diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/settings.h index 6490dbdb8..2c43d37b5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineAreas/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.cpp index 7e5a06f7f..cabf4d7ca 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.cpp @@ -8,10 +8,10 @@ #include "handler_mine_laying_artillery.h" -#include -#include -#include -#include +#include +#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.h index 9ec28326b..32ba99f1c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/handler_mine_laying_artillery.h @@ -15,8 +15,8 @@ #include #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/plugin.h index dbcf8c3f6..2732ebed7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MineLayingArtillery/plugin.h @@ -16,7 +16,7 @@ #include -#include +#include namespace MineLayingArtillery { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp index b586a3438..eafe7ce98 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.cpp @@ -8,11 +8,11 @@ #include "ces_mission_plan_handler.h" -#include -#include +#include +#include #include -#include +#include #include #include @@ -168,7 +168,7 @@ bool CesMissionPlanHandler::isUasInAutoMode(int participantId) return (uas.uasState() == ProjectDataManagement::UasState::Auto); } -// stolen from Lts/ParticipantManagement/Gui/ParticipantInfo/participant_info_dialog.cpp +// stolen from Lts/Plugins/ParticipantManagement/Gui/ParticipantInfo/participant_info_dialog.cpp bool CesMissionPlanHandler::isUasCombatReady(int participantId) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.h index ca98ec577..d32fe4153 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_handler.h @@ -43,7 +43,6 @@ public: bool init(); void updateMissionPlanList(const ParticipantManagement::MissionPlan &data); protected: - NGL::INGLLogger &m_logger; void sendNextMissionAction(); private Q_SLOTS: @@ -65,7 +64,7 @@ private: // attributes QHash m_missionPlanObjects; // Only: MissionBegin is reached and fulfilled = 0; int m_requestId = 1; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace CES_MISSIONPLAN diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.cpp index 43406b20c..f0e8109ef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.cpp @@ -8,8 +8,8 @@ #include "ces_mission_plan_object.h" #include "qobject.h" -#include -#include +#include +#include #include namespace CES_MISSIONPLAN { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.h index 7af3dcc4c..eb57d6df3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/ces_mission_plan_object.h @@ -9,14 +9,14 @@ #pragma once #include -#include +#include #include #include #include -#include +#include -#include +#include namespace CES_MISSIONPLAN { @@ -36,7 +36,6 @@ public: int participantId() const; /// uas participantId bool isMissionFulfilled(const ParticipantManagement::MissionPlan &mission); protected: - NGL::INGLLogger &m_logger; void sendActionAttact(); AreaEffectSimulation::ExplosionClusterSingleEffectOnlyRequest getExplosionCluster(); ParticipantManagement::MissionPlan &missionPlan(); @@ -63,7 +62,7 @@ private: QTimer *m_loiterTimer{nullptr}; std::shared_ptr m_ddsHandler; ParticipantManagement::MissionPlan m_missionPlan; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/plugin.h index ab0c73255..1d0ab6019 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/MissionPlan/plugin.h @@ -16,7 +16,7 @@ #include #include -#include +#include namespace CES_MISSIONPLAN diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/handler_nbc.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/handler_nbc.cpp index 8bfda50fd..12b757234 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/handler_nbc.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/handler_nbc.cpp @@ -7,12 +7,11 @@ */ #include "handler_nbc.h" -#include -#include -#include +#include +#include -#include +#include #include #include #include @@ -498,7 +497,7 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation:: DEBUG_LOG(m_logger) << "HandlerParticipantArea::calculateAesParticipant paricipantId: " << participantData.participantId() << " m_aesItemViews.size()=" << m_aesItemViews.size(); - for (const CentralEffectSimulation::AesItemViewUtm &itemView : std::as_const(m_aesItemViews)) + for (const CentralEffectSimulation::AesItemViewUtm &itemView : qAsConst(m_aesItemViews)) { DEBUG_LOG(m_logger) << " xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId; @@ -709,7 +708,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item InfrastructureManagement::StructureElement structureElement; bool roomFound = m_ddsHandler->dtcIsm()->getStructureElementById(participantData.roomId(), structureElement); - DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId() + DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId() << " pos.z=" << participantData.pos().z() << " upperOffset =" << itemView.upperOffset << " lowerOffset=" << itemView.lowerOffset @@ -721,7 +720,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item && ( ( structureElement.relPosition().offsetZ() + 1.5 > itemView.upperOffset ) || ( structureElement.relPosition().offsetZ() + 1.5 < itemView.lowerOffset))) { - DEBUG_LOG(m_logger) << "Participant id=" << participantData.participantId() + DEBUG_LOG (m_logger) << "Participant id=" << participantData.participantId() << " pos.z=" << participantData.pos().z() << " not between upperOffset =" << itemView.upperOffset << " and lowerOffset=" << itemView.lowerOffset diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/plugin.h index 04e14a6d3..319b2c751 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/NBC/plugin.h @@ -15,7 +15,7 @@ #include #include -#include +#include namespace CES_NBC diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_blocked_areas.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_blocked_areas.h index 1e7783044..a6a2c439d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_blocked_areas.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_blocked_areas.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.cpp index 08aca44f4..8971f04e2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.cpp @@ -7,7 +7,6 @@ */ #include "handler_participant_building.h" -#include #include #include @@ -303,7 +302,7 @@ void HandlerParticipantBuilding::sendCesHitToParticipant(const Buildings::Buildi void HandlerParticipantBuilding::sendFtcCesHitRequestTimeout() { auto ftcTab = m_ddsHandler->ftcTab(); - for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap)) + for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap)) { DEBUG_LOG(m_logger) << "sendFtcCesHitRequest: " << hr; ftcTab->sendCesHitRequest(hr, this); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.h index 087d66f71..58bf6b1f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/handler_participant_building.h @@ -15,7 +15,7 @@ #include #include -#include +#include #include // Handling for participants within buildings diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/plugin.h index 5481aae2f..8a2676c7f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/plugin.h @@ -19,7 +19,7 @@ #include #include -#include +#include namespace CesParticipantBuildings diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/settings.h index 84c969639..9c22ea0be 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/ParticipantBuildings/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/CMakeLists.txt index d5791e3f2..d26b16013 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/CMakeLists.txt @@ -20,7 +20,6 @@ SET(SRCS NGL_ADD_LIBRARY(AAR SV cesPluginTargetAreas MODULE ${SRCS}) NGL_INSTALL_TARGET(cesPluginTargetAreas) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(cesPluginTargetAreas Qt6::Core Qt6::Widgets @@ -33,5 +32,4 @@ NGL_TARGET_LINK_LIBRARIES(cesPluginTargetAreas LtsCoordTrans svcCoreClient ) -ENDIF(BUILD_RTI) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.cpp index a8b517bda..5f5591f33 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.cpp @@ -13,10 +13,12 @@ namespace TargetAreas { -DdsHandlerTargetAreas::DdsHandlerTargetAreas(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) +DdsHandlerTargetAreas::DdsHandlerTargetAreas(int domainId, int exerciseId) + : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) , m_participantEventId(0) - , m_exerciseId(exerciseId), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_exerciseId(exerciseId) + , m_logger(getLogger("DdsHandlerTargetAreas")) +{ DEBUG_LOG(m_logger) << "DdsHandlerTargetAreas(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.h index b058492da..1e2d5c44f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/dds_handler.h @@ -7,11 +7,11 @@ */ #pragma once -#include +#include #include #include #include -#include +#include #include #include #include @@ -53,8 +53,6 @@ private Q_SLOTS: void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType); private: - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; std::shared_ptr m_dtcCore; @@ -64,6 +62,8 @@ NGL::INGLLogger &m_logger; QMap m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number int m_participantEventId; int m_exerciseId; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/handler_target_areas.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/handler_target_areas.cpp index 58c95893f..fd7b8c5af 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/handler_target_areas.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/handler_target_areas.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include namespace TargetAreas @@ -22,6 +22,7 @@ HandlerTargetAreas::HandlerTargetAreas(const std::shared_ptr +#include //#include #include "logger.h" @@ -17,7 +17,7 @@ #include -#include +#include #include #include @@ -62,7 +62,6 @@ public: }; protected: - NGL::INGLLogger &m_logger; void onSendControlDataReply(const Core::FunctionReplyObject &reply) override final; void onSendCesHitInformationReply(const Core::FunctionReplyObject &reply) override final; void onSendCesHitReply(const Core::FunctionReplyObject &replyObject) override final; @@ -124,7 +123,7 @@ private: // attributes QHash m_requestMap; // Key = equipmentNumber - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace TargetAreas diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/logger.h index eff0bc000..92eada028 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "cesplugintargetareas_export.h" +#include namespace TargetAreas { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.cpp index 4293465b7..e0e294b08 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.cpp @@ -26,7 +26,7 @@ TargetAreasInterfaceImpl::TargetAreasInterfaceImpl(CentralEffectSimulation::Plug NGL::Settings *settings) : m_pdp(pdp) , m_ddsConnector(dDSConnector) - .getNGLLogger("CES.Plugin.TargetAreasInterfaceImpl")) + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("CES.Plugin.TargetAreasInterfaceImpl")) { Q_UNUSED(settings) } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.h index 05672c53f..d600aaf6e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/plugin.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include #include @@ -48,12 +48,12 @@ private Q_SLOTS: bool init(int domain_id, int exerciseId) override; private: -NGL::INGLLogger &m_logger; private: CentralEffectSimulation::Plugin::DataProvider *m_pdp; std::shared_ptr m_ddsConnector; std::shared_ptr m_handlerTargetAreas; std::shared_ptr m_ddsHandlerTargetAreas; + NGL::INGLLogger &m_logger; int m_domainId; int m_exerciseId; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp index 105bc4d03..6ad6aeff4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.cpp @@ -8,7 +8,7 @@ #include "targettimer.h" -#include +#include TargetTimer::TargetTimer(int participantId, int targetParticipantId, @@ -20,8 +20,8 @@ TargetTimer::TargetTimer(int participantId, m_preWarningInterval = preWarningInterval; m_timeToEffectInterval = timeToEffectInterval; timer = new QTimer(this); - connect(timer, &QTimer::timeout, - this, &TargetTimer::MyTimerSlot); + connect(timer, SIGNAL(timeout()), + this, SLOT(MyTimerSlot())); // msec } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.h index 593629bf0..e08901889 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/TargetAreas/targettimer.h @@ -11,8 +11,8 @@ #define TARGETTIMER_H -#include -#include +#include +#include class TargetTimer: public QObject { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.cpp index 5f0273076..00697c7d8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.cpp @@ -7,12 +7,11 @@ */ #include "handler_participant_booby_trap.h" -#include #include -#include -#include +#include +#include namespace CesVirtualMines { @@ -503,7 +502,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe return; } - for (const CentralEffectSimulation::AesItemViewUtm &boobyTrap : std::as_const(m_boobyTrapItems)) + for (const CentralEffectSimulation::AesItemViewUtm &boobyTrap : qAsConst(m_boobyTrapItems)) { if (!calculateBoobyTrapParticipant(boobyTrap, partPos)) continue; @@ -676,7 +675,7 @@ void HandlerParticipantBoobyTrap::sendFtcBoobyTrapTrigger(int aesItemId) void HandlerParticipantBoobyTrap::sendFtcCesHitRequestTimeout() { auto ftcTab = m_ddsHandler->ftcTab(); - for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap)) + for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap)) { DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr; ftcTab->sendCesHitRequest(hr, this); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.h index 081090407..8091e1678 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_booby_trap.h @@ -15,10 +15,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include // AES-Handling for participants diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.cpp index ba8ebe8af..83e69f409 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.cpp @@ -7,12 +7,11 @@ */ #include "handler_participant_off_route_mine.h" -#include #include -#include -#include +#include +#include namespace CesVirtualMines { @@ -347,7 +346,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE return; } - for (const CentralEffectSimulation::AesItemViewUtm &offRouteMine : std::as_const(m_offRouteMineItems)) + for (const CentralEffectSimulation::AesItemViewUtm &offRouteMine : qAsConst(m_offRouteMineItems)) { calculateOffRouteMineParticipant(offRouteMine, partPos); @@ -519,7 +518,7 @@ void HandlerParticipantOffRouteMine::sendFtcOffRouteMineTrigger(int aesItemId) void HandlerParticipantOffRouteMine::sendFtcCesHitRequestTimeout() { auto ftcTab = m_ddsHandler->ftcTab(); - for (const TrainingAreaBase::SendCesHitRequest &hr : std::as_const(m_requestMap)) + for (const TrainingAreaBase::SendCesHitRequest &hr : qAsConst(m_requestMap)) { DEBUG_LOG(m_logger) << "sendFtcCesHitRequestTimeout: " << hr; ftcTab->sendCesHitRequest(hr, this); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.h index 309396aee..4b9e3e2f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/handler_participant_off_route_mine.h @@ -13,10 +13,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include // AES-Handling for participants diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/plugin.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/plugin.h index 4ff02c319..abe963641 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/plugin.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/Plugins/VirtualMines/plugin.h @@ -18,7 +18,7 @@ #include #include -#include +#include namespace CesVirtualMines diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/aes_item_view_utm.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/aes_item_view_utm.h index bea16072f..c4a61badb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/aes_item_view_utm.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/aes_item_view_utm.h @@ -8,14 +8,14 @@ #pragma once -#include "svccesddscommon_export.h" +#include #include #include -#include +#include #include -#include +#include #include namespace CentralEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ces_plugin_interface.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ces_plugin_interface.h index 8dec28b9b..705481cea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ces_plugin_interface.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/ces_plugin_interface.h @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.cpp index cc2bf11fc..034d2335e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.cpp @@ -17,6 +17,7 @@ DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) , m_participantEventId(0) , m_exerciseId(exerciseId) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.h index 5f9b43c2a..c48faff8c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/dds_handler.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include #include #include @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include #include @@ -29,7 +29,7 @@ #include #include #include -#include "svccesddscommon_export.h" +#include #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.cpp index 68a87701a..ac9220b81 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.cpp @@ -7,12 +7,11 @@ */ #include "handler_building_data.h" -#include #include "settings.h" #include "handler_participant.h" -#include +#include #include -#include +#include #include @@ -79,7 +78,7 @@ void HandlerBuildingData::onMainStructureElementChanged(const InfrastructureMana m_mainStructureElements.insert(data.id(), data); DEBUG_LOG(m_logger) << "Got MainStructureElement: " << data; - for (const InfrastructureManagement::StructureElement &ele : std::as_const(data.elements())) + for (const InfrastructureManagement::StructureElement &ele : qAsConst(data.elements())) { if (ele.structureElementTypeId() == InfrastructureManagement::StructureElementType_def::Room) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.h index 1fb3bc5dc..b855cfdcf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_building_data.h @@ -9,12 +9,12 @@ #pragma once #include -#include "svccesddscommon_export.h" +#include #include -#include +#include #include -#include +#include // Data for buildings namespace CentralEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.cpp index c9d136fe0..11ddadb91 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include namespace CentralEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.h index 8c974358d..67472bb79 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/handler_participant.h @@ -13,12 +13,12 @@ #include "handler_building_data.h" #include -#include "svccesddscommon_export.h" +#include -#include +#include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/logger.h index 45b24ec24..ca84222f7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svccescommon_export.h" +#include "ces_export.h" namespace CentralEffectSimulation { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.cpp index 7c0ddd98c..78c1805d6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.cpp @@ -114,7 +114,7 @@ bool MainHandler::init(int domainId, int exerciseId) } - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " LtsElevationManager... "; + NOTICE_LOG(m_logger) << LOGFUNCTION << " LtsElevationManager... "; LtsElevation::LTS_ELEVATION_MANAGER_TYPE ltsElevationManager = LtsElevation::LtsElevationManager::createInstance(exerciseId, dds()->exmDtc(), @@ -126,7 +126,7 @@ bool MainHandler::init(int domainId, int exerciseId) // So the logMsg 'Finished reading elevation map of file' will be shown with a delay. // This is no error. ltsElevationManager->waitForInitialization(); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " LtsElevationManager... waitForInitialization DONE"; + DEBUG_LOG(m_logger) << LOGFUNCTION << " LtsElevationManager... waitForInitialization DONE"; // using elevationCbFunc = std::function; using namespace std::placeholders; @@ -134,11 +134,11 @@ bool MainHandler::init(int domainId, int exerciseId) ltsElevationManager.data(), _1, _2, _3, _4); LtsCoordTrans::LtsCoordinate::setElevationCallback(elevationCB); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " LtsElevationManager... LtsCoordinate::setElevationCallback DONE"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " LtsElevationManager... LtsCoordinate::setElevationCallback DONE"; } - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " LtsElevationManager... DONE "; + DEBUG_LOG(m_logger) << LOGFUNCTION << " LtsElevationManager... DONE "; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.h index 844e12747..6397150b7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/main_handler.h @@ -15,7 +15,7 @@ #include "dds_handler.h" #include -#include "svccesddscommon_export.h" +#include namespace NGLDB { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/point_helpers.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/point_helpers.h index 7c76182d7..0aa7d4c55 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/point_helpers.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/point_helpers.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.cpp index 2c9cb024c..f4d182a16 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.cpp @@ -15,7 +15,7 @@ namespace CentralEffectSimulation { -#define LOG_ERROR_NO_HNDL_BLDG_MDL ERROR_LOG(m_logger) << Q_FUNC_INFO << " no handlerBuildingModel" +#define LOG_ERROR_NO_HNDL_BLDG_MDL ERROR_LOG(m_logger) << LOGFUNCTION << " no handlerBuildingModel" #define CHECK_HNDL_BLDG_MDL_RETVAL if (!(isSet_handlerBuildingModel())) { LOG_ERROR_NO_HNDL_BLDG_MDL; return {}; } @@ -39,24 +39,24 @@ ProxyBuilding::ProxyBuilding(QObject *parent) , d(new Private) , m_logger(CentralEffectSimulation::getLogger("ProxyBuilding")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //----------------------------------------------------------------------------- ProxyBuilding::~ProxyBuilding() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; delete d; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } void ProxyBuilding::set_handlerBuildingModel(std::shared_ptr handlerBuildingModel) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - INFO_LOG(m_logger) << Q_FUNC_INFO << " set handlerBuildingModel to: " << handlerBuildingModel; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + INFO_LOG(m_logger) << LOGFUNCTION << " set handlerBuildingModel to: " << handlerBuildingModel; d->m_handlerBuildingModel_wPtr = handlerBuildingModel; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } void ProxyBuilding::clear_handlerBuildingModel() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.h index 769117eeb..c5acc9da7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/proxy_building.h @@ -10,11 +10,11 @@ #pragma once #include -#include "svccesddscommon_export.h" +#include #include -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.cpp index c602aebeb..900749b08 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.cpp @@ -8,8 +8,8 @@ #include "settings.h" -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.h index 7588403f9..0c2b841a1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CentralEffectSimulation/settings.h @@ -8,8 +8,8 @@ #pragma once -#include "svccesddscommon_export.h" -#include +#include +#include // forward: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/CMakeLists.txt index 7b4e42ee2..788907eb7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate cod_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcCodCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcCodCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcCodCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCodCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCodCommon ngldb NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCodCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate cod_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcCodClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcCodClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcCodClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCodClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCodClient svcCodCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCodClient) # @@ -101,14 +97,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate cod.sql, cod.xml CODEGEN_SQL(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcCodServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcCodServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcCodServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcCodServer PRIVATE RTI::nddscpp2 @@ -125,7 +120,6 @@ NGL_TARGET_LINK_LIBRARIES(svcCodServer NGLLogger ngltools ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcCodServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.cpp index 9330bbb25..1c3a757f2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.cpp @@ -12,6 +12,7 @@ using namespace CodificationManagement; DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.h index ce7de3398..28d29aee0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/dds_handler.h @@ -33,11 +33,12 @@ public: int exerciseId() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // Namespace CodificationManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.cpp index e162051d3..aebd7461b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.cpp @@ -7,7 +7,6 @@ */ #include "handler_codification_data.h" -#include #include "object_codification_data.h" using namespace CodificationManagement; @@ -18,6 +17,7 @@ HandlerCodificationData::HandlerCodificationData(const std::shared_ptrfts()) , m_ddsHandler(ddsHandler) , m_dbHandler(dbHandler) + , m_logger(getLogger("HandlerCodificationData")) { } // end of ctor() //----------------------------------------------------------------------------- @@ -39,7 +39,7 @@ bool HandlerCodificationData::init() } // create objects - for (const Database::CodCodificationTable &data : std::as_const(dataVec)) + for (const Database::CodCodificationTable &data : qAsConst(dataVec)) { CodificationManagement::CodificationData ddsData = ObjectCodificationData::toDdsData(data); ObjectCodificationData *ifs(new ObjectCodificationData(m_ddsHandler, m_dbHandler)); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.h index e723adfda..4caa7382e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/handler_codification_data.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "initialization.h" @@ -30,9 +30,6 @@ public: private: // FTS methods - - -NGL::INGLLogger &m_logger; void onCodificationDataModifyRequest(const rti::core::SampleIdentity &cookie, const CodificationData &request) override final; Core::FunctionReplyObject codificationDataCreateRequest(const CodificationData &request); @@ -45,5 +42,6 @@ private: // attributes std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; QMap m_codificationdataObjMap; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/initialization.h index fa3e78197..324c29806 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/initialization.h @@ -9,7 +9,7 @@ #include #include -#include "svccodserver_export.h" +#include #include class QSqlDatabase; @@ -30,13 +30,11 @@ public: bool loadFromDatabase(); private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler std::shared_ptr m_dbHandler; ///< Pointer to DB handler std::shared_ptr m_handlerCodificationData; ///< Pointer to codification data handler - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace CodificationManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/logger.h index dcb4113cf..e27ab2522 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svccodcommon_export.h" +#include "cod_export.h" namespace CodificationManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.cpp index ffaa2060c..ca1a112cd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.cpp @@ -15,6 +15,7 @@ ObjectCodificationData::ObjectCodificationData(const std::shared_ptr const std::shared_ptr &dbHandler) : m_ddsHandler(ddsHandler) , m_dbHandler(dbHandler) + , m_logger(getLogger("ObjectCodificationData")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.h index c94748e26..6eb391935 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/object_codification_data.h @@ -40,12 +40,13 @@ public: static Database::CodCodificationTable toDbData(const CodificationManagement::CodificationData &ddsData); // dds -> db protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; CodificationData m_ddsData; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/settings.h index 7de3e47c8..39046ea9b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/CodificationManagement/settings.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include "svccodserver_export.h" +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/CMakeLists.txt index fe27d2106..143a7531e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate esc_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcEscCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcEscCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEscCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEscCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEscCommon ngldb NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEscCommon) # @@ -61,14 +59,13 @@ SET(SRCS_client # generate esc_[d|f]tc.h, esc_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcEscClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcEscClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEscClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEscClient PRIVATE RTI::nddscpp2 @@ -77,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEscClient svcEscCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEscClient) # @@ -89,14 +85,13 @@ SET(SRCS_server # generate esc_[d|f]ts.h, esc_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcEscServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcEscServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEscServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEscServer PRIVATE RTI::nddscpp2 @@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEscServer PUBLIC svcEscCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEscServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.cpp index fd45609e4..bb8c1ca5e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.cpp @@ -7,21 +7,23 @@ */ #include "connection_handler_serial.h" -#include +#include -#include +#include namespace EffectShowClient { -ConnectionHandlerSerial::ConnectionHandlerSerial(QObject *parent) : QObject(parent) +ConnectionHandlerSerial::ConnectionHandlerSerial(QObject *parent) + : QObject(parent) , m_spQuerry(new LtsSerialPortQuerry::LtsSerialPortQuerry(this)) , m_serialPort(nullptr) , m_receiveTimeoutTimer(new QTimer(this)) , m_currentDataRead(QByteArray()) , m_portName(QStringLiteral("COM5")) - , m_readBuffer(new QByteArray()), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_readBuffer(new QByteArray()) + , m_logger(getLogger("ConnectionHandlerSerial")) +{ m_receiveTimeoutTimer->setInterval(1700); connect(m_spQuerry, &LtsSerialPortQuerry::LtsSerialPortQuerry::connectionEstablished, this, &ConnectionHandlerSerial::open); m_spQuerry->restartQuerry(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.h index 8f30dfe35..43f2ec3ab 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_serial.h @@ -11,8 +11,8 @@ #include "logger.h" #include -#include -#include +#include +#include #include @@ -47,7 +47,6 @@ private slots: void read(); private: - NGL::INGLLogger &m_logger; bool isValidCommandByte(const unsigned char command); bool isValidPayloadByte(const unsigned char payload); LtsSerialPortQuerry::LtsSerialPortQuerry *m_spQuerry; @@ -56,6 +55,7 @@ private: QByteArray m_currentDataRead; QString m_portName; QByteArray *m_readBuffer; + NGL::INGLLogger &m_logger; }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.cpp index 64dd3178f..0386ce3c1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.cpp @@ -8,18 +8,20 @@ #include "connection_handler_tcp.h" #include "settings.h" -#include +#include -#include +#include namespace EffectShowClient { -ConnectionHandlerTcp::ConnectionHandlerTcp(QObject *parent) : QObject(parent) +ConnectionHandlerTcp::ConnectionHandlerTcp(QObject *parent) + : QObject(parent) , m_socket(nullptr) , m_timer(new QTimer(this)) - , m_currentDataRead(QByteArray()), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_currentDataRead(QByteArray()) + , m_logger(getLogger("ConnectionHandlerTcp")) +{ m_timer->setInterval(5000); connect(m_timer, &QTimer::timeout, this, &ConnectionHandlerTcp::open); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.h index ab0cdd1e6..c7462a878 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/connection_handler_tcp.h @@ -8,10 +8,10 @@ #pragma once -#include -#include +#include +#include -#include +#include #include "logger.h" @@ -49,11 +49,11 @@ private slots: private: - NGL::INGLLogger &m_logger; bool isValidCommandByte(const unsigned char command); bool isValidPayloadByte(const unsigned char payload); QTcpSocket *m_socket; QTimer *m_timer; QByteArray m_currentDataRead; + NGL::INGLLogger &m_logger; }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.cpp index 24ffebb31..0045c8d0e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.cpp @@ -12,11 +12,13 @@ namespace EffectShowClient { -ControlUnitHandler::ControlUnitHandler(QObject *parent) : QObject(parent) +ControlUnitHandler::ControlUnitHandler(QObject *parent) + : QObject(parent) , m_connectionHandler(new ConnectionHandler(this)) , m_timer(new QTimer(this)) - , m_feature(EffectShowManagement::Feature_e::NotSpecified), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_feature(EffectShowManagement::Feature_e::NotSpecified) + , m_logger(getLogger("ControlUnitHandler")) +{ m_timer->setInterval(10000); connect(m_timer, &QTimer::timeout, this, &ControlUnitHandler::onConnectedToSerialConveter); m_timer->start(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.h index ed01651ef..5d8b02dd1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/control_unit_handler.h @@ -11,8 +11,8 @@ #include "logger.h" #include "handler_vehicle.h" #include "esc_helper.h" -#include -#include +#include +#include namespace EffectShowClient { @@ -59,10 +59,12 @@ private slots: void onDisconnectedFromSerialConveter(); private: - NGL::INGLLogger &m_logger; ConnectionHandler *m_connectionHandler; QTimer *m_timer; EffectShowManagement::Feature_e m_feature; + NGL::INGLLogger &m_logger; + + }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.cpp index c5c3723e5..1b8691081 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.cpp @@ -15,6 +15,7 @@ namespace EffectShowClient DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any, exerciseId)) , m_exerciseId(exerciseId) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.h index 1723aff90..b3f0b6b8b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/dds_handler.h @@ -47,7 +47,6 @@ public: std::shared_ptr dtcCore() const { return m_dtcCore;} private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_dtcCore; @@ -58,6 +57,8 @@ private: std::shared_ptr m_ftcNom; std::shared_ptr m_dtcAsm; int m_exerciseId; + + NGL::INGLLogger &m_logger; }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.cpp index 4463d6ab8..06ffe7c23 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.cpp @@ -8,7 +8,7 @@ */ #include "esc_convert_from_tab.h" -#include +#include namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.h index 3f8364bed..a2064d9e2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_from_tab.h @@ -10,7 +10,7 @@ #pragma once #include #include -#include +#include namespace EffectShowClient { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.cpp index b2cffaf77..ca71695d0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.cpp @@ -8,9 +8,9 @@ */ #include "esc_convert_to_tab.h" -#include -#include -#include +#include +#include +#include namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.h index 8eb5fdc88..323f7872d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_convert_to_tab.h @@ -10,7 +10,7 @@ #pragma once #include #include -#include +#include namespace EffectShowClient { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_helper.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_helper.h index 93f011365..242110729 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_helper.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/esc_helper.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace EffectShowClient { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp index 643572182..3934d7147 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.cpp @@ -13,8 +13,8 @@ #include "handler_order.h" #include "handler_vehicle.h" #include "control_unit_handler.h" -#include -#include +#include +#include #include namespace EffectShowClient @@ -25,6 +25,7 @@ HandlerFiringExplosion::HandlerFiringExplosion(MainHandler *mainHandler, : QObject(parent) , ManuallyExplosionRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerFiringExplosion")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.h index 53854904b..c90550299 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_explosion.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include #include "handler_vehicle.h" #include "dds_handler.h" @@ -54,17 +54,16 @@ private Q_SLOTS: void onEffectShowStarted(); private: - NGL::INGLLogger &m_logger; void onManuallyExplosionRequest(const rti::core::SampleIdentity &cookie, const ManuallyExplosionRequest &request); private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; EffectShowClient::FiringExplosionEntity m_firingExplosionEntity; bool m_isInterrupted = false; bool m_isNew = true; SafetyConfirmation_e m_lastState; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp index 0d137a6db..edfc8b2ea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.cpp @@ -14,8 +14,8 @@ #include "handler_tab_data.h" #include "handler_order.h" #include "handler_vehicle.h" -#include -#include +#include +#include #include namespace EffectShowClient @@ -26,6 +26,7 @@ HandlerFiringSmoke::HandlerFiringSmoke(MainHandler *mainHandler, : QObject(parent) , ManuallySmokeRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerFiringSmoke")) { DEBUG_LOG(m_logger) << "HandlerFiringSmoke ctor"; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.h index 86540fd1c..300a4cac9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_firing_smoke.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include #include "handler_vehicle.h" @@ -46,14 +46,13 @@ private Q_SLOTS: void onStatusSmokeFiring(const StatusSmokeFiring_t &statusSmokeFiring); private: - NGL::INGLLogger &m_logger; void onManuallySmokeRequest(const rti::core::SampleIdentity &cookie, const ManuallySmokeRequest &request); private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; EffectShowClient::FiringSmokeEntity m_firingSmokeEntity; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.cpp index 720b39722..ef0ece44d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.cpp @@ -16,7 +16,7 @@ #include "handler_tab_data.h" -#include +#include #include @@ -33,6 +33,7 @@ HandlerOperatingCondition::HandlerOperatingCondition(MainHandler *mainHandler, , m_isOperational(false) , m_oldErrorState(false) , m_operationalStatusTimer(new QTimer) + , m_logger(getLogger("HandlerOperatingCondition")) {} //============================================================================= HandlerOperatingCondition::~HandlerOperatingCondition() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.h index a2060ce19..9a863afe7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_operating_condition.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include "handler_vehicle.h" #include "dds_handler.h" #include "control_unit_handler.h" @@ -53,7 +53,6 @@ private slots: private: - NGL::INGLLogger &m_logger; void onSendAmmunitionRequest(const rti::core::SampleIdentity &cookie, const SendAmmunitionRequest &request); void onSendSafetyRevokeRequest(const rti::core::SampleIdentity &cookie, @@ -64,7 +63,6 @@ private: bool isErrorDmf(); private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler{nullptr}; CardRidges m_readyCardridges; CardRidges m_smokingCardridges; @@ -72,6 +70,9 @@ private: bool m_oldErrorState; QTimer *m_operationalStatusTimer{nullptr}; + + NGL::INGLLogger &m_logger; + EffectShowClient::OperatingConditionEntity m_operatingCondition; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.cpp index 48aaf8035..8136df8e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.cpp @@ -16,7 +16,7 @@ #include "handler_tab_data.h" #include "handler_vehicle.h" -#include +#include #include namespace EffectShowClient @@ -27,6 +27,7 @@ HandlerOrder::HandlerOrder(MainHandler *mainHandler, : QObject(parent) , OrderModifyRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerOrder")) {} //============================================================================= HandlerOrder::~HandlerOrder() @@ -144,7 +145,7 @@ void HandlerOrder::removeOrder(const ConvertFromTab::OrderRetract_t &orderRetrac int def = it.value()->getData().orderConfirmation; ret = it.value()->removeObject(); if (ret.error()) - ERROR_LOG(m_logger) << Q_FUNC_INFO << ret(); + ERROR_LOG(m_logger) << LOGFUNCTION << ret(); else { if (def == EffectShowManagement::OrderConfirmation_e_def::Execution || diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.h index e33f2a6d2..9c1335727 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_order.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include #include "dds_handler.h" #include "esc_convert_from_tab.h" @@ -47,13 +47,13 @@ Q_SIGNALS: void effectShowInterrupted(); private: - NGL::INGLLogger &m_logger; void onOrderModifyRequest(const rti::core::SampleIdentity &cookie, const OrderModifyRequest &request) override final; private: - NGL::INGLLogger &m_logger; QMap m_orderObjMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.cpp index 916ae5668..0bd010616 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.cpp @@ -5,7 +5,7 @@ * $Author$ * Created by hjl, SLSE, 2017-02-20 */ -#include +#include #include "main_handler.h" #include "handler_tab_data.h" #include "handler_order.h" @@ -22,6 +22,7 @@ HandlerTabData::HandlerTabData(MainHandler *mainHandler, : QObject(parent) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerTabData")) { } // end of ctor() //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.h index 525fae43d..ffbbcc7d7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_tab_data.h @@ -52,7 +52,6 @@ public: void vehicleStatus(const ConvertToTab::VehicleStatus_t &vehicleStatus); protected: - NGL::INGLLogger &m_logger; void onSendFireSmokeMarkerDataReply(const Core::FunctionReplyObject &reply) override final; Q_SIGNALS: @@ -64,6 +63,8 @@ private Q_SLOTS: private: // attributes MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.cpp index 078766049..bb9564cd3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.cpp @@ -11,19 +11,22 @@ #include "esc_helper.h" #include "control_unit_handler.h" -#include +#include #include -#include +#include namespace EffectShowClient { //============================================================================= HandlerVehicle::HandlerVehicle(MainHandler *mainHandler, - QObject *parent) : QObject(parent) + QObject *parent) + + : QObject(parent) , m_mainHandler(mainHandler) , m_volleyTimer(new QTimer(this)) - , m_remainingTimer(new QTimer(this)), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_remainingTimer(new QTimer(this)) + , m_logger(getLogger("HandlerVehicle")) +{ DEBUG_LOG(m_logger) << "HandlerVehicle ctor"; m_volleyTimer->setSingleShot(true); m_remainingTimer->setInterval(1000); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.h index 60e1e6b7b..a6076f4ba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/handler_vehicle.h @@ -12,9 +12,9 @@ #include "esc_convert_to_tab.h" #include "logger.h" #include "esc_helper.h" -#include -#include -#include +#include +#include +#include namespace EffectShowClient { @@ -85,7 +85,6 @@ public: void effectShowControl(EffectShowClient::EffectShowControl_e effectShowControl); private: - NGL::INGLLogger &m_logger; void spreadShotsInVolleys(int shots, int volleys); signals: @@ -126,6 +125,8 @@ private: // attributes StatusSmokeFiring_t m_statusSmokeFiring; QMap m_shotsInVolley; QMap m_pauseAfterVolley; + + NGL::INGLLogger &m_logger; }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/logger.h index d083922b2..9850c7497 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcesccommon_export.h" +#include "esc_export.h" namespace EffectShowClient { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.cpp index 622a68592..ba11402c1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.cpp @@ -19,7 +19,8 @@ namespace EffectShowClient { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) , m_handlerOrder(nullptr) @@ -28,8 +29,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent) , m_handlerFiringSmoke(nullptr) , m_handlerTabData(nullptr) , m_handlerVehicle(nullptr) - , m_handlerControlUnit(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_handlerControlUnit(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.h index e6764a1f2..060597bc1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include "dds_handler.h" #include @@ -48,7 +48,6 @@ public: std::shared_ptr handlerControlUnit() const { return m_handlerControlUnit; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; @@ -59,5 +58,8 @@ private: std::shared_ptr m_handlerTabData; std::shared_ptr m_handlerVehicle; std::shared_ptr m_handlerControlUnit; + + NGL::INGLLogger &m_logger; + }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.cpp index 3ed9fa510..54306e01b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.cpp @@ -19,6 +19,7 @@ namespace EffectShowClient ObjectOrder::ObjectOrder(MainHandler *mainHandler, QObject *parent) : QObject(parent) , m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectOrder")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.h index 462da1215..5c568434e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/object_order.h @@ -8,10 +8,10 @@ #include "dds_handler.h" #include "logger.h" -#include +#include #include -#include +#include // Generated #include @@ -40,7 +40,6 @@ class ObjectOrder Core::FunctionReplyObject updateObject() { return updateObject(m_data); } protected: - NGL::INGLLogger &m_logger; // Callbackfunctions for FTC void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override final; @@ -53,5 +52,7 @@ class ObjectOrder MainHandler *m_mainHandler; Database::EscOrder m_data; + + NGL::INGLLogger &m_logger; }; } // namespace EffectShowClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/settings.h index 6f34a402a..d597d5cde 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowClient/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/CMakeLists.txt index 81c24c295..679a81486 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) # Generate esm_db_impl.cpp/.h, esm_db.h CODEGEN_DATABASE(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcEsmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcEsmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEsmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEsmCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEsmCommon ngldb NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEsmCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate esm_[d|f]tc.h, esm_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcEsmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcEsmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEsmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEsmClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEsmClient svcEsmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEsmClient) # @@ -133,14 +129,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) CODEGEN_SQL(SRCS_server ${xml_FILE}) NGL_ADD_SVC_ICON(SRCS_server) -NGL_ADD_LIBRARY2(AAR SV svcEsmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcEsmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEsmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEsmServer PRIVATE RTI::nddscpp2 @@ -163,7 +158,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEsmServer ddsconnector NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEsmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp index 5ed402456..33508970e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.cpp @@ -16,6 +16,7 @@ namespace EffectShowManagement DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.h index 86fbbcf8d..6200abbf1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/dds_handler.h @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include #include @@ -65,7 +65,6 @@ public: qint64 currentPartitionTime() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; std::shared_ptr m_dtcCore; @@ -80,6 +79,7 @@ private: std::shared_ptr m_dtcMdm; std::shared_ptr m_dtcTab; std::shared_ptr m_ftcTab; + NGL::INGLLogger &m_logger; }; } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp index bda6a2e32..7cd53d48a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.cpp @@ -6,8 +6,8 @@ */ #include "effect_show_effect_cluster.h" -#include -#include +#include +#include #include "settings.h" const static int DEFAULT_EFFECT_DURATION = 777777; @@ -15,10 +15,12 @@ const static int DEFAULT_EFFECT_DURATION = 777777; namespace EffectShowManagement { EffectShowEffectCluster::EffectShowEffectCluster(const AreaEffectSimulation::EffectCluster &effectCluster, - const std::shared_ptr &handlerPdmData) : m_effectCluster(effectCluster) + const std::shared_ptr &handlerPdmData) + : m_effectCluster(effectCluster) , m_handlerPdmData(handlerPdmData) - , m_numOfEffectShows(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_numOfEffectShows(0) + , m_logger(getLogger("EffectShowEffectCluster")) +{ } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.h index e99eade9c..74c266a35 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_effect_cluster.h @@ -71,7 +71,6 @@ public: int getShotsPerArea() const; private: - NGL::INGLLogger &m_logger; /** * @brief Calculates the square of the each effect area. */ @@ -115,7 +114,6 @@ private: double rotationRad() const; private: - NGL::INGLLogger &m_logger; AreaEffectSimulation::EffectCluster const m_effectCluster; std::shared_ptr m_handlerPdmData; int m_numOfEffectShows; @@ -124,6 +122,9 @@ private: areas_t m_areasDepth; // squares in y-direction LtsCoordTrans::UtmCoordinate m_lowerLeftPos; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp index 1791817be..e97a83890 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.cpp @@ -10,10 +10,12 @@ namespace EffectShowManagement { EffectShowExplosionArea::EffectShowExplosionArea(const AreaEffectSimulation::ExplosionArea &explosionArea, - const std::shared_ptr &handlerPdmData) : m_explosionArea(explosionArea) + const std::shared_ptr &handlerPdmData) + : m_explosionArea(explosionArea) , m_handlerPdmData(handlerPdmData) - , m_numOfEffectShows(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_numOfEffectShows(0) + , m_logger(getLogger("EffectShowExplosionArea")) +{ } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.h index f8362df82..52e21698f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_area.h @@ -73,7 +73,6 @@ public: int getShotsPerArea() const; private: - NGL::INGLLogger &m_logger; /** * @brief Calculates the square of the each effect area. */ @@ -117,7 +116,6 @@ private: double rotationRad() const; private: - NGL::INGLLogger &m_logger; AreaEffectSimulation::ExplosionArea const m_explosionArea; std::shared_ptr m_handlerPdmData; int m_numOfEffectShows; @@ -126,6 +124,9 @@ private: areas_t m_areasDepth; // squares in y-direction LtsCoordTrans::UtmCoordinate m_lowerLeftPos; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp index 10eb4dd2b..a9d2154d8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.cpp @@ -10,10 +10,12 @@ namespace EffectShowManagement { EffectShowExplosionCluster::EffectShowExplosionCluster(const AreaEffectSimulation::ExplosionCluster &explosionCluster, - const std::shared_ptr &handlerPdmData) : m_explosionCluster(explosionCluster) + const std::shared_ptr &handlerPdmData) + : m_explosionCluster(explosionCluster) , m_handlerPdmData(handlerPdmData) - , m_numOfEffectShows(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_numOfEffectShows(0) + , m_logger(getLogger("EffectShowExplosionCluster")) +{ } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.h index 491400d44..abb766b26 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_explosion_cluster.h @@ -71,7 +71,6 @@ public: int getShotsPerArea() const; private: - NGL::INGLLogger &m_logger; /** * @brief Calculates the square of the each effect area. */ @@ -115,7 +114,6 @@ private: double rotationRad() const; private: - NGL::INGLLogger &m_logger; AreaEffectSimulation::ExplosionCluster const m_explosionCluster; std::shared_ptr m_handlerPdmData; int m_numOfEffectShows; @@ -124,6 +122,9 @@ private: areas_t m_areasDepth; // squares in y-direction LtsCoordTrans::UtmCoordinate m_lowerLeftPos; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp index cb66dc23f..d0666ca7a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.cpp @@ -7,15 +7,17 @@ #include "effect_show_mine_area.h" -#include +#include namespace EffectShowManagement { -EffectShowMineArea::EffectShowMineArea(const AreaEffectSimulation::MineArea &mineArea) : m_mineArea(mineArea) +EffectShowMineArea::EffectShowMineArea(const AreaEffectSimulation::MineArea &mineArea) + : m_mineArea(mineArea) , m_segment(getEffectShowSegment(mineArea)) , m_utmZone(-1) - , m_rotation(0.0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_rotation(0.0) + , m_logger(getLogger("EffectShowMineArea")) +{ } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h index cf01bf6ab..92b304bd3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/effect_show_mine_area.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace EffectShowManagement { @@ -60,7 +60,6 @@ public: } private: - NGL::INGLLogger &m_logger; /** * @brief Calculates the center position and the lower left position of the effect area. */ @@ -90,13 +89,13 @@ private: static LtsCoordTrans::UtmCoordinate rotate(const LtsCoordTrans::UtmCoordinate &p, const LtsCoordTrans::UtmCoordinate &c, double angle); private: - NGL::INGLLogger &m_logger; AreaEffectSimulation::MineArea const m_mineArea; const AreaEffectSimulation::MineSegment &m_segment; int m_utmZone; LtsCoordTrans::UtmCoordinate m_centerPos; LtsCoordTrans::UtmCoordinate m_lowerLeftPos; double m_rotation; // math angle [degree] + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp index a52973838..6a0d51b6c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.cpp @@ -8,7 +8,7 @@ */ #include "esm_convert_from_tab.h" -#include +#include namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.h index cc295e05a..3fab0f776 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_from_tab.h @@ -10,7 +10,7 @@ #pragma once #include #include -#include +#include namespace EffectShowManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp index 80b8b747f..3da49d2b1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.cpp @@ -8,9 +8,9 @@ */ #include "esm_convert_to_tab.h" -#include -#include -#include +#include +#include +#include namespace EffectShowManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.h index 5807430b4..b7a229cf2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/esm_convert_to_tab.h @@ -10,7 +10,7 @@ #pragma once #include #include -#include +#include namespace EffectShowManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp index 3991637e4..3a4a2931f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.cpp @@ -4,7 +4,7 @@ * $HeadURL$ * $Author$ */ -#include +#include #include "handler_aes_data.h" #include "object_aes_data.h" #include "handler_effect_show_vehicle_status.h" @@ -15,9 +15,11 @@ using namespace EffectShowManagement; -HandlerAesData::HandlerAesData(Initialization *mainHandler) : QObject() - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +HandlerAesData::HandlerAesData(Initialization *mainHandler) + : QObject() + , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerAesData")) +{ } // end of ctor() //============================================================================= HandlerAesData::~HandlerAesData() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.h index fbd41e255..eea2e4eba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_aes_data.h @@ -11,7 +11,7 @@ #include "logger.h" #include "handler_effect_show.h" #include -#include +#include namespace EffectShowManagement { @@ -76,7 +76,6 @@ private Q_SLOTS: void onMineAreaChanged(const AreaEffectSimulation::MineArea &data, DataModification modType); private: - NGL::INGLLogger &m_logger; /** * @brief Checks, if the status of the area effect simulation allows a treatment of its data. * @param effectStateId Status of the area effect simulatin data. @@ -94,6 +93,8 @@ private: private: // attributes QMap m_AesDataObjMap; Initialization *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp index dd1426e14..a00f694f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.cpp @@ -7,7 +7,6 @@ */ #include "handler_effect_show.h" -#include #include "handler_ppm_data.h" #include "handler_tab_data.h" #include "handler_mdm_data.h" @@ -33,6 +32,7 @@ HandlerEffectShow::HandlerEffectShow(Initialization *mainHandler, , m_cleanupTimer(new QTimer(this)) , m_timerMeteoData(new QTimer(this)) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerEffectShow")) {} // end of ctor() //============================================================================= @@ -610,7 +610,7 @@ void HandlerEffectShow::removeEffectShowsRelatedToAes(int idAes, bool retract) //------------------------------------------------------------------------------- void HandlerEffectShow::updateEffectShowsRelatedToMineArea(const AreaEffectSimulation::MineArea &data) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == data.id()) { @@ -624,7 +624,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToMineArea(const AreaEffectSimul //------------------------------------------------------------------------------- void HandlerEffectShow::updateEffectShowsRelatedToExplosionArea(const AreaEffectSimulation::ExplosionArea &data) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == data.id()) { @@ -638,7 +638,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToExplosionArea(const AreaEffect void HandlerEffectShow::updateEffectShowsRelatedToExplosionCluster(const AreaEffectSimulation::ExplosionCluster &data) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == data.id()) { @@ -652,7 +652,7 @@ void HandlerEffectShow::updateEffectShowsRelatedToExplosionCluster(const AreaEff void HandlerEffectShow::updateEffectShowsRelatedToEffectCluster(const AreaEffectSimulation::EffectCluster &data) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == data.id()) { @@ -726,7 +726,7 @@ void HandlerEffectShow::modifyEffectShows(const QVector //------------------------------------------------------------------------------- void HandlerEffectShow::updateEffectShowOrdersRelatedToAes(int idAes) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == idAes) triggerEffectShowOrder(obj); @@ -735,7 +735,7 @@ void HandlerEffectShow::updateEffectShowOrdersRelatedToAes(int idAes) //------------------------------------------------------------------------------- void HandlerEffectShow::pauseEffectShowsRelatedToAes(int idAes) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == idAes) triggerEffectShowStop(obj); @@ -744,7 +744,7 @@ void HandlerEffectShow::pauseEffectShowsRelatedToAes(int idAes) //------------------------------------------------------------------------------- void HandlerEffectShow::continueEffectShowsRelatedToAes(int idAes) { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { if (obj->getIdAES() == idAes) triggerEffectShowContinue(obj); @@ -891,7 +891,7 @@ void HandlerEffectShow::triggerMeteoData(const ObjectEffectShow *ifs) //----------------------------------------------------------------------------- void HandlerEffectShow::onSendMeteoData() { - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { const Database::EsmEffectShow &effectShow = obj->getData(); if (effectShow.esmParticipantId == -1) @@ -909,7 +909,7 @@ void HandlerEffectShow::onCleanUp() { DEBUG_LOG(m_logger) << "Start Cleanup "; QVector objects; - for (ObjectEffectShow *obj : std::as_const(m_effectShowObjMap)) + for (ObjectEffectShow *obj : qAsConst(m_effectShowObjMap)) { const Database::EsmEffectShow &effectShow = obj->getData(); if (effectShow.orderConfirmation == OrderConfirmation_e::OrderCarriedOut || effectShow.startTime <= 0 || effectShow.id <= 0) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.h index bd2a7c1cf..045627754 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "initialization.h" @@ -182,5 +182,7 @@ private: QTimer *m_timerMeteoData; Initialization *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp index d21942cd7..0e6dc5743 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.cpp @@ -13,8 +13,8 @@ #include "esm_db.h" #include "initialization.h" -#include -#include +#include +#include namespace EffectShowManagement { @@ -25,6 +25,7 @@ HandlerEffectShowActorRelocation::HandlerEffectShowActorRelocation(Initializatio , EffectShowActorRelocationModifyRequestHandler(mainHandler->dds()->fts()) , EffectShowActorRelocationRemoveRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerEffectShowActorRelocation")) {} //============================================================================= HandlerEffectShowActorRelocation::~HandlerEffectShowActorRelocation() @@ -145,7 +146,7 @@ void HandlerEffectShowActorRelocation::onEffectShowActorRelocationRemoveRequest( ret = ifs->removeObject(); if (ret.error()) - ERROR_LOG(m_logger) << Q_FUNC_INFO << ret(); + ERROR_LOG(m_logger) << LOGFUNCTION << ret(); else { // trigger relocation telegram to effect show actor diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.h index 05c04a7e1..d69eb5cb2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_actor_relocation.h @@ -7,9 +7,9 @@ */ #pragma once -#include +#include #include -#include +#include #include "dds_handler.h" #include "esm_convert_from_tab.h" @@ -57,7 +57,6 @@ public: void relocationOrderConfirmationReceived(const ConvertFromTab::OrderConfirmation_t &orderConfirmation); private: - NGL::INGLLogger &m_logger; void onEffectShowActorRelocationModifyRequest(const rti::core::SampleIdentity &cookie, const EffectShowActorRelocation &request) override final; Core::FunctionReplyObject effectShowActorRelocationModifyRequest(const EffectShowActorRelocation &request); @@ -67,7 +66,6 @@ private: private: - NGL::INGLLogger &m_logger; QMap m_effectShowActorRelocationObjMap; struct Completed_t { @@ -76,5 +74,7 @@ private: }; QQueue m_completed; // IDs and timestamp of the completed relocations Initialization *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.cpp index 36ad2a574..0bf0dd9ca 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.cpp @@ -14,15 +14,17 @@ #include "esm_db.h" #include "initialization.h" -#include +#include namespace EffectShowManagement { //============================================================================= HandlerEffectShowVehicleStatus::HandlerEffectShowVehicleStatus(Initialization *mainHandler, - QObject *parent) : QObject(parent) - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + QObject *parent) + : QObject(parent) + , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerEffectShowVehicleStatus")) +{ m_timerVehicleStatus.setSingleShot(true); } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.h index b6aeee559..5670b81e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_effect_show_vehicle_status.h @@ -7,9 +7,9 @@ */ #pragma once -#include -#include -#include +#include +#include +#include #include "dds_handler.h" #include "esm_convert_from_tab.h" @@ -87,16 +87,16 @@ public Q_SLOTS: void onTimeoutVehicleStatus(); private: - NGL::INGLLogger &m_logger; static const qint64 statusTimeout = 1800000; // 30 min timeout effect show vehicle status static const qint64 delayAfterStart = 20000; // 20 seconds delay for status requests after service start static const qint64 statusRequestInterval = 5000; // Status request time interval of 5 seconds private: - NGL::INGLLogger &m_logger; QMap m_effectShowVehicleStatusObjMap; // key = equipment number QVector m_statusRequest; // List of equipment numbers; Order List for request of vehicle status. QTimer m_timerVehicleStatus; Initialization *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp index ca37b8ebb..8935f0488 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.cpp @@ -6,7 +6,6 @@ */ #include "handler_mdm_data.h" -#include #include "initialization.h" #include #include "settings.h" @@ -14,9 +13,11 @@ using namespace EffectShowManagement; //============================================================================= HandlerMdmData::HandlerMdmData(const std::shared_ptr &ddsHandler, - QObject *parent) : QObject(parent) - , m_ddsHandler(ddsHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + QObject *parent) + : QObject(parent) + , m_ddsHandler(ddsHandler) + , m_logger(getLogger("HandlerMdmData")) +{ } //============================================================================= @@ -48,7 +49,7 @@ bool HandlerMdmData::getNearestWeather(const Core::GeoPosition2D &pos, double nearestDistanceSquared = std::numeric_limits::max(); bool found = false; - for (const auto &md : std::as_const(m_meteoData)) + for (const auto &md : qAsConst(m_meteoData)) { if (md.isStaticMeteoData()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.h index 990a79fa8..a3ba4f208 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_mdm_data.h @@ -8,7 +8,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include #include namespace EffectShowManagement @@ -40,8 +40,8 @@ private Q_SLOTS: void onMeteoDataChanged(const MeteoDataManagement::MeteoData &data, DataModification modType); private: - NGL::INGLLogger &m_logger; QHash m_meteoData; std::shared_ptr m_ddsHandler; + NGL::INGLLogger &m_logger; }; } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp index 9da14cdd3..3494bb52c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.cpp @@ -15,9 +15,12 @@ namespace EffectShowManagement //============================================================================= HandlerPdmData::HandlerPdmData(const std::shared_ptr &ddsHandler, - QObject *parent) : QObject(parent) - , m_ddsHandler(ddsHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + QObject *parent) + + : QObject(parent) + , m_ddsHandler(ddsHandler) + , m_logger(getLogger("HandlerPdmData")) +{ } // end of ctor() //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.h index 92ed6c9d5..1b5c9d729 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_pdm_data.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include #include // Project Data Management - Handling for Effect Show Actors @@ -35,9 +35,8 @@ public: int getCadence(const int chargeId) const; private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; + NGL::INGLLogger &m_logger; }; } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp index 0f042e57d..ceaf8ad3c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.cpp @@ -15,9 +15,11 @@ using namespace EffectShowManagement; //============================================================================= HandlerPpmData::HandlerPpmData(Initialization *mainHandler, - QObject *parent) : QObject(parent) - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + QObject *parent) + : QObject(parent) + , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerPpmData")) +{ } // end of ctor() //============================================================================= @@ -52,7 +54,7 @@ HandlerPpmData::Participant_t HandlerPpmData::getIdAndNameOfEffectShowActor(int return p; } - WARNING_LOG(m_logger) << Q_FUNC_INFO << " Equipment Number not found: " << equipmentNum; + WARNING_LOG(m_logger) << LOGFUNCTION << " Equipment Number not found: " << equipmentNum; return Participant_t(); // participant not available } // end of getIdAndNameOfEffectShowActor() @@ -63,7 +65,7 @@ int HandlerPpmData::getEquipmentNumber(int id) const auto it = m_participant.find(id); if (it == m_participant.end()) { - WARNING_LOG(m_logger) << Q_FUNC_INFO << " Participant(" << id << ") not found. "; + WARNING_LOG(m_logger) << LOGFUNCTION << " Participant(" << id << ") not found. "; return -1; // participant not available } return it.value().equipmentNumber; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h index 965d5f0c2..5aab2e572 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_ppm_data.h @@ -10,8 +10,8 @@ #include "initialization.h" #include "logger.h" -#include -#include +#include +#include // Participand Management-Handling for Effect Show Actors @@ -71,10 +71,10 @@ private Q_SLOTS: void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType); private: - NGL::INGLLogger &m_logger; QMap m_participant; // key = ID Initialization *m_mainHandler; + NGL::INGLLogger &m_logger; }; } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp index 8fe854081..3dc87b50a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.cpp @@ -5,8 +5,8 @@ * $Author$ * Created by hjl, SLSE, 2017-02-20 */ -#include -#include +#include +#include #include #include "initialization.h" #include "handler_tab_data.h" @@ -31,6 +31,7 @@ HandlerTabData::HandlerTabData(Initialization *mainHandler, : QObject(parent) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerTabData")) { } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.h index 47e0f7dc7..b1e76deea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/handler_tab_data.h @@ -102,7 +102,6 @@ public: void sendAdlerFqFb(const int aesId); protected: - NGL::INGLLogger &m_logger; void onSendFireSmokeMarkerDataReply(const Core::FunctionReplyObject &reply) override final; void onAdlerFqFbReply(const Core::FunctionReplyObject &reply) override final; @@ -114,6 +113,7 @@ private: private: // attributes Initialization *m_mainHandler; + NGL::INGLLogger &m_logger; QMap m_effectShowVehicleStatus; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/initialization.h index c1e7bb76f..a2d19f7a0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/initialization.h @@ -9,7 +9,7 @@ #include #include #include "dds_handler.h" -#include "svcesmserver_export.h" +#include "esm_export.h" #include "logger.h" namespace NGLDB @@ -52,7 +52,6 @@ public: int exerciseId() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; @@ -64,6 +63,9 @@ private: std::shared_ptr m_handlerEffectShow; std::shared_ptr m_handlerEffectShowActorRelocation; std::shared_ptr m_handlerEffectShowVehicleStatus; + + NGL::INGLLogger &m_logger; + }; } // namespace EffectShowManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/logger.h index 5a5314faa..4f29b54d2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcesmcommon_export.h" +#include "esm_export.h" namespace EffectShowManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp index 876cb375d..321c800b5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.cpp @@ -9,15 +9,17 @@ #include "effect_show_mine_area.h" #include "initialization.h" -#include +#include namespace EffectShowManagement { //============================================================================= ObjectAesData::ObjectAesData(Initialization *mainHandler, - QObject *parent) : QObject(parent) - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + QObject *parent) + : QObject(parent) + , m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectAesData")) +{ } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.h index 5d4b0ba33..7304666ce 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_aes_data.h @@ -6,11 +6,11 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -92,8 +92,10 @@ public: static Database::EsmAesData asEsmAesData(const AreaEffectSimulation::EffectCluster &data); private: - NGL::INGLLogger &m_logger; Initialization *m_mainHandler; Database::EsmAesData m_data; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp index 20904c618..594d63576 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.cpp @@ -16,6 +16,7 @@ namespace EffectShowManagement ObjectEffectShow::ObjectEffectShow(Initialization *mainHandler, QObject *parent) : QObject(parent) , m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectEffectShow")) { } // end of ctor() //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.h index 425a7e9b6..254c0f7df 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show.h @@ -6,13 +6,13 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "esm_convert_to_tab.h" #include "esm_convert_from_tab.h" #include "logger.h" -#include +#include #include #include @@ -60,9 +60,11 @@ public Q_SLOTS: void onPublishData(); private: - NGL::INGLLogger &m_logger; Initialization *m_mainHandler; Database::EsmEffectShow m_data; bool m_bRemoveFromDdsOnDestruction = true; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp index e8a263fa9..fb57e95ef 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.cpp @@ -14,6 +14,7 @@ namespace EffectShowManagement ObjectEffectShowActorRelocation::ObjectEffectShowActorRelocation(Initialization *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectEffectShowActorRelocation")) { } //============================================================================= diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.h index 8c1ed8474..692177f8a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_actor_relocation.h @@ -10,7 +10,7 @@ #include "esm_convert_to_tab.h" #include "logger.h" -#include +#include #include #include @@ -51,11 +51,13 @@ public: static Database::EsmEffectShowActorRelocation ddsToDb(const EffectShowManagement::EffectShowActorRelocation &ddsData); protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: Initialization *m_mainHandler; Database::EsmEffectShowActorRelocation m_data; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp index 8a1f180f0..c247635c6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.cpp @@ -14,6 +14,7 @@ namespace EffectShowManagement ObjectEffectShowVehicleStatus::ObjectEffectShowVehicleStatus(Initialization *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectEffectShowVehicleStatus")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.h index 4f7b08202..9887827e1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/object_effect_show_vehicle_status.h @@ -11,7 +11,7 @@ #include "handler_ppm_data.h" #include "logger.h" -#include +#include // Generated #include @@ -61,11 +61,13 @@ public: protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: Initialization *m_mainHandler; Database::EsmEffectShowVehicleStatus m_data; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/settings.h index 913c07a21..95d901018 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/EffectShowManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/CMakeLists.txt index acf3d026a..d54647a69 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/CMakeLists.txt @@ -39,13 +39,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate evl_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcEvlCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcEvlCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEvlCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEvlCommon PRIVATE RTI::nddscpp2 @@ -55,7 +54,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEvlCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEvlCommon) # @@ -67,14 +65,13 @@ SET(SRCS_client # generate evl_[d|f]tc.h, evl_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcEvlClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcEvlClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEvlClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEvlClient PRIVATE RTI::nddscpp2 @@ -83,7 +80,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEvlClient svcEvlCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEvlClient) # @@ -125,14 +121,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate evl.sql, evl.xml CODEGEN_SQL(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcEvlServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcEvlServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEvlServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEvlServer PRIVATE RTI::nddscpp2 @@ -148,7 +143,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEvlServer ngltools LtsCoordTrans ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEvlServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp index 01f10624d..c31c8639c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.cpp @@ -9,14 +9,14 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -28,6 +28,7 @@ using namespace Evaluations; //----------------------------------------------------------------------------- EvlTests::EvlTests(QObject *parent) : QObject(parent) + , m_logger(getLogger("EvlTests")) { qRegisterMetaType("Core::FunctionReply"); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.h index 2fb8aefb3..2961cc89d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/ModuleTests/evl_tests.h @@ -72,7 +72,6 @@ protected Q_SLOTS: void onReceiveCriteriumChanged(const EvaluationCriterium &data, DataModification modType); protected: - NGL::INGLLogger &m_logger; // Callbackfunctions for FTC void onEvlCriteriumModifyReply(const Core::FunctionReplyObject &replyObject) override final; void onEvlCriteriumRemoveReply(const Core::FunctionReplyObject &replyObject) override final; @@ -123,6 +122,8 @@ private: m_eTestStep = eUnknown; bool m_bTestsSuccessful = true; + NGL::INGLLogger &m_logger; + }; } // namespace Evaluations diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.cpp index f855ce41d..5e395b783 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.cpp @@ -15,6 +15,7 @@ namespace Evaluations DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.h index effcf805b..a19bd5369 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/dds_handler.h @@ -28,10 +28,11 @@ public: std::shared_ptr fts() const { return m_ddsFts; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace Evaluations diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/evl_db_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/evl_db_impl_custom.cpp index bd881c267..ad55b3406 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/evl_db_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/evl_db_impl_custom.cpp @@ -9,7 +9,7 @@ #include "evl_db_impl_custom.h" #include #include -#include +#include namespace Evaluations { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.cpp index a8a7ba464..c3a77db5d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.cpp @@ -18,6 +18,7 @@ HandlerComment::HandlerComment(const std::shared_ptr &ddsHandler, , Interface::Fts::EvlSchemaModifyRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerComment")) {} HandlerComment::~HandlerComment() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.h index 029d506b7..2811e0a90 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_comment.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -30,7 +30,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onEvlCommentModifyRequest(const rti::core::SampleIdentity &cookie, const EvlCommentModifyRequest &request) override final; @@ -38,12 +37,12 @@ private: const EvlSchemaModifyRequest &request) override final; private: - NGL::INGLLogger &m_logger; void createDefaultSchema(); QHash m_mapObjectComment; QHash m_mapObjectSchema; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.cpp index 2647978b0..2db5df67b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.cpp @@ -21,6 +21,7 @@ HandlerCriterium::HandlerCriterium(const std::shared_ptr &ddsHandler , Interface::Fts::EvlElementRemoveRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerCriterium")) {} HandlerCriterium::~HandlerCriterium() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.h index 83e98d7ce..d4110b737 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_criterium.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -31,7 +31,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onEvlCriteriumModifyRequest(const rti::core::SampleIdentity &cookie, const EvlCriteriumModifyRequest &request) override final; void onEvlCriteriumRemoveRequest(const rti::core::SampleIdentity &cookie, @@ -42,9 +41,10 @@ private: const EvlElementRemoveRequest &request) override final; private: - NGL::INGLLogger &m_logger; QHash m_criteriumObjMap; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.cpp index cb0629c53..cff9f6c6a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.cpp @@ -6,7 +6,6 @@ */ #include "handler_san_nine_liner.h" -#include #include "object_san_nine_liner.h" #include "object_san_category_line.h" #include "san_category_line_json.h" @@ -14,7 +13,7 @@ #include "settings.h" -#include +#include namespace Evaluations { @@ -25,6 +24,7 @@ HandlerSanNineLiner::HandlerSanNineLiner(const std::shared_ptr &ddsH , Interface::Fts::SanNineLinerRemoveRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerSanNineLiner")) {} HandlerSanNineLiner::~HandlerSanNineLiner() @@ -75,7 +75,7 @@ bool HandlerSanNineLiner::init() } // publish - for (ObjectSanNineLiner *objSan : std::as_const(m_mapObjectSanNineLiner)) + for (ObjectSanNineLiner *objSan : qAsConst(m_mapObjectSanNineLiner)) objSan->onPublishData(); return true; @@ -142,7 +142,7 @@ void HandlerSanNineLiner::onSanNineLinerModifyRequest(const rti::core::SampleIde QVector linesCategory = SanCategoryLine::fromJson(request.lines(), data.id); INFO_LOG(m_logger) << "LinesCategory count: " << linesCategory.count(); - for (Database::SanCategoryLine cl : std::as_const(linesCategory)) + for (Database::SanCategoryLine cl : qAsConst(linesCategory)) { ObjectSanCategoryLine *ifsCl(new ObjectSanCategoryLine(m_ddsHandler, m_db)); ret = ifsCl->createObject(cl); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.h index c2d3d3289..d4f152261 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/handler_san_nine_liner.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -30,7 +30,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onSanNineLinerModifyRequest(const rti::core::SampleIdentity &cookie, const SanNineLinerModifyRequest &request) override final; @@ -38,11 +37,11 @@ private: const Core::RemoveElementRequest &request) override final; private: - NGL::INGLLogger &m_logger; QHash m_mapObjectSanNineLiner; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; }; } // Namespace Evaluations diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.cpp index c2251cc90..41dd0ca67 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.cpp @@ -23,6 +23,7 @@ Initialization::Initialization() , m_dbHandler(nullptr) , m_handlerCriterium(nullptr) , m_handlerComment(nullptr) + , m_logger(getLogger("Initialization")) {} Initialization::~Initialization() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.h index 680083413..db731ddd7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/initialization.h @@ -8,7 +8,7 @@ #include #include -#include "svcevlserver_export.h" +#include #include class QSqlDatabase; @@ -31,11 +31,12 @@ public: bool loadFromDatabase(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::unique_ptr m_handlerCriterium; std::unique_ptr m_handlerComment; std::unique_ptr m_handlerSanNineLiner; + NGL::INGLLogger &m_logger; + }; } // namespace Evaluations diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/logger.h index e77c284c0..3200cd81d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcevlcommon_export.h" +#include "evl_export.h" namespace Evaluations { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.cpp index a96bc4340..1b25aab43 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.cpp @@ -13,6 +13,7 @@ ObjectComment::ObjectComment(const std::shared_ptr &ddsHandler, const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectComment")) { } @@ -78,6 +79,7 @@ ObjectSchema::ObjectSchema(const std::shared_ptr &ddsHandler, const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectSchema")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.h index a7acaede7..8b6d53609 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_comment.h @@ -9,7 +9,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -31,13 +31,14 @@ public: int getId() const { return m_data.id; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::EvlComment m_data; + + NGL::INGLLogger &m_logger; }; class ObjectSchema final @@ -54,12 +55,13 @@ public: int getId() const { return m_data.id; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::EvlSchema m_data; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.cpp index 1f441b94c..d9bc83bc8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.cpp @@ -6,7 +6,6 @@ */ #include "object_criterium.h" -#include #include "object_evaluation_element.h" namespace Evaluations @@ -16,6 +15,7 @@ ObjectCriterium::ObjectCriterium(const std::shared_ptr &ddsHandler, const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectCriterium")) { } @@ -55,7 +55,7 @@ Core::FunctionReplyObject ObjectCriterium::removeObject() if (!m_db->removeEvlCriterium(m_data.id)) return Core::FunctionReplyObject(m_data.id, tr_lts("dds", "EvlCriterium with id %1 can not be removed")).arg(m_data.id); - for (ObjectEvaluationElement *oee : std::as_const(m_elementsMap)) + for (ObjectEvaluationElement *oee : qAsConst(m_elementsMap)) oee->removeObject(); qDeleteAll(m_elementsMap); m_elementsMap.clear(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.h index d68361266..3566e4f90 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_criterium.h @@ -9,7 +9,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -39,10 +39,12 @@ protected Q_SLOTS: void onPublishData(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::EvlCriterium m_data; QHash m_elementsMap; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.cpp index 2ce697400..dd1a9a993 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.cpp @@ -14,6 +14,7 @@ ObjectEvaluationElement::ObjectEvaluationElement(const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectEvaluationElement")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.h index af1fb6463..ddc2060d9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_evaluation_element.h @@ -9,7 +9,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -35,9 +35,11 @@ protected Q_SLOTS: void onPublishData(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::EvlElement m_data; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.cpp index fc9b1f868..cc38117f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.cpp @@ -13,6 +13,7 @@ ObjectSanCategoryLine::ObjectSanCategoryLine(const std::shared_ptr & const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectSanCategoryLine")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.h index aac8d2ee8..fa79a9444 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_category_line.h @@ -9,7 +9,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -31,13 +31,14 @@ public: int getId() const { return m_data.id; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::SanCategoryLine m_data; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.cpp index 03861f455..1e2d5889f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.cpp @@ -14,6 +14,7 @@ ObjectSanNineLiner::ObjectSanNineLiner(const std::shared_ptr &ddsHan const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectSanNineLiner")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.h index f86aba031..31c4c8af3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/object_san_nine_liner.h @@ -9,7 +9,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -35,11 +35,12 @@ public: void onPublishData(); protected: - NGL::INGLLogger &m_logger; private: std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::SanNineLiner m_data; std::vector m_lines; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.cpp index 42913fd70..54b54261f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.cpp @@ -6,10 +6,9 @@ */ #include "san_category_line_json.h" -#include -#include -#include +#include +#include namespace Evaluations { @@ -55,7 +54,7 @@ QVector SanCategoryLine::fromJson(const std::string & QJsonDocument SanCategoryLine::toJson(std::vector vecCategoryLines) { QJsonArray arr; - for (const Database::SanCategoryLine &cl : std::as_const(vecCategoryLines)) + for (const Database::SanCategoryLine &cl : qAsConst(vecCategoryLines)) { QJsonObject obj; obj[QStringLiteral("id")] = cl.id; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.h index c9989989b..314eb8425 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/san_category_line_json.h @@ -3,7 +3,7 @@ #include "logger.h" -#include +#include #include namespace Evaluations @@ -19,8 +19,7 @@ namespace Evaluations static QJsonDocument toJson(std::vector vecCategoryLines); private: - - NGL::INGLLogger &m_logger; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/settings.h index 0412faf71..df73141e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Evaluations/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include "svcevlserver_export.h" +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/CMakeLists.txt index 807831e77..12acf3935 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/CMakeLists.txt @@ -35,13 +35,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate eem_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE} PARTS DTC) -NGL_ADD_LIBRARY2(AAR SV WS svcEemCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcEemCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEemCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEemCommon PRIVATE RTI::nddscpp2 @@ -53,7 +52,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEemCommon ngldb svcPdmCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEemCommon) # @@ -65,14 +63,13 @@ SET(SRCS_client # generate eem_[d|f]tc.h, eem_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE} PARTS DTC) -NGL_ADD_LIBRARY2(AAR SV WS svcEemClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcEemClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEemClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEemClient PRIVATE RTI::nddscpp2 @@ -81,7 +78,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEemClient svcEemCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEemClient) # @@ -93,14 +89,13 @@ SET(SRCS_server # generate eem_[d|f]ts.h, eem_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE} PARTS DTS) -NGL_ADD_LIBRARY2(AAR SV svcEemServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcEemServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcEemServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcEemServer PRIVATE RTI::nddscpp2 @@ -110,7 +105,6 @@ NGL_TARGET_LINK_LIBRARIES(svcEemServer svcEemCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcEemServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.cpp index c7a29ba21..3decfa2ab 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.cpp @@ -9,11 +9,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include /* Module tests for ExerciseEventManagement @@ -29,8 +29,10 @@ //----------------------------------------------------------------------------------------------------------------------- namespace ExerciseEventManagement { -EemTests::EemTests(QObject *parent) : QObject(parent), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +EemTests::EemTests(QObject *parent) + : QObject(parent) + , m_logger(getLogger("Test")) +{} //----------------------------------------------------------------------------------------------------------------------- bool EemTests::init(int domainId, int exerciseId, int testId) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.h index 9ec62169d..364bbcfd9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/ModuleTests/eem_tests.h @@ -47,7 +47,6 @@ protected Q_SLOTS: void failExit(); void ExitSuccess(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector42; std::shared_ptr m_ppmDts; std::shared_ptr m_tabDts; @@ -55,6 +54,8 @@ private: std::shared_ptr m_gimDts; std::shared_ptr m_dtc; bool m_bTestsSuccessful{true}; + + NGL::INGLLogger &m_logger; int m_testId{0}; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.cpp index f4890044f..3e98bfa49 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.cpp @@ -7,21 +7,22 @@ */ #include "web_socket_handler.h" -#include -#include +#include #include -#include -#include -#include +#include +#include +#include namespace ExerciseEventManagement { -WebSocketHandler::WebSocketHandler(QObject *parent) : QObject(parent) +WebSocketHandler::WebSocketHandler(QObject *parent) + : QObject(parent) , m_webSocketServer(new QWebSocketServer(QStringLiteral("AVS-Server"), QWebSocketServer::NonSecureMode, this)) - , m_timer(new QTimer()), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_timer(new QTimer()) + , m_logger(getLogger("Json.WebSocketHandler")) +{ connect(m_timer, &QTimer::timeout, this, &WebSocketHandler::onSendMessage); @@ -31,7 +32,7 @@ WebSocketHandler::WebSocketHandler(QObject *parent) : QObject(parent) WebSocketHandler::~WebSocketHandler() { - for (auto s : std::as_const(m_webSockets)) + for (auto s : qAsConst(m_webSockets)) { s->disconnect(this); s->close(); @@ -63,7 +64,7 @@ bool WebSocketHandler::sendTelegram(const QString &jsonStr) ERROR_LOG(m_logger) << "jsonStr" << jsonStr; bool bOk = false; - for (QWebSocket *ws : std::as_const(m_webSockets)) + for (QWebSocket *ws : qAsConst(m_webSockets)) { if (ws->sendTextMessage(jsonStr)) bOk = true; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.h index 99102a006..3ddb70000 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/WebSocketServer/web_socket_handler.h @@ -8,11 +8,11 @@ #pragma once -#include +#include #include -#include +#include #include -#include +#include #include "../logger.h" namespace ExerciseEventManagement @@ -40,10 +40,10 @@ private Q_SLOTS: void onWebSocketDisconnected(); void onSendMessage(); private: - NGL::INGLLogger &m_logger; QWebSocketServer *m_webSocketServer; QSet m_webSockets; QTimer *m_timer; + LOGGER_T m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.cpp index ef42d3dc9..9f9021608 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.cpp @@ -8,13 +8,14 @@ #include "dds_handler.h" -#include +#include namespace ExerciseEventManagement { DdsHandler::DdsHandler(int domainId, int partitionId, IDL::PartitionType partitionType) : m_ddsConnector(std::make_shared(domainId, partitionType, partitionId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.h index a928a7777..f6165336a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/dds_handler.h @@ -37,12 +37,13 @@ public: std::shared_ptr dtcIsm() const { return m_dtcIsm;} ///< Pointer to DTC InfrastructureManagement interface object private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsDts; std::shared_ptr m_dtcIsm; ///< Pointer to DTC InfrastructureManagement interface object Core::Pacemaker *m_pacemaker = nullptr; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.cpp index 6b346cfb3..2c96679ce 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.cpp @@ -7,7 +7,6 @@ */ #include "handler_dynamic_participant_data.h" -#include #include #include @@ -15,14 +14,14 @@ #include "web_socket_server.h" #include "settings.h" -#include +#include #include -#include -#include -#include +#include +#include +#include #include -#include +#include using namespace ExerciseEventManagement; @@ -30,11 +29,13 @@ using namespace ExerciseEventManagement; HandlerDynamicParticipantData::HandlerDynamicParticipantData(MainHandler *mainHandler, const std::shared_ptr &ddsHandler, const std::shared_ptr &db, - const std::shared_ptr &eventServer) : m_ddsHandler(ddsHandler) + const std::shared_ptr &eventServer) + : m_ddsHandler(ddsHandler) , m_dbHandler(db) , m_eventServer(eventServer) - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerDynamicParticipantData")) +{ } // end of ctor() //----------------------------------------------------------------------------- @@ -527,7 +528,7 @@ void HandlerDynamicParticipantData::onBuildingStateChanged(const Buildings::Buil for (const auto &cs: data.contaminationStates()) { QJsonArray roomArr; - for (const auto &roomId : std::as_const(cs.rooms())) + for (const auto &roomId : qAsConst(cs.rooms())) roomArr.append(QJsonValue(roomId)); contaminationArr.append(QJsonObject({{QStringLiteral("aesId") , cs.aesId()}, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.h index ff886993f..02eee12a8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_dynamic_participant_data.h @@ -11,7 +11,7 @@ #include "main_handler.h" #include "logger.h" -#include +#include #include #include #include @@ -68,8 +68,6 @@ private Q_SLOTS: void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType); private: // methoden - -NGL::INGLLogger &m_logger; void publishData(const Database::EemEvent &data); ExerciseEventManagement::Event toDdsData(const Database::EemEvent &data); @@ -90,7 +88,7 @@ private: // attributes QHash m_mainStructureElements; MainHandler *m_mainHandler; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace ExerciseEventManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.cpp index 69149f56f..8bdb0f9be 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.cpp @@ -15,25 +15,27 @@ #include -#include +#include #include -#include -#include -#include +#include +#include +#include -#include +#include using namespace ExerciseEventManagement; HandlerEquipmentErrorRegistration::HandlerEquipmentErrorRegistration(MainHandler *mainHandler, const std::shared_ptr &ddsHandler, const std::shared_ptr &db, - const std::shared_ptr &eventServer) : m_mainHandler(mainHandler) + const std::shared_ptr &eventServer) + : m_mainHandler(mainHandler) , m_ddsHandler(ddsHandler) , m_dbHandler(db) , m_eventServer(eventServer) - , m_ossDtc(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_ossDtc(nullptr) + , m_logger(getLogger("HandlerEquipmentErrorRegistration")) +{ } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.h index 538ae95ac..5322fb74e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_equipment_error_registration.h @@ -56,8 +56,6 @@ private Q_SLOTS: void onEquipmentErrorRegistrationChanged(const OcSituationServer::EquipmentErrorRegistration &data, DataModification modType); private: // methoden - -NGL::INGLLogger &m_logger; void publishData(const Database::EemEvent &data); ExerciseEventManagement::Event toDdsData(const Database::EemEvent &data); @@ -68,6 +66,9 @@ private: // attributes std::shared_ptr m_dbHandler; std::shared_ptr m_eventServer; std::shared_ptr m_ossDtc; + + NGL::INGLLogger &m_logger; + }; } // namespace ExerciseEventManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.cpp index 1a130bc35..ca0fc6793 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.cpp @@ -13,20 +13,22 @@ #include "settings.h" #include -#include -#include -#include +#include +#include +#include using namespace ExerciseEventManagement; HandlerParticipantEvent::HandlerParticipantEvent(MainHandler *mainHandler, const std::shared_ptr &ddsHandler, const std::shared_ptr &db, - const std::shared_ptr &eventServer) : m_ddsHandler(ddsHandler) + const std::shared_ptr &eventServer) + : m_ddsHandler(ddsHandler) , m_dbHandler(db) , m_eventServer(eventServer) - , m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerParticipantEvent")) +{ } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.h index 6aa7b84f1..34240438e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/handler_participant_event.h @@ -47,8 +47,6 @@ private Q_SLOTS: void onExplosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType); private: // methoden - -NGL::INGLLogger &m_logger; void publishData(const Database::EemEvent &data); ExerciseEventManagement::Event toDdsData(const Database::EemEvent &data); @@ -67,7 +65,7 @@ private: // attributes QMap m_aesMap; MainHandler *m_mainHandler; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace ExerciseEventManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/logger.h index b3f66aa9f..758700977 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svceemcommon_export.h" +#include "eem_export.h" namespace ExerciseEventManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.cpp index 451d293c7..5d24395ea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.cpp @@ -24,12 +24,14 @@ namespace ExerciseEventManagement { -MainHandler::MainHandler() : m_almService(nullptr) +MainHandler::MainHandler() + : m_almService(nullptr) , m_fltService(nullptr) , m_mrkService(nullptr) , m_evlService(nullptr) - , m_removeTimer(new QTimer(this)), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_removeTimer(new QTimer(this)) + , m_logger(getLogger("MainHandler")) +{ connect(m_removeTimer, &QTimer::timeout, this, &MainHandler::onRemoveKeys); m_removeTimer->setInterval(5000); m_removeTimer->setSingleShot(false); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.h index 347dc6ec8..34ad1d6e6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/main_handler.h @@ -51,7 +51,6 @@ public: void addEventIdToRemove(qint64 id); private: - NGL::INGLLogger &m_logger; bool initInternal(int domainId, int exerciseId); void onRemoveKeys(); bool loadFromDatabase(); @@ -74,5 +73,7 @@ private: QTimer *m_removeTimer; QMap> m_keysToRemove; + + LOGGER_T m_logger; }; } // namespace ExerciseEventManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.cpp index 886342448..161f45c24 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.cpp @@ -8,7 +8,7 @@ #include "settings.h" #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.h index 0f781c177..0939c3e18 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.cpp index 6141e2dad..d49c1624f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.cpp @@ -8,17 +8,16 @@ #include "web_socket_avs.h" -#include #include "web_socket_server.h" #include "main_handler.h" #include "settings.h" #include -#include -#include -#include -#include +#include +#include +#include +#include #include @@ -53,7 +52,8 @@ WebSocketAvs::WebSocketAvs(MainHandler *mainHandler, const std::shared_ptr &avmDtc, const std::shared_ptr &ismDtc, int exerciseId, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_ddsHandler(ddsHandler) , m_dbHandler(db) , m_eventServer(eventServer) @@ -65,8 +65,9 @@ WebSocketAvs::WebSocketAvs(MainHandler *mainHandler, , m_cleanupTimer(new QTimer(this)) , m_exerciseId(exerciseId) , m_lastUpdate(0) - , m_bWebSocketDisconnectedWarnedOnce(false), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_bWebSocketDisconnectedWarnedOnce(false) + , m_logger(getLogger("WebSocketAvs")) +{ connect(m_wsReconnectTimer, &QTimer::timeout, this, &WebSocketAvs::openWebSocket); @@ -563,7 +564,7 @@ void WebSocketAvs::onCleanUpDbInternal() } - for (const AvsData &oldEntry : std::as_const(ntpRangeSortLocal)) + for (const AvsData &oldEntry : qAsConst(ntpRangeSortLocal)) { const auto &item = collection.value(oldEntry.eventTime); @@ -679,7 +680,7 @@ QMap> WebSocketAvs::getAllInternalDbData() //qCritical() << "END select reading internal db "; DEBUG_LOG(m_logger) << "START Sync read local DB at " << QDateTime::fromMSecsSinceEpoch(m_lastUpdate).toString(); int j = 0; - for (const auto &dataI : std::as_const(dataVec)) + for (const auto &dataI : qAsConst(dataVec)) { if (m_lastUpdate > 0 && dataI.sampleTime < m_lastUpdate) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.h index ffdd13d1e..f7aebeaff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_avs.h @@ -9,9 +9,9 @@ #pragma once #include -#include -#include -#include +#include +#include +#include #include "logger.h" #include "dds_handler.h" @@ -86,13 +86,11 @@ private Q_SLOTS: QMap> getAllInternalDbData(); private: - NGL::INGLLogger &m_logger; AvsData jsonObjectToAvsData(const QJsonObject &obj); Database::EemEvent avsDataToEemEvent(const AvsData &data); ExerciseEventManagement::Event avsDataToEvent(const AvsData &data); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler std::shared_ptr m_dbHandler; std::shared_ptr m_eventServer; @@ -107,5 +105,6 @@ private: int m_exerciseId; qint64 m_lastUpdate; bool m_bWebSocketDisconnectedWarnedOnce; + LOGGER_T m_logger; }; } // namespace ExerciseEventManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.cpp index 100b4b2ee..709d5cec8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.cpp @@ -8,32 +8,33 @@ #include "web_socket_server.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include namespace ExerciseEventManagement { -WebSocketEventServer::WebSocketEventServer(const QSqlDatabase &db, QObject *parent) : QObject(parent) +WebSocketEventServer::WebSocketEventServer(const QSqlDatabase &db, QObject *parent) + : QObject(parent) , m_wsServer(nullptr) , m_cleanupTimer(new QTimer(this)) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_db(db) + , m_logger(getLogger("WebSocketEventServer")) +{ m_cleanupTimer->setInterval(10000); // clear every 10s connect(m_cleanupTimer, &QTimer::timeout, this, &WebSocketEventServer::onCleanupLiveHistory); } WebSocketEventServer::~WebSocketEventServer() { - for (auto s : std::as_const(m_liveSockets)) + for (auto s : qAsConst(m_liveSockets)) { s->disconnect(this); s->close(); @@ -82,7 +83,7 @@ void WebSocketEventServer::sendEvent(const QJsonObject &obj) { const QJsonDocument doc(obj); const QString msg = QString::fromUtf8(doc.toJson(QJsonDocument::Compact)); - for (QWebSocket *ws : std::as_const(m_liveSockets)) + for (QWebSocket *ws : qAsConst(m_liveSockets)) ws->sendTextMessage(msg); m_liveHistory[time(nullptr)].push_back(msg); } @@ -103,7 +104,7 @@ void WebSocketEventServer::onNewConnection() { connect(ws, &QWebSocket::disconnected, this, &WebSocketEventServer::onSocketDisconnected); - for (const auto &historyVec : std::as_const(m_liveHistory)) + for (const auto &historyVec : qAsConst(m_liveHistory)) { for (const auto &msg : historyVec) ws->sendTextMessage(msg); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.h index 06e6bc6c0..a9717194d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseEventManagement/web_socket_server.h @@ -8,11 +8,11 @@ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include "logger.h" @@ -35,7 +35,6 @@ public: void sendEvent(const QJsonObject &obj); private: -NGL::INGLLogger &m_logger; void onNewConnection(); void onSocketDisconnected(); void onCleanupLiveHistory(); @@ -46,5 +45,6 @@ private: QWebSocketServer *m_wsServer; QTimer *m_cleanupTimer; QSqlDatabase m_db; + NGL::INGLLogger &m_logger; }; } // namespace ExerciseEventManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/CMakeLists.txt index 179f5a27c..0c2d61a4a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate exm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcExmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcExmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcExmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcExmCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcExmCommon ngldb LtsUtilsCore ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcExmCommon) # @@ -61,14 +59,13 @@ SET(SRCS_client # generate exm_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcExmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcExmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcExmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcExmClient PRIVATE RTI::nddscpp2 @@ -77,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcExmClient svcExmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcExmClient) # @@ -90,14 +86,13 @@ SET(SRCS_server # generate exm_[d|f]ts.h, exm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcExmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(WS AAR SV svcExmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcExmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcExmServer PRIVATE RTI::nddscpp2 @@ -108,7 +103,6 @@ NGL_TARGET_LINK_LIBRARIES(svcExmServer svcExmCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcExmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.cpp index ac6d1cbc3..f5f9edc26 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.cpp @@ -19,10 +19,10 @@ #include #include -#include -#include +#include +#include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.h index b06b6d7cf..7773802c0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_statemachine_test.h @@ -7,7 +7,7 @@ #pragma once -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_tests.cpp index 233a41c97..cb673e48d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/ModuleTests/exm_tests.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include #include @@ -39,6 +39,7 @@ ExmTests::ExmTests(QObject *parent) , m_phaseId(0) , m_testId(0) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.cpp index 3bf973e0b..989af4cfe 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.cpp @@ -12,17 +12,18 @@ #include #include -#include +#include #include #include #include -#include -#include +#include +#include -DataTopicTests::DataTopicTests() : m_domainParticipantPub(nullptr) +DataTopicTests::DataTopicTests() + : m_domainParticipantPub(nullptr) , m_domainParticipantSub(nullptr) , m_domainId(0) , m_ddsPublisher(nullptr) @@ -32,8 +33,8 @@ DataTopicTests::DataTopicTests() : m_domainParticipantPub(nullptr) , m_subscriberListenerBinder(nullptr) , m_dtcExercise(nullptr) , m_mainThreadId(QThread::currentThreadId()) - .getNGLLogger("UnitTests.DataTopicTests")), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.DataTopicTests")) +{ if (!DDS::QosProfile::setDefault()) ERROR_LOG(m_logger) << "Error setting default QoS from xml-file "; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.h index 9b1876b4a..e0bb1df1c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests.h @@ -8,13 +8,13 @@ */ #pragma once -#include +#include #include // For Topic Exercise #include #include -#include +#include #include #include @@ -42,7 +42,6 @@ public: ExerciseManagement::Exercise getReceivedExerciseData() const { return m_receivedExerciseData; } protected: - NGL::INGLLogger &m_logger; // Subscriber Methods void processData(const ExerciseManagement::Exercise& instance, DataModification modType); @@ -68,6 +67,8 @@ private: Qt::HANDLE m_mainThreadId; // For returning TestData ExerciseManagement::Exercise m_receivedExerciseData; + + NGL::INGLLogger& m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.cpp index 7b77734f1..0d3c557ca 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.cpp @@ -12,7 +12,7 @@ #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.h index 5ee6f8a2d..97182c563 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/data_topic_tests_main.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include #include @@ -35,11 +35,12 @@ private Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: ExerciseManagement::Exercise m_sentExerciseData; QSignalSpy *m_exerciseDataArrivedSpy = nullptr; DataTopicTests *m_dtTest = nullptr; + NGL::INGLLogger &m_logger; + }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.cpp index 75144dbd3..569f4fd2d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.cpp @@ -11,18 +11,20 @@ #include #include -#include +#include -Initialisation::Initialisation() : m_domainParticipant(nullptr) +Initialisation::Initialisation() + : m_domainParticipant(nullptr) , m_domainParticipantSub(nullptr) , m_domainId(0) , m_partitionId(-1) , m_ddsPublisher(nullptr) , m_ddsSubscriber(nullptr) , m_subListener(new DTC::SubscriberListener) - .getNGLLogger("UnitTests.Initialisation")), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.Initialisation")) + +{ DDS::DefaultQos defaultQos; //if (!defaultQos.setDefaultQos(QStringList("/shd/CTC/SV/.default_dds_profile.xml"))) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.h index 9aad1d390..fdc66c839 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/UnitTests/initialisation.h @@ -38,7 +38,6 @@ public: DTC::SubscriberListener *getSubscriberListener() { return m_subListener; } private: - NGL::INGLLogger &m_logger; dds::domain::DomainParticipant m_domainParticipant; dds::domain::DomainParticipant m_domainParticipantSub; int m_domainId; @@ -47,6 +46,8 @@ private: dds::sub::Subscriber m_ddsSubscriber; DTC::SubscriberListener *m_subListener; + + NGL::INGLLogger &m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/Messages/reply_message.h index 58afaaf38..14f2518d6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/Messages/reply_message.h @@ -10,8 +10,8 @@ #include -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/json_keys.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/json_keys.h index 383911a67..115348830 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/json_keys.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/json_keys.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/websocket_interface_handler.cpp index 6a1402df1..c2eeec9a0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/convert_db_to_dds.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/convert_db_to_dds.h index 74aa9ac34..f6bedd900 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/convert_db_to_dds.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/convert_db_to_dds.h @@ -10,8 +10,8 @@ #include #include -#include -#include +#include +#include namespace ExerciseManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.cpp index 44df852a3..84be6d90b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace ExerciseManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.h index 6355a0715..3f99cf010 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/dds_handler.h @@ -12,7 +12,7 @@ #include #include #include -#include // for checkEquipmentNumbersOnAllExercises +#include // for checkEquipmentNumbersOnAllExercises #include // for checking double cnrconfigs in linked exercise #include "logger.h" @@ -42,7 +42,6 @@ public: std::shared_ptr ddsConnector() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; @@ -52,6 +51,8 @@ private: std::shared_ptr m_ppmDtc; std::shared_ptr m_avmDtc; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_base.h index 975662040..8ca4ef6ed 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_base.h @@ -24,15 +24,15 @@ namespace ExerciseManagement ExerciseManagement::ExerciseState exerciseState() const { return m_exerciseState; } protected: - NGL::INGLLogger &m_logger; ExerciseStateBase(const QString &objectName, const ExerciseState &exerciseState, ObjectExercise* objExe); void onEntry(QEvent *event); int exerciseId() const { return m_exercise ? m_exercise->id() : -1; } protected: - NGL::INGLLogger &m_logger; - ObjectExercise *m_exercise; + ObjectExercise *m_exercise; + NGL::INGLLogger &m_logger; + private: const ExerciseManagement::ExerciseState m_exerciseState; }; @@ -50,7 +50,6 @@ namespace ExerciseManagement public: explicit Creation(ObjectExercise *objExe); protected: - NGL::INGLLogger &m_logger; void onEntry(QEvent *event); }; @@ -60,7 +59,6 @@ namespace ExerciseManagement public: explicit Start(ObjectExercise *objExe); protected: - NGL::INGLLogger &m_logger; void onEntry(QEvent *event); void onExit(QEvent *event); }; @@ -78,7 +76,6 @@ namespace ExerciseManagement public: explicit Stop(ObjectExercise *objExe); protected: - NGL::INGLLogger &m_logger; void onEntry(QEvent *event); }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.cpp index 8e93a13ca..28d649620 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.cpp @@ -7,7 +7,6 @@ */ #include "exercise_state_machine.h" -#include #include "exercise_state_manager.h" #include "exercise_state_base.h" @@ -23,6 +22,7 @@ ExerciseStateMachine::ExerciseStateMachine(ObjectExercise* objExe, QObject *pare , m_stateManager(new ExerciseStateManager(objExe, this)) , m_stateMachine(new QStateMachine(this)) , m_exercise(objExe) + , m_logger(getLogger("ExerciseStateMachine")) { qRegisterMetaType("ExerciseManagement::ExerciseState"); @@ -77,7 +77,7 @@ ExerciseStateMachine::ExerciseStateMachine(ObjectExercise* objExe, QObject *pare // ---------------------------------------------------------------------------------------------------------- //States zur StateMachine hinzufügen - for (ExerciseStateBase *state : std::as_const(m_exerciseStates)) + for (ExerciseStateBase *state : qAsConst(m_exerciseStates)) { DEBUG_LOG(m_logger) << "Ex " << exerciseId() << ": state: " << state->exerciseState(); m_stateMachine->addState(state); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.h index cdbd3be0f..e35661755 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_machine.h @@ -10,7 +10,7 @@ #pragma once -#include +#include #include #include @@ -45,7 +45,6 @@ namespace ExerciseManagement void onEnteredState(); private: - NGL::INGLLogger &m_logger; ExerciseStateBase *getStateFromId(ExerciseManagement::ExerciseState exerciseState); int exerciseId() const; @@ -54,6 +53,8 @@ namespace ExerciseManagement QMap m_exerciseStates; ObjectExercise *m_exercise; + + NGL::INGLLogger &m_logger; }; } // namespace ExerciseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.cpp index 3e5febe0c..e78177678 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.cpp @@ -19,6 +19,7 @@ namespace ExerciseManagement : QObject(parent) , m_exerciseState(ExerciseState::Unknown) , m_exercise(objExe) + , m_logger(getLogger("ExerciseStateManager")) { m_stateSignals[ExerciseState::Unknown] = [&]() { emit stateUnknown(); }; m_stateSignals[ExerciseState::Created] = [&]() { emit stateCreated(); }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.h index 9db6e6e67..1f78435e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/exercise_state_manager.h @@ -8,9 +8,9 @@ #pragma once -#include +#include #include -#include +#include #include @@ -46,8 +46,6 @@ namespace ExerciseManagement void stateFalse(); private: - - NGL::INGLLogger &m_logger; void setStateInternal(ExerciseManagement::ExerciseState state); int exerciseId() const; @@ -55,6 +53,7 @@ namespace ExerciseManagement ExerciseManagement::ExerciseState m_exerciseState; ObjectExercise *m_exercise; + NGL::INGLLogger &m_logger; }; } // namespace ExerciseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.cpp index 6f1c01275..13633ac28 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.cpp @@ -7,21 +7,20 @@ */ #include "handler_exercise.h" -#include #include "exm_db.h" #include "handler_exercise_phase.h" #include "main_handler.h" #include "object_exercise.h" #include "settings.h" -//#include -#include +//#include +#include #include -#include +#include #include #include -#include +#include namespace ExerciseManagement { @@ -42,6 +41,7 @@ HandlerExercise::HandlerExercise(MainHandler *mainHandler, , m_db(db) , m_exTblGen(exTableGenerator) , m_startupExerciseTimer(new QTimer(this)) + , m_logger(getLogger("HandlerExercise")) { //m_imageCache.setMaxCost(15); m_startupExerciseTimer->setSingleShot(false); @@ -70,7 +70,7 @@ bool HandlerExercise::init() QVector> exerciseStates; exerciseStates.reserve(dataVec.size()); // create exercise objects - for (const Database::ExmExercise &data : std::as_const(dataVec)) + for (const Database::ExmExercise &data : qAsConst(dataVec)) { ObjectExercise *ifs(new ObjectExercise(m_ddsHandler, m_db, m_exTblGen, this)); Core::FunctionReplyObject ret = ifs->createObject(data); @@ -106,7 +106,7 @@ bool HandlerExercise::init() return a.first < b.first; }); - for (const auto &p : std::as_const(exerciseStates)) + for (const auto &p : qAsConst(exerciseStates)) m_exercisesToStart.enqueue(p.first); m_startupExerciseTimer->start(); @@ -211,7 +211,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseCreateRequest(const ExerciseC int iCnt = 0; QSet linkedExerciseIds; - for (const ObjectExercise *ex : std::as_const(m_exeObjMap)) + for (const ObjectExercise *ex : qAsConst(m_exeObjMap)) { const auto state = ex->exerciseState(); @@ -313,7 +313,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM int iCntRunningExercises = 0; QSet linkedExerciseIds; - for (const ObjectExercise *ex : std::as_const(m_exeObjMap)) + for (const ObjectExercise *ex : qAsConst(m_exeObjMap)) { const auto state = ex->exerciseState(); @@ -350,7 +350,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM if (request.newState() == ExerciseState::Stopped) { int iCnt = 0; - for (const ObjectExercise *ex : std::as_const(m_exeObjMap)) + for (const ObjectExercise *ex : qAsConst(m_exeObjMap)) { const auto state = ex->exerciseState(); if (ex->id() != request.id() && state == ExerciseState::Stopped) @@ -365,7 +365,7 @@ Core::FunctionReplyObject HandlerExercise::exerciseModifyRequest(const ExerciseM request.newState() == ExerciseState::Paused)) { int iCnt = 0; - for (const ObjectExercise *ex : std::as_const(m_exeObjMap)) + for (const ObjectExercise *ex : qAsConst(m_exeObjMap)) { if (ex->id() != request.id() && ex->data().hasHlaInterface && (ex->exerciseState() == ExerciseState::Started || ex->exerciseState() == ExerciseState::Paused)) @@ -663,7 +663,7 @@ void HandlerExercise::onStartGroupReply(const Core::FunctionReplyObject &replyOb bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStarted, QString &mesgOut) { - INFO_LOG(m_logger) << Q_FUNC_INFO <<" START, exerciseIdTobeStarted: " << exerciseIdToBeStarted; + INFO_LOG(m_logger) << LOGFUNCTION <<" START, exerciseIdTobeStarted: " << exerciseIdToBeStarted; // only one exercise, about to start if (m_exeObjMap.size() <= 1) @@ -684,7 +684,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar if (!ppmDtcForEx) { - WARNING_LOG(m_logger) << Q_FUNC_INFO << " no ppmDtcForEx (" << exerciseIdToBeStarted << ")"; + WARNING_LOG(m_logger) << LOGFUNCTION << " no ppmDtcForEx (" << exerciseIdToBeStarted << ")"; return true; } ppmDtcForEx->enableParticipant(); @@ -704,7 +704,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar std::shared_ptr ppmDtc = m_ddsHandler->ppmDtc(); if (!ppmDtc) { - WARNING_LOG(m_logger) << Q_FUNC_INFO << " no ppmDtc"; + WARNING_LOG(m_logger) << LOGFUNCTION << " no ppmDtc"; return true; } @@ -723,17 +723,17 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar ObjectExercise *ifs = m_exeObjMap.value(exerciseId); if (!ifs) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Exercise not found, exId = " << exerciseId; + ERROR_LOG(m_logger) << LOGFUNCTION << " Exercise not found, exId = " << exerciseId; return; } if ((ifs->exerciseState() == ExerciseState::Started) || (ifs->exerciseState() == ExerciseState::Paused)) { const std::vector &mapping = equipmentExerciseMapping.mapping(); - for (const auto &eq2p : std::as_const(mapping)) + for (const auto &eq2p : qAsConst(mapping)) if (eqNoForEx.contains(eq2p.equipmentNumber())) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " !!! eq = " << eq2p.equipmentNumber() << " is already used in exercise =" << exerciseId; + DEBUG_LOG(m_logger) << LOGFUNCTION << " !!! eq = " << eq2p.equipmentNumber() << " is already used in exercise =" << exerciseId; usedEqNumbers[exerciseId].insert(eq2p.equipmentNumber()); } } @@ -767,7 +767,7 @@ bool HandlerExercise::checkEquipmentNumbersOnAllExercises(int exerciseIdToBeStar } } // while - WARNING_LOG(m_logger) << Q_FUNC_INFO << " state change request not allowed: mesgOut:" << mesgOut; + WARNING_LOG(m_logger) << LOGFUNCTION << " state change request not allowed: mesgOut:" << mesgOut; // limit length: if (mesgOut.size()>200) @@ -811,7 +811,7 @@ QStringList HandlerExercise::doubleChannels(int exerciseAId, int exerciseBId) co doubleChannelNames.reserve(exerciseAChannelIds.size()); - for (int exerciseAChannelId : std::as_const(exerciseAChannelIds)) + for (int exerciseAChannelId : qAsConst(exerciseAChannelIds)) { if (exerciseBChannelIds.contains(exerciseAChannelId)) doubleChannelNames.append(QString::fromStdString(m_ddsHandler->avmDtc()->cnrChannel(exerciseAChannelId).name())); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.h index 125d45d3d..4a0657e43 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise.h @@ -8,11 +8,11 @@ */ #pragma once -#include +#include #include -#include +#include #include -#include +#include #include #include "dds_handler.h" @@ -73,10 +73,8 @@ public: // } // }; private: - NGL::INGLLogger &m_logger; void onStartNextExercise(); private: - NGL::INGLLogger &m_logger; /** * @brief HandlerExercise::hasError * checks if there is an error in the replyObject and, if given, deletes @@ -109,7 +107,6 @@ private: QStringList doubleChannels(int exerciseAId, int exerciseBId) const; private: - NGL::INGLLogger &m_logger; QHash m_exeObjMap; MainHandler *m_mainHandler; std::shared_ptr m_ddsHandler; @@ -118,5 +115,7 @@ private: QTimer *m_startupExerciseTimer; QQueue m_exercisesToStart; //QCache m_imageCache; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.cpp index 0cb2497a4..e486ae567 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.cpp @@ -7,8 +7,8 @@ #include "handler_exercise_phase.h" -#include -#include +#include +#include #include "dds_handler.h" #include "exm_db.h" @@ -29,6 +29,7 @@ HandlerExercisePhase::HandlerExercisePhase(MainHandler *mainHandler, , m_mainHandler(mainHandler) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerExercisePhase")) {} HandlerExercisePhase::~HandlerExercisePhase() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.h index c75ed5ed7..f6465bb1b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/handler_exercise_phase.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include "logger.h" #include "exm_fts.h" @@ -36,7 +36,6 @@ public: Core::FunctionReplyObject removeAllPhasesByExerciseId(qint64 exerciseId); private: - NGL::INGLLogger &m_logger; void onExercisePhaseCreateRequest(const rti::core::SampleIdentity &cookie, const ExercisePhaseCreateRequest &request) override final; void onExercisePhaseModifyRequest(const rti::core::SampleIdentity &cookie, @@ -45,11 +44,11 @@ private: const Core::RemoveElementRequest &request) override final; private: - NGL::INGLLogger &m_logger; QMap m_exercisePhaseObjMap; MainHandler *m_mainHandler; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; }; } // namespace ExerciseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/logger.h index 30a7acee0..e86b2b2b7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcexmcommon_export.h" +#include "exm_export.h" namespace ExerciseManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.cpp index 5c516e3c3..affebfcff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.cpp @@ -19,8 +19,10 @@ namespace ExerciseManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +MainHandler::MainHandler(QObject *parent) + : QObject(parent) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.h index 764a36935..7803db052 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include "dds_handler.h" #include "exm_db.h" @@ -39,7 +39,6 @@ public: std::shared_ptr dds() const { return m_ddsHandler; } private: - NGL::INGLLogger &m_logger; bool initDbAdminstration(); bool initExerciseHandler(); bool initExercisePhaseHandler(); @@ -47,12 +46,14 @@ private: void sendKeepAlive(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_handlerExercise; std::shared_ptr m_handlerExercisePhases; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_exTblGen; std::shared_ptr m_websocketHandler; + + NGL::INGLLogger &m_logger; + }; } // namespace ExerciseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.cpp index 7d3053b8c..56c1c2976 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.cpp @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include namespace ExerciseManagement { @@ -32,6 +32,7 @@ ObjectExercise::ObjectExercise(const std::shared_ptr &ddsHandler, , m_exTblGen(exTblGen) , m_exerciseHandler(exHandler) , m_copyExercise(nullptr) + , m_logger(getLogger("ObjectExercise")) { m_stateMachine = new ExerciseStateMachine(this); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.h index 1b4a9971f..14dcb2b43 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise.h @@ -6,9 +6,9 @@ */ #pragma once -#include +#include #include "dds_handler.h" -#include +#include // Generated #include @@ -68,14 +68,12 @@ namespace ExerciseManagement bool transferExerciseToEvaluationDb(); private: - NGL::INGLLogger &m_logger; void onPublishData(); void fixupTimeZone(); void onErrorOccured(); void onTransferDbFinished(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; const std::shared_ptr m_exTblGen; @@ -83,5 +81,7 @@ namespace ExerciseManagement ExerciseStateMachine *m_stateMachine; HandlerExercise *m_exerciseHandler; DBAdministration::CopyExercise *m_copyExercise; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.cpp index 8d3d9561f..4c40621f9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.cpp @@ -16,9 +16,11 @@ namespace ExerciseManagement { ObjectExercisePhase::ObjectExercisePhase(const std::shared_ptr &ddsHandler, - const std::shared_ptr &db) : m_ddsHandler(ddsHandler) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + const std::shared_ptr &db) + : m_ddsHandler(ddsHandler) + , m_db(db) + , m_logger(getLogger("ObjectExercisePhase")) +{} ObjectExercisePhase::~ObjectExercisePhase () {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.h index 0a19f7f1b..6525bc334 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/object_exercise_phase.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include // Generated #include @@ -33,12 +33,13 @@ public: bool isValid() const; protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::ExmExercisePhase m_data; + + NGL::INGLLogger &m_logger; }; } // namepace ExerciseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.cpp index f97c86b82..d95250ddf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.cpp @@ -11,7 +11,7 @@ #include #include -#include "LtsUtils/LtsUtilsCore/lts_portrange.h" +#include "LtsUtilsCore/lts_portrange.h" namespace ExerciseManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.h index 5c9f2ee64..21c1d2f09 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ExerciseManagement/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/CMakeLists.txt index b3aec8936..8757a7b97 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/CMakeLists.txt @@ -34,13 +34,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate flm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcFlmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcFlmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcFlmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcFlmCommon PRIVATE RTI::nddscpp2 @@ -51,7 +50,6 @@ NGL_TARGET_LINK_LIBRARIES(svcFlmCommon LtsUtilsCore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcFlmCommon) # @@ -65,14 +63,13 @@ SET(SRCS_client # generate flm_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcFlmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(WS AAR SV svcFlmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcFlmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcFlmClient PRIVATE RTI::nddscpp2 @@ -81,7 +78,6 @@ NGL_TARGET_LINK_LIBRARIES(svcFlmClient svcFlmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcFlmClient) # @@ -95,14 +91,13 @@ SET(SRCS_server # generate flm_[d|f]ts.h, flm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcFlmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(WS AAR SV svcFlmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcFlmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcFlmServer PRIVATE RTI::nddscpp2 @@ -113,7 +108,6 @@ NGL_TARGET_LINK_LIBRARIES(svcFlmServer ngldb LtsUtilsCore ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcFlmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.cpp index ed2c73e46..fc3cf8e10 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.cpp @@ -11,21 +11,20 @@ */ #include "flm_tests.h" -#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include -#include -#include +#include +#include #include #include #include @@ -53,6 +52,7 @@ FlmTests::FlmTests(QObject *parent) , m_fileContentId(-1) , m_operatorId(99) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } @@ -690,7 +690,7 @@ void FlmTests::tryGetAllTemplates() } DEBUG_LOG(m_logger) << "Found " << allTemplates.size() << " templates"; - for (const FileContent &fc : std::as_const(allTemplates)) + for (const FileContent &fc : qAsConst(allTemplates)) DEBUG_LOG(m_logger) << "Found template (id, name) = (" << fc.id() << ", " << fc.name() << ")"; QTest::qWait(1000); @@ -710,7 +710,7 @@ void FlmTests::tryGetAllPlans() } DEBUG_LOG(m_logger) << "Found " << allPlans.size() << " plans"; - for (const QString &plan : std::as_const(allPlans)) + for (const QString &plan : qAsConst(allPlans)) DEBUG_LOG(m_logger) << "Found plan = " << plan; QTest::qWait(1000); @@ -730,7 +730,7 @@ void FlmTests::tryGetAllFavs() } DEBUG_LOG(m_logger) << "Found " << allFavs.size() << " favs"; - for (const QString &fav : std::as_const(allFavs)) + for (const QString &fav : qAsConst(allFavs)) DEBUG_LOG(m_logger) << "Found fav = " << fav; QTest::qWait(1000); @@ -750,7 +750,7 @@ void FlmTests::tryGetAllSymbols() } DEBUG_LOG(m_logger) << "Found " << allSymbols.size() << " symbols"; - for (const QString &symbol : std::as_const(allSymbols)) + for (const QString &symbol : qAsConst(allSymbols)) DEBUG_LOG(m_logger) << "Found symbol = " << symbol; QTest::qWait(1000); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.h index 67a2c0a31..0ff28da8e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/ModuleTests/flm_tests.h @@ -21,7 +21,7 @@ #include #include -#include +#include #include namespace FileManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/client_message.cpp index c4d0430da..c0a3f2c8b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/client_message.cpp @@ -49,12 +49,14 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS ClientMessage::ClientMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) : LtsWebSocket::AbstractClientMessage(client, type, typeId, uuid, data) , m_dataManager(dataManager) + , m_logger(getLogger("ClientMessage")) {} // ####### ClientMessage end ####### // ####### BaseDlRequest begin ####### -BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) : ClientMessage(dataManager, client, type, typeId, uuid, data), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) + : ClientMessage(dataManager, client, type, typeId, uuid, data) +{} void BaseDlRequest::process() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/reply_message.h index 2ef1f91e4..a768685de 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/Messages/reply_message.h @@ -10,8 +10,8 @@ #include -#include -#include +#include +#include namespace FileManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/json_keys.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/json_keys.h index 8fac48e65..5c63fb895 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/json_keys.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/json_keys.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/websocket_interface_handler.cpp index a9d428f7e..1df8d0a36 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/base.h index 861151822..19c63416d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/base.h @@ -22,7 +22,6 @@ class Base : public QObject { Q_OBJECT protected: -NGL::INGLLogger &m_logger; explicit Base(MainHandler *mainHandler, NGL::INGLLogger &logger, QObject *parent = nullptr); virtual ~Base(); @@ -33,5 +32,6 @@ NGL::INGLLogger &m_logger; protected: MainHandler *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/convert_db_to_dds.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/convert_db_to_dds.h index 00a73db01..327116ec0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/convert_db_to_dds.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/convert_db_to_dds.h @@ -10,7 +10,7 @@ #include #include -#include +#include namespace FileManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.cpp index efccb6c32..3e8672694 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.cpp @@ -16,6 +16,7 @@ namespace FileManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.h index aba128833..827061ee6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/dds_handler.h @@ -40,13 +40,14 @@ public: std::shared_ptr fts() const { return m_ddsFts; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsDtc; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_db_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_db_impl_custom.cpp index b97770f4d..61788ce48 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_db_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_db_impl_custom.cpp @@ -9,7 +9,7 @@ #include "flm_db_impl_custom.h" #include #include -#include +#include namespace FileManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_dtc_impl_custom.cpp index 514822e0c..e1175dbf2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/flm_dtc_impl_custom.cpp @@ -12,8 +12,8 @@ #include #include -#include -#include +#include +#include #include //--------------------------------------------------------------------------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.cpp index 5e12d8c3f..9f885b8e1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.cpp @@ -14,8 +14,8 @@ #include "flm_db.h" #include "convert_db_to_dds.h" -#include -#include +#include +#include //---------------------------------------------------------------------------------------------------------------------------- namespace FileManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.h index a457afbe2..3299f4c9c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_content.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.cpp index e42020abd..e8d4917cd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.cpp @@ -16,8 +16,9 @@ //------------------------------------------------------------------------------------------------------ namespace FileManagement { -HandlerFileTypeInfo::HandlerFileTypeInfo(MainHandler *mainHandler) : Base(mainHandler, getLogger("HandlerFileTypeInfo")), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +HandlerFileTypeInfo::HandlerFileTypeInfo(MainHandler *mainHandler) + : Base(mainHandler, getLogger("HandlerFileTypeInfo")) +{} //------------------------------------------------------------------------------------------------------ HandlerFileTypeInfo::~HandlerFileTypeInfo() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.h index 3d0e0f2a8..03c9b2b0b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_file_type_info.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" @@ -29,8 +29,6 @@ public: QString getFileExtension(const FileManagement::FileType &fileType) const; private: - -NGL::INGLLogger &m_logger; QMap m_objectFileTypeInfoMap; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_folder.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_folder.h index 7b93dbf27..fd379deb5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_folder.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/handler_folder.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/logger.h index 96b7cc6b7..69b89f3e0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/logger.h @@ -10,7 +10,7 @@ #pragma once #include -#include "svcflmcommon_export.h" +#include "flm_export.h" namespace FileManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.cpp index a7d561a75..1b8cb8f52 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.cpp @@ -21,14 +21,16 @@ namespace FileManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) , m_handlerFileTypeInfo(nullptr) , m_handlerFolder(nullptr) , m_handlerFileContent(nullptr) - , m_handlerWebSocket(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_handlerWebSocket(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.h index 7fb15dd3f..140c0959e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/main_handler.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "flm_db.h" #include "logger.h" @@ -45,11 +45,9 @@ public: int exerciseId() const; private: - NGL::INGLLogger &m_logger; bool initFlmHandler(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_handlerFileTypeInfo; @@ -58,5 +56,8 @@ private: std::shared_ptr m_handlerWebSocket; std::unique_ptr m_thpScriptServer; std::unique_ptr m_pdfServer; + + NGL::INGLLogger &m_logger; + }; } // namespace FileManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_content.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_content.h index 2f8b20faf..a0d1ba93d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_content.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_content.h @@ -11,7 +11,7 @@ #include "base.h" -#include +#include // Generated #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_type_info.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_type_info.h index 3e5715a4d..4c73a99fa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_type_info.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_file_type_info.h @@ -11,7 +11,7 @@ #include "base.h" -#include +#include // Generated #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_folder.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_folder.h index a32a65fc5..9293d16f1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_folder.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/object_folder.h @@ -11,7 +11,7 @@ #include "base.h" -#include +#include // Generated #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.cpp index 27b83e4cd..a9aa21931 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.cpp @@ -16,8 +16,10 @@ namespace FileManagement { -CBI_PdfDownload::CBI_PdfDownload(unsigned short port) : CommandInterface(port, "PDF_DOWNLOAD"), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +CBI_PdfDownload::CBI_PdfDownload(unsigned short port) + : CommandInterface(port, "PDF_DOWNLOAD") + , m_logger(getLogger("PdfDownload")) +{} void CBI_PdfDownload::handleCommandInternal(const QVector &args) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.h index ce928d0d3..f2eb641e6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_download.h @@ -26,10 +26,9 @@ public: QString help() const override; protected: - -NGL::INGLLogger &m_logger; void handleCommandInternal(const QVector &args) override; private: + NGL::INGLLogger &m_logger; }; } // namespace FileManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.cpp index d7a03dd67..ec72b8cd7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.cpp @@ -16,9 +16,11 @@ namespace FileManagement { -PdfServer::PdfServer(MainHandler *mainHandler, QObject *parent) : QObject(parent) - , m_tcpServer(TcpServer::instance(NGL::Connections::port(NGL::Connections::eConnection::FLM_PDF_SERVER))), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +PdfServer::PdfServer(MainHandler *mainHandler, QObject *parent) + : QObject(parent) + , m_tcpServer(TcpServer::instance(NGL::Connections::port(NGL::Connections::eConnection::FLM_PDF_SERVER))) + , m_logger(getLogger("PdfServer")) +{ m_tcpServer->setUserData(mainHandler); m_tcpServer->setUseWorkerThreads(false); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.h index a7b740a18..b336a92da 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/pdf_server.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include #include "logger.h" @@ -27,7 +27,7 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; TcpServer *m_tcpServer; + NGL::INGLLogger &m_logger; }; } // namespace FileManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.cpp index 7f643aad0..502257d5a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.cpp @@ -13,7 +13,7 @@ #include #include -#include "LtsUtils/LtsUtilsCore/lts_portrange.h" +#include "LtsUtilsCore/lts_portrange.h" namespace FileManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.h index 6ac258921..bd89bf3ca 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/settings.h @@ -8,8 +8,8 @@ */ #pragma once -#include -#include +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp index 5a4a74533..5dd714223 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.cpp @@ -1,5 +1,4 @@ #include "thp_script_httq.h" -#include #include "logger.h" #include @@ -10,20 +9,20 @@ #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include -#include -#include -//#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +//#include +#include +#include +#include +#include +#include #define L QStringLiteral @@ -57,7 +56,7 @@ LoggerFactory *ThpScriptServer::createLoggerFactory() // Logger Logger::Logger(LoggerFactory *loggerFactory, QObject *parent) : httq::Logger(loggerFactory, parent) - .getNGLLogger(QString::fromUtf8(parent->metaObject()->className()).replace(QStringLiteral("::"), QStringLiteral(".")).toStdString())) // man man + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger(QString::fromUtf8(parent->metaObject()->className()).replace(QStringLiteral("::"), QStringLiteral(".")).toStdString())) // man man {} @@ -83,6 +82,7 @@ void Logger::error(const QString &message) ThpScriptServer::ThpScriptServer(QObject *parent) : AbstractServer(parent) , mWsSvr(new QWebSocketServer({}, QWebSocketServer::NonSecureMode, this)) + , m_logger(getLogger("ThpScriptServer")) { if (!listen(NGL::Connections::port(NGL::Connections::eConnection::FLM_THP_SERVER))) { @@ -348,7 +348,7 @@ void ThpScriptServer::changeList(const ThpServerInformation &tsi, httq::HttpRequ QVector tsiArray; tsiArray.reserve(arr.size() + 1); - for (const QJsonValue &val : std::as_const(arr)) + for (const QJsonValue &val : qAsConst(arr)) { ThpServerInformation tsix(fromJson(val)); if (tsix.scriptId == tsi.scriptId && tsix.exerciseId == tsi.exerciseId) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.h index 07284eca7..55dabc8f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FileManagement/thp_script_httq.h @@ -52,8 +52,7 @@ public: void error(const QString &message) override; private: - -NGL::INGLLogger &m_logger; + NGL::INGLLogger &m_logger; }; @@ -77,6 +76,8 @@ public : private: QWebSocketServer *mWsSvr; + NGL::INGLLogger &m_logger; + static QJsonObject noError(); bool newHttpConnection(httq::HttpRequest *request) override; virtual QWebSocketServer *webSocketServer() const override { return mWsSvr; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/CMakeLists.txt index 47ca29c7d..4b9e8a26e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate flt_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcFltCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcFltCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcFltCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcFltCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcFltCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcFltCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate flt_[d|f]tc.h, flt_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcFltClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcFltClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcFltClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcFltClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcFltClient svcFltCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcFltClient) # @@ -105,14 +101,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate flt.sql, flt.xml CODEGEN_SQL(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcFltServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcFltServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcFltServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcFltServer PRIVATE Qt6::Core @@ -127,7 +122,6 @@ NGL_TARGET_LINK_LIBRARIES(svcFltServer svcFltCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcFltServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.cpp index 369d38cfa..eb4355834 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.cpp @@ -15,12 +15,14 @@ namespace FilterManagement DdsHandler::DdsHandler(int domainId, int partitionId, IDL::PartitionType partitionType) : m_ddsConnector(std::make_shared(domainId, partitionType, partitionId)) + , m_logger(getLogger("DdsHandler")) { FATAL_LOG(m_logger) << "DdsHandler of domainId, partitionId ... (" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { FATAL_LOG(m_logger) << "DdsHandler of ddsConnector (" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.h index a1f0d7228..93f77d322 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/dds_handler.h @@ -40,12 +40,13 @@ public: std::shared_ptr ddsConnector() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; Core::Pacemaker *m_pacemaker{nullptr}; + + NGL::INGLLogger &m_logger; }; } // namespace FilterManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.cpp index 58f69d3aa..b04cf63d8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.cpp @@ -19,6 +19,7 @@ namespace FilterManagement HandlerAesFilter::HandlerAesFilter(Initialization *mainHandler) : Interface::Fts::AesFilterUpdateRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerAesFilter")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.h index f6bbbbde6..723c37461 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_aes_filter.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include "logger.h" @@ -28,7 +28,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void cleanup(); void onAesFilterUpdateRequest(const rti::core::SampleIdentity &cookie, const AesFilter &request) override; @@ -38,7 +37,6 @@ private: std::shared_ptr dds() const; private: - NGL::INGLLogger &m_logger; struct key { int operatorId = 0; @@ -58,5 +56,6 @@ private: QMap m_aesFilterMap; Initialization *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.cpp index 4edc5b45e..3efc8eaf8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.cpp @@ -19,6 +19,7 @@ namespace FilterManagement HandlerBuildingComponentFilter::HandlerBuildingComponentFilter(Initialization *mainHandler) : Interface::Fts::BuildingComponentFilterUpdateRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerBuildingComponentFilter")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.h index 5545c6d74..8236d8994 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_building_component_filter.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include "logger.h" @@ -28,7 +28,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void cleanup(); void onBuildingComponentFilterUpdateRequest(const rti::core::SampleIdentity &cookie, const BuildingComponentFilter &request) override; @@ -38,7 +37,6 @@ private: std::shared_ptr dds() const; private: - NGL::INGLLogger &m_logger; struct key { int operatorId = 0; @@ -58,5 +56,6 @@ private: QMap m_buildingComponentFilterMap; Initialization *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.cpp index cbecc2417..5819f9c9c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.cpp @@ -20,16 +20,17 @@ HandlerFilterDataUpdate::HandlerFilterDataUpdate(Initialization *mainHandler) : Interface::Fts::TriggerFilterDataUpdateRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::FilterDataUpdateRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("FilterDataUpdate")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } HandlerFilterDataUpdate::~HandlerFilterDataUpdate() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; cleanup(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } bool HandlerFilterDataUpdate::init() @@ -45,7 +46,7 @@ void HandlerFilterDataUpdate::cleanup() void HandlerFilterDataUpdate::onTriggerFilterDataUpdateRequest(const rti::core::SampleIdentity &cookie, const TriggerFilterData &request) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " TriggerFilterData: " << request; + DEBUG_LOG(m_logger) << LOGFUNCTION << " TriggerFilterData: " << request; auto ret = triggerFilterDataUpdateRequest(request); if (ret.error()) WARNING_LOG(m_logger) << ret(); @@ -60,7 +61,7 @@ Core::FunctionReplyObject HandlerFilterDataUpdate::triggerFilterDataUpdateReques void HandlerFilterDataUpdate::onFilterDataUpdateRequest(const rti::core::SampleIdentity &cookie, const FilterData &request) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " FilterData: " << request; + DEBUG_LOG(m_logger) << LOGFUNCTION << " FilterData: " << request; auto ret = filterDataUpdateRequest(request); if (ret.error()) WARNING_LOG(m_logger) << ret(); @@ -69,7 +70,7 @@ void HandlerFilterDataUpdate::onFilterDataUpdateRequest(const rti::core::SampleI Core::FunctionReplyObject HandlerFilterDataUpdate::filterDataUpdateRequest(const FilterData &request) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " FilterData: " << request; + DEBUG_LOG(m_logger) << LOGFUNCTION << " FilterData: " << request; const std::tuple k(request.operatorId(), request.screenId(), request.screenContainerId()); auto it = m_latestFilter.find(k); if (it == m_latestFilter.end()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.h index 2a1e3c8a7..6b00b8386 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_filter_data_update.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include "logger.h" @@ -29,7 +29,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void cleanup(); // @@ -51,7 +50,6 @@ private: std::shared_ptr dds() const; private: - NGL::INGLLogger &m_logger; struct key { int operatorId = 0; @@ -72,5 +70,6 @@ private: QMap, FilterData> m_latestFilter; Initialization *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.cpp index d4e5a0ad1..1058e2ef8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.cpp @@ -19,6 +19,7 @@ namespace FilterManagement HandlerSymbolAppearance::HandlerSymbolAppearance(Initialization *mainHandler) : Interface::Fts::SymbolAppearanceUpdateRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerSymbolAppearance")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.h index 73a2b8be1..027091438 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/handler_symbol_appearance.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include "logger.h" @@ -28,7 +28,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void cleanup(); void onSymbolAppearanceUpdateRequest(const rti::core::SampleIdentity &cookie, const SymbolAppearance &request) override; @@ -38,7 +37,6 @@ private: std::shared_ptr dds() const; private: - NGL::INGLLogger &m_logger; struct key { int operatorId = 0; @@ -58,5 +56,6 @@ private: QMap m_symbolAppearanceMap; Initialization *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/initialization.h index ad9228c90..014f4782c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/initialization.h @@ -42,12 +42,13 @@ public: std::shared_ptr db() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_handlerAesFilter; std::shared_ptr m_handlerBuildingComponentFilter; std::shared_ptr m_handlerSymbolAppearance; std::shared_ptr m_handlerFilterDataUpdate; + NGL::INGLLogger &m_logger; + }; } // namespace FilterManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/logger.h index 64727e50f..685291dc4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcfltcommon_export.h" +#include "flt_export.h" namespace FilterManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.cpp index 1969bc9e3..86570807e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.cpp @@ -15,8 +15,10 @@ namespace FilterManagement { -MainHandler::MainHandler() : m_fltService(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +MainHandler::MainHandler() + : m_fltService(nullptr) + , m_logger(getLogger("MainHandler")) +{ } MainHandler::~MainHandler() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.h index 237739c74..428c32a77 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/main_handler.h @@ -31,12 +31,13 @@ public: bool init(int domainId, int exerciseId); private: - NGL::INGLLogger &m_logger; bool initInternal(int domainId, int exerciseId); std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; FilterManagement::Initialization *m_fltService; + + LOGGER_T m_logger; }; } // namespace FilterManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/settings.h index 20f888c52..347cc5cce 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/FilterManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/CMakeLists.txt index 595941bcb..cf8d08370 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate gim_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcGimCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcGimCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcGimCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcGimCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcGimCommon LtsUtilsCore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcGimCommon) # @@ -63,14 +61,13 @@ 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_LIBRARY2(AAR SV WS svcGimClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcGimClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcGimClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcGimClient PRIVATE RTI::nddscpp2 @@ -79,7 +76,6 @@ NGL_TARGET_LINK_LIBRARIES(svcGimClient svcGimCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcGimClient) # @@ -91,14 +87,13 @@ 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_LIBRARY2(AAR SV svcGimServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcGimServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcGimServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcGimServer PRIVATE RTI::nddscpp2 @@ -108,7 +103,6 @@ NGL_TARGET_LINK_LIBRARIES(svcGimServer svcGimCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcGimServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.cpp index 77c1c4aa6..ae312140a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace GuezIedManagement DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.h index c4acef3e4..c98008348 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/dds_handler.h @@ -36,12 +36,13 @@ public: std::shared_ptr dds() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace GuezIedManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.cpp index c8c469e75..15cd3e465 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.cpp @@ -7,14 +7,13 @@ */ #include "handler_ied.h" -#include #include "object_ied.h" #include "main_handler.h" #include "gim_db.h" #include -#include +#include #include #include #include @@ -35,6 +34,7 @@ HandlerIed::HandlerIed(MainHandler *mainHandler, , m_tabDtc(nullptr) , m_ppmDtc(nullptr) , m_db(db) + , m_logger(getLogger("HandlerIed")) {} HandlerIed::~HandlerIed() @@ -75,7 +75,7 @@ bool HandlerIed::init() } // create Ied objects - for (const Database::GimIed &data : std::as_const(dataVec)) + for (const Database::GimIed &data : qAsConst(dataVec)) { ObjectIed *ifs(new ObjectIed(m_ddsHandler, m_db, m_ppmDtc, this)); Core::FunctionReplyObject ret = ifs->createObject(data); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.h index f92aa8303..93972296b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/handler_ied.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include "dds_handler.h" #include "logger.h" @@ -38,14 +38,12 @@ private slots: void onStateIed(const TrainingAreaBase::StateIed &data, DataModification modType); private: - NGL::INGLLogger &m_logger; void onPairIedRequest(const rti::core::SampleIdentity &cookie, const PairIedRequest &request) override; int getIdByEquipmentnumber(const int number) const; int getPartyIdFromParticipantEquipmentNumber(const int equipmentNumber) const; private: - NGL::INGLLogger &m_logger; QMap m_iedObjMap; QMap m_orphanedStateIed; MainHandler *m_mainHandler; @@ -53,5 +51,7 @@ private: std::shared_ptr m_tabDtc; std::shared_ptr m_ppmDtc; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/logger.h index 3d21052c9..78c226132 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcgimcommon_export.h" +#include "gim_export.h" namespace GuezIedManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.cpp index 7d3176d0b..3a33d5c29 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.cpp @@ -21,14 +21,16 @@ using namespace GuezIedManagement; -MainHandler::MainHandler() : m_handlerIed(nullptr) +MainHandler::MainHandler() + : m_handlerIed(nullptr) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) , m_codService(nullptr) , m_esmService(nullptr) , m_gmpService(nullptr) - , m_exerciseId(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_exerciseId(0) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.h index c659ee948..1c0527b9f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/main_handler.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include #include "dds_handler.h" @@ -47,10 +47,8 @@ public: bool loadFromDatabase(); private: - NGL::INGLLogger &m_logger; QString initInternal(int domainId, int exerciseId); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_handlerIed; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; @@ -60,5 +58,8 @@ private: GuezMinelayerProcessing::Initialization *m_gmpService; int m_exerciseId; + + NGL::INGLLogger &m_logger; + }; } // namespace GuezIedProcessing diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp index 8c42dcf6e..e19dcb43d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.cpp @@ -24,6 +24,7 @@ ObjectIed::ObjectIed(const std::shared_ptr &ddsHandler, , m_ddsHandler(ddsHandler) , m_db(db) , m_ppmDtc(ppmDtc) + , m_logger(getLogger("ObjectIed")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.h index 5a6ac4c25..695adc04a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/object_ied.h @@ -6,12 +6,12 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" -#include -#include +#include +#include // Generated #include @@ -47,7 +47,6 @@ private slots: void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType); private: - NGL::INGLLogger &m_logger; void assignBaseData(const Database::GimIed &data); void assignPairingState(const Database::GimIed &data); Core::FunctionReplyObject updateObject(); @@ -60,5 +59,8 @@ private: std::shared_ptr m_ppmDtc; Database::GimIed m_data; IedPosition m_position; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/settings.h index 379a5ca5d..9b12096e1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezIedManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/CMakeLists.txt index c906fd408..30ff0c271 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/CMakeLists.txt @@ -33,7 +33,7 @@ SET(SRCS # make sure xml file is properly installed CODEGEN_HANDLE_SVC_XML(SRCS ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcGmpServer SHARED ${SRCS}) +NGL_ADD_LIBRARY(AAR SV svcGmpServer SHARED ${SRCS}) NGL_TARGET_LINK_LIBRARIES(svcGmpServer Qt6::Core svcAesClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.cpp index 0e9818a09..62f045939 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.cpp @@ -9,8 +9,8 @@ #include "gmp_minefieldInterpreter_test.h" -#include -#include +#include +#include #include #include @@ -39,12 +39,12 @@ int main(int argc, char *argv[]) //------------------------------------------------------------------------------------------------------- GmpMinefieldInterpreterTestsMain::GmpMinefieldInterpreterTestsMain() - : m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) - , m_minefieldInterpreter(nullptr) + : m_minefieldInterpreter(nullptr) , m_receivedMinefield() , m_receivedVeType(0) , m_minefieldInterpreterTimer(nullptr) , m_minefieldSpy(nullptr) + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("Tests.GmpMinefieldInterpreterTest")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.h index 5797f319a..a00381517 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/UnitTests/gmp_minefieldInterpreter_test.h @@ -8,10 +8,10 @@ */ #pragma once -#include -#include +#include +#include #include -#include +#include #include "../zssi_wi_Minenfeld_Interpreter.h" @@ -37,8 +37,6 @@ private slots: void onSendMinefield(const wirkfeld_minensperre_rt &minefield, int veType); private: - -NGL::INGLLogger &m_logger; GuezMinelayerProcessing::ZSSI_WI_Minenfeld_Interpreter *m_minefieldInterpreter; wirkfeld_minensperre_rt m_receivedMinefield; @@ -46,4 +44,5 @@ NGL::INGLLogger &m_logger; QTimer *m_minefieldInterpreterTimer; QSignalSpy *m_minefieldSpy; + NGL::INGLLogger &m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.cpp index 941598b91..65a3fd18d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.cpp @@ -8,32 +8,20 @@ #include "dds_handler.h" -#if BUILD_RTI #include -#endif namespace GuezMinelayerProcessing { -#if BUILD_RTI DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) - , m_logger(getLogger("GuezMinelayerProcessing.DdsHandler")) - , m_topicLockMaster(std::make_shared()) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } -#else -DdsHandler::DdsHandler() - : m_logger(getLogger("GuezMinelayerProcessing.DdsHandler")) -{ - DEBUG_LOG(m_logger) << "DdsHandler() - RTI DDS not enabled"; -} -#endif bool DdsHandler::init(const QStringList &qosFileList) { -#if BUILD_RTI if (!m_ddsConnector->init(qosFileList)) { ERROR_LOG(m_logger) << "Error initializing dds connections - aborting"; @@ -42,10 +30,6 @@ bool DdsHandler::init(const QStringList &qosFileList) // default initialize Publisher and Subscriber m_ddsConnector->initPublisherSubscriber(); -#else - Q_UNUSED(qosFileList) - DEBUG_LOG(m_logger) << "DdsHandler::init() - RTI DDS not enabled, skipping initialization"; -#endif return true; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.h index 612463195..83cb11f2d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/dds_handler.h @@ -7,10 +7,8 @@ */ #pragma once -#if BUILD_RTI #include #include -#endif #include "logger.h" namespace GuezMinelayerProcessing @@ -18,26 +16,18 @@ namespace GuezMinelayerProcessing class DdsHandler final { public: -#if BUILD_RTI explicit DdsHandler(const std::shared_ptr &ddsConnector); -#else - explicit DdsHandler(); -#endif ~DdsHandler() = default; bool init(const QStringList &qosFileList = QStringList()); -#if BUILD_RTI std::shared_ptr ddsConnector() const { return m_ddsConnector; } std::shared_ptr topicLockMaster() const { return m_topicLockMaster; } -#endif private: - NGL::INGLLogger &m_logger; -#if BUILD_RTI std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; -#endif + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.cpp index 476d6e97e..ecc9b7df4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.cpp @@ -9,18 +9,14 @@ #include "handler_minelayer_data.h" -#if BUILD_RTI #include -#endif #include #include #include "dds_handler.h" #include "zssi_wi_Minenfeld_Interpreter.h" -#include - -#if BUILD_RTI +#include namespace GuezMinelayerProcessing { @@ -28,15 +24,13 @@ namespace GuezMinelayerProcessing HandlerMinelayerData::HandlerMinelayerData(const std::shared_ptr &ddsHandler, QObject *parent) : QObject(parent) - , m_logger(getLogger("GuezMinelayerProcessing.HandlerMinelayerData")) , m_ddsHandler(ddsHandler) -#if BUILD_RTI , m_tabDtc(nullptr) , m_ppmDtc(nullptr) , m_aesFtc(nullptr) -#endif , m_minefieldInterpreter(new ZSSI_WI_Minenfeld_Interpreter(this)) , m_minefieldInterpreterTimer(new QTimer(this)) + , m_logger(getLogger("HandlerMinelayerData")) {} HandlerMinelayerData::~HandlerMinelayerData() @@ -44,24 +38,19 @@ HandlerMinelayerData::~HandlerMinelayerData() bool HandlerMinelayerData::init() { -#if BUILD_RTI // AES-Ftc m_aesFtc = AreaEffectSimulation::Interface::Ftc::create(m_ddsHandler->ddsConnector()); bool ret = m_aesFtc->enableMineAreaModifyFromCtaData(); if (!ret) { - ERROR_LOG(m_logger) << "AesFtc Can not enable MineAreaModifyFromCtaData()"; + ERROR_LOG(m_logger) << "AesFtc Can not enable MineAreaCreateFromCtaData()"; return false; } -#endif // Data from training area base m_tabDtc = TrainingAreaBase::Interface::Dtc::create(m_ddsHandler->ddsConnector()); - bool ret = true; -#if BUILD_RTI ret &= m_tabDtc->enableSpecialSensorData(); -#endif ret &= m_tabDtc->enableMinelayerTrailerData(); ret &= m_tabDtc->enableMinelayerThrowerData(); if (!ret) @@ -70,17 +59,13 @@ bool HandlerMinelayerData::init() return false; } -#if BUILD_RTI connect(m_tabDtc.get(), &TrainingAreaBase::Interface::Dtc::specialSensorDataChanged, this, &HandlerMinelayerData::onSpecialSensorDataChanged); -#endif connect(m_tabDtc.get(), &TrainingAreaBase::Interface::Dtc::minelayerTrailerDataChanged, this, &HandlerMinelayerData::onMinelayerTrailerData); connect(m_tabDtc.get(), &TrainingAreaBase::Interface::Dtc::minelayerThrowerDataChanged, this, &HandlerMinelayerData::onMinelayerThrowerData); // PPM for partyId Mapping m_ppmDtc = ParticipantManagement::Interface::Dtc::create(m_ddsHandler->ddsConnector()); -#if BUILD_RTI ret &= m_ppmDtc->enableParticipant(); -#endif if (!ret) { ERROR_LOG(m_logger) << "PpmDtc Can not enable Participant Data"; @@ -98,7 +83,7 @@ bool HandlerMinelayerData::init() return ret; } -void HandlerMinelayerData::onSpecialSensorDataChanged(const TrainingAreaBase::SpecialSensorData &data, ParticipantManagement::DataModification modType) +void HandlerMinelayerData::onSpecialSensorDataChanged(const TrainingAreaBase::SpecialSensorData &data, DataModification modType) { if (modType != DataModification::eAdded && modType != DataModification::eModified) @@ -159,7 +144,7 @@ void HandlerMinelayerData::convertMinelayerDataToXdrData(const TrainingAreaBase: outData.verlegedaten.anzahl_verlegter_minen = inData.mineCount(); } -void HandlerMinelayerData::onMinelayerTrailerData(const TrainingAreaBase::MinelayerTrailerData &data, ParticipantManagement::DataModification modType) +void HandlerMinelayerData::onMinelayerTrailerData(const TrainingAreaBase::MinelayerTrailerData &data, DataModification modType) { if ((modType == DataModification::eAdded) || (modType == DataModification::eModified)) @@ -202,7 +187,7 @@ void HandlerMinelayerData::onMinelayerTrailerData(const TrainingAreaBase::Minela } } -void HandlerMinelayerData::onMinelayerThrowerData(const TrainingAreaBase::MinelayerThrowerData &data, ParticipantManagement::DataModification modType) +void HandlerMinelayerData::onMinelayerThrowerData(const TrainingAreaBase::MinelayerThrowerData &data, DataModification modType) { if ((modType == DataModification::eAdded) || (modType == DataModification::eModified)) @@ -306,7 +291,6 @@ static inline double compassFromMathAngleForSfm(int mathAngle) void HandlerMinelayerData::onSendMinefield(const wirkfeld_minensperre_rt &minefield, int fzArt) { -#if BUILD_RTI AreaEffectSimulation::MineArea outData; outData.participantId(minefield.header.identitaet); outData.partyId(partyIdFromEquipmentNumber(minefield.header.identitaet)); // Get from PPM; @@ -349,7 +333,7 @@ void HandlerMinelayerData::onSendMinefield(const wirkfeld_minensperre_rt &minefi // request create mine area from aes m_aesFtc->mineAreaModifyFromCtaDataRequest(outData, this); -#endif + } void HandlerMinelayerData::onStartMinefieldInterpreter() @@ -366,23 +350,4 @@ void HandlerMinelayerData::onMineAreaModifyFromCtaDataReply(const Core::Function INFO_LOG(m_logger) << "Got onMineAreaCreateFromCtaDataReply reply with id " << replyObject.id(); } -} // namespace GuezMinelayerProcessing - -#else // BUILD_RTI - -namespace GuezMinelayerProcessing -{ - -HandlerMinelayerData::HandlerMinelayerData(const std::shared_ptr &ddsHandler, - QObject *parent) - : QObject(parent) - , m_logger(getLogger("GuezMinelayerProcessing.HandlerMinelayerData")) - , m_ddsHandler(ddsHandler) -{} - -HandlerMinelayerData::~HandlerMinelayerData() -{} - -} // namespace GuezMinelayerProcessing - -#endif // BUILD_RTI +} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.h index 58a6fd9ae..789ca2d7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/handler_minelayer_data.h @@ -8,27 +8,22 @@ */ #pragma once -#include -#include -#include +#include +#include +#include +#include #include -#include +#include +#include #include "GFS_map_cont.h" #include "logger.h" -#if BUILD_RTI -#include -#include -#endif - namespace GuezMinelayerProcessing { class DdsHandler; class ZSSI_WI_Minenfeld_Interpreter; - -#if BUILD_RTI class HandlerMinelayerData : public QObject , protected AreaEffectSimulation::Interface::Ftc::MineAreaModifyFromCtaDataReplyHandler { @@ -43,14 +38,13 @@ public: void onMineAreaModifyFromCtaDataReply(const Core::FunctionReplyObject &replyObject) override final; private slots: - void onSpecialSensorDataChanged(const TrainingAreaBase::SpecialSensorData &data, ParticipantManagement::DataModification modType); - void onMinelayerTrailerData(const TrainingAreaBase::MinelayerTrailerData &data, ParticipantManagement::DataModification modType); - void onMinelayerThrowerData(const TrainingAreaBase::MinelayerThrowerData &data, ParticipantManagement::DataModification modType); + void onSpecialSensorDataChanged(const TrainingAreaBase::SpecialSensorData &data, DataModification modType); + void onMinelayerTrailerData(const TrainingAreaBase::MinelayerTrailerData &data, DataModification modType); + void onMinelayerThrowerData(const TrainingAreaBase::MinelayerThrowerData &data, DataModification modType); void onSendMinefield(const wirkfeld_minensperre_rt &minefield, int fzArt); void onStartMinefieldInterpreter (); private: - NGL::INGLLogger &m_logger; template void convertMinelayerDataToXdrData(const TrainingAreaBase::MinelayerTrailerData &inData, T &outData); Core::GeoPosition2D geographicFromRelative(const gps_position_rt &position) const; @@ -66,23 +60,8 @@ private: ZSSI_WI_Minenfeld_Interpreter *m_minefieldInterpreter; QTimer *m_minefieldInterpreterTimer; + + NGL::INGLLogger &m_logger; + }; -#else -// Stub implementation when BUILD_RTI is OFF -class HandlerMinelayerData : public QObject -{ - Q_OBJECT -public: - explicit HandlerMinelayerData(const std::shared_ptr &ddsHandler, - QObject *parent = nullptr); - ~HandlerMinelayerData(); - - bool init() { return false; } - -private: - NGL::INGLLogger &m_logger; - std::shared_ptr m_ddsHandler; -}; -#endif // BUILD_RTI - } // namespace GuezMinelayerProcessing diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.cpp index e4638fb4d..ef45860f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.cpp @@ -9,35 +9,24 @@ #include "dds_handler.h" #include "handler_minelayer_data.h" -#if BUILD_RTI #include -#endif using namespace GuezMinelayerProcessing; Initialization::Initialization() - : m_logger(getLogger("GuezMinelayerProcessing.Initialization")) - , m_ddsHandler(nullptr) -#if BUILD_RTI + : m_ddsHandler(nullptr) , m_handlerMinelayerData(nullptr) -#endif + , m_logger(getLogger("Initialization")) {} Initialization::~Initialization() { -#if BUILD_RTI m_handlerMinelayerData = nullptr; -#endif m_ddsHandler = nullptr; } -bool Initialization::initialize( -#if BUILD_RTI - const std::shared_ptr &ddsConnector -#endif -) +bool Initialization::initialize(const std::shared_ptr &ddsConnector) { -#if BUILD_RTI if (m_handlerMinelayerData) return true; @@ -56,15 +45,6 @@ bool Initialization::initialize( ERROR_LOG(m_logger) << "Initialisation m_handlerMinelayerData failed."; return false; } -#else - // initialize DDS stub - m_ddsHandler.reset(new DdsHandler()); - if (!m_ddsHandler->init()) - { - ERROR_LOG(m_logger) << "Initialisation ddsHandler failed."; - return false; - } -#endif return true; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.h index 9b868b481..795305a99 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/initialization.h @@ -6,19 +6,15 @@ */ #pragma once -#if BUILD_RTI #include -#endif #include -#include "svcgmpserver_export.h" +#include #include "logger.h" namespace GuezMinelayerProcessing { class DdsHandler; -#if BUILD_RTI class HandlerMinelayerData; -#endif class GMP_SERVER_EXPORT Initialization final { @@ -26,18 +22,14 @@ public: Initialization(); ~Initialization(); - bool initialize( -#if BUILD_RTI - const std::shared_ptr &ddsConnector -#endif - ); + bool initialize(const std::shared_ptr &ddsConnector); bool loadFromDatabase(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; -#if BUILD_RTI std::shared_ptr m_handlerMinelayerData; -#endif + + NGL::INGLLogger &m_logger; + }; } // namespace GuezMinelayerProcessing diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/settings.h index df88911bd..3a6bc5710 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include "gmp_export.h" +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.cpp index 86f4ca713..6e66a759b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.cpp @@ -46,7 +46,7 @@ static char rcs_id[] = "$Id$"; //------------------ includes ------------------------------ -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.h index 7a7a04387..ed3b903f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Generator.h @@ -48,7 +48,7 @@ #define ZSSI_WI_MINENFELD_GENERATOR_H /*------------------ includes ----------------------------*/ -#include +#include #include "GFS_map_cont.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Interpreter.h b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Interpreter.h index 0e7252ccf..ae44970e6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Interpreter.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/GuezMinelayerProcessing/zssi_wi_Minenfeld_Interpreter.h @@ -45,7 +45,7 @@ /*------------------ includes ----------------------------*/ -#include +#include #include "GFS_map_cont.h" #include "zssi_wi_Minenfeld_Generator.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/CMakeLists.txt index 629ee4461..92f2d0fb2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/CMakeLists.txt @@ -35,13 +35,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate ism_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcIsmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcIsmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcIsmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcIsmCommon PRIVATE RTI::nddscpp2 @@ -52,7 +51,6 @@ NGL_TARGET_LINK_LIBRARIES(svcIsmCommon ngldb NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcIsmCommon) # @@ -68,14 +66,13 @@ SET(SRCS_client # generate ism_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcIsmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcIsmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcIsmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcIsmClient PRIVATE RTI::nddscpp2 @@ -87,7 +84,6 @@ NGL_TARGET_LINK_LIBRARIES(svcIsmClient LtsCoordTrans Qt6::Gui ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcIsmClient) # @@ -102,14 +98,13 @@ SET(SRCS_server # generate ism_[d|f]ts.h, ism_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcIsmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(WS AAR SV svcIsmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcIsmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcIsmServer PRIVATE RTI::nddscpp2 @@ -121,7 +116,6 @@ NGL_TARGET_LINK_LIBRARIES(svcIsmServer LtsUtilsCore LtsWebSocketServer ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcIsmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/CMakeLists.txt index fac4a4d82..061e21189 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/CMakeLists.txt @@ -9,7 +9,6 @@ SET(SRCS_IMPORT_BUILDINGS ism_import_buildings.h ) NGL_ADD_EXECUTABLE(AAR SV WS ismImportBuildings ${SRCS_IMPORT_BUILDINGS}) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(ismImportBuildings Qt6::Core RTI::nddscpp2 @@ -20,6 +19,5 @@ NGL_TARGET_LINK_LIBRARIES(ismImportBuildings LtsUtilsCoreHeaderOnly Qt6::WebSockets ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(ismImportBuildings) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.cpp index f9f873e39..adcd73282 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.cpp @@ -13,16 +13,16 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include -#include +#include -#include +#include #include #include @@ -34,6 +34,7 @@ using namespace InfrastructureManagement; // ------------------------------------------------------------------------------ IsmImportBuildings::IsmImportBuildings(QObject *parent) : QObject(parent) + , m_logger(getLogger("ImportXml")) { qRegisterMetaType("Core::FunctionReply"); connect(this, &IsmImportBuildings::importDone, this, &IsmImportBuildings::importNext); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.h index 8df0e58f6..321ca0e1c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ImportBuildings/ism_import_buildings.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include //---------------------------------------------------------------------------------------------- namespace InfrastructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ModuleTests/ism_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ModuleTests/ism_tests.cpp index 4f4c7103d..cfa93fde6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ModuleTests/ism_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ModuleTests/ism_tests.cpp @@ -8,21 +8,20 @@ */ #include "ism_tests.h" -#include #include #include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include -#include -#include +#include +#include #include #include #include @@ -51,6 +50,7 @@ IsmTests::IsmTests(QObject *parent) , m_structureElementId(0) , m_indexNo(0) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } @@ -1052,7 +1052,7 @@ void IsmTests::checkSchedule() else { ERROR_LOG(m_logger) << "Instrumentation plan not complete !!!"; - for (const MountingPointPlan &mpp : std::as_const(diff)) + for (const MountingPointPlan &mpp : qAsConst(diff)) ERROR_LOG(m_logger) << "Diff - # mpp.structureElementId() = " << mpp.structureElementId(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/Messages/client_message.cpp index c609b779d..7ba4f39a1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/Messages/client_message.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include namespace InfrastructureManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/data_manager.cpp index c1de9fe83..f3bc1f41a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/data_manager.cpp @@ -24,8 +24,8 @@ #include #include -#include -#include +#include +#include #include using namespace InfrastructureManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/websocket_interface_handler.cpp index c22778e3c..ba91a2132 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -25,6 +25,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/base.h index 7e445261f..0ce52c6b3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/base.h @@ -21,7 +21,6 @@ class Base : public QObject { Q_OBJECT protected: -NGL::INGLLogger &m_logger; explicit Base(MainHandler *mainHandler, NGL::INGLLogger &logger); virtual ~Base(); @@ -31,5 +30,6 @@ NGL::INGLLogger &m_logger; protected: MainHandler *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.cpp index ca17f3e7e..400fc370e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.cpp @@ -9,15 +9,14 @@ #include "dds_handler.h" -#if BUILD_RTI #include -#endif namespace InfrastructureManagement { DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } @@ -30,7 +29,6 @@ bool DdsHandler::init(const QStringList &qosFileList) return false; } -#if BUILD_RTI // default initialize Publisher and Subscriber m_ddsConnector->initPublisherSubscriber(); @@ -60,9 +58,6 @@ bool DdsHandler::init(const QStringList &qosFileList) } return bRet; -#else - return true; -#endif } } // Namespace PDM diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.h index 2c9ff6a10..67cb07a62 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/dds_handler.h @@ -50,13 +50,14 @@ public: } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.cpp index 022190de7..6574458ff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.cpp @@ -8,17 +8,16 @@ */ #include "handler_effect_area.h" -#include #include "handler_main_structure_element.h" #include "handler_mounting_point_asset.h" #include "object_main_structure_element.h" #include "object_effect_area.h" #include "main_handler.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace InfrastructureManagement @@ -42,7 +41,7 @@ HandlerEffectArea::~HandlerEffectArea() bool HandlerEffectArea::init() { const QHash &objMseMap = m_mainHandler->getHandlerMainStructureElement()->getMainStructureElementsMap(); - for (const auto &objMse : std::as_const(objMseMap)) + for (const auto &objMse : qAsConst(objMseMap)) { ObjectEffectArea *effectAreaObj = createEffectAreaForMse(objMse->getData()); if (effectAreaObj) @@ -52,7 +51,7 @@ bool HandlerEffectArea::init() if (m_logger.isDebugEnabled()) { DEBUG_LOG(m_logger) << "number of EffectAreas: " << m_objectEffectAreaMap.size(); - for (const auto &EffectAreaObj : std::as_const(m_objectEffectAreaMap)) + for (const auto &EffectAreaObj : qAsConst(m_objectEffectAreaMap)) DEBUG_LOG(m_logger) << "EffectArea ID: " << EffectAreaObj->getId() << " | area EGCU ID: " << EffectAreaObj->getAreaEgcuId(); } @@ -129,7 +128,7 @@ std::vector HandlerEffectArea::egcuIdsFromJsonObject(const QJsonObject const QJsonArray &egcuMountPoints = jsonObj.value(QStringLiteral("egcuMountpoints")).toArray(); // qAsConst does not work with r-value DEBUG_LOG(m_logger) << "egcuMountPoints.size=" << egcuMountPoints.size(); - for (const auto &egcuMountPnt : std::as_const(egcuMountPoints)) + for (const auto &egcuMountPnt : qAsConst(egcuMountPoints)) { QJsonObject element = egcuMountPnt.toObject(); int mountingPointId = element.value(QStringLiteral("id")).toInt(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.h index 73461249b..c5dd4f7a1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_effect_area.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_instrumentation_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_instrumentation_asset.h index 4ef7b4dd1..fddfd03cd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_instrumentation_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_instrumentation_asset.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_schedule.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_schedule.h index 8301cc0c4..0bab86e74 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_schedule.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_schedule.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.cpp index bb6422365..61e1910b1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.cpp @@ -8,7 +8,6 @@ */ #include "handler_main_structure_element.h" -#include #include "handler_mounting_point_asset.h" #include "handler_instrumentation_asset.h" #include "object_main_structure_element.h" @@ -16,8 +15,8 @@ #include "object_instrumentation_asset.h" #include #include "convert_db_to_dds.h" -#include -#include +#include +#include namespace InfrastructureManagement { @@ -67,7 +66,7 @@ bool HandlerMainStructureElement::init() std::sort(dataVecSE.begin(), dataVecSE.end(), sortSE); // create MSE objects - for (const Database::IsmMainStructureElement &dbData : std::as_const(dataVec)) + for (const Database::IsmMainStructureElement &dbData : qAsConst(dataVec)) { ObjectMainStructureElement *ifs(new ObjectMainStructureElement(dbData, m_mainHandler)); m_objectMainStructureElementMap.insert(ifs->getId(), ifs); @@ -75,7 +74,7 @@ bool HandlerMainStructureElement::init() DEBUG_LOG(m_logger) << "m_objectMainStructureElementMap.size() = " << m_objectMainStructureElementMap.size(); // create SE objects, add them to MSE - for (const Database::IsmStructureElement &dbData : std::as_const(dataVecSE)) + for (const Database::IsmStructureElement &dbData : qAsConst(dataVecSE)) { ObjectMainStructureElement *objMse = m_objectMainStructureElementMap.value(dbData.mainStructureElementId); if (!objMse || !objMse->isValid()) @@ -94,7 +93,7 @@ bool HandlerMainStructureElement::init() } // add structure elements to global map for lookup (e.g. in 'add Footprints to MSE objects') - for (ObjectMainStructureElement *objMse : std::as_const(m_objectMainStructureElementMap)) + for (ObjectMainStructureElement *objMse : qAsConst(m_objectMainStructureElementMap)) m_objectStructureElementMap.unite(objMse->getStructureElements()); // add Footprints to MSE objects @@ -112,7 +111,7 @@ bool HandlerMainStructureElement::init() } } - for (const QMap &cont : std::as_const(footprintSorted)) + for (const QMap &cont : qAsConst(footprintSorted)) { if (cont.empty()) continue; @@ -582,7 +581,7 @@ void HandlerMainStructureElement::onExerciseStateChanged(const ExerciseManagemen if (data.state().underlying() != ExerciseManagement::ExerciseState::Terminated) return; - for (auto mseObj : std::as_const(m_objectMainStructureElementMap)) + for (auto mseObj : qAsConst(m_objectMainStructureElementMap)) { const MainStructureElement &mse = mseObj->getData(); QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromStdString(mse.properties())).object(); @@ -602,7 +601,7 @@ void HandlerMainStructureElement::onExerciseStateChanged(const ExerciseManagemen modReq.modelId(mse.modelId()); modReq.name(mse.name()); std::vector resElements; - for (auto element : std::as_const(mse.elements())) + for (auto element : qAsConst(mse.elements())) { QJsonDocument doc = QJsonDocument::fromJson(QByteArray::fromStdString(element.properties())); QJsonObject objEle = doc.object(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.h index 496f4909b..2a9d09554 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_main_structure_element.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include "main_handler.h" #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_mounting_point_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_mounting_point_asset.h index 9aef5710b..f8250a9ee 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_mounting_point_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_mounting_point_asset.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_special_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_special_area.h index d59dbb77c..04b6d7fdf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_special_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/handler_special_area.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include "base.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.cpp index 3c6145c56..acc68b627 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.cpp @@ -8,7 +8,6 @@ */ #include "ism_dtc_impl_custom.h" -#include #include "ism_dtc_impl_custom_p.h" #include @@ -17,20 +16,20 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include #include #include #include -#include +#include -#include -#include +#include +#include //--------------------------------------------------------------------------------------------------------------------------------------------- namespace InfrastructureManagement @@ -285,7 +284,6 @@ int DtcImplCustom::getOpticalCodeFromAssetId(int assetId) const } -#if BUILD_RTI int DtcImplCustom::getAssetIdFromOpticalCode(int opticalCode) const { DEBUG_LOG(m_logger) << "getAssetIdFromOpticalCode: opticalCode=" << opticalCode; @@ -331,7 +329,6 @@ int DtcImplCustom::getAssetIdFromMountingPointId(int mainStructureElementId, in return -1; } -#endif //--------------------------------------------------------------------------------------------------------------------------------------------- @@ -476,7 +473,6 @@ bool DtcImplCustom::getStructureElementByBuildingIdAndMountingPointId(int mainSt } //--------------------------------------------------------------------------------------------------------------------------------------------- -#if BUILD_RTI bool DtcImplCustom::getAllAssetsPerRoom(const std::function &predicate, QMap > &allAssets) { @@ -526,6 +522,7 @@ bool DtcImplCustom::getAllAssetsPerRoom(const std::function &predicate, QMap > &allAssets) const { @@ -564,6 +561,7 @@ bool DtcImplCustom::getAllAssetsPerBuilding(const std::functionreadAlive()) @@ -580,11 +578,8 @@ bool DtcImplCustom::getBuildingId(int structureElementId, int &buildingId) const buildingId = 0; return false; } -#endif -} //--------------------------------------------------------------------------------------------------------------------------------------------- -#if BUILD_RTI QList DtcImplCustom::getSections() { QList sections; @@ -595,7 +590,6 @@ QList DtcImplCustom::getSections() } return sections; } -#endif //--------------------------------------------------------------------------------------------------------------------------------------------- QString DtcImplCustom::getBuildingDisplayName(int buildingId) @@ -619,7 +613,6 @@ QString DtcImplCustom::getBuildingDisplayName(const MainStructureElement &mse) c } -#if BUILD_RTI MountingPointPlan DtcImplCustom::getMountingPointPlan(int scheduleId, int structureElementId) const { for (const auto &sample : m_dtcMainSchedule->readAlive()) @@ -635,7 +628,6 @@ MountingPointPlan DtcImplCustom::getMountingPointPlan(int scheduleId, int struct } return MountingPointPlan(); } -#endif //--------------------------------------------------------------------------------------------------------------------------------------------- int DtcImplCustom::getBuildingRoomsCount(int buildingId) @@ -673,7 +665,6 @@ BridgeStatus DtcImplCustom::getBridgeStatus(int buildingId) // this is just a quicker method to determine if a plan is complete or not //--------------------------------------------------------------------------------------------------------------------------------------------- -#if BUILD_RTI bool DtcImplCustom::checkSchedule(int scheduleId) { const MainSchedule schedule = mainSchedule(scheduleId); @@ -707,10 +698,8 @@ bool DtcImplCustom::getScheduleDifferences(int scheduleId, QList DtcImplCustom::getFootprintsByExerciseId(int exerciseId) { QMap footprints; @@ -766,10 +754,7 @@ QMap DtcImplCustom::getFootprintsByExerciseId(int exerciseId return footprints; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI QMap DtcImplCustom::getUtmFootprintsByExerciseId(int exerciseId, int &zone, bool isGroundLevel) { QMap footprints; @@ -810,7 +795,6 @@ QMap DtcImplCustom::getUtmFootprintsByExerciseId(int exerciseId, DEBUG_LOG(m_logger) << "getUtmFootprintsByExerciseId footprints.size=" << footprints.size(); return footprints; } -#endif // returns absolut utm positions of the footprint QPolygonF DtcImplCustom::getUtmFootprintById(int mseId, int &zoneOut, bool isGroundLevel) @@ -834,7 +818,7 @@ QPolygonF DtcImplCustom::getUtmFootprintById(int mseId, int &zoneOut, bool isGro // QPolygonF poly; // poly.reserve(mfElements.size()); // DEBUG_LOG(m_logger) << "mseId: " << mseId << " isGroundLevel: " << isGroundLevel; -// for (const InfrastructureManagement::FootprintElement &element : std::as_const(mfElements)) +// for (const InfrastructureManagement::FootprintElement &element : qAsConst(mfElements)) // { // // maybe this is easier? // // // if different, continue @@ -855,7 +839,7 @@ QPolygonF DtcImplCustom::getUtmFootprintById(int mseId, int &zoneOut, bool isGro // // Get other footprint if groundLevel footprint is not available // if (poly.isEmpty() && isGroundLevel) // { -// for (const InfrastructureManagement::FootprintElement &element : std::as_const(mfElements)) +// for (const InfrastructureManagement::FootprintElement &element : qAsConst(mfElements)) // { // const auto &relPos = element.relPosition(); // poly.push_back(QPointF(relPos.offsetX(), relPos.offsetY())); @@ -873,7 +857,7 @@ QPolygonF DtcImplCustom::getUtmFootprintById(int mseId, int &zoneOut, bool isGro // QPolygonF retPolyUtm; // retPolyUtm.reserve(poly.size()); -// for (const QPointF &point : std::as_const(poly)) +// for (const QPointF &point : qAsConst(poly)) // { // const QPointF finalUtmPoint(utmFpPosition + point); // retPolyUtm.push_back(finalUtmPoint); @@ -882,10 +866,8 @@ QPolygonF DtcImplCustom::getUtmFootprintById(int mseId, int &zoneOut, bool isGro // return retPolyUtm; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI + // returns all building IDs that have an intersection with the area under the polygon and are assigned to the specified exercise. // Parameter: completeEnclosed true = Only buildings that are completely enclosed by the polygon are taken into account. // false = All buildings that are completely enclosed by the polygon and that have an overlap with the polygon are taken into account. @@ -901,7 +883,7 @@ QVector DtcImplCustom::getBuildingByPolygon(int exerciseId, const QPolygon // Convert Form to UTM int zone = -1; - for (const QPointF &point : std::as_const(polygon)) + for (const QPointF &point : qAsConst(polygon)) { auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(point, zone); DEBUG_LOG(m_logger) << "geo=" << point.x() << "/" << point.y() @@ -930,7 +912,7 @@ QVector DtcImplCustom::getBuildingByPolygon(int exerciseId, const QPolygon if (completeEnclosed) { const QPolygonF &footprintPolygonRef = footprintPolygon.value(); - for (const QPointF &fpPoint : std::as_const(footprintPolygonRef)) + for (const QPointF &fpPoint : qAsConst(footprintPolygonRef)) { if (!polygonUtm.containsPoint(fpPoint, Qt::OddEvenFill)) { @@ -953,10 +935,7 @@ QVector DtcImplCustom::getBuildingByPolygon(int exerciseId, const QPolygon return result; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI // returns building ID surrounds the polygon and is assigned to the specified exercise. // returns -1 if no building found int DtcImplCustom::getSurroundingBuildingByPolygon(int exerciseId, const QPolygonF &polygon, bool isGroundLevel) @@ -970,7 +949,7 @@ int DtcImplCustom::getSurroundingBuildingByPolygon(int exerciseId, const QPolygo // Convert Form to UTM int zone = -1; - for (const QPointF &point : std::as_const(polygon)) + for (const QPointF &point : qAsConst(polygon)) { auto utm = LtsCoordTrans::UtmCoordinate::fromGeographic(point, zone); DEBUG_LOG(m_logger) << "geo=" << point.x() << "/" << point.y() @@ -997,7 +976,7 @@ int DtcImplCustom::getSurroundingBuildingByPolygon(int exerciseId, const QPolygo DEBUG_LOG(m_logger) << "getBuildingByPolygon Append Building id=" << footprintPolygon.key(); if (completeEnclosed) { - for (const QPointF &fpPoint : std::as_const(polygonUtm)) + for (const QPointF &fpPoint : qAsConst(polygonUtm)) { if (!footprintPolygon.value().containsPoint(fpPoint, Qt::OddEvenFill)) { @@ -1020,10 +999,7 @@ int DtcImplCustom::getSurroundingBuildingByPolygon(int exerciseId, const QPolygo return -1; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI /*! * \brief DtcImplCustom::getBuildingIdAtPosition * \param exerciseId @@ -1047,12 +1023,7 @@ int DtcImplCustom::getBuildingIdAtPosition(int exerciseId, const QPointF &utmPos } return bldId; } -#endif -#endif - -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI // The floors list is sorted according to height. QVector DtcImplCustom::getFloorIdsFromBuilding(int buildingId) { @@ -1092,10 +1063,7 @@ QList DtcImplCustom::getFloorsFromBuilding(int buildingId) std::sort(floors.begin(), floors.end(), structureElementHeightComparator); return floors; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI double DtcImplCustom::getHalfFloorHeight(int buildingId, int floorId) { QList floorHeights = getFloorsFromBuilding(buildingId); @@ -1121,10 +1089,7 @@ double DtcImplCustom::getHalfFloorHeight(int buildingId, int floorId) return 0.0; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI QVector DtcImplCustom::getRoomIdsFromFloorId(int buildingId, int floorId) { DEBUG_LOG(m_logger) << "getRoomIdsFromFloorId " @@ -1151,10 +1116,7 @@ QVector DtcImplCustom::getRoomIdsFromFloorId(int buildingId, int floorId) } return rooms; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI QVector DtcImplCustom::getBuildingIdsByExercise ( int exerciseId) { QVector result; @@ -1169,10 +1131,7 @@ QVector DtcImplCustom::getBuildingIdsByExercise ( int exerciseId) return result; } -#endif -//--------------------------------------------------------------------------------------------------------- -#if BUILD_RTI QByteArray DtcImplCustom::getVulnerabilityModelData( int buildingId) { const MainStructureElement &mse = mainStructureElement(buildingId); @@ -1188,13 +1147,12 @@ QByteArray DtcImplCustom::getVulnerabilityModelData( int buildingId) QFile f(vulnerabilityModelFilename); if (!f.open(QIODevice::ReadOnly)) { - WARNING_LOG(m_logger) << "Could not open file '" << vulnerabilityModelModelFilename << "' for reading: " << f.errorString(); + WARNING_LOG(m_logger) << "Could not open file '" << vulnerabilityModelFilename << "' for reading: " << f.errorString(); } QByteArray dataBa = f.readAll(); return dataBa; } -#endif } // namespace Interface diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.h index 3be27faf6..c0bd8420d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom.h @@ -36,31 +36,27 @@ public: bool getAssetIdFromMountingPoint(int structureElementId, int mountingPointAssetId, int &assetId) const override; int getOpsCodeFromJSon(const std::string &s) const; int getOpticalCodeFromAssetId(int assetId) const override; -#if BUILD_RTI int getAssetIdFromOpticalCode(int opticalCode) const override; int getAssetIdFromMountingPointId(int mainStructureElementId, int mountingPointId) const override; - bool getAllAssetsPerRoom(const std::function &predicate, - QMap > &allAssets) override; - bool getAllAssetsPerBuilding(const std::function &predicate, - QMap > &allAssets) const override; - int getStructueElementIdFromAssetId(int assetId) const override; -#endif bool getOpsDataFromMseIdAndSeId(int mainStructureElementId, int structureElementId, int &roomId, Core::GeoPosition &geoPosition) const override; bool getStructureElementById(int structureElementId, StructureElement &structureElement) const override; bool getStructureElementInMntPointAssetByAssetId(int assetId, StructureElement &structureElement) const override; bool getStructureElementByBuildingIdAndMountingPointId(int mainStructureElementId, int mountingPointId, StructureElement &structureElement) override; + bool getAllAssetsPerRoom(const std::function &predicate, + QMap > &allAssets) override; + bool getAllAssetsPerBuilding(const std::function &predicate, + QMap > &allAssets) const override; bool getBuildingId(int structureElementId, int &buildingId) const override; QString getBuildingDisplayName(int buildingId) override; QString getBuildingDisplayName(const MainStructureElement &mse) const override; MountingPointPlan getMountingPointPlan(int scheduleId, int structureElementId) const override; int getBuildingRoomsCount(int buildingId) override; BridgeStatus getBridgeStatus(int buildingId) override; -#if BUILD_RTI bool checkSchedule(int scheduleId) override; bool getScheduleDifferences(int scheduleId, QList &diffList) override; int getMountedAssetId(int structureElementId) const override; + int getStructueElementIdFromAssetId(int assetId) const override; QList getSections() override; -#endif QMap getFootprintsByExerciseId(int exerciseId) override; QMap getUtmFootprintsByExerciseId(int exerciseId, int &zone, bool isGroundLevel) override; QPolygonF getUtmFootprintById(int mseId, int &zoneOut, bool isGroundLevel) override; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom_p.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom_p.h index 5fd893173..7e8dbecba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom_p.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/ism_dtc_impl_custom_p.h @@ -9,10 +9,9 @@ #pragma once #include "ism_dtc_impl_custom.h" -#include #include -#include +#include #include #include @@ -67,7 +66,7 @@ public: const std::vector &mfElements = mf.elements(); QPolygonF poly; poly.reserve(mfElements.size()); - for (const InfrastructureManagement::FootprintElement &element : std::as_const(mfElements)) + for (const InfrastructureManagement::FootprintElement &element : qAsConst(mfElements)) { // if different, continue if (isGroundLevel != element.isGroundLevel()) @@ -79,7 +78,7 @@ public: // Get other footprint if groundLevel footprint is not available if (poly.isEmpty() && isGroundLevel) { - for (const InfrastructureManagement::FootprintElement &element : std::as_const(mfElements)) + for (const InfrastructureManagement::FootprintElement &element : qAsConst(mfElements)) { const auto &relPos = element.relPosition(); poly.push_back(QPointF(relPos.offsetX(), relPos.offsetY())); @@ -100,7 +99,7 @@ public: // QPolygonF retPolyUtm; // retPolyUtm.reserve(poly.size()); - // for (const QPointF &point : std::as_const(poly)) + // for (const QPointF &point : qAsConst(poly)) // { // const QPointF finalUtmPoint(utmFpPosition + point); // retPolyUtm.push_back(finalUtmPoint); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/logger.h index e8be91507..6d02ebe40 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/logger.h @@ -10,7 +10,7 @@ #pragma once #include -#include "svcismcommon_export.h" +#include "ism_export.h" namespace InfrastructureManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/main_handler.h index 21784414f..7105dbdda 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/main_handler.h @@ -74,8 +74,6 @@ public: int exerciseId() const; private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_dbHandler; std::shared_ptr m_ddsHandler; std::shared_ptr m_handlerMainStructureElement; @@ -86,6 +84,8 @@ NGL::INGLLogger &m_logger; std::shared_ptr m_handlerSpecialArea; std::shared_ptr m_handlerWebSocketInterface; std::shared_ptr m_exmDtc; + + NGL::INGLLogger &m_logger; }; QPointF rotatePoint(const double xIn, const double yIn, double angleDegree); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_effect_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_effect_area.h index f60647b2b..2bd6913db 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_effect_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_effect_area.h @@ -10,7 +10,7 @@ #pragma once #include "base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_instrumentation_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_instrumentation_asset.h index c4d914a32..2d0575eab 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_instrumentation_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_instrumentation_asset.h @@ -10,7 +10,7 @@ #pragma once #include "base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.cpp index 64636f9d4..6f60b711f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.cpp @@ -9,7 +9,7 @@ #include "object_main_schedule.h" #include -#include +#include using namespace InfrastructureManagement; //---------------------------------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.h index 436a996a2..a858b9da0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_schedule.h @@ -10,7 +10,7 @@ #pragma once #include "base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.cpp index 116eef970..932ed01fd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.cpp @@ -8,19 +8,18 @@ */ #include "object_main_structure_element.h" -#include #include "handler_main_structure_element.h" #include "object_structure_element.h" #include "main_handler.h" #include "handler_mounting_point_asset.h" #include "convert_db_to_dds.h" #include -#include +#include #include #include -#include -#include +#include +#include namespace { @@ -440,7 +439,7 @@ Core::FunctionReplyObject ObjectMainStructureElement::updateObject(const MainStr m_mainHandler->getHandlerMainStructureElement()->removedStructureElements(oldStructureElements); m_mainHandler->getHandlerMainStructureElement()->addedStructureElements(m_objectStructureElements); QMap newObjectStructureElements; - for (ObjectStructureElement *ose : std::as_const(m_objectStructureElements)) + for (ObjectStructureElement *ose : qAsConst(m_objectStructureElements)) { // only delete the old ones // and also not the one for the mse and bcu @@ -489,7 +488,7 @@ Core::FunctionReplyObject ObjectMainStructureElement::removeObject() dts()->removeMainStructureElementByKey(m_data.id()); dts()->removeMainFootprintByKey(m_footprint.id()); - for (ObjectStructureElement *ose : std::as_const(m_objectStructureElements)) + for (ObjectStructureElement *ose : qAsConst(m_objectStructureElements)) { ose->removeObject(); delete ose; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.h index e044c6dd7..c3244f488 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_main_structure_element.h @@ -9,10 +9,10 @@ #pragma once -#include -#include +#include +#include #include "base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_mounting_point_asset.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_mounting_point_asset.h index 181718bce..f8ffeec00 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_mounting_point_asset.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_mounting_point_asset.h @@ -10,7 +10,7 @@ #pragma once #include "base.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.cpp index b10cd96c2..bd5313dfb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.cpp @@ -8,9 +8,8 @@ */ #include "object_special_area.h" -#include -#include +#include #include namespace InfrastructureManagement @@ -90,7 +89,7 @@ SpecialArea ObjectSpecialArea::toDdsData(const Database::IsmSpecialArea &dbData) QPolygonF tmp; tmp.reserve(ddsData.polygon().size()); - for (const Core::GeoPosition2D &pos : std::as_const(ddsData.polygon())) + for (const Core::GeoPosition2D &pos : qAsConst(ddsData.polygon())) tmp.push_back(QPointF(pos.lon(),pos.lat())); QRectF boundingBox = tmp.boundingRect(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.h index d981dbdd3..18f93291c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_special_area.h @@ -10,12 +10,12 @@ #pragma once #include "base.h" -#include +#include #include #include -#include +#include #include namespace InfrastructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_structure_element.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_structure_element.h index 84798397e..dd69e9f4d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_structure_element.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/object_structure_element.h @@ -10,7 +10,7 @@ #pragma once #include "base.h" -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.cpp index 5a8d21307..a9947b89f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.cpp @@ -8,15 +8,15 @@ */ #include "parse_building_xml.h" -#include -#include -#include +#include +#include +#include -#include -#include -#include +#include +#include +#include -#include +#include //------------------------------------------------------------------------------------------------------------- namespace InfrastructureManagement @@ -59,6 +59,7 @@ ParseBuildingXml::ParseBuildingXml(const QString &xmlFilename, , m_soundAreaFilename(soundAreaFilename) , m_geoPosition(geoPosition) , m_rotationAngleDegree(rotationAngleDegree) + , m_logger(getLogger("ParseBuildingXml")) { DEBUG_LOG(m_logger) << "m_soundAreaFilename=" << m_soundAreaFilename; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.h index 0fded54cb..6971d538b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/parse_building_xml.h @@ -8,10 +8,10 @@ */ #pragma once -#include "svcismclient_export.h" +#include "ism_export.h" -#include -#include +#include +#include #include #include "logger.h" @@ -55,7 +55,6 @@ public: QVector parseMetaXml(const QString &metaXml) const; const MainStructureElementModifyRequest &parsedRequest() const { return m_request; } private: - NGL::INGLLogger &m_logger; QDomDocument openXml(const QString &fileName) const; void parseXmlInternal(); Egcu parseEgcu(const QDomElement &domEgcu); @@ -80,7 +79,6 @@ private: QDomElement getChildElement(const T &parent, const QString &childTag, bool bThrow = true) const; int getInteger(const QDomElement &element, const QString &attribute) const; private: - NGL::INGLLogger &m_logger; QString m_xmlFilename; QString m_vulnerabilityFilename; QString m_egcuToRoomFilename; @@ -92,6 +90,8 @@ private: QString m_lastError; QVector m_egcus; SoundArea m_soundArea; + + LOGGER_T m_logger; }; } // namespace InfraStructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_base.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_base.h index 6609d4d33..6da28cf72 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_base.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_base.h @@ -22,15 +22,15 @@ namespace InfrastructureManagement InfrastructureManagement::ScheduleStatus scheduleStatus() const { return m_scheduleStatus; } protected: - NGL::INGLLogger &m_logger; ScheduleStatusBase(const QString &objectName, const ScheduleStatus &scheduleStatus, ObjectMainSchedule* objSchedule); void onEntry(QEvent *event); int scheduleId() const { return m_schedule ? m_schedule->getId() : -1; } protected: - NGL::INGLLogger &m_logger; ObjectMainSchedule *m_schedule; + NGL::INGLLogger &m_logger; + private: const InfrastructureManagement::ScheduleStatus m_scheduleStatus; }; @@ -48,7 +48,6 @@ namespace InfrastructureManagement public: explicit Creation(ObjectMainSchedule *objSchedule); protected: - NGL::INGLLogger &m_logger; void onEntry(QEvent *event); }; @@ -65,7 +64,6 @@ namespace InfrastructureManagement public: explicit Activation(ObjectMainSchedule *objSchedule); protected: - NGL::INGLLogger &m_logger; void onEntry(QEvent *event); }; @@ -75,7 +73,6 @@ namespace InfrastructureManagement public: explicit Expiration(ObjectMainSchedule *objSchedule); protected: - NGL::INGLLogger &m_logger; void onEntry(QEvent *event); }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.cpp index f635b3f7c..fc1c29fa9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.cpp @@ -19,6 +19,7 @@ namespace InfrastructureManagement : QObject(parent) , m_ScheduleStatus(ScheduleStatus::Unknown) , m_schedule(objSchedule) + , m_logger(getLogger("ScheduleStatusManager")) { m_stateSignals[ScheduleStatus::Unknown] = [&]() { emit stateUnknown(); }; m_stateSignals[ScheduleStatus::Created] = [&]() { emit stateCreated(); }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.h index a575059e5..9890dae4d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_manager.h @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include +#include #include @@ -45,8 +45,6 @@ namespace InfrastructureManagement void stateFalse(); private: - - NGL::INGLLogger &m_logger; void setStateInternal(InfrastructureManagement::ScheduleStatus state); int scheduleId() const; @@ -54,6 +52,7 @@ namespace InfrastructureManagement InfrastructureManagement::ScheduleStatus m_ScheduleStatus; ObjectMainSchedule *m_schedule; + NGL::INGLLogger &m_logger; }; } // namespace InfrastructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.cpp index f04a354d1..34453321c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.cpp @@ -7,7 +7,6 @@ */ #include "schedule_status_state_machine.h" -#include #include "schedule_status_manager.h" #include "schedule_status_base.h" @@ -23,6 +22,7 @@ ScheduleStatusMachine::ScheduleStatusMachine(ObjectMainSchedule* objSchedule, QO , m_stateManager(new ScheduleStatusManager(objSchedule, this)) , m_stateMachine(new QStateMachine(this)) , m_schedule(objSchedule) + , m_logger(getLogger("ScheduleStatusMachine")) { qRegisterMetaType("InfrastructureManagement::ScheduleStatus"); @@ -74,7 +74,7 @@ ScheduleStatusMachine::ScheduleStatusMachine(ObjectMainSchedule* objSchedule, QO // ---------------------------------------------------------------------------------------------------------- //States zur StateMachine hinzufügen - for (ScheduleStatusBase *state : std::as_const(m_ScheduleStatuses)) + for (ScheduleStatusBase *state : qAsConst(m_ScheduleStatuses)) { DEBUG_LOG(m_logger) << "Schedule " << scheduleId() << ": state: " << state->scheduleStatus(); m_stateMachine->addState(state); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.h index 11c90addb..b212a2400 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/schedule_status_state_machine.h @@ -10,7 +10,7 @@ #pragma once -#include +#include #include #include @@ -45,8 +45,6 @@ namespace InfrastructureManagement void onEnteredState(); private: - - NGL::INGLLogger &m_logger; ScheduleStatusBase *getStateFromId(InfrastructureManagement::ScheduleStatus ScheduleStatus); int scheduleId() const; @@ -55,6 +53,8 @@ namespace InfrastructureManagement QMap m_ScheduleStatuses; ObjectMainSchedule *m_schedule; + + NGL::INGLLogger &m_logger; }; } // namespace InfrastructureManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.cpp index 286f91dec..9e38207da 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.cpp @@ -9,8 +9,8 @@ #include "settings.h" -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.h index 15a272a00..049e88cfc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/InfrastructureManagement/settings.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/CMakeLists.txt index 08711897a..d6ac51b40 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate mrk_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcMrkCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcMrkCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMrkCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMrkCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMrkCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMrkCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate mrk_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcMrkClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcMrkClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMrkClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMrkClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMrkClient svcMrkCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMrkClient) # @@ -105,14 +101,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate mrk.sql, mrk.xml CODEGEN_SQL(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcMrkServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcMrkServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMrkServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMrkServer PRIVATE Qt6::Core @@ -128,7 +123,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMrkServer svcMrkCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMrkServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.cpp index faa00bdfa..5dbce1dc4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.cpp @@ -9,10 +9,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -27,6 +27,7 @@ MrkTests::MrkTests(QObject *parent) , m_markerId(0) , m_eTestStep(eUnknown) , m_bTestsSuccessful(true) + , m_logger(getLogger("MrkTests")) { qRegisterMetaType("Core::FunctionReply"); } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.h index 93e34a29f..c8b9193fe 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/ModuleTests/mrk_tests.h @@ -65,7 +65,6 @@ protected Q_SLOTS: void onReceiveMarkerChanged(const Marker &data, DataModification modType); protected: - NGL::INGLLogger &m_logger; // Callbackfunctions for FTC void onMarkerCreateReply(const Core::FunctionReplyObject &replyObject); void onMarkerModifyReply(const Core::FunctionReplyObject &replyObject) override final; @@ -106,6 +105,8 @@ private: } m_eTestStep; bool m_bTestsSuccessful; + NGL::INGLLogger &m_logger; + }; } // namespace MarkerManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.cpp index 6a9b72c47..104938b0d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.cpp @@ -13,6 +13,7 @@ namespace MarkerManagement DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.h index ad0a35611..c62b9748d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/dds_handler.h @@ -29,11 +29,12 @@ public: std::shared_ptr fts() const { return m_ddsFts; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace MarkerManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.cpp index 63a21da14..31796b215 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.cpp @@ -7,7 +7,6 @@ */ #include "handler_marker.h" -#include #include "object_marker.h" #include "dds_handler.h" @@ -20,6 +19,7 @@ HandlerMarker::HandlerMarker(const std::shared_ptr &ddsHandler, , Interface::Fts::MarkerRemoveRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerMarker")) { } // end of ctor() //----------------------------------------------------------------------------- @@ -51,7 +51,7 @@ bool HandlerMarker::init() // alle Descriptions zu der Marke eintragen // TODO: select descBymarkerId - for (const Database::MrkMarkerDescription &desc : std::as_const(dataDescriptionVec)) + for (const Database::MrkMarkerDescription &desc : qAsConst(dataDescriptionVec)) { if (desc.markerId == ddsMoData.id()) ddsMoData.descriptions().push_back(ObjectMarker::toDdsData(desc)); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.h index b4dfbade1..ffa004864 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_marker.h @@ -29,8 +29,6 @@ public: bool init(); private: // methods - -NGL::INGLLogger &m_logger; void onMarkerModifyRequest(const rti::core::SampleIdentity &cookie, const Marker &request) override final; Core::FunctionReplyObject markerCreateRequest(const Marker &request); @@ -43,6 +41,8 @@ NGL::INGLLogger &m_logger; private: // attributes std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; + QHash m_objectMarkerMap; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.cpp index 255d09a8e..9218047b6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.cpp @@ -19,6 +19,7 @@ HandlerSnapshot::HandlerSnapshot(const std::shared_ptr &ddsHandler, , Interface::Fts::SnapshotRemoveRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerSnapshot")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.h index 780f2cff2..9d6503720 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/handler_snapshot.h @@ -29,8 +29,6 @@ public: bool init(); private: // methods - -NGL::INGLLogger &m_logger; void onSnapshotModifyRequest(const rti::core::SampleIdentity &cookie, const Snapshot &request) override final; Core::FunctionReplyObject snapshotCreateRequest(const Snapshot &request); @@ -42,6 +40,8 @@ NGL::INGLLogger &m_logger; private: // attributes std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; + QHash m_objectSnapshotMap; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/initialization.h index 1d09bbda2..4c43dc6b1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/initialization.h @@ -37,11 +37,12 @@ public: bool loadFromDatabase(); private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_dbHandler; std::shared_ptr m_ddsHandler; std::unique_ptr m_handlerMarker; std::unique_ptr m_handlerSnapshot; + + NGL::INGLLogger &m_logger; + }; } // namespace MarkerManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/logger.h index b797d43f3..9b71dab65 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/logger.h @@ -9,13 +9,13 @@ #pragma once #include -#include +#include "mrk_export.h" namespace MarkerManagement { using LOGGER_T = NGL::INGLLogger &; -SVCMRKCOMMON_EXPORT LOGGER_T getLogger(const char *name); +MRK_COMMON_EXPORT LOGGER_T getLogger(const char *name); inline LOGGER_T getLogger(const QString &loggerName) { return getLogger(loggerName.toUtf8().constData()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.cpp index 04035bfe4..385e5ca73 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.cpp @@ -16,6 +16,7 @@ namespace MarkerManagement ObjectMarker::ObjectMarker(const std::shared_ptr &ddsHandler, const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectMarker")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.h index 1d8174a08..8091db8b4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_marker.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "mrk_db.h" -#include +#include // Generated #include @@ -48,13 +48,14 @@ public: static MarkerDescription toDdsData(const Database::MrkMarkerDescription &dbData); // db -> dds private: - NGL::INGLLogger &m_logger; void onPublishData(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Marker m_dataMarkerObject; + + NGL::INGLLogger &m_logger; + }; } // namespace MarkerManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.cpp index ab1802935..341462026 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.cpp @@ -15,6 +15,7 @@ namespace MarkerManagement ObjectSnapshot::ObjectSnapshot(const std::shared_ptr &ddsHandler, const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectSnapshot")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.h index d51632a2d..3be96e5a0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/object_snapshot.h @@ -8,10 +8,10 @@ #pragma once -#include +#include #include "dds_handler.h" #include "mrk_db.h" -#include +#include // Generated #include @@ -41,14 +41,15 @@ public: static Snapshot toDdsData(const Database::MrkSnapshot &dbData); // db -> dds private: - NGL::INGLLogger &m_logger; void onPublishData(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; MarkerManagement::Snapshot m_dataSnapshot; + + NGL::INGLLogger &m_logger; + }; } // namespace MarkerManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/settings.h index 850d367c7..467a94512 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MarkerManagement/settings.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/CMakeLists.txt index 92fcd6724..8a4c6340d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate msg_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcMsgCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcMsgCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMsgCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMsgCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMsgCommon LtsCommandLineParser NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMsgCommon) # @@ -61,14 +59,13 @@ SET(SRCS_client # generate msg_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcMsgClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcMsgClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMsgClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMsgClient PRIVATE RTI::nddscpp2 @@ -77,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMsgClient svcMsgCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMsgClient) # @@ -89,14 +85,13 @@ SET(SRCS_server # generate msg_[d|f]ts.h, msg_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcMsgServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcMsgServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMsgServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMsgServer PRIVATE RTI::nddscpp2 @@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMsgServer svcMsgCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMsgServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.cpp index 989afe98e..acd3a2c4f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.cpp @@ -9,8 +9,8 @@ #include #include -#include -#include +#include +#include #include @@ -52,6 +52,7 @@ MsgTests::MsgTests(QObject *parent) , m_msgIdRecvMessage(3) // Result from last test , m_numberMessages(3) // Result from last test , m_testStep(TestCase::CreateOperator) + , m_logger(getLogger("MsgTests")) {} MsgTests::~MsgTests() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.h index c9d922d70..64b5b7d7d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/ModuleTests/msg_tests.h @@ -52,7 +52,6 @@ protected Q_SLOTS: void markMessageAsRead(); void markMessageAsDeleted(); protected: - NGL::INGLLogger &m_logger; void onCreateOperatorMessageReply(const Core::FunctionReplyObject &replyObject) override final; void onModifyOperatorMessageReply(const Core::FunctionReplyObject &replyObject) override final; @@ -72,6 +71,9 @@ private: int m_msgIdRecvMessage; int m_numberMessages; TestCase m_testStep; + + NGL::INGLLogger &m_logger; + }; } // namespace Messaging diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.cpp index 13db90f77..c1e5c2dcb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.cpp @@ -15,6 +15,7 @@ namespace Messaging DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::AllExercises)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } // end of ctor()DdsHandler diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.h index 8f8b5d0ef..4d6afd3a5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/dds_handler.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include #include @@ -44,13 +44,14 @@ public: private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.cpp index 062644b11..467f97cb8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.cpp @@ -16,6 +16,7 @@ ExerciseHandler::ExerciseHandler(const std::shared_ptr(ddsConnector->getDomainId(), IDL::PartitionType::Exercise, exerciseId)) , m_exerciseId(exerciseId) , m_idleTimer(new QTimer(this)) + , m_logger(getLogger("ExerciseHandler")) { connect(m_idleTimer, &QTimer::timeout, this, &ExerciseHandler::exerciseHandlerIdleTimeout); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.h index 3da408b33..d3009fc9d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercise_handler.h @@ -10,8 +10,8 @@ #include "dds_handler.h" #include "logger.h" -#include -#include +#include +#include #include #include @@ -35,15 +35,14 @@ Q_SIGNALS: void equipmentMessageReply(int msgId, bool sentSuccessful); void equipmentMessageOcReply(int replyId, bool sentSuccessful); private: - NGL::INGLLogger &m_logger; void onSendEquipmentMessageReply(const Core::FunctionReplyObject &replyObject) override; void onSendEquipmentMessageOcReply(const Core::FunctionReplyObject &replyObject) override; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_tabFtc; std::shared_ptr m_ossFtc; int m_exerciseId; QTimer *m_idleTimer; // &ddsHandler) : m_ddsHandler(ddsHandler) + , m_logger(getLogger("ExercisesHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercises_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercises_handler.h index 8c81fad15..f90e55f1d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercises_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/exercises_handler.h @@ -11,9 +11,9 @@ #include "dds_handler.h" #include "logger.h" -#include -#include -#include +#include +#include +#include #include #include #include @@ -40,15 +40,14 @@ private Q_SLOTS: void onEquipmentMessageChanged(const TrainingAreaBase::EquipmentMessage &data, const DataModification modType); void onExerciseHandlerIdleTimeout(); private: - NGL::INGLLogger &m_logger; ExerciseHandler *exerciseHandlerForExerciseId(int exerciseId); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_ppmDtc; QHash m_exerciseHandler; // QHash< QPair, equipmentNumber> QHash, int> m_participant2EquipNumber; QHash m_equipNo2ExerciseId; + LOGGER_T m_logger; }; } // namespace Messaging diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.cpp index 5158223ac..41a1cc2da 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.cpp @@ -21,6 +21,7 @@ HandlerOperatorMessage::HandlerOperatorMessage(const std::shared_ptr , m_ddsHandler(ddsHandler) , m_db(db) , m_exercisesHandler(exercisesHandler) + , m_logger(getLogger("HandlerOperatorMessage")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.h index baac013b4..dd9a0cf41 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/handler_operator_message.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "exercises_handler.h" #include "logger.h" @@ -43,8 +43,6 @@ private Q_SLOTS: void onOperatorChanged(const OperatorManagement::User &data); private: // methods - -NGL::INGLLogger &m_logger; void onCreateOperatorMessageRequest(const rti::core::SampleIdentity &cookie, const CreateOperatorMessageRequest &request) override; Core::FunctionReplyObject createOperatorMessageRequest(const CreateOperatorMessageRequest &request); @@ -66,6 +64,8 @@ private: // attributes std::shared_ptr m_opmDtc; //std::shared_ptr m_ppmDtc; QMap m_operatorMap; + NGL::INGLLogger &m_logger; + static const unsigned int m_maxSubjectLength = 80; static const unsigned int m_maxOcContentLength = 1024; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/logger.h index 7682c1be9..506973131 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcmsgcommon_export.h" +#include "msg_export.h" namespace Messaging { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/main_handler.h index e397722b6..fbc2ba7f6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/main_handler.h @@ -33,13 +33,11 @@ public: bool init(int domainId); private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler std::shared_ptr m_dbHandler; ///< Pointer to DB handler std::shared_ptr m_exercisesHandler; /// m_handlerOperatorMessage; ///< Messages between Operators / O/C - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace MessagingDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/settings.h index 400866d03..3c1796802 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/Messaging/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/CMakeLists.txt index 3b8486070..527f64d50 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate mdm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcMdmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcMdmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMdmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMdmCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMdmCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMdmCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate mdm_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcMdmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcMdmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMdmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMdmClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMdmClient svcMdmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMdmClient) # @@ -88,14 +84,13 @@ SET(SRCS_server # generate mdm_[d|f]ts.h, mdm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcMdmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcMdmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcMdmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcMdmServer PRIVATE RTI::nddscpp2 @@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcMdmServer svcMdmCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcMdmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.cpp index cf9492e09..b6b00cf9d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.cpp @@ -12,8 +12,10 @@ namespace MeteoDataManagement { -DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::AllExercises)), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +DdsHandler::DdsHandler(int domainId) + : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::AllExercises)) + , m_logger(getLogger("DdsHandler")) +{ DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.h index 5b4aa2be6..b81282634 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/dds_handler.h @@ -39,12 +39,12 @@ public: qint64 currentPartitionTime() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_pacemaker; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.cpp index 6c282a8e9..10035bd27 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.cpp @@ -16,10 +16,12 @@ using namespace MeteoDataManagement; HandlerInfrastructureData::HandlerInfrastructureData(const std::shared_ptr &ddsHandler, const std::shared_ptr &handlerMeteoDataUnits, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_ddsHandler(ddsHandler) - , m_handlerMeteoDataUnits(handlerMeteoDataUnits), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_handlerMeteoDataUnits(handlerMeteoDataUnits) + , m_logger(getLogger("HandlerInfrastructureData")) +{ } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.h index 485908a71..9d95b0c70 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_infrastructure_data.h @@ -16,8 +16,8 @@ #include #include -#include -#include +#include +#include namespace MeteoDataManagement { @@ -57,8 +57,6 @@ private Q_SLOTS: void onMainStructureElementChanged(const InfrastructureManagement::MainStructureElement &data, DataModification modType = DataModification::eAdded); private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; ///< Pointer to MDM DDS handler std::shared_ptr m_handlerMeteoDataUnits; ///< Pointer to meteo data units handler std::shared_ptr m_dtc; ///< Pointer to DTC InfrastructureManagement interface object @@ -68,7 +66,7 @@ NGL::INGLLogger &m_logger; QHash m_mountingPointAssetsMap; ///< Hold all available structure element ids for meteo data units (key == assetId) QHash m_mainStructureElements; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.cpp index 88c12af19..ac25fe9be 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.cpp @@ -12,18 +12,20 @@ #include "handler_infrastructure_data.h" #include "tcpweatherstation.h" #include "main_handler.h" -#include -#include +#include +#include using namespace MeteoDataManagement; HandlerMeteoDataUnit::HandlerMeteoDataUnit(MainHandler *mainHandler, const InfrastructureManagement::InstrumentationAsset &asset, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_mainHandler(mainHandler) , m_asset(asset) - , m_tcpWS(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_tcpWS(nullptr) + , m_logger(getLogger("HandlerMeteoDataUnit")) +{ init(); } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.h index 5054a32c2..2dd44e3dd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_unit.h @@ -32,7 +32,6 @@ public: ~HandlerMeteoDataUnit(); private: - NGL::INGLLogger &m_logger; bool init(); protected Q_SLOTS: @@ -54,14 +53,13 @@ protected Q_SLOTS: private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; ///< Pointer to MDM DDS handler InfrastructureManagement::InstrumentationAsset m_asset; ///< meteo unit data asset TcpWeatherStation *m_tcpWS; ///< Pointer to tcp based meteo data unit MeteoDataManagement::MeteoData m_lastMeteoData; ///< last received meteo data MeteoDataManagement::MeteoData m_newMeteoData; ///< new received meteo data - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.cpp index ea284b805..d3fd67c72 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.cpp @@ -14,8 +14,10 @@ namespace MeteoDataManagement { -HandlerMeteoDataUnits::HandlerMeteoDataUnits(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +HandlerMeteoDataUnits::HandlerMeteoDataUnits(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerMeteoDataUnits")) +{ } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.h index a51840ad2..d67c553fa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_meteo_data_units.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "handler_meteo_data_unit.h" #include "logger.h" @@ -28,10 +28,9 @@ public: bool removeMeteoDataUnit(const InfrastructureManagement::InstrumentationAsset &asset); private: - NGL::INGLLogger &m_logger; QMap m_handlerMeteoDataUnitsMap; ///< Hold all meteo data unit handler MainHandler *m_mainHandler; ///< Pointer to DDS handler - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.cpp index 4ea6077fb..c1919bee8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.cpp @@ -15,6 +15,7 @@ HandlerStaticMeteoData::HandlerStaticMeteoData(const std::shared_ptr : StaticMeteoDataModifyRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerStaticMeteoData")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.h index 4ddd10700..41cf30134 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/handler_static_meteo_data.h @@ -24,8 +24,6 @@ public: bool init(); private: // methods - -NGL::INGLLogger &m_logger; void onStaticMeteoDataModifyRequest(const rti::core::SampleIdentity &cookie, const StaticMeteoDataModifyRequest &request) override final; @@ -46,6 +44,8 @@ private: // attributes std::shared_ptr m_ddsHandler; std::shared_ptr m_db; Database::MdmStaticMeteoData m_dbStaticMeteoData; + NGL::INGLLogger &m_logger; + }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/logger.h index e9bf817e1..ca0dc0e56 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcmdmcommon_export.h" +#include "mdm_export.h" namespace MeteoDataManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.cpp index 7a5e0459c..e40314e9b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.cpp @@ -16,13 +16,15 @@ namespace MeteoDataManagement { -MainHandler::MainHandler() : m_ddsHandler(nullptr) +MainHandler::MainHandler() + : m_ddsHandler(nullptr) , m_dbHandler(nullptr) , m_handlerMeteoDataUnits(nullptr) , m_handlerInfrastructureData(nullptr) , m_handlerStaticMeteoData(nullptr) - , m_gnaService(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_gnaService(nullptr) + , m_logger(getLogger("MainHandler")) +{ } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.h index 41fec98d2..077fdd32f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/main_handler.h @@ -41,7 +41,6 @@ public: std::shared_ptr db() const; std::shared_ptr ism() const { return m_handlerInfrastructureData; } private: - NGL::INGLLogger &m_logger; QString initInternal(int domainId); private: // attributes std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler @@ -51,6 +50,6 @@ private: // attributes std::shared_ptr m_handlerStaticMeteoData; ///< Pointer to static meteo data handler GuezNasat::Initialization *m_gnaService; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/settings.h index d17956a5a..0b6541658 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpclimate.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpclimate.h index 32bcfb7db..e45e61b4b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpclimate.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpclimate.h @@ -10,7 +10,7 @@ #pragma once -#include +#include #include "tcpsocket.h" @@ -48,8 +48,6 @@ protected Q_SLOTS: void onRequestTimeout(); protected: - -NGL::INGLLogger &m_logger; /** * pure virtual function from TcpSocket to initialize the especially sensor device */ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.cpp index c9229a181..8a443fe19 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.cpp @@ -8,7 +8,7 @@ #include "tcpsocket.h" -#include +#include #include //#include // used for keepalive //#include // used for keepalive diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.h index 59a9abf93..24b964aee 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpsocket.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "logger.h" namespace MeteoDataManagement @@ -23,7 +23,6 @@ public: ~TcpSocket(); protected: - NGL::INGLLogger &m_logger; /** * Connect to converter * @param[in] hostName Hostname or Ip address of the RS232-LAN Converter @@ -48,7 +47,6 @@ protected Q_SLOTS: bool sendCommand(const QByteArray &qba); protected: - NGL::INGLLogger &m_logger; /** * pure virtual function to initialize the especially sensor device */ @@ -66,6 +64,7 @@ protected: QTcpSocket *m_socket; ///< pointer to tcpsocket object bool m_tryReconnect; ///< if true, try reconnection bool m_bSocketErrorWarnedOnce; + NGL::INGLLogger &m_logger; }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.cpp index 1334fbcc7..f9fb8e1f2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.cpp @@ -18,7 +18,8 @@ TcpWeatherStation::TcpWeatherStation(int id, const QString &converterIp, quint16 climatePort, quint16 windPort, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_id(id) , m_converterIp(converterIp) , m_climatePort(climatePort) @@ -31,8 +32,9 @@ TcpWeatherStation::TcpWeatherStation(int id, , m_direction(0.0) , m_speed(0.0) , m_climateOk(false) - , m_windOk(false), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_windOk(false) + , m_logger(getLogger("TcpWeatherStation")) +{ INFO_LOG(m_logger) << "Start TcpWeatherStation ip/(hostname): " << m_converterIp << " climatePort: " << m_climatePort << " windPort: " << m_windPort; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.h index 8f4a740ad..9a7b5e25d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpweatherstation.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include "logger.h" namespace MeteoDataManagement @@ -70,7 +70,6 @@ protected Q_SLOTS: protected: - NGL::INGLLogger &m_logger; int m_id; ///< weatherstation id QString m_converterIp; ///< IP address of the RS232-LAN Converter quint16 m_climatePort; ///< Access port number of climate sensor on the RS232-LAN Converter @@ -86,5 +85,6 @@ protected: float m_speed; ///< last speed value from wind sensor bool m_climateOk; ///< last statecheck climate bool m_windOk; ///< last statecheck weather + NGL::INGLLogger &m_logger; }; } // namespace MeteoDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpwind.h b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpwind.h index 0f58832ee..671ffe17c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpwind.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/MeteoDataManagement/tcpwind.h @@ -11,7 +11,7 @@ #pragma once -#include +#include #include "tcpsocket.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/CMakeLists.txt index dc89626e7..09b43597b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/CMakeLists.txt @@ -30,13 +30,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate nme_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcNmeCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcNmeCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcNmeCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcNmeCommon PRIVATE RTI::nddscpp2 @@ -45,7 +44,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNmeCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcNmeCommon) # @@ -57,14 +55,13 @@ SET(SRCS_client # generate nme_[d|f]tc.h, nme_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcNmeClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcNmeClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcNmeClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcNmeClient PRIVATE RTI::nddscpp2 @@ -73,7 +70,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNmeClient svcNmeCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcNmeClient) # @@ -87,14 +83,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate nme_db_impl.cpp/.h, nme_db.h CODEGEN_DATABASE(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcNmeServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcNmeServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcNmeServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcNmeServer PRIVATE RTI::nddscpp2 @@ -104,7 +99,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNmeServer PUBLIC svcNmeCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcNmeServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.cpp index c4a884e47..4569f0cfd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.cpp @@ -19,6 +19,7 @@ namespace NmeaManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.h index 086c8a8c5..fbd2267be 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/dds_handler.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include #include @@ -44,12 +44,13 @@ public: std::shared_ptr fts() const { return m_ddsFts;} private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtsCurrentRunningState; std::shared_ptr m_pacemaker; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace NmeaManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/logger.h index 530924e32..fb887b4aa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/logger.h @@ -10,7 +10,7 @@ #pragma once #include -#include "svcnmecommon_export.h" +#include "nme_export.h" namespace NmeaManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.cpp index fcd9d791a..16ea81a48 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.cpp @@ -14,8 +14,10 @@ namespace NmeaManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +MainHandler::MainHandler(QObject *parent) + : QObject(parent) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.h index a7c06f1c1..416f598c8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/main_handler.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include #include "dds_handler.h" #include "socket_handler.h" @@ -29,9 +29,10 @@ public: std::shared_ptr dds() const { return m_ddsHandler; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_socketHandler; std::shared_ptr m_nmeaHandler; + NGL::INGLLogger &m_logger; + }; } // namespace NmeaManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.cpp index 4eec8ddca..35c378265 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.cpp @@ -5,9 +5,8 @@ * $Author$ * Created by Gerlinde Rudolphus, SLTE, 2022-06-09 */ -#include -#include -#include +#include +#include #include "nmea_handler.h" namespace NmeaManagement { @@ -15,6 +14,7 @@ NmeaHandler::NmeaHandler(const std::shared_ptr &ddsHandler, QObject *parent) : QObject(parent) , m_ddsHandler(ddsHandler) + , m_logger(getLogger("NmeaHandler")) { } @@ -64,7 +64,7 @@ void NmeaHandler::IIXDR(QString package) NmeaManagement::BatteryState batteryState; NmeaManagement::ServiceControl serviceControl; - QRegularExpression sep(QStringLiteral("(\\,|\\*)")); + QRegExp sep(QStringLiteral("(\\,|\\*)")); QStringList pkt_data = package.split(sep); INFO_LOG(m_logger) << "----------------------------------------------------"; INFO_LOG(m_logger) << "batteryState pkt_data.size=" << pkt_data.size(); @@ -185,7 +185,7 @@ qint64 NmeaHandler::getDateTime(QString receivedTimeStr) void NmeaHandler::IIALR(QString package) { NmeaManagement::BatteryAlarm batteryAlarm; - QRegularExpression sep(QStringLiteral("(\\,|\\*)")); + QRegExp sep(QStringLiteral("(\\,|\\*)")); QStringList pkt_data = package.split(sep); alarm_state packageData; INFO_LOG(m_logger) << "pkt_data.size=" << pkt_data.size(); @@ -229,7 +229,7 @@ void NmeaHandler::GPGGA(QString package) NmeaManagement::PositionExcon PositionExcon; double latDecimal; double lonDecimal; - QRegularExpression sep(QStringLiteral("(\\,|\\*)")); + QRegExp sep(QStringLiteral("(\\,|\\*)")); QStringList pkt_data = package.split(sep); gpgga_data packageData; @@ -316,7 +316,7 @@ void NmeaHandler::GPGGA(QString package) void NmeaHandler::GPRMC(QString package) { - QRegularExpression sep(QStringLiteral("(\\,|\\*)")); + QRegExp sep(QStringLiteral("(\\,|\\*)")); QStringList pkt_data = package.split(sep); gprmc_data packageData; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.h index 35f0d7735..fb5cbb9ea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/nmea_handler.h @@ -11,7 +11,7 @@ #include #include -#include +#include #include "dds_handler.h" #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/settings.h index b6c4b037f..e2c47260b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/settings.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp index a201c2461..5dd952d08 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.cpp @@ -7,7 +7,7 @@ */ #include "socket_handler.h" -#include +#include #include #include "nmea_handler.h" #include @@ -23,13 +23,14 @@ SocketHandler::SocketHandler(const std::shared_ptr &ddsHandler, , TurnRadioMasterOffRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_nmeaHandler(nmeaHandler) + , m_logger(getLogger("SocketHandler")) { // create a timer m_reconnectTimer = new QTimer(this); // setup signal and slot - connect(m_reconnectTimer, &QTimer::timeout, - this, &SocketHandler::reconnectTimerSlot); + connect(m_reconnectTimer, SIGNAL(timeout()), + this, SLOT(reconnectTimerSlot())); } @@ -38,11 +39,11 @@ void SocketHandler::init(QString nmeaHost, int nmeaPort) m_nmeaHost = nmeaHost; m_nmeaPort = nmeaPort; socket = new QUdpSocket(this); - connect(socket, &QUdpSocket::connected, this, &SocketHandler::connected); - connect(socket, &QUdpSocket::disconnected, this, &SocketHandler::disconnected); - connect(socket, &QUdpSocket::readyRead, this, &SocketHandler::readyRead); + connect(socket, SIGNAL(connected()), this, SLOT(connected())); + connect(socket, SIGNAL(disconnected()), this, SLOT(disconnected())); + connect(socket, SIGNAL(readyRead()), this, SLOT(readyRead())); - connect(socket, &QUdpSocket::bytesWritten, this, &SocketHandler::bytesWritten); + connect(socket, SIGNAL(bytesWritten(qint64)), this, SLOT(bytesWritten(qint64))); INFO_LOG(m_logger) << "Connecting,.."; INFO_LOG(m_logger) << nmeaHost << " port: " << nmeaPort; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.h index e6d56c4eb..4ed9cfb6d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NmeaManagement/socket_handler.h @@ -8,16 +8,16 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include -#include +#include #include #include -#include +#include #include "dds_handler.h" #include "nmea_handler.h" #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/CMakeLists.txt index 123419156..8defc0325 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate nom_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcNomCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcNomCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcNomCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcNomCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNomCommon LtsCommandLineParser NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcNomCommon) # @@ -61,14 +59,13 @@ SET(SRCS_client # generate nom_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcNomClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcNomClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcNomClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcNomClient PRIVATE RTI::nddscpp2 @@ -77,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNomClient svcNomCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcNomClient) # @@ -89,14 +85,13 @@ SET(SRCS_server # generate nom_[d|f]ts.h, nom_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcNomServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcNomServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcNomServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcNomServer PRIVATE RTI::nddscpp2 @@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcNomServer svcNomCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcNomServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.cpp index 2adf6c6e5..513da82f4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.cpp @@ -10,10 +10,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -23,7 +23,7 @@ #include #include #include -#include +#include using namespace NotificationManagement; @@ -35,6 +35,7 @@ NomTests::NomTests(QObject *parent) , m_notificationId(0) , m_eTestStep(eUnknown) , m_bTestsSuccessful(true) + , m_logger(getLogger("NomTests")) { qRegisterMetaType("Core::FunctionReply"); } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.h index 37a960855..d1b2584b8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/ModuleTests/nom_tests.h @@ -63,7 +63,6 @@ protected Q_SLOTS: void onReceiveNotificationChanged(const NomNotification &data, DataModification modType); protected: - NGL::INGLLogger &m_logger; // Callbackfunctions for FTC void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override final; void onReadReceiptReply(const Core::FunctionReplyObject &reply) override final; @@ -97,6 +96,8 @@ private: } m_eTestStep; bool m_bTestsSuccessful; + NGL::INGLLogger &m_logger; + }; } // namespace NotificationManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.cpp index 26c889359..d27dba811 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace NotificationManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::AllExercises)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } // end of ctor()DdsHandler diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.h index 4a6579f8c..0ab3dd64d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/dds_handler.h @@ -47,7 +47,6 @@ public: private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_pacemaker; @@ -56,6 +55,7 @@ private: std::shared_ptr m_ddsFts; std::shared_ptr m_dtcExm; std::shared_ptr m_dtcOpm; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.cpp index 36166eb8f..f58bf70a5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.cpp @@ -7,7 +7,6 @@ */ #include "handler_notification.h" -#include #include "object_notification.h" #include "dds_handler.h" #include "settings.h" @@ -25,6 +24,7 @@ HandlerNotification::HandlerNotification(const std::shared_ptr &ddsH , m_removeNotificationTimer(new QTimer()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerNotification")) { } // end of ctor() //----------------------------------------------------------------------------- @@ -64,7 +64,7 @@ bool HandlerNotification::init() } // alle Addressen zu der NomNotification eintragen - for (const Database::NomAddress &addr : std::as_const(dataAddressVec)) + for (const Database::NomAddress &addr : qAsConst(dataAddressVec)) { if (addr.notificationId == notif.id()) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.h index 59d519707..bc351b1ee 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/handler_notification.h @@ -9,7 +9,7 @@ #include "dds_handler.h" #include -#include +#include namespace NotificationManagement { @@ -33,8 +33,6 @@ public: bool init(); private: // methods - -NGL::INGLLogger &m_logger; void onCreateNotificationRequest(const rti::core::SampleIdentity &cookie, const CreateNotification &request) override final; void onReadReceiptRequest(const rti::core::SampleIdentity &cookie, @@ -52,6 +50,8 @@ private: // attributes QTimer* m_removeNotificationTimer; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; + QHash m_objectNotificationMap; // Key = notificationId }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/logger.h index ee5105c3c..abcfaccb5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcnomcommon_export.h" +#include "nom_export.h" namespace NotificationManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/main_handler.h index b2465833b..0a9269c2f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/main_handler.h @@ -32,12 +32,10 @@ public: bool init(int domainId); private: // attributes - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler std::shared_ptr m_dbHandler; ///< Pointer to DB handler std::shared_ptr m_handlerNotification; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace NotificationManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.cpp index 168bb225d..baaaa55cc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.cpp @@ -7,13 +7,12 @@ */ #include "object_notification.h" -#include #include "dds_handler.h" #include -#include -#include -#include +#include +#include +#include namespace NotificationManagement { @@ -25,6 +24,7 @@ const QString CONTENT_ARG = QStringLiteral("contentArg"); ObjectNotification::ObjectNotification(const std::shared_ptr &ddsHandler, const std::shared_ptr &db) : m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("ObjectNotification")) { } // end of ctor() //----------------------------------------------------------------------------- @@ -96,7 +96,7 @@ QString ObjectNotification::contentArgsToJson() int i = 1; QJsonArray jsonArray; - for (const std::string& arg : std::as_const(m_dataNotificationObject.contentArgs())) + for (const std::string& arg : qAsConst(m_dataNotificationObject.contentArgs())) { DEBUG_LOG(m_logger) << ".arg() ersetzt immer den kleinsten freien Platzhalter" << ", arg=" << arg; @@ -138,7 +138,7 @@ std::vector ObjectNotification::jsonToContentArgs(const QString &js { // 3. Für schnellen Zugriff nach ID indizieren QHash sucheMap; - for (const QJsonValue &wert : std::as_const(jsonArray)) + for (const QJsonValue &wert : qAsConst(jsonArray)) { QJsonObject obj = wert.toObject(); int id = obj[CONTENT_ID].toInt(); @@ -168,7 +168,7 @@ Core::FunctionReplyObject ObjectNotification::readReceipt(const ReadReceipt &dat Database::NomAddress dbDataAddr; - for (const Address &recipientAddr : std::as_const(m_dataNotificationObject.recipientIds())) + for (const Address &recipientAddr : qAsConst(m_dataNotificationObject.recipientIds())) { if (data.operatorId() > 0 && recipientAddr.addressType() == AddressType_def::Operator && recipientAddr.addressId() != data.operatorId()) continue; @@ -223,7 +223,7 @@ Core::FunctionReplyObject ObjectNotification::readReceipt(const ReadReceipt &dat m_dataNotificationObject = toDdsData(dbDataNotification); m_dataNotificationObject.sender(sender); - for (const Address &addr : std::as_const(recipients)) + for (const Address &addr : qAsConst(recipients)) { if (addr.id() == dbDataAddr.id) m_dataNotificationObject.recipientIds().push_back(toDdsData(dbDataAddr)); @@ -247,7 +247,7 @@ Core::FunctionReplyObject ObjectNotification::deleteMessage(const DeleteMessage Database::NomAddress dbDataAddr; - for (const Address &recipientAddr : std::as_const(m_dataNotificationObject.recipientIds())) + for (const Address &recipientAddr : qAsConst(m_dataNotificationObject.recipientIds())) { DEBUG_LOG(m_logger) << "recipientAddr=" << ", id: " << recipientAddr.id() << ", addressId: " << recipientAddr.addressId() << ", isDeleted: " << recipientAddr.isDeleted(); @@ -282,7 +282,7 @@ Core::FunctionReplyObject ObjectNotification::deleteMessage(const DeleteMessage m_dataNotificationObject = toDdsData(dbDataNotification); m_dataNotificationObject.sender(sender); - for (const Address &addr : std::as_const(recipients)) + for (const Address &addr : qAsConst(recipients)) { DEBUG_LOG(m_logger) << "addr=" << ", id: " << addr.id() << ", addressId: " << addr.addressId() << ", isDeleted: " << addr.isDeleted(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.h index eff748728..537a0f9d0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/object_notification.h @@ -10,7 +10,7 @@ #include "dds_handler.h" //#include "nom_db.h" -#include +#include // Generated #include @@ -50,15 +50,16 @@ public: static Address toDdsData(const Database::NomAddress &dbData); // db -> dds private: - NGL::INGLLogger &m_logger; void onPublishData(); QString contentArgsToJson(); static std::vector jsonToContentArgs(const QString &properties); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; NomNotification m_dataNotificationObject; + + NGL::INGLLogger &m_logger; + }; } // namespace NotificationManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/settings.h index e4d1db5a2..7b6c67b39 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/NotificationManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/CMakeLists.txt index 707991d7b..c08ecc543 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate obd_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE} PARTS FTC) -NGL_ADD_LIBRARY2(SV WS svcObdCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(SV WS svcObdCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcObdCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcObdCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcObdCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcObdCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate obd_[d|f]tc.h, obd_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE} PARTS FTC) -NGL_ADD_LIBRARY2(SV WS svcObdClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(SV WS svcObdClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcObdClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcObdClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcObdClient svcObdCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcObdClient) # @@ -88,14 +84,13 @@ SET(SRCS_server # generate obd_[d|f]ts.h, obd_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE} PARTS FTS) -NGL_ADD_LIBRARY2(SV svcObdServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(SV svcObdServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcObdServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcObdServer PRIVATE RTI::nddscpp2 @@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcObdServer svcObdCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcObdServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.cpp index 46a5c3c87..198935041 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.cpp @@ -7,7 +7,6 @@ * Created by Philipp Dassow, SLST, 2017-12-05 */ #include "client_message.h" -#include #include #include @@ -123,12 +122,14 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS ClientMessage::ClientMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) : LtsWebSocket::AbstractClientMessage(client, type, typeId, uuid, data) , m_dataManager(dataManager) + , m_logger(getLogger("ClientMessage")) {} // ####### ClientMessage end ####### // ####### ServicesInformation begin ####### -ErrorMessage::ErrorMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) : ClientMessage(dataManager, client, type, typeId, uuid, data), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +ErrorMessage::ErrorMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) + : ClientMessage(dataManager, client, type, typeId, uuid, data) +{} void ErrorMessage::process() { @@ -249,7 +250,7 @@ void PdfListMessage::process() QJsonArray arr = m_data.toArray(); - for (const QJsonValue ¤t : std::as_const(arr)) + for (const QJsonValue ¤t : qAsConst(arr)) { if (!current.isObject()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.h index 0236aa754..8d9bc417e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/client_message.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/reply_message.h index e11726926..20cdc0fa6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/Messages/reply_message.h @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/data_manager.cpp index ba3f95722..fd7082880 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/data_manager.cpp @@ -9,7 +9,7 @@ */ #include "WebSocketInterface/data_manager.h" -#include +#include namespace OcBaseDownload { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp index e18d3e824..9e49c17be 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.cpp @@ -13,7 +13,7 @@ #include "data_manager.h" #include "WebSocketInterface/Messages/client_message.h" -#include +#include namespace OcBaseDownload { @@ -27,6 +27,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_dataManager(nullptr) , m_mainHandler(mainHandler) , m_webSocketActivityTimer(new QTimer(this)) + , m_logger(getLogger("WebSocketInterfaceHandler")) { connect(m_webSocketActivityTimer, &QTimer::timeout, this, &WebSocketInterfaceHandler::dataReceiveTimeout, Qt::UniqueConnection); const int iTimeout = Settings::webSocketActivityTimeoutMSec(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.h index 9430cccac..8a9065ef7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/WebSocketInterface/websocket_interface_handler.h @@ -8,8 +8,8 @@ */ #pragma once -#include -#include +#include +#include #include #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.cpp index f07bf1646..02cb44b0a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.cpp @@ -14,10 +14,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include namespace OcBaseDownload { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.h index 10c4e31d2..718f9e8eb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/copy_database.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include "logger.h" @@ -33,7 +33,6 @@ Q_SIGNALS: void dropDatabaseFailed(); void dropDatabaseFinished(); private: - NGL::INGLLogger &m_logger; bool runDropDb(const QString &dbName); void onDropDbFinished(int exitCode, QProcess::ExitStatus exitStatus); void runGrant(); @@ -53,10 +52,11 @@ private: QString executablePath(const QString &program); private: - NGL::INGLLogger &m_logger; QString m_dbHost; QString m_srcDbName; QString m_dstDbName; QProcess *m_proc; + + NGL::INGLLogger &m_logger; }; } // namespace OcBaseDownload diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.cpp index 27facfe23..969925679 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.cpp @@ -16,6 +16,7 @@ namespace OcBaseDownload DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Global, 0)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.h index 216bc0742..2ab4b6f70 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/dds_handler.h @@ -36,12 +36,13 @@ public: std::shared_ptr fts() const { return m_ddsFts; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtsCurrentRunningState; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace OcBaseDownload diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.cpp index 1adbd2b04..aa4545e31 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.cpp @@ -7,13 +7,12 @@ */ #include "handler_base_download.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include #include @@ -25,8 +24,8 @@ #include #include -#include -#include +#include +#include #include "copy_database.h" #include "main_handler.h" #include "settings.h" @@ -51,6 +50,7 @@ HandlerBaseDownload::HandlerBaseDownload(MainHandler *mainHandler, QObject *pare , m_remoteDbRetryCounter(0) , m_copyDatabase(new CopyDatabase(getLogger("HandlerBaseDownload"), this)) , m_exTblGen(new DBAdministration::ExerciseTableGenerator(getLogger("ExerciseTableGenerator"), NGL::directory(NGL::FileType::ConfigFile, QLatin1String("xml")), this)) + , m_logger(getLogger("HandlerBaseDownload")) { connect(m_baseDownloadReplyUpdateTimer, &QTimer::timeout, this, &HandlerBaseDownload::updateBaseDownloadReply); @@ -1126,7 +1126,7 @@ void HandlerBaseDownload::removeOldExercises() } QVector exercises; exmDbHandler->db()->select(exercises); - for (const auto &ex : std::as_const(exercises)) + for (const auto &ex : qAsConst(exercises)) { if (m_exTblGen->dropExerciseSchema(ex.id, false)) continue; @@ -1718,7 +1718,7 @@ void HandlerBaseDownload::copyFromOldDatabase() //TODO: add more tables if needed, check data in these tables, z.B. in rec_equipment_position.equipment_number is always negative (?!) DBTransaction trans(m_dbConnection); - for (const QString &table : std::as_const(tableList)) + for (const QString &table : qAsConst(tableList)) { if (!copyTable(dbIn, m_dbConnection, table)) ERROR_LOG(m_logger) << "Failed to copy table " << table; @@ -1852,7 +1852,7 @@ void HandlerBaseDownload::copyOldFlmData(const QSqlDatabase &dbIn, const QSqlDat QVector flmFolderData; dbIfcNew->select(flmFolderData); qint64 folderId = -1; - for (const auto &folder : std::as_const(flmFolderData)) + for (const auto &folder : qAsConst(flmFolderData)) { if (folder.name == QStringLiteral("Snapshots")) { @@ -1868,7 +1868,7 @@ void HandlerBaseDownload::copyOldFlmData(const QSqlDatabase &dbIn, const QSqlDat if (folderId > 0) // found Snapshots folder for the exercise id { - for (auto data : std::as_const(flmData)) + for (auto data : qAsConst(flmData)) { if (data.folderId == folderId || //snapshots (data.fileTypeId.underlying() == FileManagement::FileType::Pdf)) //old PDF diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.h index d7ac16f31..d2e6f21d5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_base_download.h @@ -8,9 +8,9 @@ #pragma once #include -#include -#include -#include +#include +#include +#include // db #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_pdf_download.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_pdf_download.cpp index 9b5bb4bc3..ac38f66b8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_pdf_download.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/handler_pdf_download.cpp @@ -7,23 +7,22 @@ */ #include "handler_pdf_download.h" -#include #include "WebSocketInterface/Messages/reply_message.h" -#include +#include #include "pdf_downloader.h" #include #include #include #include #include -#include +#include #include #include #include "main_handler.h" #include "settings.h" -#include -#include +#include +#include namespace OcBaseDownload { @@ -42,6 +41,7 @@ HandlerPdfDownload::HandlerPdfDownload(MainHandler *mainHandler, QObject *parent , m_currentPort(NGL::Connections::port(NGL::Connections::eConnection::SCM_WEBSOCKET)) , m_currentMode(Mode::PORT_REQUEST) , m_downloader(nullptr) + , m_logger(getLogger("HandlerPdfDownload")) { } @@ -172,7 +172,7 @@ void HandlerPdfDownload::onStartPdfDownloadRequest(const rti::core::SampleIdenti return false; }; QVector pdfInfoVec; - for (const auto ¤t : std::as_const(m_pdfData)) + for (const auto ¤t : qAsConst(m_pdfData)) { if (!containsId(request.documentIds(), current.id)) continue; @@ -200,7 +200,7 @@ void HandlerPdfDownload::onStartPdfDownloadRequest(const rti::core::SampleIdenti void HandlerPdfDownload::onOcPdfDownloadRequest(const rti::core::SampleIdentity &cookie, const OcPdfDownloadRequest &request) { - DEBUG_LOG(m_logger) < -#include +#include #include #include #include "WebSocketInterface/Messages/client_message.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/logger.h index 7ad81a544..2ec6bc443 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcobdcommon_export.h" +#include "obd_export.h" namespace OcBaseDownload { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.cpp index fecc0a838..ec9520bb6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.cpp @@ -13,14 +13,16 @@ namespace OcBaseDownload { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_handlerBaseDownload(nullptr) , m_handlerPdfDownload(nullptr) , m_handlerWebSocket(nullptr) , m_scmDtc(nullptr) - , m_scmFtc(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_scmFtc(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.h index 61b146de0..c00538642 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include @@ -42,7 +42,6 @@ public: std::shared_ptr scmFtc() const { return m_scmFtc; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_handlerBaseDownload; std::shared_ptr m_handlerPdfDownload; @@ -50,5 +49,8 @@ private: std::shared_ptr m_scmDtc; std::shared_ptr m_scmFtc; + + NGL::INGLLogger &m_logger; + }; } // namespace OcBaseDownload diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.cpp index 76fa7f537..f5b9e4e85 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.cpp @@ -11,15 +11,17 @@ #include #include -#include +#include namespace OcBaseDownload { -PdfDownloadSocket::PdfDownloadSocket(const QString &hostName, QObject *parent) : QObject(parent) +PdfDownloadSocket::PdfDownloadSocket(const QString &hostName, QObject *parent) + : QObject(parent) , m_socket(new QTcpSocket(this)) , m_readTimeout(new QTimer(this)) - , m_sizeToDownload(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_sizeToDownload(0) + , m_logger(getLogger("PdfDownloadSocket")) +{ DEBUG_LOG(m_logger) << "PdfDownloadSocket::PdfDownloadSocket"; connect(m_socket, &QTcpSocket::connected, this, &PdfDownloadSocket::connected); connect(m_socket, &QTcpSocket::readyRead, this, &PdfDownloadSocket::readyRead); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.h index f1c6cc94d..c47f841a6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_download_socket.h @@ -9,9 +9,9 @@ #pragma once #include "logger.h" -#include -#include -#include +#include +#include +#include class QTimer; namespace OcBaseDownload @@ -35,10 +35,10 @@ private slots: void onReadTimeout(); private: - NGL::INGLLogger &m_logger; QTcpSocket *m_socket; QTimer *m_readTimeout; int m_sizeToDownload; QByteArray m_downloadedData; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.cpp index 5adabea3f..0bf95d5ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.cpp @@ -17,19 +17,21 @@ #include #include -#include +#include namespace OcBaseDownload { -PdfDownloader::PdfDownloader(const QVector &pdfInfoVec, MainHandler *mainHandler, const QString &hostName, int exerciseId, QObject *parent) : QObject(parent) +PdfDownloader::PdfDownloader(const QVector &pdfInfoVec, MainHandler *mainHandler, const QString &hostName, int exerciseId, QObject *parent) + : QObject(parent) , m_pdfInfoVec(pdfInfoVec) , m_socket(new PdfDownloadSocket(hostName, this)) , m_mainHandler(mainHandler) , m_exerciseId(exerciseId) , m_exTblGen(new DBAdministration::ExerciseTableGenerator(getLogger("ExerciseTableGenerator"), NGL::directory(NGL::FileType::ConfigFile, QLatin1String("xml")), this)) , m_downloadCount(0) - , m_totalDownloads(pdfInfoVec.size()), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_totalDownloads(pdfInfoVec.size()) + , m_logger(getLogger("PdfDownloader")) +{ connect(m_socket, &PdfDownloadSocket::downloadFinished, this, &PdfDownloader::onSingleDownloadFinished); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.h index 3576eb4eb..1cd689810 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/pdf_downloader.h @@ -8,10 +8,10 @@ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -47,8 +47,6 @@ private Q_SLOTS: void onSingleDownloadFinished(const QByteArray &data); private: // other - -NGL::INGLLogger &m_logger; typedef WebSocketInterface::Messages::PdfListMessage::PdfInformation PdfInfo; private: // methods @@ -69,5 +67,7 @@ private: // attributes DBAdministration::ExerciseTableGenerator *m_exTblGen; int m_downloadCount; int m_totalDownloads; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.cpp index 7f0917ea8..53f90e107 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include namespace OcBaseDownload { class NGLSettingsClass : public NGL::Settings diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.h index f712a2395..80b60ee83 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcBaseDownload/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/CMakeLists.txt index 947b7036c..c01914dcc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/CMakeLists.txt @@ -45,13 +45,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate osc_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE} PARTS FTC) -NGL_ADD_LIBRARY2(SV WS svcOscCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(SV WS svcOscCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOscCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOscCommon PRIVATE RTI::nddscpp2 @@ -61,7 +60,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOscCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOscCommon) # @@ -73,14 +71,13 @@ SET(SRCS_client # generate osc_[d|f]tc.h, osc_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE} PARTS FTC) -NGL_ADD_LIBRARY2(SV WS svcOscClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(SV WS svcOscClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOscClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOscClient PRIVATE RTI::nddscpp2 @@ -89,7 +86,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOscClient svcOscCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOscClient) # @@ -101,14 +97,13 @@ SET(SRCS_server # generate osc_[d|f]ts.h, osc_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE} PARTS FTS) -NGL_ADD_LIBRARY2(SV svcOscServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(SV svcOscServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOscServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOscServer PRIVATE RTI::nddscpp2 @@ -118,7 +113,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOscServer svcOscCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOscServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/client_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/client_message.h index 7375e2c51..0d3a3f91c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/client_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/client_message.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/reply_message.h index 996bcd5ca..a21033b2b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/Messages/reply_message.h @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/data_manager.cpp index 95e65e9f3..7e1e7d391 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/data_manager.cpp @@ -11,10 +11,10 @@ #include "main_handler.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace OcSituationClient { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.cpp index 4678d8660..02e186281 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.cpp @@ -23,6 +23,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.h index e4ca80905..077a4994e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/WebSocketInterface/websocket_interface_handler.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.cpp index 3e05a5782..34868fc72 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.cpp @@ -8,7 +8,7 @@ #include "central_aes_byte_reader.h" -#include +#include #include "main_handler.h" #include "settings.h" @@ -16,8 +16,10 @@ namespace OcSituationClient { -CentralAesByteReader::CentralAesByteReader(const QByteArray &data) : m_data(data), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +CentralAesByteReader::CentralAesByteReader(const QByteArray &data) + : m_data(data) + , m_logger(getLogger("CentralAesByteReader")) +{} bool CentralAesByteReader::getRemoveMessage(size_t &pos, CentralAesByteReader::RemoveMessage &removeMessage) const { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.h index 5bbefb23a..3584c4ac6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/central_aes_byte_reader.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "AreaEffectSimulation/aes_dtc.h" #include "OcSituationServer/oc_situation.h" #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.cpp index dac811fdc..4cdcac7be 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.cpp @@ -15,6 +15,7 @@ namespace OcSituationClient DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.h index 410b1e3ce..118c7d490 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/dds_handler.h @@ -40,13 +40,14 @@ public: qint64 currentPartitionTime() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_dtcCore; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace OcSituationClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.cpp index 1e882951a..f354ea4a7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.cpp @@ -7,9 +7,8 @@ */ #include "handler_oc_aes_data.h" -#include -#include +#include #include @@ -28,6 +27,7 @@ HandlerOcAesData::HandlerOcAesData(MainHandler *mainHandler, , m_tabDts(mainHandler->tabDts()) , m_tabocDtc(mainHandler->tabocDtc()) , m_utmCoord(LtsCoordTrans::UtmCoordinate::fromMgrs(Settings::baseCoord())) + , m_logger(getLogger("HandlerOcAesData")) {} HandlerOcAesData::~HandlerOcAesData() @@ -177,7 +177,7 @@ void HandlerOcAesData::handleDangerAreas(const QByteArray &data, size_t pos) m_aesFtc->dangerAreaModifyRequest(req, this); } - for (int id : std::as_const(aesToBeDeleted)) + for (int id : qAsConst(aesToBeDeleted)) { if (m_aesDtc->dangerArea(id).isCentral()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.h index cc70c0c16..621b221ff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_aes_data.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.cpp index 3f2aaf2a8..e5cad8563 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.cpp @@ -8,11 +8,11 @@ #include "handler_oc_central_aes_data.h" -#include -#include -#include +#include +#include +#include #include -#include +#include #include "central_aes_byte_reader.h" #include "main_handler.h" @@ -25,7 +25,7 @@ HandlerOcCentralAesData::HandlerOcCentralAesData(const std::shared_ptr &aesFtc, const std::shared_ptr &tabocDts, QObject *parent) - : QObject(parent), m_aesDtc(aesDtc), m_aesFtc(aesFtc), m_tabocDts(tabocDts) + : QObject(parent), m_aesDtc(aesDtc), m_aesFtc(aesFtc), m_tabocDts(tabocDts), m_logger(getLogger("HandlerOcCentralAesData")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.h index f337fa449..6eb68e3ad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_central_aes_data.h @@ -7,9 +7,9 @@ */ #pragma once -#include -#include -#include +#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.cpp index 839b137d9..8f64415bb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.cpp @@ -7,10 +7,9 @@ */ #include "handler_oc_data.h" -#include -#include -#include +#include +#include #include "main_handler.h" #include "handler_oc_aes_data.h" @@ -54,6 +53,7 @@ HandlerOcData::HandlerOcData(MainHandler *mainHandler, , m_useFilter(false) , m_position(dds::core::optional()) , m_licensed(false) + , m_logger(getLogger("HandlerOcData")) {} HandlerOcData::~HandlerOcData() @@ -74,7 +74,7 @@ bool HandlerOcData::init() return false; } - for (const auto &data : std::as_const(dataVec)) + for (const auto &data : qAsConst(dataVec)) { switch (data.aesTypeId) { @@ -399,7 +399,7 @@ void HandlerOcData::situationRequestCycleTimeout() void HandlerOcData::onUserChanged(const OperatorManagement::User &data, DataModification modType) { - TRACE_LOG(m_logger) << Q_FUNC_INFO; + TRACE_LOG(m_logger) << LOGFUNCTION; if (modType != DataModification::eModified || data.id() == 99) // id 99 = Organisator return; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.h index 949be2f04..179c6c92d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_data.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include @@ -43,7 +43,6 @@ public: bool init(); protected: - NGL::INGLLogger &m_logger; void onEvlSchemaModifyReply(const Core::FunctionReplyObject &reply) override final; void onCreateOperatorMessageReply(const Core::FunctionReplyObject &reply) override final; void onModifyOperatorMessageReply(const Core::FunctionReplyObject &reply) override final; @@ -121,5 +120,8 @@ private: OperatorManagement::User m_user; bool m_licensed; + + NGL::INGLLogger &m_logger; + }; } // namespace OcSituationClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.cpp index 48bc95d49..7458fde73 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.cpp @@ -7,10 +7,9 @@ */ #include "handler_oc_situation_data.h" -#include -#include -#include +#include +#include #include "main_handler.h" #include "settings.h" @@ -32,6 +31,7 @@ HandlerOcSituationData::HandlerOcSituationData(const std::shared_ptr , m_tabDts(tabDts) , m_tabocDtc(tabocDtc) , m_tabocDts(tabocDts) + , m_logger(getLogger("HandlerOcSituationData")) {} HandlerOcSituationData::~HandlerOcSituationData() @@ -97,7 +97,7 @@ void HandlerOcSituationData::process(const QByteArray &data, bool bIsInitial) int ownEquipmentNumber = m_tabocDtc->specificsEquipment(1).equipmentNumber(); int ownParticipantId = -1; - for (const int &participantId : std::as_const(m_participantId2EqId)) + for (const int &participantId : qAsConst(m_participantId2EqId)) { if (m_participantId2EqId.value(participantId) == ownEquipmentNumber) { @@ -138,7 +138,7 @@ void HandlerOcSituationData::removeAllPositions() invalidPos.position().reportingSource(Core::PositionReportingSource::SetByOperator); // SetByOperator -> nan is allowed invalidPos.sampleTime(m_dds->currentPartitionTime()); - for (const auto eqNumber : std::as_const(m_participantId2EqId)) + for (const auto eqNumber : qAsConst(m_participantId2EqId)) { invalidPos.equipmentNumber(eqNumber); m_tabDts->publish(invalidPos); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.h index 3cefb9583..4b7dd5058 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/handler_oc_situation_data.h @@ -7,9 +7,9 @@ */ #pragma once -#include +#include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/logger.h index 041a8ba2e..e5d80d5d4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcosccommon_export.h" +#include "osc_export.h" namespace OcSituationClient { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.cpp index aa7b160c4..98a45f215 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.cpp @@ -16,7 +16,8 @@ namespace OcSituationClient { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_handlerOcData(nullptr) , m_dbHandler(nullptr) @@ -34,8 +35,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent) , m_tabDtc(nullptr) , m_tabFtc(nullptr) , m_tabocDtc(nullptr) - , m_tabocDts(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_tabocDts(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.h index e72a66fc4..e1d003ddd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/main_handler.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include #include @@ -19,7 +19,7 @@ #include #include #include -#include +#include #include #include #include @@ -84,7 +84,6 @@ public: return {}; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_handlerOcData; std::shared_ptr m_dbHandler; @@ -105,5 +104,7 @@ private: std::shared_ptr m_tabFtc; std::shared_ptr m_tabocDtc; std::shared_ptr m_tabocDts; + + NGL::INGLLogger &m_logger; }; } // namespace OcSituationClient diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/settings.h index 60f5fdf09..1dba58dd0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationClient/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/CMakeLists.txt index 45d5342aa..c50ea380a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/CMakeLists.txt @@ -47,13 +47,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate oss_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcOssCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcOssCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOssCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOssCommon PRIVATE RTI::nddscpp2 @@ -64,7 +63,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOssCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOssCommon) # @@ -76,14 +74,13 @@ SET(SRCS_client # generate oss_[d|f]tc.h, oss_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcOssClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcOssClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOssClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOssClient PRIVATE RTI::nddscpp2 @@ -92,7 +89,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOssClient svcOssCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOssClient) # @@ -104,14 +100,13 @@ SET(SRCS_server # generate oss_[d|f]ts.h, oss_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcOssServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcOssServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOssServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOssServer PRIVATE RTI::nddscpp2 @@ -121,7 +116,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOssServer svcOssCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOssServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/central_aes_data_builder.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/central_aes_data_builder.cpp index 31950187d..26a758fa4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/central_aes_data_builder.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/central_aes_data_builder.cpp @@ -7,7 +7,6 @@ */ #include "central_aes_data_builder.h" -#include #include "LtsUtils/LtsUtilsCore/qbytearray_byteaccess.h" #include "QLineF" @@ -456,7 +455,7 @@ void addSegments(QByteArray &buf, const std::vector #include "oc_situation.h" -#include +#include #include "logger.h" -#include -#include +#include +#include #include "central_aes_data_builder.h" namespace OcSituationServer diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.cpp index 38d14b994..dad19cab2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.cpp @@ -15,6 +15,7 @@ namespace OcSituationServer DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.h index 76d7c0530..04713d28c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/dds_handler.h @@ -39,12 +39,13 @@ public: Q_SIGNALS: void partitionTimeChanged(qint64 partitionTime); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_dtcCore; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace OcSituationServer diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.cpp index 0efc0474c..9f041df87 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.cpp @@ -7,13 +7,12 @@ */ #include "handler_oc_aes_data.h" -#include #include -#include +#include -#include -#include +#include +#include #include "settings.h" @@ -34,6 +33,7 @@ HandlerOcAesData::HandlerOcAesData(MainHandler *mainHandler, , m_demandingEquipments(QMap>()) , m_iedPositionsToBeSend(QMap()) , m_iedPositionCycleTimer(new QTimer(this)) + , m_logger(getLogger("HandlerOcAesData")) {} HandlerOcAesData::~HandlerOcAesData() @@ -61,7 +61,7 @@ bool HandlerOcAesData::init() return false; } - for (const auto &data : std::as_const(dataVec)) + for (const auto &data : qAsConst(dataVec)) { switch (data.aesTypeId) { @@ -199,7 +199,7 @@ void HandlerOcAesData::sendIedPositions() LtsUtils::set1Byte(OcSituation::AesType::IedPositions, data); LtsUtils::set1Byte(cnt, data); - for (const auto &pos : std::as_const(m_iedPositionsToBeSend)) + for (const auto &pos : qAsConst(m_iedPositionsToBeSend)) { LtsUtils::set2Byte(m_gimDtc->ied(pos.id()).equipmentNumber(), data); const QPointF relCoord(m_positionConverter->relativeFromGeographic(pos.position())); @@ -252,7 +252,7 @@ void HandlerOcAesData::collectionTimeout(OcSituation::AesType type, const std::f if (m_demandingEquipments[type].size() > 5) sendFunction(0); // broadcast else - for (int eqNumber : std::as_const(m_demandingEquipments[type])) + for (int eqNumber : qAsConst(m_demandingEquipments[type])) sendFunction(eqNumber); //cleanup diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.h index 806c7c6d6..a6462130b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_aes_data.h @@ -7,10 +7,10 @@ */ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include #include "main_handler.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.cpp index 94d7747d3..94c5b6694 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.cpp @@ -7,15 +7,14 @@ */ #include "handler_oc_central_aes_data.h" -#include #include -#include -#include -#include +#include +#include +#include #include #include "settings.h" -#include +#include #include "central_aes_data_queue.h" #include @@ -248,7 +247,7 @@ void HandlerOcCentralAesData::setRequestCentralAesData(OcSituation::SituationCen int radius, bool initial) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; QMutexLocker l(&m_accessMutex); DEBUG_LOG(m_logger) << "Requested CenterEquipmentId: " << centerEquipmentId << " radius: " << radius; @@ -448,7 +447,7 @@ void HandlerOcCentralAesData::onAesItemViewChanged(const AreaEffectSimulation::A void HandlerOcCentralAesData::handleSituation() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; QMutexLocker l(&m_accessMutex); @@ -473,7 +472,7 @@ void HandlerOcCentralAesData::handleSituation() QMultiMap distances; - for (qint32 currentAesItemId : std::as_const(m_aesItemsInRange)) + for (qint32 currentAesItemId : qAsConst(m_aesItemsInRange)) { qreal distance = calculateDistanceToCircleCenter(currentAesItemId); @@ -548,7 +547,7 @@ void HandlerOcCentralAesData::aliveTimeout() void HandlerOcCentralAesData::onResetInternalData() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; DEBUG_LOG(m_logger) << "Resetting internal data!"; m_aesItemsInRange.clear(); @@ -559,7 +558,7 @@ void HandlerOcCentralAesData::onResetInternalData() void HandlerOcCentralAesData::fetchAesItemsInRange() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; if (m_radius == 0) return; @@ -639,7 +638,7 @@ QPolygonF HandlerOcCentralAesData::polygonFromForm(const std::vector &aesIte AreaEffectSimulation::AesType aesType = AreaEffectSimulation::AesType::inner_enum::AtUnknown; - for (qint32 currentAesItemId : std::as_const(kickedOutAesItems)) + for (qint32 currentAesItemId : qAsConst(kickedOutAesItems)) { if (m_allCentralAesItemViews.contains(currentAesItemId)) aesType = m_allCentralAesItemViews.value(currentAesItemId).aesTypeId(); @@ -737,7 +736,7 @@ void HandlerOcCentralAesData::removeKickedOutAesItems(const QSet &aesIte void HandlerOcCentralAesData::buildSituationCircle() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; // building the situation "circle" --> we use a regular polygon with 8 edges m_situationCircle.clear(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.h index 50dc6481c..11e542a2e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_central_aes_data.h @@ -7,16 +7,16 @@ */ #pragma once -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include -#include +#include #include -#include +#include #include "main_handler.h" #include "position_converter.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.cpp index f416f55c9..9176ec872 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.cpp @@ -8,10 +8,10 @@ #include "handler_oc_data.h" -#include +#include -#include -#include +#include +#include #include "main_handler.h" #include "oc_situation.h" @@ -43,6 +43,7 @@ HandlerOcData::HandlerOcData(MainHandler *mainHandler, , m_tabFtc(mainHandler->tabFtc()) , m_currentActiveEvaluationSchemaId(0) , m_stateInformationTimer(new QTimer(this)) + , m_logger(getLogger("HandlerOcData")) {} HandlerOcData::~HandlerOcData() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.h index acd934668..b276564de 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_data.h @@ -10,9 +10,9 @@ #include "main_handler.h" #include "logger.h" -#include -#include -#include +#include +#include +#include namespace OcSituationServer { @@ -37,7 +37,6 @@ public: bool init(); protected: - NGL::INGLLogger &m_logger; void onEvlCommentModifyReply(const Core::FunctionReplyObject &reply) override final; void onCreateOperatorMessageReply(const Core::FunctionReplyObject &reply) override final; void onSendOcDataReply(const Core::FunctionReplyObject &reply) override final; @@ -85,5 +84,8 @@ private: QMap m_centralAesDataThreads; // equipmentId, thread for central aes data handling QMutex m_accessMutex; // Mutex-Object QTimer *m_stateInformationTimer; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.cpp index 889678d30..57f21ea78 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.cpp @@ -7,12 +7,11 @@ */ #include "handler_oc_situation_data.h" -#include #include -#include -#include -#include +#include +#include +#include #include #include "settings.h" #include @@ -161,7 +160,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen QSet typeClasses, bool initial) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; QMutexLocker l(&m_accessMutex); DEBUG_LOG(m_logger) << "Requested CenterEquipmentId: " << centerEquipmentId << " radius: " << radius; @@ -184,7 +183,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen if (m_centerEquipmentId > 0) { ParticipantManagement::Participant centerParticipant; - for (const auto &participant : std::as_const(m_allParticipants)) + for (const auto &participant : qAsConst(m_allParticipants)) { if (participant.equipmentNumber().is_set() && participant.equipmentNumber().get() == m_centerEquipmentId) { @@ -259,7 +258,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen void HandlerOcSituationData::onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; if (modType == DataModification::eRemoved) return; @@ -313,7 +312,7 @@ static inline int getEquipmentStateBits(const ParticipantManagement::DynamicPart void HandlerOcSituationData::onDynamicParticipantDataChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; if (modType == DataModification::eRemoved) return; @@ -355,7 +354,7 @@ void HandlerOcSituationData::onDynamicParticipantDataChanged(const ParticipantMa void HandlerOcSituationData::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; if (modType == DataModification::eRemoved) return; const int participantId = data.participantId(); @@ -434,7 +433,7 @@ void HandlerOcSituationData::onAesItemViewChanged(const AreaEffectSimulation::Ae void HandlerOcSituationData::onDusMineStateChanged(const AreaEffectSimulation::DusMineState &/*data*/, DataModification /*modType*/) { auto copy = m_dynamicParticpantData; - for (const ParticipantManagement::DynamicParticipantData &dynPartData : std::as_const(copy)) + for (const ParticipantManagement::DynamicParticipantData &dynPartData : qAsConst(copy)) { if (!m_participantWithMaybeMissingPartyId.contains(dynPartData.participantId())) continue; @@ -444,7 +443,7 @@ void HandlerOcSituationData::onDusMineStateChanged(const AreaEffectSimulation::D void HandlerOcSituationData::handleSituation() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; QMutexLocker l(&m_accessMutex); @@ -495,7 +494,7 @@ void HandlerOcSituationData::aliveTimeout() void HandlerOcSituationData::onResetInternalData() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; INFO_LOG(m_logger) << "Resetting internal data!"; m_participants.clear(); @@ -514,7 +513,7 @@ void HandlerOcSituationData::onResetInternalData() void HandlerOcSituationData::fetchParticipantsInRange() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; const QPointF relCenterPos = PositionConverter::relativeFromGeographic(m_centerPosition, m_baseCoordinate); if (m_centerType == OcSituation::SituationCenterType::Equipment) @@ -529,7 +528,7 @@ void HandlerOcSituationData::fetchParticipantsInRange() QSet curParticipants; const QHash oldParticipants = m_participants; - for (const auto &position : std::as_const(m_allParticipantPositions)) + for (const auto &position : qAsConst(m_allParticipantPositions)) { if (!LtsUtils::isPositionTimeOutdated(m_partitionTime, position.sampleTime())) // only if position is not outdated { @@ -600,7 +599,7 @@ void HandlerOcSituationData::fetchParticipantsInRange() void HandlerOcSituationData::handleParticipant(const ParticipantManagement::Participant &participant) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; int participantId = participant.id(); if (participant.equipmentNumber().is_set()) @@ -641,12 +640,12 @@ static inline bool sortParticipantsForRange(const QPair &p1, QVector> HandlerOcSituationData::createPrioQueue() const { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; QVector> participantsPrioQueue; participantsPrioQueue.reserve(m_participantsToSend.size()); - for (auto participantId : std::as_const(m_participantsToSend)) + for (auto participantId : qAsConst(m_participantsToSend)) { // ignore (currently) outdated players if (m_outdatedParticipants.contains(participantId)) @@ -681,7 +680,7 @@ QVector> HandlerOcSituationData::createPrioQueue() const QByteArray HandlerOcSituationData::createDataStream(int maxSize, const QVector> &participantsPrioQueue) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; QByteArray ret; @@ -692,7 +691,7 @@ QByteArray HandlerOcSituationData::createDataStream(int maxSize, // first: participants that are not in range any more DEBUG_LOG(m_logger) << "m_newlyOutdatedParticipants: " << m_newlyOutdatedParticipants.size(); QSet copyOfOutdated = m_newlyOutdatedParticipants; - for (const auto participantId : std::as_const(m_newlyOutdatedParticipants)) + for (const auto participantId : qAsConst(m_newlyOutdatedParticipants)) { addParticipantId(ret, participantId, OcSituation::ModificationFlag::eNone); copyOfOutdated.remove(participantId); @@ -776,7 +775,7 @@ QByteArray HandlerOcSituationData::createDataStream(int maxSize, void HandlerOcSituationData::updatePrioOfNotSendParticipants() { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; // add a prio bonus to all participants not send this cycle QMap::const_iterator it = m_modifiedFlags.constBegin(); for (; it != m_modifiedFlags.constEnd(); ++it) @@ -801,7 +800,7 @@ void HandlerOcSituationData::updatePrioOfNotSendParticipants() void HandlerOcSituationData::setModified(int participantId, OcSituation::ModificationBits bits) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; DEBUG_LOG(m_logger) << "setModified " << bits << " for: " << m_participantId2EqId[participantId] << " / " << participantId; m_participantsToSend.insert(participantId); @@ -817,7 +816,7 @@ void HandlerOcSituationData::setModified(int participantId, OcSituation::Modific void HandlerOcSituationData::clearModified(int participantId) { - TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO; + TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION; DEBUG_LOG(m_logger) << "clearModified for: " << m_participantId2EqId[participantId] << " / " << participantId; m_modifiedFlags.remove(participantId); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.h index f3c8f3462..1c0af2c3b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/handler_oc_situation_data.h @@ -7,17 +7,17 @@ */ #pragma once -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include +#include +#include #include -#include +#include #include "main_handler.h" #include "position_converter.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/logger.h index fb14365a6..6697c8b45 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcosscommon_export.h" +#include "oss_export.h" namespace OcSituationServer { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.cpp index 92fce8456..c6eec6272 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.cpp @@ -17,7 +17,8 @@ namespace OcSituationServer { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_exerciseId(0) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) @@ -31,8 +32,9 @@ MainHandler::MainHandler(QObject *parent) : QObject(parent) , m_ppmDtc(nullptr) , m_ppmFtc(nullptr) , m_tabDtc(nullptr) - , m_tabFtc(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_tabFtc(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.h index cb43def88..64fd7d26a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/main_handler.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include #include @@ -15,7 +15,7 @@ #include #include #include -#include +#include #include #include @@ -63,7 +63,6 @@ public: int exerciseId() const { return m_exerciseId; } private: - NGL::INGLLogger &m_logger; int m_exerciseId; std::shared_ptr m_ddsHandler; @@ -80,5 +79,7 @@ private: std::shared_ptr m_ppmFtc; std::shared_ptr m_tabDtc; std::shared_ptr m_tabFtc; + + NGL::INGLLogger &m_logger; }; } // namespace OcSituationServer diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/position_converter.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/position_converter.cpp index 0aa71e335..1479722a4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/position_converter.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/position_converter.cpp @@ -10,16 +10,18 @@ #include #include -#include +#include namespace OcSituationServer { -PositionConverter::PositionConverter(MainHandler *m_mainHandler) : m_mainHandler(m_mainHandler) +PositionConverter::PositionConverter(MainHandler *m_mainHandler) + : m_mainHandler(m_mainHandler) , m_baseCoord(LtsCoordTrans::UtmCoordinate()) , m_asmDtc(AssetManagement::Interface::Dtc::create(m_mainHandler->dds()->dds())) - , m_exmDtc(ExerciseManagement::Interface::Dtc::create(m_mainHandler->dds()->dds())), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_exmDtc(ExerciseManagement::Interface::Dtc::create(m_mainHandler->dds()->dds())) + , m_logger(getLogger("PositionConverter")) +{ m_exmDtc->enableExercise(); m_asmDtc->enableTrainingArea(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/settings.h index 577c7f974..f7bd985ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OcSituationServer/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OnlineReports/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/OnlineReports/CMakeLists.txt index 9f9892b86..4b6268afa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OnlineReports/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OnlineReports/CMakeLists.txt @@ -12,7 +12,7 @@ SET(SRCS_common ore_dummy.cpp) # Generate aes_dt[s,c]_types.h, aes_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcOreDummy SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcOreDummy SHARED ${SRCS_common}) NGL_TARGET_LINK_LIBRARIES(svcOreDummy PRIVATE Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/CMakeLists.txt index 6154f98ec..0d8d07214 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate opm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcOpmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcOpmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOpmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOpmCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOpmCommon LtsUtilsCore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOpmCommon) # @@ -63,14 +61,13 @@ SET(SRCS_client # generate opm_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcOpmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcOpmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOpmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOpmClient PRIVATE RTI::nddscpp2 @@ -79,7 +76,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOpmClient svcOpmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOpmClient) # @@ -91,14 +87,13 @@ SET(SRCS_server # generate opm_[d|f]ts.h, opm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcOpmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcOpmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcOpmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcOpmServer PRIVATE RTI::nddscpp2 @@ -109,7 +104,6 @@ NGL_TARGET_LINK_LIBRARIES(svcOpmServer ngldb LtsUtilsCore ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcOpmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.cpp index 4291e86fa..c28eb9461 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.cpp @@ -14,10 +14,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include using namespace OperatorManagement; @@ -30,6 +30,7 @@ OpmTests::OpmTests(QObject *parent) , m_createdId(0) , m_eTestStep(eUnknown) , m_bTestsSuccessful(true) + , m_logger(getLogger("OpmTests")) { qRegisterMetaType("Core::FunctionReply"); } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.h index 93f04a4cb..948884f2a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/ModuleTests/opm_tests.h @@ -67,7 +67,6 @@ protected Q_SLOTS: void onReceiveGroupChanged(const Group &data, DataModification modType); protected: - NGL::INGLLogger &m_logger; // Callbackfunctions for FTC void onOperatorCreateModifyReply(const Core::FunctionReplyObject &replyObject) override final; void onOperatorRemoveReply(const Core::FunctionReplyObject &replyObject) override final; @@ -106,6 +105,9 @@ private: } m_eTestStep; bool m_bTestsSuccessful; + + NGL::INGLLogger &m_logger; + }; } // namespace OperatorManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/client_message.cpp index 0e862ad31..81d4d85d6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/client_message.cpp @@ -47,12 +47,14 @@ LtsWebSocket::AbstractClientMessage *ClientMessageFactory::createMessage(LtsWebS ClientMessage::ClientMessage(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid, const QJsonValue &data) : LtsWebSocket::AbstractClientMessage(client, type, typeId, uuid, data) , m_dataManager(dataManager) + , m_logger(getLogger("ClientMessage")) {} // ####### ClientMessage end ####### // ####### BaseDlRequest begin ####### -BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid) : ClientMessage(dataManager, client, type, typeId, uuid), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +BaseDlRequest::BaseDlRequest(DataManager *dataManager, LtsWebSocket::ReplyHandler *client, const QString &type, const int typeId, const QString &uuid) + : ClientMessage(dataManager, client, type, typeId, uuid) +{} void BaseDlRequest::process() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/reply_message.h index ada2b2025..da91b1d96 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/Messages/reply_message.h @@ -10,8 +10,8 @@ #include -#include -#include +#include +#include namespace OperatorManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/json_keys.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/json_keys.h index 74dfde525..ec3593044 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/json_keys.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/json_keys.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/websocket_interface_handler.cpp index 824b8318b..5d7cb9335 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.cpp index 11882ecb3..7cf0eb4d8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace OperatorManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any, 0)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.h index 93e3f81c5..fb0f1cd04 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/dds_handler.h @@ -41,7 +41,6 @@ public: std::shared_ptr ddsConnector() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; @@ -49,6 +48,8 @@ private: std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; std::shared_ptr m_dtcAsm; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.cpp index c39e6fb2a..c854f8ee6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.cpp @@ -15,6 +15,7 @@ namespace OperatorManagement HandlerAccessControlLevel::HandlerAccessControlLevel(MainHandler *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerAccessControlLevel")) {} HandlerAccessControlLevel::~HandlerAccessControlLevel() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.h index a020271bc..261c46d78 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_access_control_level.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "main_handler.h" #include "logger.h" @@ -25,8 +25,9 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; QMap m_accesscontrollevelObjMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.cpp index 57505d4ed..45e86d98c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.cpp @@ -9,7 +9,6 @@ #include "handler_active_apps.h" -#include #include "dds_handler.h" #include "main_handler.h" @@ -21,6 +20,7 @@ HandlerActiveApps::HandlerActiveApps(MainHandler *mainHandler) : Interface::Fts::ActiveAppUpdateRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::ActiveAppRemoveRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerActiveApps")) { } @@ -69,7 +69,7 @@ void HandlerActiveApps::cleanupOperator(int operatorId) void HandlerActiveApps::cleanup() { auto dtsPtr = dts(); - for (const ActiveApp &item : std::as_const(m_activeApps)) + for (const ActiveApp &item : qAsConst(m_activeApps)) dtsPtr->removeActiveAppByKey(item.id()); m_activeApps.clear(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.h index 89fa43802..25d0ce747 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_active_apps.h @@ -9,7 +9,7 @@ #pragma once -#include +#include #include #include #include "logger.h" @@ -31,7 +31,6 @@ public: void cleanupOperator(int operatorId); private: - NGL::INGLLogger &m_logger; void cleanup(); void removeZombieEntry(const ActiveApp &request); void onActiveAppUpdateRequest(const rti::core::SampleIdentity &cookie, @@ -45,8 +44,8 @@ private: std::shared_ptr fts() const; private: - NGL::INGLLogger &m_logger; QHash m_activeApps; MainHandler *m_mainHandler; + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.cpp index 9c17c5809..08ad1e5a3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.cpp @@ -7,7 +7,6 @@ */ #include "handler_group.h" -#include #include "object_group.h" #include "handler_operator.h" #include "opm_db.h" @@ -21,6 +20,7 @@ HandlerGroup::HandlerGroup(MainHandler *mainHandler) , Interface::Fts::GroupCreateRequestHandler(mainHandler->fts()) , Interface::Fts::GroupRemoveRequestHandler(mainHandler->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerGroup")) {} HandlerGroup::~HandlerGroup() @@ -152,7 +152,7 @@ Core::FunctionReplyObject HandlerGroup::create(const GroupCreateRequest &request { Database::OpmGroup group; group.name = QString::fromStdString(request.name()); - for (const ObjectGroup *g : std::as_const(m_groupObjMap)) + for (const ObjectGroup *g : qAsConst(m_groupObjMap)) { if (g->name().compare(group.name, Qt::CaseInsensitive) == 0) return Core::FunctionReplyObject(-1, tr_lts("dds", "Name '%1' already exists")).arg(group.name); @@ -193,7 +193,7 @@ Core::FunctionReplyObject HandlerGroup::changeName(const OperatorManagement::Gro group.name = QString::fromStdString(request.name()); group.description = QString::fromStdString(request.description()); - for (const ObjectGroup *g : std::as_const(m_groupObjMap)) + for (const ObjectGroup *g : qAsConst(m_groupObjMap)) { if (g == ifs) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.h index 6706445ff..9f658801b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_group.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "main_handler.h" #include "logger.h" @@ -34,7 +34,6 @@ public: Core::FunctionReplyObject remove(const Core::RemoveElementRequest &request); private: - NGL::INGLLogger &m_logger; void onGroupChangeMembershipsRequest(const rti::core::SampleIdentity &cookie, const GroupChangeMembersRequest &request) override; void onGroupCreateRequest(const rti::core::SampleIdentity &cookie, @@ -47,11 +46,12 @@ private: void updateRolePresetId( const int operatorId, const int rolePresetId); private: - NGL::INGLLogger &m_logger; QMap m_groupObjMap; QMultiMap m_groupGroupMap; QMultiMap m_aclAllowMap; QMultiMap m_aclDenyMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_locked_topics.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_locked_topics.cpp index 63d2810a2..56d6e9d3d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_locked_topics.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_locked_topics.cpp @@ -11,7 +11,7 @@ #include "handler_operator.h" #include #include -#include +#include #include @@ -22,6 +22,7 @@ HandlerLockedTopics::HandlerLockedTopics(MainHandler &mainHandler, QObject *parent) : QObject(parent) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerLockedTopics")) {} bool HandlerLockedTopics::init() @@ -260,7 +261,7 @@ Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityR // } // const Database::OpmLockedTopics &lockedTopic = *lockedTopicIt; -// DEBUG_LOG(m_logger) << Q_FUNC_INFO << ": locked topic id " << lockedTopic.id; +// DEBUG_LOG(m_logger) << LOGFUNCTION << ": locked topic id " << lockedTopic.id; // // ... and then reinserting the updated lock entity (as the id has now changed) - while the key (op, ws, exc, topic id) stays the same! // m_lockedTopics[requestedKey] = dbStruct; // } @@ -280,13 +281,13 @@ Core::TryLockEntityReply HandlerLockedTopics::tryLock(const Core::TryLockEntityR // if (lockedTopicIt == m_lockedTopics.constEnd()) // { -// ERROR_LOG(m_logger) << Q_FUNC_INFO << ": Failed to release outdated lock as lock entity id ("< +#include #include "logger.h" #include "opm_db.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.cpp index 7200ec7df..29ecd8c92 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.cpp @@ -7,16 +7,15 @@ */ #include "handler_operator.h" -#include #include "handler_locked_topics.h" #include "handler_active_apps.h" #include "object_operator.h" #include "handler_group.h" #include "opm_db.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace OperatorManagement { @@ -32,6 +31,7 @@ HandlerOperator::HandlerOperator(MainHandler *mainHandler) , Interface::Fts::OperatorUpdateVisiblePartiesByExerciseRequestHandler(mainHandler->fts()) , m_aliveCheckTimer(new QTimer(this)) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerOperator")) { connect(m_aliveCheckTimer, &QTimer::timeout, this, &HandlerOperator::onCheckAliveTimeout); m_aliveCheckTimer->setInterval(10000); @@ -75,7 +75,7 @@ bool HandlerOperator::init() OperatorManagement::OperatorWorkstationAlive alive; alive.lastAlive(QDateTime::currentMSecsSinceEpoch()); - for (const Database::OpmOperator &op : std::as_const(dataVec)) + for (const Database::OpmOperator &op : qAsConst(dataVec)) { ObjectOperator *ifs(new ObjectOperator(m_mainHandler)); Core::FunctionReplyObject ret = ifs->createObject(op, opMap[op.id]); @@ -299,7 +299,7 @@ Core::FunctionReplyObject HandlerOperator::operatorModifyRequest(const OperatorC { op.name = QString::fromStdString(request.name().get()); - for (const ObjectOperator *o : std::as_const(m_operatorObjMap)) + for (const ObjectOperator *o : qAsConst(m_operatorObjMap)) { if (o == ifs) continue; @@ -589,7 +589,7 @@ Core::FunctionReplyObject HandlerOperator::operatorApplyForeignAclsRequest(const void HandlerOperator::onOperatorUpdateVisiblePartiesByExerciseRequest(const rti::core::SampleIdentity &cookie, const OperatorUpdateVisiblePartiesByExerciseRequest &request) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << request; + DEBUG_LOG(m_logger) << LOGFUNCTION << request; // DEBUG_LOG(m_logger) << "onOperatorUpdateVisiblePartiesByExerciseRequest: " << request; Core::FunctionReplyObject reply = operatorUpdateVisiblePartiesByExerciseRequest(request); if (reply.error()) @@ -619,7 +619,7 @@ Core::FunctionReplyObject HandlerOperator::operatorUpdateVisiblePartiesByExercis void HandlerOperator::reloadAcls() { - for (ObjectOperator *ifs : std::as_const(m_operatorObjMap)) + for (ObjectOperator *ifs : qAsConst(m_operatorObjMap)) ifs->reloadAcls(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.h index 1a465cc51..7269475af 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/handler_operator.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include #include "main_handler.h" @@ -42,7 +42,6 @@ public: QString operatorNameById(int operatorId) const; private: - NGL::INGLLogger &m_logger; void onOperatorChangePasswordRequest(const rti::core::SampleIdentity &cookie, const OperatorChangePasswordRequest &request) override; void onOperatorCreateModifyRequest(const rti::core::SampleIdentity &cookie, @@ -76,10 +75,10 @@ private: private Q_SLOTS: void onCheckAliveTimeout(); private: - NGL::INGLLogger &m_logger; QHash> m_aliveData; QHash m_operatorObjMap; QTimer *m_aliveCheckTimer; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/main_handler.h index b2b40c954..c8380aa6c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/main_handler.h @@ -48,7 +48,6 @@ public: std::shared_ptr getHandlerActiveApps() const { return m_handlerActiveApps; } private: - NGL::INGLLogger &m_logger; bool initAclHandler(); bool initOperatorHandler(); bool initGroupHandler(); @@ -57,7 +56,6 @@ private: bool initActiveApps(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_handlerAcl; std::shared_ptr m_handlerOperator; std::shared_ptr m_handlerGroup; @@ -66,5 +64,8 @@ private: std::shared_ptr m_dbHandler; std::shared_ptr m_handlerWebSocket; std::shared_ptr m_handlerActiveApps; + + NGL::INGLLogger &m_logger; + }; } // namespace ExerciseManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.cpp index 2396aeccf..c391fd8e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.cpp @@ -15,6 +15,7 @@ namespace OperatorManagement ObjectAccessControlLevel::ObjectAccessControlLevel(MainHandler *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectAccessControlLevel")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.h index 477d12309..ba2450dba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_access_control_level.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include // Generated #include @@ -28,11 +28,13 @@ public: qint64 getId() const { return m_data.id; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; Database::OpmAccessControlLevel m_data; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.cpp index 2031109ea..769798dce 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.cpp @@ -16,6 +16,7 @@ namespace OperatorManagement ObjectGroup::ObjectGroup(MainHandler *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectGroup")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.h index 8978878be..7f39e1ebd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_group.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include // Generated #include @@ -41,7 +41,6 @@ public: QString name() const { return m_data.name; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: @@ -50,5 +49,8 @@ private: std::vector m_isMemberOf; std::vector m_aclAllow; std::vector m_aclDeny; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.cpp index c2c8c2488..6a4c3e283 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.cpp @@ -6,14 +6,13 @@ */ #include "object_operator.h" -#include #include "main_handler.h" -#include +#include #include -#include -#include -#include +#include +#include +#include namespace OperatorManagement { @@ -21,6 +20,7 @@ namespace OperatorManagement ObjectOperator::ObjectOperator(MainHandler *mainHandler) : m_mainHandler(mainHandler) , m_originalPrimaryGroupId(0) + , m_logger(getLogger("ObjectOperator")) { } @@ -144,7 +144,7 @@ Core::FunctionReplyObject ObjectOperator::updateObject(const Database::OpmOperat Core::FunctionReplyObject ObjectOperator::updateOperatorExercise(const Database::OpmOperatorExercise &data) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << data.operatorId << " " << data.exerciseId; + DEBUG_LOG(m_logger) << LOGFUNCTION << data.operatorId << " " << data.exerciseId; // insert can fail due to (deleted) exerciseId m_mainHandler->db()->setEmitMessageOnError(false); @@ -292,7 +292,7 @@ QSet ObjectOperator::calculateEffectiveAcls() const QSet allowances; QSet denials; - for (int group : std::as_const(effectiveGroups)) + for (int group : qAsConst(effectiveGroups)) { addValuesToSet(allowMap, group, allowances); addValuesToSet(denyMap, group, denials); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.h index 20b1c0a6d..a6fc03d88 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/object_operator.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include // Generated #include @@ -41,7 +41,6 @@ public: QSet effectiveAcls() const { return m_effectiveAcls; } void reloadAcls(bool force = false); protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: @@ -56,6 +55,8 @@ private: QSet m_effectiveAcls; std::vector m_exercises; int m_originalPrimaryGroupId; + NGL::INGLLogger &m_logger; + //Database::OpmOperatorExercise toDbData(const PartiesByExercise &ddsData); std::vector toDdsData(const QVector &dbData); }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.cpp index 0fa0f3337..47df723d0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.cpp @@ -8,12 +8,11 @@ */ #include "opm_dtc_impl_custom.h" -#include -#include -#include -#include +#include +#include +#include #include -#include +#include #include #include @@ -31,7 +30,7 @@ QVector DtcImplCustom::getOperatorsByOperatorRight(int operatorRight) QVector ret; DEBUG_LOG(m_logger) << "OperatorRight: " << operatorRight; - for (const User &user : std::as_const(m_userCont)) + for (const User &user : qAsConst(m_userCont)) { for (int acl : user.effectiveAcls()) { @@ -53,7 +52,7 @@ QVector DtcImplCustom::operatorForExerciseParty(int exerciseId, int partyId DEBUG_LOG(m_logger) << LOGFUNCTION << " exerciseId: " << exerciseId << ", partyId: " << partyId; - for (const User &user : std::as_const(m_userCont)) + for (const User &user : qAsConst(m_userCont)) { const auto visiblePartiesByExercise = user.visiblePartiesByExercise(); for (const auto &pbe : visiblePartiesByExercise) @@ -114,7 +113,7 @@ bool DtcImplCustom::sendAdlerNotification(const QString &jsonStr, const int exer DEBUG_LOG(m_logger) << "sendAdlerNotification"; const QJsonArray &exercisesArr = doc.object().value(QStringLiteral("Exercises")).toArray(); - for (const QJsonValue &exercisesVal : std::as_const(exercisesArr)) + for (const QJsonValue &exercisesVal : qAsConst(exercisesArr)) { const QJsonObject exercisesObj = exercisesVal.toObject(); @@ -136,7 +135,7 @@ bool DtcImplCustom::sendAdlerNotification(const QString &jsonStr, const int exer // 2. Array durchlaufen QJsonArray notifications = exercisesObj.value(QStringLiteral("suppressNotifications")).toArray(); - for (const QJsonValue &val : std::as_const(notifications)) + for (const QJsonValue &val : qAsConst(notifications)) { DEBUG_LOG(m_logger) << "sendAdlerNotification notifications"; const QJsonObject entry = val.toObject(); @@ -170,7 +169,7 @@ QVector DtcImplCustom::getNotificationRecipents(const int exerciseId, const bool inExercise = false; const auto user = m_userCont.value(userId); // Only include operators who are assigned to the exercise. - for (const auto &exerciseIdUser : std::as_const(user.exerciseIds())) + for (const auto &exerciseIdUser : qAsConst(user.exerciseIds())) { if (exerciseIdUser == exerciseId) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.h index 1ee6ea292..62319caea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/opm_dtc_impl_custom.h @@ -9,8 +9,8 @@ #pragma once #include -#include -#include +#include +#include //------------------------------------------------------------------------------------------------------------- namespace OperatorManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.cpp index e0040dd11..ae0b72eee 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.cpp @@ -11,7 +11,7 @@ #include #include -#include "LtsUtils/LtsUtilsCore/lts_portrange.h" +#include "LtsUtilsCore/lts_portrange.h" namespace OperatorManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.h index 14ab684dc..ae2d7f829 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/OperatorManagement/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.cpp index f058faf3a..0847000f3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.cpp @@ -10,7 +10,7 @@ #include "ParticipantHandling/participant.h" #include "ParticipantHandling/participant_donator.h" #include "main_handler.h" -#include +#include namespace ParticipantManagement { @@ -21,6 +21,7 @@ BiteHandler::BiteHandler(MainHandler *mainHandler) : QObject() , Interface::Fts::CallBiteRequestHandler(mainHandler->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("BiteHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.h index b4eeadde3..a4e9bd2b1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/BiteHandling/bite_handler.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "logger.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/CMakeLists.txt index b9ed7491a..536782b5d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/CMakeLists.txt @@ -20,9 +20,6 @@ SET(SRCS_common ppm_db_impl_custom.h logger.cpp logger.h - ppm_translation.h - ppm_translation.cpp - ppm_types.h ) # Generate ppm_enums.idl / ppm.idl @@ -41,13 +38,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate ppm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS HLA svcPpmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS HLA svcPpmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPpmCommon PRIVATE RTI::nddscpp2 @@ -62,7 +58,6 @@ NGL_TARGET_LINK_LIBRARIES(svcPpmCommon LtsCoordTrans ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPpmCommon) # @@ -76,14 +71,13 @@ SET(SRCS_client # generate ppm_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV HLA svcPpmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(WS AAR SV HLA svcPpmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPpmClient PRIVATE RTI::nddscpp2 @@ -92,7 +86,6 @@ NGL_TARGET_LINK_LIBRARIES(svcPpmClient svcPpmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPpmClient) # @@ -107,14 +100,13 @@ SET(SRCS_server CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # WS for RecordReplayPlugin -NGL_ADD_LIBRARY2(AAR SV WS svcPpmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV WS svcPpmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPpmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPpmServer PRIVATE RTI::nddscpp2 @@ -125,7 +117,6 @@ NGL_TARGET_LINK_LIBRARIES(svcPpmServer ngldb LtsUtilsCore ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPpmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.cpp index 3b306f5d6..af3623920 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.cpp @@ -11,14 +11,15 @@ #include "main_handler.h" #include "ParticipantHandling/participant.h" -#include -#include +#include +#include ParticipantManagement::EquipmentEventHandling::EquipmentEventHandler::EquipmentEventHandler(MainHandler *mainHandler, QObject *parent) : QObject(parent) , Interface::Fts::EquipmentSystemEventDataRequestHandler(mainHandler->fts()) , m_mainHandler (mainHandler) , m_filterId(0) + , m_logger(getLogger("EquipmentEventHandler")) { } @@ -26,13 +27,13 @@ bool ParticipantManagement::EquipmentEventHandling::EquipmentEventHandler::init( { if (!m_mainHandler->tabDtc()->enableEquipmentEvent()) { - ERROR_LOG(m_logger) << " TAB Dtc enableEquipmentEvent() failed !"; + ERROR_LOG (m_logger) << " TAB Dtc enableEquipmentEvent() failed !"; return false; } if (!m_mainHandler->dts()->enableEquipmentSystemEventFtcReply()) { - ERROR_LOG(m_logger) << " Dts enableEquipmentSystemEventDataFtcReply() failed !"; + ERROR_LOG (m_logger) << " Dts enableEquipmentSystemEventDataFtcReply() failed !"; return false; } connect(m_mainHandler->tabDtc().get(), &TrainingAreaBase::Interface::Dtc::equipmentEventChanged, this, &EquipmentEventHandler::onEquipmentEventChanged); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.h index fc297187d..2c82b2189 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/EquipmentEventHandling/equipment_event_handler.h @@ -12,7 +12,7 @@ #include -#include +#include #include namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.cpp index e17537df9..ea0bac3b3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.cpp @@ -14,8 +14,8 @@ #include #include -#include -#include +#include +#include //-------------------------------------------------------------------------------- ParticipantManagement::PpmTests::PpmTests(QObject *parent) @@ -26,6 +26,7 @@ ParticipantManagement::PpmTests::PpmTests(QObject *parent) , m_equipmentId(-1) , m_participantId(1) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.h index 5a0d46513..138a1bc96 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ModuleTests/ppm_tests.h @@ -20,7 +20,7 @@ #pragma once -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.cpp index 31f91bfd8..db826fc56 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.cpp @@ -2,7 +2,7 @@ * @RDE_HEADER@ * The FiringUnitValidator regulates the rules for firing units * $Id: participant_dis_helper.h 37747 2017-12-08 08:07:01Z ehrlicher $ - * $HeadURL: svn://10.196.0.54/TDS/branches/product/features/24_vulcano/Lts/ParticipantManagement/Gui/Common/participant_dis_helper.h $ + * $HeadURL: svn://10.196.0.54/TDS/branches/product/features/24_vulcano/Lts/Plugins/ParticipantManagement/Gui/Common/participant_dis_helper.h $ * $Author: ehrlicher $ * Created by Hannes Fritsche, ESZS, 2024-03-07 */ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.h index 9054b605d..d363c0e1d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/firing_unit_validator.h @@ -2,16 +2,16 @@ * @RDE_HEADER@ * The FiringUnitValidator regulates the rules for firing units serverside * $Id: participant_dis_helper.h 37747 2017-12-08 08:07:01Z ehrlicher $ - * $HeadURL: svn://10.196.0.54/TDS/branches/product/features/24_vulcano/Lts/ParticipantManagement/Gui/Common/participant_dis_helper.h $ + * $HeadURL: svn://10.196.0.54/TDS/branches/product/features/24_vulcano/Lts/Plugins/ParticipantManagement/Gui/Common/participant_dis_helper.h $ * $Author: ehrlicher $ * Created by Hannes Fritsche, ESZS, 2024-03-07 */ #pragma once -#include +#include #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.cpp index d6510b968..f3f56323b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.cpp @@ -19,6 +19,7 @@ namespace ParticipantManagement GetParticipants::GetParticipants(MainHandler *mainHandler) : Interface::Fts::GetParticipantsRequestHandler(mainHandler->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("GetParticipants")) {} GetParticipants::~GetParticipants() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.h index 0c1d627aa..2a435c249 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/get_participants.h @@ -21,12 +21,12 @@ public: ~GetParticipants(); private: - NGL::INGLLogger &m_logger; void onGetParticipantsRequest(const rti::core::SampleIdentity &cookie, const GetParticipantsRequest &request) override; private: - NGL::INGLLogger &m_logger; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.cpp index 02a2be261..b11c3dde2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.cpp @@ -13,7 +13,7 @@ #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.h index a6f2f38db..b5b8b1978 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant.h @@ -12,7 +12,7 @@ #include #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.cpp index dbea622d5..8fbb0be27 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.cpp @@ -7,7 +7,6 @@ * Created by Hannes Baeuerle, SLSE, 2016-05-12 */ #include "participant_handler.h" -#include #include "participant.h" #include "ppm_common.h" @@ -17,7 +16,7 @@ #include #include -#include +#include namespace ParticipantManagement { @@ -44,7 +43,7 @@ void ParticipantHandler::clearParticipants() dts()->removeHitLineInfoByKey(it.value().id()); m_hitLineInfoMap.clear(); - for (auto p : std::as_const(m_participants)) + for (auto p : qAsConst(m_participants)) { p->removeFromDds(); delete p; @@ -346,7 +345,7 @@ void ParticipantHandler::onNewParticipantModeReport(const TrainingAreaBase::Part Participant *participant = participantByEquipmentNumber(report.equipmentNumber()); if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << report.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << report.equipmentNumber(); return; } @@ -388,7 +387,7 @@ void ParticipantHandler::onNewSpecialSensorData(const TrainingAreaBase::SpecialS if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << data.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << data.equipmentNumber(); return; } @@ -416,7 +415,7 @@ void ParticipantHandler::onNewLaserDesignation(const TrainingAreaBase::LaserDesi if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << data.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << data.equipmentNumber(); return; } @@ -440,7 +439,7 @@ void ParticipantHandler::onLaserDesignationRemoved(int equipmentNumber, int gear if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << equipmentNumber; + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << equipmentNumber; return; } DynamicParticipantData dpd = participant->dynamicParticipantData(); @@ -467,7 +466,7 @@ void ParticipantHandler::onBuildingHitLineInfo(const Buildings::BuildingHitLineI if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with participantId: " << data.originatorParticipantId(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with participantId: " << data.originatorParticipantId(); return; } @@ -490,7 +489,7 @@ void ParticipantHandler::onSanitaryMaterialStockReport(const TrainingAreaBase::P Participant *participant = participantByEquipmentNumber(data.equipmentNumber()); if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << data.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << data.equipmentNumber(); return; } if (data.qualification() == TrainingAreaBase::Qualification::NotDefined) @@ -524,7 +523,7 @@ void ParticipantHandler::onParticipantSanitation(const TrainingAreaBase::Partici Participant *participantOrig = participantByEquipmentNumber(data.originatorEquipmentNumber()); if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << data.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << data.equipmentNumber(); return; } int participantOrigId = data.originatorEquipmentNumber(); @@ -555,7 +554,7 @@ void ParticipantHandler::onOperatorAction(const TrainingAreaBase::OperatorAction Participant *participant = participantByEquipmentNumber(data.equipmentNumber()); if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << data.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << data.equipmentNumber(); return; } @@ -586,7 +585,7 @@ void ParticipantHandler::onNewFunctionalAreaEntryChanged(const TrainingAreaBase: if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with equipment number " << data.equipmentNumber(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with equipment number " << data.equipmentNumber(); return; } @@ -640,7 +639,7 @@ void ParticipantHandler::setPosition(const ParticipantManagement::ParticipantPos if (!participant) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << "Could not find participant with id " << data.participantId(); + ERROR_LOG(m_logger) << LOGFUNCTION << "Could not find participant with id " << data.participantId(); return; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.h index 4c0561563..23bc6983a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler.h @@ -135,7 +135,6 @@ class ParticipantHandler quint16 getWebSocketPort() const; protected: - NGL::INGLLogger &m_logger; static void updateLaserDesignation(DynamicParticipantData &data, const TrainingAreaBase::LaserDesignation &newLaserDesignation); void updateLaserDesignation(DynamicParticipantData &dataInOut, const Buildings::BuildingHitLineInfo &newLaserDesignation); static void removeLaserDesignation(DynamicParticipantData &data, qint32 gearId); @@ -159,7 +158,6 @@ class ParticipantHandler virtual bool isSampleTimeInFuture(qint64 sampleTime) const; protected: - NGL::INGLLogger &m_logger; std::unique_ptr m_unitPositionCalculator; QHash m_equipNumber2ParticipantId; QHash m_participants; @@ -168,6 +166,8 @@ class ParticipantHandler QMap m_hitLineInfoMap; BaseDataProvider *m_bdp; + LOGGER_T m_logger; + std::shared_ptr m_webSocketHandler; friend class Participant; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.cpp index 66739c725..2341da5d5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.cpp @@ -7,7 +7,6 @@ * Created by Hannes Baeuerle, SLSE, 2016-05-12 */ #include "participant_handler_for_exercise.h" -#include #include "convert_db_to_dds.h" #include "firing_unit_validator.h" @@ -22,11 +21,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include namespace ParticipantManagement @@ -169,7 +168,7 @@ bool ParticipantHandlerForExercise::init() } // remove the 'unused' EquipmentExerciseMappings (for whatever reason there are some...) - for (const auto &eem : std::as_const(localEquipmentExerciseMappings)) + for (const auto &eem : qAsConst(localEquipmentExerciseMappings)) dbEx0->removeEquipmentExerciseMapping(eem); // after m_publishEquipmentExerciseMappings has been set and participants are created @@ -190,7 +189,7 @@ bool ParticipantHandlerForExercise::init() bool isOwnPositionParticipant = false; // publish participants in dds - for (Participant *p : std::as_const(m_participants)) + for (Participant *p : qAsConst(m_participants)) { if (p->equipmentNumber() == 1) isOwnPositionParticipant = true; @@ -310,7 +309,7 @@ bool ParticipantHandlerForExercise::init() dtc->equipmentExerciseMappings([this](const EquipmentExerciseMapping &data) { onEquipmentExerciseMappingChanged(data, DataModification::eAdded); }); auto pub = dts(); - for (const ParticipantOrganisation &partOrga : std::as_const(m_participantOrganisations)) + for (const ParticipantOrganisation &partOrga : qAsConst(m_participantOrganisations)) pub->publish(partOrga); if (m_mainHandler->exerciseId() > 0) @@ -352,7 +351,7 @@ bool ParticipantHandlerForExercise::init() m_pdmDtc->waitForHistoricalDataGearTypeChargeType(); } - // for(const auto &participant : std::as_const(m_participants)) + // for(const auto &participant : qAsConst(m_participants)) // customedSetGearCharges(participant); return true; @@ -455,7 +454,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe checkLongActionBreak(); - for (const ParticipantManagement::ParticipantData ¤tParticipant : std::as_const(validateData.participantsToBeCreatedOrModified)) + for (const ParticipantManagement::ParticipantData ¤tParticipant : qAsConst(validateData.participantsToBeCreatedOrModified)) { auto ret = validateParticipantData(validateData, currentParticipant); if (ret.error()) @@ -597,7 +596,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe DEBUG_LOG(m_logger) << "New participants created and existing participants updated"; // build hierarchy - for (const ParticipantData ¤tData : std::as_const(validateData.participantsToBeCreatedOrModified)) // first set superiorIds + for (const ParticipantData ¤tData : qAsConst(validateData.participantsToBeCreatedOrModified)) // first set superiorIds { Participant *participantToUpdate = participantById(validateData.modIdToParticipantId.value(currentData.modId())); if (currentData.superiorModId() >= 0) // superiorModId < 0 -> no change in superior @@ -613,7 +612,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe QHash> inferiors; inferiors.reserve(m_participants.size() / 2); // first collect all inferiors per superior - for (const Participant *currentParticipant : std::as_const(m_participants)) + for (const Participant *currentParticipant : qAsConst(m_participants)) { int superiorId = currentParticipant->superiorId(); inferiors[superiorId].push_back(currentParticipant->id()); @@ -626,7 +625,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe } } // now update all participants with newly collected inferiors - for (Participant *currentParticipant : std::as_const(m_participants)) + for (Participant *currentParticipant : qAsConst(m_participants)) { if (currentParticipant->hasNewInferiorStructure(inferiors.value(currentParticipant->id()))) participantsWithChanges.insert(currentParticipant); @@ -636,7 +635,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe // update in Database std::vector dbParticipantsToUpdate; dbParticipantsToUpdate.reserve(participantsWithChanges.size()); - for (Participant *currentParticipant : std::as_const(participantsWithChanges)) + for (Participant *currentParticipant : qAsConst(participantsWithChanges)) { dbParticipantsToUpdate.push_back(currentParticipant->toDbParticipant()); partiesUsed.insert(currentParticipant->partyId()); @@ -652,13 +651,13 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe // mark parties in use ChangePartyUsedStateRequest req; - for (int partyId : std::as_const(partiesUsed)) + for (int partyId : qAsConst(partiesUsed)) { req.partyId(partyId); req.isUsedBy(true); m_mainHandler->partyHandler()->changePartyUsedStateRequest(req); } - for (int partyId : std::as_const(partiesWithDeletedOrMovedOutParticipants)) + for (int partyId : qAsConst(partiesWithDeletedOrMovedOutParticipants)) { req.partyId(partyId); req.isUsedBy(false); @@ -727,7 +726,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::modifyParticipantDataRe QJsonArray jsonArray; // finally ... publish participant data via dds if no error occured - for (Participant *currentParticipant : std::as_const(participantsWithChanges)) + for (Participant *currentParticipant : qAsConst(participantsWithChanges)) { currentParticipant->publishParticipant(); NOTICE_LOG(m_logger) << "publishParticipant id=" << currentParticipant->id(); @@ -1293,7 +1292,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::selectiveReammunitionRe tabRequest.participantId(request.id()); tabRequest.gearId(request.gearId()); INFO_LOG(m_logger) << "Gear id = " << request.gearId(); - for (const Reammunition ra : std::as_const(request.reammunition())) + for (const Reammunition ra : qAsConst(request.reammunition())) { TrainingAreaBase::Reammunition tabRa; tabRa.chargeTypeId(ra.chargeTypeId()); @@ -1368,7 +1367,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::setSimulatedPositionReq { if (request.participantId() <= 0) { - for (Participant *participant : std::as_const(m_participants)) + for (Participant *participant : qAsConst(m_participants)) { if (participant->isDeleted() || participant->superiorId() != 0) continue; @@ -1508,7 +1507,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::validateParticipantData DEBUG_LOG(m_logger) << "checking superiorIds"; // superior exists? bool isExistingSuperiorId = false; - for (const ParticipantData &dat : std::as_const(data.participantsToBeCreatedOrModified)) + for (const ParticipantData &dat : qAsConst(data.participantsToBeCreatedOrModified)) { if (participantToValidate.superiorModId() == dat.modId()) { @@ -1530,7 +1529,7 @@ Core::FunctionReplyObject ParticipantHandlerForExercise::validateParticipantData // all hierarchy numbers with same superior unique? DEBUG_LOG(m_logger) << "checking hierarchyNumbers"; - for (const ParticipantData &dat : std::as_const(data.participantsToBeCreatedOrModified)) + for (const ParticipantData &dat : qAsConst(data.participantsToBeCreatedOrModified)) { // operator==() on optionals returns false if not set ... if (dat.modId() != participantToValidate.modId() && dat.superiorModId() == participantToValidate.superiorModId() @@ -1804,7 +1803,7 @@ void ParticipantHandlerForExercise::onEquipmentExerciseMappingChanged(const Equi case DataModification::eModified: { QSet oldEqIds; - for (const auto &db : std::as_const(m_equipmentExerciseMappings)) + for (const auto &db : qAsConst(m_equipmentExerciseMappings)) { if (db.exerciseId != data.exerciseId()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.h index 02ec0f188..d22e24141 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/participant_handler_for_exercise.h @@ -15,9 +15,9 @@ #include #include -#include +#include #include -#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/proxy_listener.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/proxy_listener.cpp index 1117e293b..649540f62 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/proxy_listener.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/proxy_listener.cpp @@ -18,6 +18,7 @@ namespace ParticipantHandling ProxyListener::ProxyListener(MainHandler *mainHandler) : QObject() , m_mainHandler(mainHandler) + , m_logger(getLogger("ProxyListener")) {} bool ProxyListener::init() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.cpp index 1a4d34d75..f2825f76d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.cpp @@ -9,24 +9,26 @@ #include "unit_position_calculator.h" #include "participant_handler.h" -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include namespace ParticipantManagement { namespace ParticipantHandling { -UnitPositionCalculator::UnitPositionCalculator(ParticipantHandler *participantHandler, QObject *parent) : QObject(parent) +UnitPositionCalculator::UnitPositionCalculator(ParticipantHandler *participantHandler, QObject *parent) + : QObject(parent) , m_participantHandler(participantHandler) , m_bSomethingChangedSinceLastCalculation(false) , m_timer(new QTimer(this)) - , m_bRunning(true), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_bRunning(true) + , m_logger(getLogger("UnitPositionCalculator")) +{ connect(m_timer, &QTimer::timeout, this, &UnitPositionCalculator::calculate); m_timer->setSingleShot(true); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.h index 6edacca6b..7b23c87b4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ParticipantHandling/unit_position_calculator.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include #include #include "participant_handler.h" @@ -36,7 +36,6 @@ public: void onInferiorChanged(int participantId, const std::vector &inferiorIds); private: - NGL::INGLLogger &m_logger; struct CalculatedUnitPosition : public ParticipantManagement::UnitPosition { int superiorId = 0; @@ -44,7 +43,6 @@ private: }; private: - NGL::INGLLogger &m_logger; CalculatedUnitPosition &getParticipant(int participantId); void calculate(); // no const ref - must be a copy since this is running in a different thread @@ -63,7 +61,6 @@ private Q_SLOTS: void onCalculationDone(); private: - NGL::INGLLogger &m_logger; std::unordered_map m_participantData; std::unordered_map m_publishedPositionData; @@ -73,6 +70,7 @@ private: bool m_bSomethingChangedSinceLastCalculation; QTimer *m_timer; bool m_bRunning; + NGL::INGLLogger &m_logger; }; } // namespace ParticipantHandling diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party.h index ba665b24b..a135f5ca5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party_handler.cpp index 0c08643e0..19fa0ebd9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/PartyHandling/party_handler.cpp @@ -8,7 +8,6 @@ */ #include "PartyHandling/party_handler.h" -#include #include "PartyHandling/party.h" #include #include @@ -23,6 +22,7 @@ PartyHandling::PartyHandler::PartyHandler(MainHandler *mainHandler) , SyncPartiesRequestHandler(mainHandler->exerciseId() <= 0 ? nullptr : mainHandler->fts()) , ChangePartyUsedStateRequestHandler(mainHandler->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("PartyHandler")) { } @@ -63,7 +63,7 @@ bool PartyHandling::PartyHandler::init() return false; } - for ( Database::PpmParty currentParty : std::as_const(partyVec)) + for ( Database::PpmParty currentParty : qAsConst(partyVec)) { resetAdlerProperties(currentParty.properties, currentParty.id); PartyHandling::Party *newParty = new PartyHandling::Party(currentParty); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/participant_handler_for_replay.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/participant_handler_for_replay.cpp index 926c266ab..a0d28944d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/participant_handler_for_replay.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/participant_handler_for_replay.cpp @@ -8,7 +8,6 @@ #include "participant_handler_for_replay.h" -#include #include "participant_for_replay.h" #include "ppm_record_replay_plugin_custom.h" @@ -89,7 +88,7 @@ void ParticipantHandlerForReplay::setDynamicParticipantData(const ParticipantMan void ParticipantHandlerForReplay::publishData() { - for (auto p : std::as_const(m_participants)) + for (auto p : qAsConst(m_participants)) { p->publishParticipant(); p->publishDynamicData(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.cpp index 91eb7ebab..26e6d7a63 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.cpp @@ -7,7 +7,6 @@ */ #include "ppm_record_replay_plugin_custom.h" -#include #include "participant_handler_for_replay.h" #include #include @@ -180,11 +179,11 @@ bool RecordReplayPluginCustom::setReplayStartTime(NSqlQuery &q, qint64 startTime m_participantHandler->clearParticipants(); INFO_LOG(m_logger) << "setReplayStartTime-clearParticipants " << startTime << " DONE"; - for (const auto &ddsParticipant : std::as_const(m_participantMap)) + for (const auto &ddsParticipant : qAsConst(m_participantMap)) m_participantHandler->createUpdateParticipant(ddsParticipant); INFO_LOG(m_logger) << "setReplayStartTime-createUpdateParticipant " << startTime << " DONE"; - for (const auto &dynParticipant : std::as_const(m_dynamicParticipantDataMap)) + for (const auto &dynParticipant : qAsConst(m_dynamicParticipantDataMap)) m_participantHandler->setDynamicParticipantData(dynParticipant); INFO_LOG(m_logger) << "setReplayStartTime-setDynamicParticipantData " << startTime << " DONE"; @@ -224,9 +223,9 @@ bool RecordReplayPluginCustom::publishData(qint64 desiredTime) return false; } - for (const Participant &p : std::as_const(m_participantMap)) + for (const Participant &p : qAsConst(m_participantMap)) m_participantHandler->createUpdateParticipant(p); - for (const Participant &p : std::as_const(m_participantDisposedMap)) + for (const Participant &p : qAsConst(m_participantDisposedMap)) m_participantHandler->removeParticipant(p); setDataForParticipants(desiredTime); @@ -290,7 +289,7 @@ QVector> RecordReplayPluginCustom::makeConcurrentWithoutEquipNo(T it = content.erase(it); } // while - for (auto contentIndex : std::as_const(contentVec)) + for (auto contentIndex : qAsConst(contentVec)) { // execute in workerThread result.append(QtConcurrent::run([this, contentIndex]() @@ -326,7 +325,7 @@ QVector> RecordReplayPluginCustom::makeConcurrent(T &content, qint it = content.erase(it); } // while - for (auto contentIndex : std::as_const(contentVec)) + for (auto contentIndex : qAsConst(contentVec)) { // execute in workerThread result.append(QtConcurrent::run([this, contentIndex]() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.h index 7e10a97a7..4c2c9c831 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/RecordReplay/ppm_record_replay_plugin_custom.h @@ -11,7 +11,7 @@ #include #include #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.cpp index ad8c24ec3..686dad776 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.cpp @@ -17,22 +17,23 @@ HandlerTargetInformation::HandlerTargetInformation(MainHandler *mainHandler) : ModifyTargetInformationRequestHandler(mainHandler->fts()) , RemoveTargetInformationRequestHandler(mainHandler->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerTargetInformation")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- HandlerTargetInformation::~HandlerTargetInformation() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- bool HandlerTargetInformation::init() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; bool bRet = true; // create objects @@ -56,7 +57,7 @@ bool HandlerTargetInformation::init() return false; } DEBUG_LOG(m_logger) << "m_objectMap.size() = " << m_objectMap.size(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return true; } @@ -66,19 +67,19 @@ bool HandlerTargetInformation::init() void HandlerTargetInformation::onModifyTargetInformationRequest(const rti::core::SampleIdentity &cookie, const ModifyTargetInformationRequest &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; const auto ret = targetInformationModifyRequest(request); if (ret.error()) WARNING_LOG(m_logger) << ret(); m_mainHandler->fts()->modifyTargetInformationReply(cookie, ret); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- Core::FunctionReplyObject HandlerTargetInformation::targetInformationModifyRequest(const ModifyTargetInformationRequest &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; const int requestId = request.targetInfo().id(); // modify if (requestId > 0) @@ -100,7 +101,7 @@ Core::FunctionReplyObject HandlerTargetInformation::targetInformationModifyReque } else m_objectMap.insert(ifs->getId(), ifs); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return ret; } @@ -108,7 +109,7 @@ Core::FunctionReplyObject HandlerTargetInformation::targetInformationModifyReque void HandlerTargetInformation::onRemoveTargetInformationRequest(const rti::core::SampleIdentity &cookie, const RemoveTargetInformationRequest &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " request=" << request; + TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request; Core::FunctionReplyObject ret; ObjectTargetInformation *ifs = m_objectMap.value(request.id()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.h index b75e92c78..cdcd58ac0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/handler_target_information.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include @@ -44,8 +44,6 @@ public: } private: // methods - -NGL::INGLLogger &m_logger; void onModifyTargetInformationRequest(const rti::core::SampleIdentity &cookie, const ModifyTargetInformationRequest &request) override; Core::FunctionReplyObject targetInformationModifyRequest(const ModifyTargetInformationRequest &request); @@ -56,7 +54,7 @@ private: // attributes QHash m_objectMap; MainHandler *m_mainHandler; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.cpp index c3ec99fc4..ba66473b0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.cpp @@ -9,8 +9,8 @@ #include "object_target_information.h" #include "../main_handler.h" -#include -#include +#include +#include //------------------------------------------------------------------------------ @@ -108,19 +108,21 @@ std::vector vecfromJson(const QJsonValue &val) } -ObjectTargetInformation::ObjectTargetInformation(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; +ObjectTargetInformation::ObjectTargetInformation(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectTargetInformation")) +{ + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ ObjectTargetInformation::~ObjectTargetInformation() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isValid()) m_mainHandler->dts()->removeTargetInformationByKey(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ @@ -132,7 +134,7 @@ bool ObjectTargetInformation::isValid() const //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTargetInformation::createObject(const TargetInformation &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; m_data = data; if (m_data.id() <= 0) @@ -149,14 +151,14 @@ Core::FunctionReplyObject ObjectTargetInformation::createObject(const TargetInfo // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTargetInformation::updateObject(const TargetInformation &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, participantId=" << data.participantId() + TRACE_LOG(m_logger) << LOGFUNCTION << " START, participantId=" << data.participantId() << " size =" << data.shootbackAreas().size(); Database::PpmTargetInformation dbData; dbData = toDbData(data); @@ -170,7 +172,7 @@ Core::FunctionReplyObject ObjectTargetInformation::updateObject(const TargetInfo // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, id=" << data.id() + TRACE_LOG(m_logger) << LOGFUNCTION << " END, id=" << data.id() << " size =" << data.shootbackAreas().size(); return Core::FunctionReplyObject(m_data.id()); } @@ -178,7 +180,7 @@ Core::FunctionReplyObject ObjectTargetInformation::updateObject(const TargetInfo //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTargetInformation::removeObject() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (!m_mainHandler->db()->removePpmTargetInformation(m_data.id())) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetInformation with id %1 can not be removed from DB")).arg(m_data.id()); @@ -186,7 +188,7 @@ Core::FunctionReplyObject ObjectTargetInformation::removeObject() if (!m_mainHandler->dts()->removeTargetInformationByKey(m_data.id())) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetInformation with id %1 can not be removed from DDS")).arg(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.h index 1651c0b96..17789106b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TargetHandling/object_target_information.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include -#include +#include // Generated #include @@ -46,11 +46,12 @@ public: static TargetInformation toDdsData(const Database::PpmTargetInformation &dbData); // db -> dds protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; TargetInformation m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TemplateHandling/template_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TemplateHandling/template_handler.cpp index 06dce072f..6947f780c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TemplateHandling/template_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TemplateHandling/template_handler.cpp @@ -7,7 +7,6 @@ * Created by Hannes Baeuerle, SLSE, 2016-07-27 */ #include "template_handler.h" -#include #include "template.h" #include "main_handler.h" #include @@ -24,6 +23,7 @@ namespace TemplateHandling TemplateHandler::TemplateHandler(MainHandler *mainHandler) : Interface::Fts::ModifyTemplateDataRequestHandler(mainHandler->exerciseId() <= 0 ? mainHandler->fts() : nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("TemplateHandler")) {} TemplateHandler::~TemplateHandler() @@ -114,7 +114,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti futureVec += fut; } - for (const QFuture ¤tFut : std::as_const(futureVec)) + for (const QFuture ¤tFut : qAsConst(futureVec)) { Core::FunctionReplyObject ret = currentFut.result(); if (ret.error()) @@ -123,7 +123,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti } else { - for (const ParticipantManagement::TemplateData ¤tTemplate : std::as_const(templatesToBeCreatedOrModified)) + for (const ParticipantManagement::TemplateData ¤tTemplate : qAsConst(templatesToBeCreatedOrModified)) { DEBUG_LOG(m_logger) << "Validating template: " << currentTemplate; auto ret = validateTemplateData(templatesToBeCreatedOrModified, modIdToTemplateId, currentTemplate); @@ -139,7 +139,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti // create new and update existing templates DEBUG_LOG(m_logger) << "Creating new and updating existing templates ..."; - for (const TemplateData ¤tData : std::as_const(templatesToBeCreatedOrModified)) + for (const TemplateData ¤tData : qAsConst(templatesToBeCreatedOrModified)) { Template *templateToUpdate = m_templates.value(modIdToTemplateId.value(currentData.modId())); if (!templateToUpdate) @@ -164,7 +164,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti DEBUG_LOG(m_logger) << "New templates created and existing templates updated"; // build hierarchy - for (const TemplateData ¤tData : std::as_const(templatesToBeCreatedOrModified)) // first set superiorIds + for (const TemplateData ¤tData : qAsConst(templatesToBeCreatedOrModified)) // first set superiorIds { Template *templateToUpdate = m_templates.value(modIdToTemplateId.value(currentData.modId()), nullptr); const int superiorId = modIdToTemplateId.value(currentData.superiorModId()); @@ -174,7 +174,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti templatesWithChanges.append(templateToUpdate); } - for (Template *currentTemplate : std::as_const(m_templates)) // set inferiorIds + for (Template *currentTemplate : qAsConst(m_templates)) // set inferiorIds { if (!currentTemplate->hasNewInferiorStructure(inferiorIdsForTemplate(currentTemplate->id())) || templatesWithChanges.contains(currentTemplate)) @@ -184,7 +184,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti } // update in Database - for (Template *currentTemplate : std::as_const(templatesWithChanges)) + for (Template *currentTemplate : qAsConst(templatesWithChanges)) { if (!m_mainHandler->db()->update(currentTemplate->dbEntry())) return Core::FunctionReplyObject(tr_lts("dds", "Could not update template data in database, template data may be inconsistent")); @@ -192,7 +192,7 @@ Core::FunctionReplyObject TemplateHandler::modifyTemplateDataRequest(const Parti trans.commit(); // finally ... publish template data via dds if no error occured - for (Template *currentTemplate : std::as_const(templatesWithChanges)) + for (Template *currentTemplate : qAsConst(templatesWithChanges)) m_mainHandler->exAnyDts()->publish(currentTemplate->toDdsTemplateParticipant()); return Core::FunctionReplyObject(); @@ -203,7 +203,7 @@ std::vector TemplateHandler::inferiorIdsForTemplate(int32_t superiorTem std::vector result; result.reserve(10); - for (Template *currentTemplate : std::as_const(m_templates)) + for (Template *currentTemplate : qAsConst(m_templates)) { if (currentTemplate->superiorId() == superiorTemplateId) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.cpp index 652cf7ad6..cb5c84e20 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.cpp @@ -11,8 +11,8 @@ #include "type_handler_global.h" #include "main_handler.h" -#include -#include +#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.h index 7f1d6a55c..c12601461 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler.h @@ -39,14 +39,15 @@ public: static std::shared_ptr createInstance(MainHandler *mainHandler, NGL::INGLLogger &logger); protected: - -NGL::INGLLogger &m_logger; bool isArtilleryType(int typeId) const; explicit TypeHandler(MainHandler *mainHandler, LOGGER_T logger); protected: MainHandler *m_mainHandler; QHash m_types; QHash m_equipmentTypes; + + LOGGER_T m_logger; + }; // class TypeHandler } // namespace TypeHandling } // namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.cpp index e543fe7b8..14558d3eb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.cpp @@ -10,7 +10,7 @@ #include "main_handler.h" #include "convert_db_to_dds.h" -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.h index 8a8bc125d..f6e86876a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/TypeHandling/type_handler_exercise.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include "type_handler.h" #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/mission_plan_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/mission_plan_handler.cpp index f2d29d8b4..2597e9ac5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/mission_plan_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/mission_plan_handler.cpp @@ -8,7 +8,6 @@ */ #include -#include #include #include "main_handler.h" #include "ParticipantHandling/participant.h" @@ -24,6 +23,7 @@ MissionPlanHandler::MissionPlanHandler(MainHandler *mainHandler) , Interface::Fts::RemoveMissionPlanRequestHandler(mainHandler->fts()) , Interface::Fts::SetMissionActionFulfilledRequestHandler(mainHandler->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("MissionPlanHandler")) { } @@ -90,7 +90,7 @@ bool MissionPlanHandler::loadMissionPlansFromDb() <<" Items size = "< #include namespace ParticipantManagement @@ -18,11 +17,13 @@ namespace UasHandling ObjectMissionPlan::ObjectMissionPlan(const std::shared_ptr &ddsHandler, const std::shared_ptr &db, const ParticipantManagement::MissionPlan & missionPlan, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_ddsHandler(ddsHandler) , m_db(db) - , m_missionplan(missionPlan), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_missionplan(missionPlan) + , m_logger(getLogger("ObjectMissionPlan")) +{ DEBUG_LOG(m_logger)<<" - ctor ObjectMissionPlan: planId: "< -#include +#include #include #include #include "logger.h" -#include +#include namespace ParticipantManagement { namespace UasHandling @@ -45,13 +45,14 @@ public: Core::FunctionReplyObject setMissionActionFulfilled(SetMissionActionFulfilledRequest req, qint64 currentTimeMSec); Core::FunctionReplyObject setMissionPlanAborted(bool state); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_db; ParticipantManagement::MissionPlan m_missionplan; QHash m_mapMissionItems; /// key:dbItemId | Value MissionItem std::vector > m_dbMissionActions; /// [ItemNumber][ActionNumber] + + LOGGER_T m_logger; }; } // namespace UasHandling diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas.h index b5f3532b2..976a70a1c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.cpp index 70b6f5fb6..cb2d20d39 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.cpp @@ -8,13 +8,12 @@ */ #include "uas_handler.h" -#include #include "uas.h" #include #include "main_handler.h" #include "ParticipantHandling/participant.h" -#include +#include namespace ParticipantManagement { @@ -26,6 +25,7 @@ UasHandler::UasHandler(MainHandler *mainHandler) , CreateModifyUasRequestHandler(mainHandler->exAnyFts()) , RemoveUasRequestHandler(mainHandler->exAnyFts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("UasHandler")) { m_mainHandler->exAnyFts()->enableCreateModifyUas(); m_mainHandler->exAnyFts()->enableRemoveUas(); @@ -53,7 +53,7 @@ bool UasHandler::init() return false; } - for (const Database::PpmUas ¤tUas : std::as_const(uasVec)) + for (const Database::PpmUas ¤tUas : qAsConst(uasVec)) { UasHandling::Uas *newUas = new UasHandling::Uas(currentUas); @@ -137,7 +137,7 @@ Core::FunctionReplyObject UasHandler::removeUas(UasHandling::Uas *uasToDelete) //------------------------------------------------------------------------------------------ Core::FunctionReplyObject UasHandler::createUas(const CreateModifyUasRequest &request) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO; + DEBUG_LOG(m_logger) << LOGFUNCTION; // cant check here as we dont have access to all party participants /* @@ -283,7 +283,7 @@ void UasHandler::onUASRadioLinkConnectionStatusChanged(const UASRadioLinkConnect bool UasHandler::hostNameHostPortExists(const QString &hostname, int hostport, int uasId) { - for (Uas *uas : std::as_const(m_uass)) + for (Uas *uas : qAsConst(m_uass)) { if (uas->id() == uasId) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.h index d0a0b0622..9a660227d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/UasHandling/uas_handler.h @@ -42,7 +42,6 @@ private slots: void onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification mod); void onUASRadioLinkConnectionStatusChanged(const UASRadioLinkConnectionStatus &data, DataModification mod); private: - NGL::INGLLogger &m_logger; Core::FunctionReplyObject removeUas(const RemoveUasRequest &request); Core::FunctionReplyObject removeUas(UasHandling::Uas *uasToDelete); Core::FunctionReplyObject createUas(const CreateModifyUasRequest &request); @@ -54,6 +53,9 @@ private: MainHandler *m_mainHandler; std::shared_ptr m_exmDtc; QHash m_uass; + + LOGGER_T m_logger; + }; } // namespace UasHandling } // namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/client_message.cpp index 4f3243f92..fe319a085 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/client_message.cpp @@ -14,7 +14,7 @@ #include #include -#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/reply_message.h index 33a061eec..a21a0e3c1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/Messages/reply_message.h @@ -10,8 +10,8 @@ #include -#include -#include +#include +#include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/data_manager.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/data_manager.h index 96c505ee4..5b9439cf4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/data_manager.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/data_manager.h @@ -10,7 +10,7 @@ #include #include -#include +#include #include "logger.h" namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/json_keys.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/json_keys.h index e7b270614..9814681a7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/json_keys.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/json_keys.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/websocket_interface_handler.cpp index 58ac2538f..ad05923aa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/convert_db_to_dds.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/convert_db_to_dds.h index 35aac66b9..a8c8dcc83 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/convert_db_to_dds.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/convert_db_to_dds.h @@ -10,7 +10,7 @@ #include #include -#include +#include #include namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.cpp index b3fe0a509..9ea7c0793 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.cpp @@ -12,13 +12,15 @@ #include #include -#include +#include namespace ParticipantManagement { -DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, exerciseId <= 0 ? IDL::PartitionType::Global : IDL::PartitionType::Exercise, exerciseId)), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +DdsHandler::DdsHandler(int domainId, int exerciseId) + : m_ddsConnector(std::make_shared(domainId, exerciseId <= 0 ? IDL::PartitionType::Global : IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) +{ DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.h index 43fbc385e..0db18dd84 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/dds_handler.h @@ -9,13 +9,13 @@ #include #include -#include +#include #include #include #include #include "logger.h" -#include +#include namespace Core { @@ -50,7 +50,6 @@ public: void longActionBreak(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_exAnyConnector; @@ -64,6 +63,8 @@ private: std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_exerciseTime; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.cpp index ee1beb239..02a560c4f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.cpp @@ -9,7 +9,7 @@ #include "exercise_time.h" #include "ppm_dts.h" -#include +#include #include namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.h index 1a7802ae2..5a3071052 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/exercise_time.h @@ -7,8 +7,8 @@ */ #pragma once -#include -#include +#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/logger.h index 7e221a44a..bf8680bf7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcppmcommon_export.h" +#include "ppm_export.h" namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/main_handler.h index b3d72a87b..72e634e3c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/main_handler.h @@ -82,8 +82,6 @@ class MainHandler final : public ParticipantHandling::BaseDataProvider qint64 currentTimeMSec() const override; private: // attributes - - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_dbHandlerEx0; @@ -103,5 +101,7 @@ class MainHandler final : public ParticipantHandling::BaseDataProvider std::shared_ptr m_websocketHandler; std::shared_ptr m_uasHandler; std::shared_ptr m_missionPlanHandler; + + LOGGER_T m_logger; }; } // namespace ParticipantManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.cpp index 51ae47396..dfea460a2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.cpp @@ -7,10 +7,9 @@ */ #include "ppm_common.h" -#include -#include -#include +#include +#include namespace ParticipantManagement @@ -35,7 +34,7 @@ StateInformation youngestStateInformation(const std::vector> printing all SIs"; - for (const ParticipantManagement::StateInformation &si : std::as_const(sortedStateList)) + for (const ParticipantManagement::StateInformation &si : qAsConst(sortedStateList)) qWarning() << ">>>> si" << "siVulnId" << (uint8_t)si.vulnerabilityState().underlying() << "bits" << si.vulnerabilityBits() << "time" << si.stateTime(); qWarning() << ">> checking SIs"; } - for (const ParticipantManagement::StateInformation &si : std::as_const(sortedStateList)) + for (const ParticipantManagement::StateInformation &si : qAsConst(sortedStateList)) { const uint8_t siVulnId = si.vulnerabilityState().underlying(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.h index c60293944..73e05837d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_common.h @@ -7,7 +7,7 @@ */ #pragma once #include -#include "svcppmcommon_export.h" +#include "ppm_export.h" namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_dtc_impl_custom.cpp index 359b6786f..cc2addaa1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/ppm_dtc_impl_custom.cpp @@ -7,18 +7,17 @@ */ #include "ppm_dtc_impl_custom.h" -#include #include "ppm_common.h" #include #include #include #include -#include +#include #include #include -#include -#include +#include +#include namespace ParticipantManagement { @@ -745,7 +744,7 @@ int DtcImplCustom::getParticipantFromPrf(int prf) const for (const DynamicParticipantData &sample : m_dtcDynamicParticipantData->readAlive()) { - for (const auto &designation : std::as_const(sample.designations())) + for (const auto &designation : qAsConst(sample.designations())) { DEBUG_LOG(m_logger) << " code=" << designation.code(); if (designation.code() == prf) @@ -769,7 +768,7 @@ int DtcImplCustom::getPrfFromParticipant(int participantId) const if (participantId == sample.participantId()) { DEBUG_LOG(m_logger) << "participantId=" << sample.participantId() << " designations.size()=" << sample.designations().size(); - for (const auto &designation : std::as_const(sample.designations())) + for (const auto &designation : qAsConst(sample.designations())) { DEBUG_LOG(m_logger) << " code=" << designation.code(); if (designation.code() > 0) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.cpp index 28d5d4758..7e8f14be3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.cpp @@ -11,7 +11,7 @@ #include #include -#include "LtsUtils/LtsUtilsCore/lts_portrange.h" +#include "LtsUtilsCore/lts_portrange.h" namespace ParticipantManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.h index accebf45a..a47740ad3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/settings.h @@ -6,8 +6,8 @@ */ #pragma once -#include -#include +#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.cpp index b180bee7b..15cc8b590 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.cpp @@ -7,11 +7,10 @@ */ #include "web_socket_handler.h" -#include -#include -#include -#include +#include +#include +#include #include @@ -26,7 +25,7 @@ WebSocketHandler::WebSocketHandler(QObject *parent) WebSocketHandler::~WebSocketHandler() { - for (const auto& ws : std::as_const(m_webSockets)) + for (const auto& ws : qAsConst(m_webSockets)) { ws->disconnect(this); } @@ -71,7 +70,7 @@ bool WebSocketHandler::sendTelegramInternal(const ParticipantPosition &pos, int const QString jsonStr = QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact)); bool ret = false; - for (const auto &wsw : std::as_const(m_webSockets)) + for (const auto &wsw : qAsConst(m_webSockets)) { if (wsw->sendTextMessage(jsonStr)) ret = true; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.h index 9493db266..3f0e22306 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ParticipantManagement/web_socket_handler.h @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include +#include #include #include "logger.h" @@ -31,7 +31,6 @@ public: bool sendPosition(const ParticipantPosition& participantPosition, int equipmentNumber) const; private: - NGL::INGLLogger &m_logger; bool sendTelegramInternal(const ParticipantPosition& pos, int eqNo) const; private Q_SLOTS: @@ -39,9 +38,10 @@ private Q_SLOTS: void onWebSocketDisconnected(); private: - NGL::INGLLogger &m_logger; QWebSocketServer* m_webSocketServer = nullptr; QVector m_webSockets; + + LOGGER_T m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PlanEditor/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/PlanEditor/CMakeLists.txt index c72168dd1..e82a09b61 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PlanEditor/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PlanEditor/CMakeLists.txt @@ -12,7 +12,7 @@ SET(SRCS_common ped_dummy.cpp) # Generate aes_dt[s,c]_types.h, aes_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcPedDummy SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcPedDummy SHARED ${SRCS_common}) NGL_TARGET_LINK_LIBRARIES(svcPedDummy PRIVATE Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/CMakeLists.txt index 88a067d36..a41a145d0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/CMakeLists.txt @@ -32,14 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate pre_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcPreCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcPreCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPreCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ - ${CMAKE_CURRENT_BINARY_DIR} ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPreCommon PRIVATE RTI::nddscpp2 @@ -49,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcPreCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPreCommon) # @@ -61,14 +58,13 @@ SET(SRCS_client # generate pre_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcPreClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcPreClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPreClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPreClient PRIVATE RTI::nddscpp2 @@ -77,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcPreClient svcPreCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPreClient) # @@ -101,14 +96,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate pre.sql, pre.xml CODEGEN_SQL(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcPreServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcPreServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPreServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPreServer PRIVATE RTI::nddscpp2 @@ -121,7 +115,6 @@ NGL_TARGET_LINK_LIBRARIES(svcPreServer svcPreCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPreServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.cpp index 6445747e6..bba02af96 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include #include @@ -25,6 +25,7 @@ PreTests::PreTests(QObject *parent) , m_testId(0) , m_presentationId(0) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.h index 55b200ea5..4e164dd74 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/ModuleTests/pre_tests.h @@ -26,7 +26,7 @@ #include #include -#include +#include namespace PresentationManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.cpp index 87f412477..06eb5c8d7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.cpp @@ -13,6 +13,7 @@ namespace PresentationManagement DdsHandler::DdsHandler(const std::shared_ptr &ddsConnector) : m_ddsConnector(ddsConnector) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.h index 2baf4e18b..ba2690cbd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/dds_handler.h @@ -45,11 +45,12 @@ public: } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.cpp index b62908807..9336b9c51 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.cpp @@ -8,7 +8,6 @@ */ #include "handler_presentation.h" -#include #include "object_presentation.h" #include "initialization.h" #include "dds_handler.h" @@ -24,6 +23,7 @@ HandlerPresentation::HandlerPresentation(Initialization *mainHandler) , Interface::Fts::GetPresentationContentRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::PresentationChangeStatusRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerPresentation")) { } @@ -73,7 +73,7 @@ bool HandlerPresentation::init() } // publish - for (ObjectPresentation *objPre : std::as_const(m_objectPresentationMap)) + for (ObjectPresentation *objPre : qAsConst(m_objectPresentationMap)) objPre->onPublishData(); return true; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.h index 8ec038563..7cb6bc71c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/handler_presentation.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include @@ -44,7 +44,6 @@ public: } private: - NGL::INGLLogger &m_logger; void onPresentationModifyRequest(const rti::core::SampleIdentity &cookie, const PresentationModifyRequest &request) override; Core::FunctionReplyObject presentationCreateRequest(const PresentationModifyRequest &request); @@ -57,8 +56,8 @@ private: const PresentationChangeStatusRequest &request) override; private: - NGL::INGLLogger &m_logger; Initialization *m_mainHandler; QMap m_objectPresentationMap; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.cpp index d34f77c6f..412a2a3dd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.cpp @@ -19,6 +19,7 @@ namespace PresentationManagement Initialization::Initialization(QObject *parent) : QObject(parent) + , m_logger(getLogger("Initialization")) { qsrand(time(nullptr)); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.h index 531fb59d9..a66aeb74e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/initialization.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include "logger.h" @@ -42,10 +42,9 @@ public: int exerciseId() const; private: - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_handlerPresentation; + LOGGER_T m_logger; }; } // namespace AreaEffectSimulation diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/logger.h index 30073a01a..932e04524 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcprecommon_export.h" +#include "pre_export.h" namespace PresentationManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.cpp index 2ae8a2b0e..b121d896a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.cpp @@ -8,7 +8,6 @@ */ #include "object_presentation.h" -#include #include "initialization.h" #include "dds_handler.h" #include @@ -16,13 +15,16 @@ namespace PresentationManagement { //---------------------------------------------------------------------------------------------------- -ObjectPresentation::ObjectPresentation(Initialization *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +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")) { } @@ -110,7 +112,7 @@ Core::FunctionReplyObject ObjectPresentation::updateObject(const PresentationMod if (!m_mainHandler->db()->update(dbData)) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "Error updating Presentation-data into database")); - for (const auto &content : std::as_const(m_content)) + for (const auto &content : qAsConst(m_content)) { if (m_mainHandler->db()->removePrePresentationContent(content.id())) DEBUG_LOG(m_logger) << "Removed presentation content id " << content.id(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.h index f6eb0af1c..221ee712d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/object_presentation.h @@ -9,8 +9,8 @@ #pragma once -#include -#include +#include +#include #include #include @@ -54,9 +54,9 @@ public: void onPublishData(); private: - NGL::INGLLogger &m_logger; Initialization *m_mainHandler; Presentation m_data; std::vector m_content; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/settings.h index 6d4d3db1f..5068a2cb8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/PresentationManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/CMakeLists.txt index 763d89235..c65352510 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/CMakeLists.txt @@ -20,75 +20,41 @@ SET(SRCS_common logger.h ) -IF(BUILD_RTI) - # Generate pdm_enums.idl / pdm.idl - CODEGEN_IDL_SVC(SRCS_common ${xml_FILE}) +# Generate pdm_enums.idl / pdm.idl +CODEGEN_IDL_SVC(SRCS_common ${xml_FILE}) - # Generate pdm_db.h - CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE}) - # Generate pdm_db_impl.cpp/.h, - CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE}) +# Generate pdm_db.h +CODEGEN_DATABASE_STRUCTS(SRCS_common ${xml_FILE}) +# Generate pdm_db_impl.cpp/.h, +CODEGEN_DATABASE_SQL(SRCS_common ${xml_FILE}) - # Generate *.cpp/*.hpp from idl - RTIDDSGEN(SRCS_common pdm_enums.idl) - RTIDDSGEN(SRCS_common pdm.idl) +# Generate *.cpp/*.hpp from idl +RTIDDSGEN(SRCS_common pdm_enums.idl) +RTIDDSGEN(SRCS_common pdm.idl) - # Generate pdm_dt[s,c]_types.h, pdm_ft[s,c]_types.h - CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) - # generate pdm_[d|f]tc.h - CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -ELSE() - # Stub files for BUILD_RTI=OFF - NO code generation - LIST(APPEND SRCS_common - stubs/pdm_enums_stub.hpp - stubs/pdm_stub.hpp - stubs/pdm_db_stub.hpp - ) -ENDIF() +# Generate pdm_dt[s,c]_types.h, pdm_ft[s,c]_types.h +CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) +# generate pdm_[d|f]tc.h +CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -# Create target only if component flags allow -NGL_ADD_LIBRARY2(AAR SV WS HLA svcPdmCommon SHARED ${SRCS_common}) - -# Generate export header ALWAYS (needed even if target not built) -IF(NOT TARGET svcPdmCommon) - # Create a dummy static library just for export header generation - ADD_LIBRARY(svcPdmCommon STATIC ${SRCS_common}) -ENDIF() - -# Generate export header BEFORE setting include directories -GENERATE_EXPORT_HEADER(svcPdmCommon EXPORT_FILE_NAME "svcpdmcommon_export.h") - -# Include directories for svcPdmCommon (must include build dir for export header) -IF(TARGET svcPdmCommon) - TARGET_INCLUDE_DIRECTORIES(svcPdmCommon - PUBLIC - ${CMAKE_CURRENT_SOURCE_DIR} - ${CMAKE_CURRENT_BINARY_DIR} - ${CMAKE_SOURCE_DIR}/include/ProjectDataManagement - ${CMAKE_CURRENT_SOURCE_DIR}/../ - ${CMAKE_CURRENT_BINARY_DIR}/../ - ${CMAKE_CURRENT_SOURCE_DIR}/stubs - ${CMAKE_CURRENT_BINARY_DIR}/stubs - ) -ENDIF() -NGL_TARGET_LINK_LIBRARIES(svcPdmCommon +NGL_ADD_LIBRARY(AAR SV WS HLA svcPdmCommon SHARED ${SRCS_common}) +NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmCommon PUBLIC - Qt6::Core - NGLLogger - LtsUtilsCore - ngldb + ${CMAKE_CURRENT_SOURCE_DIR}/../ + ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcPdmCommon PRIVATE RTI::nddscpp2 PUBLIC + Qt6::Core ddscore + NGLLogger + LtsUtilsCore + ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcPdmCommon) -IF(BUILD_RTI) # # --- Library svcPdmClient -------------------------------------------------------------------------------- # @@ -100,7 +66,7 @@ SET(SRCS_client # generate pdm_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV HLA svcPdmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(WS AAR SV HLA svcPdmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ @@ -126,7 +92,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_LIBRARY2(WS AAR SV svcPdmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(WS AAR SV svcPdmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcPdmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ @@ -198,5 +164,3 @@ NGL_ADD_TARGET_LINK(svcProjectDataManagement sPDM) # Uncomment if necessary #ADD_SUBDIRECTORY(UnitTests) ADD_SUBDIRECTORY(ModuleTests) - -ENDIF(BUILD_RTI) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.cpp index 6da1dea07..763783adb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.cpp @@ -10,18 +10,20 @@ #include #include -#include +#include #include //--------------------------------------------------------------------------------- namespace ProjectDataManagement { -PdmTests::PdmTests(QObject *parent) : QObject(parent) +PdmTests::PdmTests(QObject *parent) + : QObject(parent) , m_id(0) , m_testId(0) - , m_bTestsSuccessful(true), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) +{ qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.h index fce4be48d..f33754ff5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/ModuleTests/pdm_tests.h @@ -11,17 +11,12 @@ #pragma once #include -// pdm_ftc.h - external dependency, removed for build +#include #include #include namespace ProjectDataManagement { -namespace Interface { -namespace Ftc { -} -} - class PdmTests : public QObject { Q_OBJECT diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.cpp index 8301d209c..f17688638 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.cpp @@ -17,6 +17,7 @@ ChargeTypeRename::ChargeTypeRename(const std::shared_ptr &dds, const , Interface::Fts::UpdateChargeTypeRequestHandler(dds->fts()) , m_dds(dds) , m_db(db) + , m_logger(getLogger("ChargeTypeRename")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.h index 0f5534f43..c0512460d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/chargetype_rename.h @@ -8,7 +8,7 @@ #pragma once #include -#include +#include #include "logger.h" @@ -29,8 +29,6 @@ public: ~ChargeTypeRename() = default; private: - -NGL::INGLLogger &m_logger; void onUpdateChargeNamesRequest(const rti::core::SampleIdentity &cookie, const UpdateChargeNamesRequest &request) override; // void onSuppressVisibilityRequest(const rti::core::SampleIdentity &cookie, @@ -40,5 +38,6 @@ NGL::INGLLogger &m_logger; private: std::shared_ptr m_dds; std::shared_ptr m_db; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.cpp index c253aa330..ddfa335f5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace ProjectDataManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.h index cb479c905..cf3fd8aca 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/dds_handler.h @@ -37,12 +37,13 @@ public: std::shared_ptr dds() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/logger.h index 61d6ae027..a4e19b5ea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/logger.h @@ -9,14 +9,13 @@ #pragma once #include -#include -#include "svcpdmcommon_export.h" +#include "pdm_export.h" namespace ProjectDataManagement { using LOGGER_T = NGL::INGLLogger &; -SVCPDMCOMMON_EXPORT LOGGER_T getLogger(const char *name); +PDM_COMMON_EXPORT LOGGER_T getLogger(const char *name); inline LOGGER_T getLogger(const QString &loggerName) { return getLogger(loggerName.toUtf8().constData()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.cpp index e3d88c472..29de893b6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.cpp @@ -7,7 +7,7 @@ #include "main_handler.h" #include "settings.h" -#include +#include #include "convert_db_to_dds.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.h index 0d8427a53..e923880c3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/main_handler.h @@ -32,10 +32,11 @@ public: std::shared_ptr db() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_translation; std::shared_ptr m_chargeTypeRename; + NGL::INGLLogger &m_logger; + }; } // namespace ProjectDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.cpp index aa5e73e41..98f33911e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.cpp @@ -8,15 +8,14 @@ */ #include "pdm_dtc_impl_custom.h" -#include #include "NGLLogger/INGLLogger.h" #include "pdm_translation.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include #include #include @@ -1160,7 +1159,7 @@ QStringList DtcImplCustom::chargeNames(std::vector &chargeIds) QStringList sl; auto uleisClassOffsets = it.value(); sl.reserve(uleisClassOffsets.size()); - for (UleisClassOffset o : std::as_const(uleisClassOffsets)) + for (UleisClassOffset o : qAsConst(uleisClassOffsets)) sl << offsetName(o); if (sl.size() == 6) @@ -1616,7 +1615,7 @@ ProjectDataManagement::BuildingChargeEffect DtcImplCustom::getBuildingChargeEffe waitForHistoricalDataBuildingChargeEffect(2000); } - for (const ProjectDataManagement::BuildingChargeEffect &bcEffect : std::as_const(m_buildingChargeEffectCont)) + for (const ProjectDataManagement::BuildingChargeEffect &bcEffect : qAsConst(m_buildingChargeEffectCont)) { if (bcEffect.chargeTypeId() == chargeTypeId) { @@ -1676,7 +1675,7 @@ QString DtcImplCustom::adlerLoadTypeName(int loadTypeId) QString DtcImplCustom::adlerTargetTypeName(int targetTypeId) { - for (const ProjectDataManagement::TargetType &targetTyp : std::as_const(m_targetTypeCont)) + for (const ProjectDataManagement::TargetType &targetTyp : qAsConst(m_targetTypeCont)) { const QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromRawData(targetTyp.properties().c_str(), targetTyp.properties().size())).object(); @@ -1688,7 +1687,7 @@ QString DtcImplCustom::adlerTargetTypeName(int targetTypeId) QString DtcImplCustom::adlerTargetSubTypeName(int targetSubTypeId) { - for (const ProjectDataManagement::TargetSubType &targetSubTyp : std::as_const(m_targetSubTypeCont)) + for (const ProjectDataManagement::TargetSubType &targetSubTyp : qAsConst(m_targetSubTypeCont)) { const QJsonObject obj = QJsonDocument::fromJson(QByteArray::fromRawData(targetSubTyp.properties().c_str(), targetSubTyp.properties().size())).object(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.h index f3ec707f3..c6d75e167 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_dtc_impl_custom.h @@ -8,9 +8,9 @@ */ #pragma once -#include -#include -#include +#include +#include +#include #include //------------------------------------------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.cpp index 90c9b85d6..3737a5426 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.cpp @@ -9,64 +9,61 @@ #include "pdm_to_string.h" #include "pdm_translation.h" -#include +#include namespace ProjectDataManagement { - -// Forward declaration for helper function -static QString toString(VulnerabilityState vs); - // // VulnerabilityState + VulnerabilityClass // static QString toStringBuilding(VulnerabilityState vs) { - switch (static_cast(vs)) + switch (vs.underlying()) { #ifdef ETS_MODE - case 1: return QCoreApplication::translate("ProjectDataManagement", "Ready", "VulnerabilityStateBuilding"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "Damaged", "VulnerabilityStateBuilding"); + case VulnerabilityState_def::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready", "VulnerabilityStateBuilding"); + case VulnerabilityState_def::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Damaged", "VulnerabilityStateBuilding"); #else - case 1: return QCoreApplication::translate("ProjectDataManagement", "Combat Ready", "VulnerabilityStateBuilding"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "CatastrophicKill", "VulnerabilityStateBuilding"); + case VulnerabilityState_def::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Combat Ready", "VulnerabilityStateBuilding"); + case VulnerabilityState_def::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "CatastrophicKill", "VulnerabilityStateBuilding"); #endif default: break; } - return QCoreApplication::translate("ProjectDataManagement", "Unknown (%1)", "VulnerabilityState").arg(static_cast(vs)); + return QCoreApplication::translate("ProjectDataManagement", "Unknown (%1)", "VulnerabilityState").arg(vs.underlying()); } static QString toStringVehicle(VulnerabilityState vs) { - switch (static_cast(vs)) + switch (vs.underlying()) { #ifdef ETS_MODE - case 1: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle"); - case 2: return QCoreApplication::translate("ProjectDataManagement", "Communication Damage", "VulnerabilityStateVehicle"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "Main Function Damage", "VulnerabilityStateVehicle"); - case 4: return QCoreApplication::translate("ProjectDataManagement", "Mobility Lost", "VulnerabilityStateVehicle"); - case 5: return QCoreApplication::translate("ProjectDataManagement", "Fully Damaged", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Communication Damage", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Main Function Damage", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::MobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Mobility Lost", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Fully Damaged", "VulnerabilityStateVehicle"); default: break; #else - case 2: return QCoreApplication::translate("ProjectDataManagement", "Comms Damaged", "VulnerabilityStateVehicle"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "Veh Body Damaged", "VulnerabilityStateVehicle"); - case 4: return QCoreApplication::translate("ProjectDataManagement", "Main Funct Damaged", "VulnerabilityStateVehicle"); - case 5: return QCoreApplication::translate("ProjectDataManagement", "Mobility Kill", "VulnerabilityStateVehicle"); - case 6: return QCoreApplication::translate("ProjectDataManagement", "Visible Mobility Kill", "VulnerabilityStateVehicle"); - case 7: return QCoreApplication::translate("ProjectDataManagement", "Wpn / Turret Damaged", "VulnerabilityStateVehicle"); - case 8: return QCoreApplication::translate("ProjectDataManagement", "Visible Wpn / Turret Damaged", "VulnerabilityStateVehicle"); - case 9: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill", "VulnerabilityStateVehicle"); - case 1: - case 0: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: + case VulnerabilityState_def::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Comms Damaged", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "Veh Body Damaged", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Main Funct Damaged", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::MobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Mobility Kill", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::VisibleMobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Visible Mobility Kill", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::WeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Wpn / Turret Damaged", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::VisibleWeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Visible Wpn / Turret Damaged", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::CombatReady: + case VulnerabilityState_def::NoChange: + case VulnerabilityState_def::TemporarySeverance: + case VulnerabilityState_def::NearMiss: + case VulnerabilityState_def::HitWithNoEffect: + case VulnerabilityState_def::VulnerabilityBitsChanged: + case VulnerabilityState_def::NContamination: + case VulnerabilityState_def::BContamination: + case VulnerabilityState_def::CContamination: + case VulnerabilityState_def::NotReady: // Internal + case VulnerabilityState_def::Reserved: // Internal break; // use common translation from toString() #endif } @@ -76,70 +73,60 @@ static QString toStringVehicle(VulnerabilityState vs) static QString toStringSoldier(VulnerabilityState vs) { - switch (static_cast(vs)) + switch (vs.underlying()) { #ifdef ETS_MODE - case 1: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle"); - case 2: return QCoreApplication::translate("ProjectDataManagement", "lightly injured", "VulnerabilityStateVehicle"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "moderatly injured", "VulnerabilityStateVehicle"); - case 4: return QCoreApplication::translate("ProjectDataManagement", "seriously injured", "VulnerabilityStateVehicle"); - case 5: return QCoreApplication::translate("ProjectDataManagement", "dead", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "lightly injured", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "moderatly injured", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "seriously injured", "VulnerabilityStateVehicle"); + case VulnerabilityState_def::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "dead", "VulnerabilityStateVehicle"); default: break; #else - case 2: return QCoreApplication::translate("ProjectDataManagement", "Wounded Walking", "VulnerabilityStateSoldier"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "Wounded Sitting", "VulnerabilityStateSoldier"); - case 4: return QCoreApplication::translate("ProjectDataManagement", "Wounded Laying", "VulnerabilityStateSoldier"); - case 5: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill / Killed", "VulnerabilityStateSoldier"); - case 7: return QCoreApplication::translate("ProjectDataManagement", "Weapon Damage", "VulnerabilityStateSoldier"); - case 8: return QCoreApplication::translate("ProjectDataManagement", "Visible Weapon Damage", "VulnerabilityStateSoldier"); - case 1: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 6: - case 0: - case 17: + case VulnerabilityState_def::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Walking", "VulnerabilityStateSoldier"); + case VulnerabilityState_def::MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Sitting", "VulnerabilityStateSoldier"); + case VulnerabilityState_def::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Laying", "VulnerabilityStateSoldier"); + case VulnerabilityState_def::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill / Killed", "VulnerabilityStateSoldier"); + case VulnerabilityState_def::WeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Weapon Damage", "VulnerabilityStateSoldier"); + case VulnerabilityState_def::VisibleWeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Visible Weapon Damage", "VulnerabilityStateSoldier"); + case VulnerabilityState_def::CombatReady: + case VulnerabilityState_def::TemporarySeverance: + case VulnerabilityState_def::NearMiss: + case VulnerabilityState_def::HitWithNoEffect: + case VulnerabilityState_def::VulnerabilityBitsChanged: + case VulnerabilityState_def::NContamination: + case VulnerabilityState_def::BContamination: + case VulnerabilityState_def::CContamination: + case VulnerabilityState_def::NoChange: break; // use common translation from toString() // those should not happen ... + case VulnerabilityState_def::MobilityKill: + case VulnerabilityState_def::VisibleMobilityKill: + case VulnerabilityState_def::NotReady: // Internal + case VulnerabilityState_def::Reserved: // Internal + break; #endif } return toString(vs); } -QString toString(VulnerabilityState vs) -{ - switch (static_cast(vs)) - { - case 0: return QCoreApplication::translate("ProjectDataManagement", "Unknown", "VulnerabilityState"); - case 1: return QCoreApplication::translate("ProjectDataManagement", "Normal", "VulnerabilityState"); - case 2: return QCoreApplication::translate("ProjectDataManagement", "Warning", "VulnerabilityState"); - case 3: return QCoreApplication::translate("ProjectDataManagement", "Critical", "VulnerabilityState"); - default: break; - } - return QCoreApplication::translate("ProjectDataManagement", "Unknown (%1)", "VulnerabilityState").arg(static_cast(vs)); -} - QString toString(VulnerabilityState vs, VulnerabilityClass vc) { - switch (static_cast(vc)) + switch (vc.underlying()) { - case 0: // Unknown - case 1: // WtdDamages - case 2: // WtdInjuries + case VulnerabilityClass_def::Unknown: + case VulnerabilityClass_def::WtdDamages: + case VulnerabilityClass_def::WtdInjuries: return toString(vs); - case 3: // BuildingDamages + case VulnerabilityClass_def::BuildingDamages: return toStringBuilding(vs); - case 4: // VehicleDamages + case VulnerabilityClass_def::VehicleDamages: return toStringVehicle(vs); - case 5: // SoldierInjuries + case VulnerabilityClass_def::SoldierInjuries: return toStringSoldier(vs); } - return QCoreApplication::translate("ProjectDataManagement", "Unknown (%1)", "VulnerabilityState").arg(static_cast(vs)); + return QCoreApplication::translate("ProjectDataManagement", "Unknown (%1)", "VulnerabilityState").arg(vs.underlying()); } } // namespace ProjectDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.h index a1fa70774..1d97c930e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/pdm_to_string.h @@ -6,9 +6,8 @@ * $Author$ */ -#include #include -#include +#include namespace ProjectDataManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/settings.h index bf17d2367..3044df1ff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.cpp index 716447e4c..80b2a44a6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.cpp @@ -1,10 +1,9 @@ #include "static_pvsan_import.h" -#include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -294,7 +293,7 @@ bool PvSanImport::addProcedures(const QVector &procedures) QVector translations; m_db->select(translations); QSet idsToRemove; - for (const auto &tr : std::as_const(translations)) + for (const auto &tr : qAsConst(translations)) { if (tr.context == myContext) idsToRemove.insert(tr.id); @@ -419,7 +418,7 @@ bool PvSanImport::addMaterial(const QVector &material) QVector translations; m_db->select(translations); QSet idsToRemove; - for (const auto &tr : std::as_const(translations)) + for (const auto &tr : qAsConst(translations)) { if (tr.context == myContext) idsToRemove.insert(tr.id); @@ -482,7 +481,7 @@ bool PvSanImport::addInjuryPlaces(const QVector &kind, const QVector translations; m_db->select(translations); QSet idsToRemove; - for (const auto &tr : std::as_const(translations)) + for (const auto &tr : qAsConst(translations)) { if (tr.context == myContext) idsToRemove.insert(tr.id); @@ -496,7 +495,7 @@ bool PvSanImport::addInjuryPlaces(const QVector &kind, const QVector &kind, const QVectortruncatePdmSanitationInjuryPlace1(); idsToRemove.clear(); - for (const auto &tr : std::as_const(translations)) + for (const auto &tr : qAsConst(translations)) { if (tr.context == myContext) idsToRemove.insert(tr.id); @@ -541,7 +540,7 @@ bool PvSanImport::addInjuryPlaces(const QVector &kind, const QVector &kind, const QVectortruncatePdmSanitationInjuryPlace2(); idsToRemove.clear(); - for (const auto &tr : std::as_const(translations)) + for (const auto &tr : qAsConst(translations)) { if (tr.context == myContext) idsToRemove.insert(tr.id); @@ -587,7 +586,7 @@ bool PvSanImport::addInjuryPlaces(const QVector &kind, const QVector &injuries) trans.context = myContext; Database::PdmSanitationInjury injuryDb; int id = 1; - for (const QString &injury : std::as_const(injuries)) + for (const QString &injury : qAsConst(injuries)) { QStringList kde = injury.split(QStringLiteral(";")); if (kde.size() < 29 ) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.h index ff8d69936..def3597f7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/static_pvsan_import.h @@ -12,7 +12,7 @@ #include "logger.h" #include -#include +#include namespace ProjectDataManagement { @@ -22,7 +22,6 @@ public: PvSanImport(const std::shared_ptr &db, NGL::INGLLogger &logger); private: -NGL::INGLLogger &m_logger; qint64 getCode(const QString &type, int typeId); bool publishDataPvSan(); @@ -39,5 +38,6 @@ bool addInjuries(const QVector &injuries); QString m_version; const std::shared_ptr &m_db; +NGL::INGLLogger &m_logger; }; } // namespace ProjectDataManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.cpp index 4d1551975..39c57cdcc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.cpp @@ -6,14 +6,13 @@ */ #include "translation.h" -#include #include "dds_handler.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace ProjectDataManagement { @@ -23,6 +22,7 @@ Translation::Translation(const std::shared_ptr &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"; m_publishTimer.setInterval(1000); @@ -61,7 +61,7 @@ void Translation::collectAndPublishData() void Translation::publishData() { QJsonArray arr; - for (const QJsonObject &obj : std::as_const(m_jsonData)) + for (const QJsonObject &obj : qAsConst(m_jsonData)) arr += obj; const QJsonObject jObj{ {QStringLiteral("translations"), arr} }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.h index c2ac86bd4..a27cf4a21 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectDataManagement/translation.h @@ -10,9 +10,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "logger.h" namespace ProjectDataManagement @@ -30,15 +30,14 @@ protected Q_SLOTS: void collectAndPublishData(); void publishData(); private: - NGL::INGLLogger &m_logger; void addToJson(const Database::PdmTranslation &data); void onInsertUpdateTranslationRequest(const rti::core::SampleIdentity &cookie, const InsertUpdateTranslationRequest &request) override; private: - NGL::INGLLogger &m_logger; QHash m_jsonData; std::shared_ptr m_dds; std::shared_ptr m_db; QTimer m_publishTimer; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectionWorkstation/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectionWorkstation/CMakeLists.txt index d7835a622..35555bf94 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectionWorkstation/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ProjectionWorkstation/CMakeLists.txt @@ -12,7 +12,7 @@ SET(SRCS_common pws_dummy.cpp) # Generate pws_dt[s,c]_types.h, pws_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcPwsCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcPwsCommon SHARED ${SRCS_common}) NGL_TARGET_LINK_LIBRARIES(svcPwsCommon PRIVATE Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/CMakeLists.txt index 9c437d0a1..4c3458449 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/CMakeLists.txt @@ -33,13 +33,12 @@ RTIDDSGEN(SRCS_common rec_enums.idl) # Generate rec_dt[s,c]_types.h, rec_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcRecCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcRecCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcRecCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcRecCommon PRIVATE RTI::nddscpp2 @@ -50,7 +49,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRecCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcRecCommon) # @@ -60,7 +58,7 @@ NGL_INSTALL_TARGET(svcRecCommon) # rec_export.h #) -#NGL_ADD_LIBRARY2(AAR SV svcRecServer SHARED ${SRCS_server}) +#NGL_ADD_LIBRARY(AAR SV svcRecServer SHARED ${SRCS_server}) #NGL_TARGET_INCLUDE_DIRECTORIES(svcRecServer # PUBLIC # ${CMAKE_CURRENT_SOURCE_DIR}/../ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.cpp index 3a767998a..4c14191c6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.cpp @@ -5,7 +5,6 @@ * $Author$ */ #include "db_writer.h" -#include #include "db_writer_snapshot.h" #include "rec_db.h" @@ -13,7 +12,7 @@ #include "settings.h" #include -#include +#include #include @@ -23,12 +22,14 @@ namespace RecordingManagement { -DbWriter::DbWriter(const std::shared_ptr &ddsConnector) : m_query(nullptr) +DbWriter::DbWriter(const std::shared_ptr &ddsConnector) + : m_query(nullptr) , m_recordTimer(new QTimer(this)) , m_ddsConnector(ddsConnector) , m_dbWriterSnapshot(nullptr) - , m_dbWriterSnapshotThread(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_dbWriterSnapshotThread(nullptr) + , m_logger(getLogger("DbWriter")) +{} DbWriter::~DbWriter() { @@ -118,7 +119,7 @@ void DbWriter::ddsTopicsToDatabase() QHash minRecordSampleTimes; // for each plugin - for (RecordReplay::RecordReplayPlugin *recPlugin : std::as_const(m_plugins)) + for (RecordReplay::RecordReplayPlugin *recPlugin : qAsConst(m_plugins)) { if (!recPlugin->ddsTopicsToDatabase(*m_query, minRecordSampleTimes)) { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.h index c537501e6..34e249f96 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer.h @@ -6,9 +6,9 @@ */ #pragma once -#include -#include -#include +#include +#include +#include #include #include @@ -35,7 +35,6 @@ public: bool init(const std::shared_ptr &db); protected: - NGL::INGLLogger &m_logger; bool initSnapshot(); bool loadPlugin(const LtsPluginManager::PluginInstance &pi); @@ -50,5 +49,7 @@ private: DbWriterSnapshot *m_dbWriterSnapshot{nullptr}; DbWriterSnapshotThread *m_dbWriterSnapshotThread{nullptr}; std::shared_ptr m_db; + + LOGGER_T m_logger; }; } // namespace RecordingManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.cpp index c22c42251..2f9aa6c8f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.cpp @@ -5,13 +5,12 @@ * $Author$ */ #include "db_writer_snapshot.h" -#include #include "logger.h" -#include -#include -#include +#include +#include +#include #include #include @@ -36,12 +35,14 @@ void DbWriterSnapshotThread::run() DbWriterSnapshot::DbWriterSnapshot(const QVector &plugins, int exerciseId, - NGL::Settings *settings) : QObject() + NGL::Settings *settings) + : QObject() , m_plugins(plugins) , m_snapshotInterval(1 * 60 * 1000) // TODO: make config variable // Interval: 1 min in milliseconds , m_exerciseId(exerciseId) - , m_settings(settings), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_settings(settings) + , m_logger(getLogger("DbWriterSnapshot")) +{ } DbWriterSnapshot::~DbWriterSnapshot() @@ -162,7 +163,7 @@ void DbWriterSnapshot::initSnapshot() // Recording already initialised => read last arrays for each plugin/topic to // get a hint where to start with indexing each topic - for (RecordReplay::RecordReplayPlugin *recPlugin : std::as_const(m_plugins)) + for (RecordReplay::RecordReplayPlugin *recPlugin : qAsConst(m_plugins)) { // get all record topics and check if there's a index for them // if not -> check if there's a sample for this topic where we've to start indexing @@ -226,7 +227,7 @@ void DbWriterSnapshot::writeSnapshotData() // shortcut to avoid DBTransaction and loop over all plugins qint64 startTime = std::numeric_limits::max(); - for(const qint64 st : std::as_const(minRecSampleTimes)) + for(const qint64 st : qAsConst(minRecSampleTimes)) startTime = std::min(startTime, st); INFO_LOG(m_logger) << "writeSnapshotData - lastSnapshotTimeToGenerateNow: " << lastSnapshotTimeToGenerateNow << ", minRecTime is " << startTime; @@ -250,7 +251,7 @@ void DbWriterSnapshot::writeSnapshotData() << " lastSnapshotTimeToGenerateNow: " << lastSnapshotTimeToGenerateNow << " - BEGIN"; DBTransaction trans(QSqlDatabase::database(dbConnectionName())); NSqlQuery recSnapshotQuery(QSqlDatabase::database(dbConnectionName())); - for (RecordReplay::RecordReplayPlugin *recPlugin : std::as_const(m_plugins)) + for (RecordReplay::RecordReplayPlugin *recPlugin : qAsConst(m_plugins)) writeSnapshotDataPlugin(lastSnapshotTimeToGenerateNow, recSnapshotQuery, recPlugin, minRecSampleTimes); trans.commit(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.h index 40ee9069e..ad3f648fa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/db_writer_snapshot.h @@ -6,10 +6,10 @@ */ #pragma once -#include -#include -#include -#include +#include +#include +#include +#include #include #include "logger.h" @@ -62,6 +62,7 @@ private: std::shared_ptr m_dbInterface; int m_exerciseId; NGL::Settings *m_settings; + LOGGER_T m_logger; }; @@ -74,7 +75,6 @@ public: , m_dbWriterSnapshot(dbWriterSnapshot) {} protected: - NGL::INGLLogger &m_logger; void run() override final; private: DbWriterSnapshot *m_dbWriterSnapshot; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.cpp index ca401a26a..e792e7c9a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace RecordingManagement DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.h index aa4d3a76c..3cbc44cda 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/dds_handler.h @@ -33,9 +33,10 @@ public: std::shared_ptr dds() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/logger.h index e8698faab..cb115f13e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcreccommon_export.h" +#include "rec_export.h" namespace RecordingManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/main_handler.h index 1962736c9..0191d794e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/main_handler.h @@ -31,10 +31,10 @@ public: private: - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_dbWriter; + + LOGGER_T m_logger; }; } // namespace RecordingManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/settings.h index ed8404834..03ba08fff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RecordingManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.cpp index eb19f160c..97fc57046 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.cpp @@ -7,20 +7,21 @@ */ #include "handler_dynamic_participant_data.h" -#include #include "rep_db.h" #include "settings.h" #include #include -#include +#include #include using namespace ReportManagement; //----------------------------------------------------------------------------- HandlerDynamicParticipantData::HandlerDynamicParticipantData(const std::shared_ptr &ddsHandler, - const std::shared_ptr &db) : m_ddsHandler(ddsHandler) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + const std::shared_ptr &db) + : m_ddsHandler(ddsHandler) + , m_db(db) + , m_logger(getLogger("HandlerDynamicParticipantData")) +{ } // end of ctor() //----------------------------------------------------------------------------- @@ -914,7 +915,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic } // Has Turm/Wanne Map been filled? - for (Database::RepChargeResupplyData turmWanneCrData : std::as_const(turmWanneMap)) + for (Database::RepChargeResupplyData turmWanneCrData : qAsConst(turmWanneMap)) { QPair pair; pair.first = turmWanneCrData.gearTypeId; @@ -973,7 +974,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic DEBUG_LOG(m_logger) << "Qualification = " << sanData.qualification; - for ( ParticipantManagement::SanitationMaterial sanMat : std::as_const(data.sanitationMaterialStock())) + for ( ParticipantManagement::SanitationMaterial sanMat : qAsConst(data.sanitationMaterialStock())) { sanData.materialId = sanMat.materialId(); sanData.materialAmount = sanMat.materialCount(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.h index f281dc3f5..51e4d654e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/handler_dynamic_participant_data.h @@ -12,7 +12,7 @@ #include "rep_db.h" #include "logger.h" -#include +#include #include #ifdef GUEZ_MODE #include @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include namespace ReportManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.cpp index 9c7cc9a54..1ae8b4691 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.cpp @@ -15,11 +15,13 @@ namespace ReportManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) - , m_dynPartData(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_dynPartData(nullptr) + , m_logger(getLogger("MainHandlerAnalyzer")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.h index e7d728828..b2b67fef2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Analyzer/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "handler_dynamic_participant_data.h" @@ -32,10 +32,10 @@ public: private: - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_dynPartData; + + LOGGER_T m_logger; }; } // namespace ReportManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/CMakeLists.txt index b93971076..c167189d9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/CMakeLists.txt @@ -30,13 +30,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate rep_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcRepCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcRepCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcRepCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcRepCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRepCommon svcPdmCommon LtsUtilsCoreHeaderOnly ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcRepCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate rep_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcRepClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcRepClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcRepClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcRepClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRepClient svcRepCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcRepClient) # @@ -88,14 +84,13 @@ SET(SRCS_server # generate rep_[d|f]ts.h, rep_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcRepServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcRepServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcRepServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcRepServer PRIVATE RTI::nddscpp2 @@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcRepServer svcRepCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcRepServer) # @@ -119,7 +113,7 @@ CREATE_TOPIC_TYPE_PLUGIN(${xml_FILE}) # # Generate rep.sql, rep.xml CODEGEN_SQL(SHARED_SRCS_exe ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcRepCommonExecutable STATIC ${SHARED_SRCS_exe}) +NGL_ADD_LIBRARY(AAR SV svcRepCommonExecutable STATIC ${SHARED_SRCS_exe}) NGL_TARGET_LINK_LIBRARIES(svcRepCommonExecutable PUBLIC Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_charge_administration.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_charge_administration.cpp index 1cf99007f..7a2bd688f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_charge_administration.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_charge_administration.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include using namespace ReportManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_medevac_nine_liner.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_medevac_nine_liner.cpp index 3953bde74..ac3b0285a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_medevac_nine_liner.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_medevac_nine_liner.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include using namespace ReportManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_building_damage.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_building_damage.cpp index 6d97d6b58..7d29ce4ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_building_damage.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_building_damage.cpp @@ -7,12 +7,11 @@ */ #include "handler_report_data.h" -#include #include #include -#include +#include using namespace ReportManagement; //---------------------------------------------------------------------------- @@ -106,7 +105,7 @@ bool HandlerReportData::generateBuildingDamageResult(const CreateModifyReportReq qInsert.bindValue(QStringLiteral(":reportId"), reportId); - for (const BuildingDamageData &bdData : std::as_const(m_buildingDamageData)) + for (const BuildingDamageData &bdData : qAsConst(m_buildingDamageData)) { qInsert.bindValue(QStringLiteral(":bldId"), bdData.buildingId); qInsert.bindValue(QStringLiteral(":time"), bdData.timePoint); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_charge_resupply.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_charge_resupply.cpp index 5ffa55883..2d541c42f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_charge_resupply.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_charge_resupply.cpp @@ -7,13 +7,12 @@ */ #include "handler_report_data.h" -#include #include #include -#include -#include +#include +#include using namespace ReportManagement; @@ -86,7 +85,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq { QStringList strList; strList.reserve(usedGears.size()); - for (int gearId : std::as_const(usedGears)) + for (int gearId : qAsConst(usedGears)) strList += QString::number(gearId); QString gears = strList.join(QLatin1String(", ")); stmt += QLatin1String(" AND gear_id IN (") + gears + QLatin1String(")"); @@ -196,7 +195,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq } // Now examine the remaining weapons: - for (const participant_map2_t &p : std::as_const(m_crGear)) + for (const participant_map2_t &p : qAsConst(m_crGear)) { QMap temp; for (const QVector &datas : p) @@ -208,7 +207,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq int p_before = temp.begin().value().participantId; int pt_before = temp.begin().value().participantTypeId; - for (const Database::RepChargeResupplyData &d : std::as_const(temp)) + for (const Database::RepChargeResupplyData &d : qAsConst(temp)) { if (p_before != d.participantId) { @@ -332,7 +331,7 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq int current = start; - for (const Database::RepChargeResupplyData &d : std::as_const(tmap)) // Per Timestamp + for (const Database::RepChargeResupplyData &d : qAsConst(tmap)) // Per Timestamp { if (d.chargeTypeId < 0) { @@ -432,9 +431,9 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq QMap finalMap; - for (const charge_type_map2_t &ctmap : std::as_const(m_crResData)) // Per Participant + for (const charge_type_map2_t &ctmap : qAsConst(m_crResData)) // Per Participant { - for (const ChargeResupplyResult &res : std::as_const(ctmap)) // Per ChargeType + for (const ChargeResupplyResult &res : qAsConst(ctmap)) // Per ChargeType { if (request.participantIds().size() > 0 && !contains(request.participantIds(), res.participantId)) continue; @@ -464,9 +463,9 @@ bool HandlerReportData::generateChargeResupplyResult(const CreateModifyReportReq DEBUG_LOG(m_logger) << "finalMap.size: " << finalMap.size(); - for (const charge_type_map2_t &ctmap : std::as_const(finalMap)) + for (const charge_type_map2_t &ctmap : qAsConst(finalMap)) { - for (const ChargeResupplyResult &res : std::as_const(ctmap)) + for (const ChargeResupplyResult &res : qAsConst(ctmap)) { checkElapsedTimer(timeoutTimer); DEBUG_LOG(m_logger) << "res.chargeTypeId: " << res.chargeTypeId; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.cpp index b9c1d0dcb..cf4386bae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.cpp @@ -15,10 +15,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include #include using namespace ReportManagement; @@ -32,6 +32,7 @@ HandlerReportData::HandlerReportData(const std::shared_ptr &ddsHandl , m_db(db) , m_ppmDtc(nullptr) , m_aesDtc(nullptr) + , m_logger(getLogger("HandlerReportData")) { } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.h index 67be3ae28..e97da4956 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_data.h @@ -14,11 +14,11 @@ #include "rep_db.h" #include -#include +#include #include -#include -#include +#include +#include // ---------------------------------------------------------------------------------------------------------------------- namespace ReportManagement @@ -192,8 +192,6 @@ class HandlerReportData final bool init(); private: // methods - - NGL::INGLLogger &m_logger; static QString intVecToString(const std::vector &intVec); void onCreateModifyReportRequest(const rti::core::SampleIdentity &cookie, const CreateModifyReportRequest &request) override final; void onRemoveReportRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) override final; @@ -319,5 +317,7 @@ class HandlerReportData final rti::core::SampleIdentity m_updateReportCookie; UpdateReportReply m_reply; + + LOGGER_T m_logger; }; } // namespace ReportManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_firings.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_firings.cpp index 8f9d04985..68096cc4d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_firings.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_firings.cpp @@ -7,7 +7,6 @@ */ #include "handler_report_data.h" -#include #include #include @@ -65,7 +64,7 @@ bool HandlerReportData::generateFiringsResult(const CreateModifyReportRequest &r QElapsedTimer timeoutTimer; timeoutTimer.start(); - for (const int &chargeId : std::as_const(request.chargeTypeIds())) + for (const int &chargeId : qAsConst(request.chargeTypeIds())) { if (chargeId == 0) continue; // skip 0 diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.cpp index 48dea4900..09cde346a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.cpp @@ -11,13 +11,13 @@ #include "settings.h" -#include +#include #include -#include -#include -#include -#include +#include +#include +#include +#include #include using namespace ReportManagement; @@ -26,6 +26,7 @@ HandlerReportGetData::HandlerReportGetData(const std::shared_ptr &dd : Interface::Fts::GetReportDataRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_db(db) + , m_logger(getLogger("HandlerReportGetData")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.h index ee15400d1..f25760009 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_get_data.h @@ -12,7 +12,7 @@ #include "logger.h" #include "rep_db.h" -#include +#include #include #include @@ -32,8 +32,6 @@ public: bool init(); private: // methods - -NGL::INGLLogger &m_logger; void onGetReportDataRequest(const rti::core::SampleIdentity &cookie, const GetReportDataRequest &request) override final; GetReportDataReply getReportDataRequest(const GetReportDataRequest &request); @@ -57,7 +55,7 @@ private: // attributes std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler std::shared_ptr m_db; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace ReportManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_maintenance.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_maintenance.cpp index 046e48dd7..afc690456 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_maintenance.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_maintenance.cpp @@ -7,12 +7,11 @@ */ #include "handler_report_data.h" -#include #include #include -#include +#include using namespace ReportManagement; @@ -82,7 +81,7 @@ bool HandlerReportData::generateMaintenanceResult(const CreateModifyReportReques qInsert.bindValue(QStringLiteral(":reportId"), reportId); - for (const auto &vrData : std::as_const(m_maintenanceData)) + for (const auto &vrData : qAsConst(m_maintenanceData)) { const auto participant = ppmDtc->participant(vrData.participantId); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_mine_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_mine_area.cpp index abfcb25b1..c23cecbcb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_mine_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_mine_area.cpp @@ -11,8 +11,8 @@ #include #include -#include -#include +#include +#include using namespace ReportManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_nbc.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_nbc.cpp index 0053c87f8..ac648444e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_nbc.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_nbc.cpp @@ -11,7 +11,7 @@ #include #include -#include +#include using namespace ReportManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_participant_distance.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_participant_distance.cpp index 449c4f043..ec4c67e31 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_participant_distance.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_participant_distance.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include using namespace ReportManagement; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment.cpp index cfeb27bd5..b552b1780 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment.cpp @@ -7,13 +7,12 @@ */ #include "handler_report_data.h" -#include #include #include #include -#include +#include using namespace ReportManagement; @@ -127,7 +126,7 @@ bool HandlerReportData::generateTreatmentResult(const CreateModifyReportRequest QElapsedTimer timeoutTimer; timeoutTimer.start(); - for (const TreatmentData &tData : std::as_const(m_treatmentData)) + for (const TreatmentData &tData : qAsConst(m_treatmentData)) { checkElapsedTimer(timeoutTimer); const auto participant = ppmDtc->participant(tData.participantId); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment_timeline.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment_timeline.cpp index 61c361ae8..27b8e6962 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment_timeline.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_treatment_timeline.cpp @@ -7,14 +7,13 @@ */ #include "handler_report_data.h" -#include #include #include #include -#include -#include +#include +#include using namespace ReportManagement; @@ -103,7 +102,7 @@ bool HandlerReportData::generateTreatmentTimelineResult(const CreateModifyReport qInsert.bindValue(QStringLiteral(":reportId"), reportId); - for (const TreatmentTimelineData &tData : std::as_const(m_treatmentTimelineData)) + for (const TreatmentTimelineData &tData : qAsConst(m_treatmentTimelineData)) { const auto participant = ppmDtc->participant(tData.participantId); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_unit_power.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_unit_power.cpp index cbf11c25d..5fc74d828 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_unit_power.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_report_unit_power.cpp @@ -7,15 +7,14 @@ */ #include "handler_report_data.h" -#include #include "rep_db.h" #include -#include +#include -#include -#include -#include +#include +#include +#include #include #include @@ -99,7 +98,7 @@ bool HandlerReportData::getParticipantInitial(const QVector &participantIds qBeforeStart.bindValue(QStringLiteral(":startTime"), startTime); qAfterStart.bindValue(QStringLiteral(":startTime"), startTime); qAfterStart.bindValue(QStringLiteral(":endTime"), endTime); - for (int participantId : std::as_const(participantIds)) + for (int participantId : qAsConst(participantIds)) { qBeforeStart.bindValue(QStringLiteral(":participant_id"), participantId); if (!qBeforeStart.exec()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_sanitation_material.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_sanitation_material.cpp index 05216993e..0ae4d458b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_sanitation_material.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/handler_sanitation_material.cpp @@ -7,12 +7,11 @@ */ #include "handler_report_data.h" -#include #include #include -#include +#include using namespace ReportManagement; @@ -68,7 +67,7 @@ bool HandlerReportData::generateSanitationMaterialResult(const CreateModifyRepor qInsert.prepare(QLatin1String("INSERT INTO rep_sanitation_material_result (report_id, sanitation_unique_id, qualification, material_id ) VALUES (:reportId, :uqId, :qualif, :materialId )")); qInsert.bindValue(QLatin1String(":reportId"), reportId); - for (qint64 sanitationId : std::as_const(sanitationIds)) + for (qint64 sanitationId : qAsConst(sanitationIds)) { qInsert.bindValue(QLatin1String(":uqId"), sanitationId); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.cpp index 700acdadc..a23c26eb6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.cpp @@ -18,11 +18,13 @@ namespace ReportManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_dbHandler(nullptr) - , m_preService(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_preService(nullptr) + , m_logger(getLogger("MainHandlerGenerator")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.h index d880b1e80..ed6019275 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "handler_report_data.h" @@ -38,13 +38,13 @@ public: private: - -NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_reportData; std::shared_ptr m_reportGetData; //external PresentationManagement::Initialization *m_preService; + + LOGGER_T m_logger; }; } // namespace ReportManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.cpp index 2587db43e..c0aa92df9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.cpp @@ -10,20 +10,22 @@ #include "dds_handler.h" #include "logger.h" -#include -#include -#include -#include +#include +#include +#include +#include //------------------------------------------------------------------------------ namespace ReportManagement { ObjectReportInfo::ObjectReportInfo(const std::shared_ptr &ddsHandler, const std::shared_ptr &db, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_ddsHandler(ddsHandler) - , m_db(db), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_db(db) + , m_logger(getLogger("ObjectReportInfo")) +{ } //------------------------------------------------------------------------------ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.h index dacae5b57..24952d0af 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/Generator/object_report_info.h @@ -7,9 +7,9 @@ */ #pragma once -#include +#include #include "dds_handler.h" -#include +#include // Generated #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/lon_lat2utm_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/lon_lat2utm_test.cpp index 4be8f6946..1c7dac2ba 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/lon_lat2utm_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/lon_lat2utm_test.cpp @@ -13,8 +13,8 @@ #include -#include -#include +#include +#include // ------------------------------------------------------------------ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/rep_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/rep_tests.cpp index 93703c4a9..9e4bbe694 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/rep_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/ModuleTests/rep_tests.cpp @@ -10,12 +10,12 @@ #include #include -#include -#include +#include +#include #include #include -#include +#include #include #include #include @@ -30,6 +30,7 @@ RepTests::RepTests(QObject *parent) , m_reportId(0) , m_operatorId(100) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.cpp index 7284f75ec..3476f0002 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.cpp @@ -16,6 +16,7 @@ namespace ReportManagement DdsHandler::DdsHandler(int domainId, int exerciseId) : QObject() , m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.h index a2a6c0bb8..d42302525 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/dds_handler.h @@ -57,12 +57,13 @@ public: } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/logger.h index 8646e1ac7..3b642518c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcrepcommon_export.h" +#include "rep_export.h" namespace ReportManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/settings.h index 32c6ff6be..4810dc393 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ReportManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/CMakeLists.txt index c6139a44d..59cba8f70 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/CMakeLists.txt @@ -43,7 +43,6 @@ NGL_TARGET_LINK_LIBRARIES(rscCommon #NGL_ADD_SVC_ICON(SRCS_exe) #NGL_ADD_EXECUTABLE(AAR SV svcRoutingServiceNG ${SRCS_exe}) -#IF(BUILD_RTI) #NGL_TARGET_LINK_LIBRARIES(svcRoutingServiceNG # rscCommon # Qt6::Core @@ -61,7 +60,6 @@ NGL_TARGET_LINK_LIBRARIES(rscCommon # svcCoreClient # svcExmClient #) -#ENDIF(BUILD_RTI) #NGL_INSTALL_TARGET(svcRoutingServiceNG) #NGL_INSTALL(AAR SV FILES log4cxx_rsc.props DESTINATION bin) #NGL_ADD_TARGET_LINK(svcRoutingServiceNG sRSC) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.cpp index 81246f23c..d49c2ebc7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.cpp @@ -10,8 +10,7 @@ #include "connection.h" #include "data_writer_task.h" -#if BUILD_RTI -#include +#include #include #include @@ -187,4 +186,3 @@ bool Connection::initTopics() } } // namespace RoutingService -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.h index 7eba241f0..55e0d82c3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/connection.h @@ -8,7 +8,6 @@ #pragma once -#if BUILD_RTI #include #include @@ -42,7 +41,6 @@ private: bool initTopics(); private: - NGL::INGLLogger &m_logger; Connection *m_output; dds::domain::DomainParticipant m_domainParticipant; std::unique_ptr m_publisher; @@ -55,8 +53,7 @@ private: std::string m_partition; std::string m_description; + NGL::INGLLogger &m_logger; }; } // namespace RoutingService - -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.cpp index 3533441d3..9c596e582 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.cpp @@ -11,15 +11,14 @@ namespace RoutingService { DataWriterTask::DataWriterTask() - : m_logger(getLogger("DataWriterTask")) - , m_doShutdown(false) + : m_doShutdown(false) + , m_logger(getLogger("DataWriterTask")) { DEBUG_LOG(m_logger) << this << ": init "; } DataWriterTask::~DataWriterTask() { -#if BUILD_RTI std::lock_guard lock(m_queueLock); DEBUG_LOG(m_logger) << this << ": Cleaning up remaining writers: " << m_writerQueue.size(); while (!m_writerQueue.empty()) @@ -27,10 +26,8 @@ DataWriterTask::~DataWriterTask() delete m_writerQueue.front(); m_writerQueue.pop(); } -#endif } -#if BUILD_RTI void DataWriterTask::enqueue(SampleWriterInterface *swi) { std::lock_guard lock(m_queueLock); @@ -104,6 +101,5 @@ void DataWriterTask::writeSamples() } } } -#endif // BUILD_RTI } // namespace RoutingService diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.h index 520799508..bb29c36d2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/data_writer_task.h @@ -11,15 +11,10 @@ #include #include #include +#include #include "logger.h" -#if BUILD_RTI -#include -#else -#include "stubs/routing_plugin_stub.h" -#endif - namespace RoutingService { class DataWriterTask final : public DataWriterTaskInterface @@ -28,30 +23,19 @@ public: DataWriterTask(); ~DataWriterTask(); -#if BUILD_RTI void enqueue(SampleWriterInterface *swi) override; void shutdown(); bool waitForData(); SampleWriterInterface *getNextSampleWriter(); void writeSamples(); -#else - // Stub methods when BUILD_RTI is disabled - void enqueue(SampleWriterInterface* /*swi*/) {} - void shutdown() {} - bool waitForData() { return false; } - SampleWriterInterface* getNextSampleWriter() { return nullptr; } - void writeSamples() {} -#endif private: - NGL::INGLLogger &m_logger; -#if BUILD_RTI std::queue m_writerQueue; -#endif std::mutex m_queueLock; std::condition_variable m_waitForDataCondition; bool m_doShutdown; + NGL::INGLLogger &m_logger; }; } // namespace RoutingService diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/logger.h index 27b5ae664..0398cea97 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/logger.h @@ -10,7 +10,7 @@ #pragma once #include -#include "rsccommon_export.h" +#include namespace RoutingService { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.cpp index 50c98e8cc..c0e7a52df 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.cpp @@ -19,7 +19,6 @@ #include #include -#if BUILD_RTI namespace RoutingService { @@ -103,4 +102,3 @@ void MainHandler::shutdown() } } // namespace RoutingService -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h index 6e398b0df..df6b2bdd1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/main_handler.h @@ -8,12 +8,9 @@ #pragma once -#include +#include #include "logger.h" - -#if BUILD_RTI - #include "partition_handler.h" #include "session_handler.h" #include "session.h" @@ -39,11 +36,10 @@ public: private: - NGL::INGLLogger &m_logger; std::unique_ptr m_sessionHandler; std::unique_ptr m_partitionHandler; std::shared_ptr m_pacemaker; + + NGL::INGLLogger &m_logger; }; } // namespace RoutingService - -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.cpp index 5e1a34473..8953f91ae 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.cpp @@ -9,13 +9,14 @@ #include "partition_handler.h" #include -#if BUILD_RTI namespace RoutingService { -PartitionHandler::PartitionHandler(const std::shared_ptr &ddsConnector, QObject *parent) : QObject(parent) +PartitionHandler::PartitionHandler(const std::shared_ptr &ddsConnector, QObject *parent) + : QObject(parent) , m_exmDtc(ExerciseManagement::Interface::Dtc::create(ddsConnector)) - , m_destroyTimer(new QTimer(this)), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_destroyTimer(new QTimer(this)) + , m_logger(getLogger("PartitionHandler")) +{ m_exmDtc->enableExercise(); m_destroyTimer->setInterval(1000); @@ -102,4 +103,3 @@ void PartitionHandler::onDestroyTimerTimeout() } // namespace RoutingService -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h index d4bc55c3b..4a1f87650 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/partition_handler.h @@ -8,14 +8,11 @@ #pragma once -#if BUILD_RTI - #include -#include -#include -#include +#include +#include +#include #include -#include #include "logger.h" namespace RoutingService @@ -31,7 +28,6 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void partitionModified(const QString &partitionName, const ExerciseManagement::ExerciseState &state); void partitionRemoved(const QString &partitionName); private Q_SLOTS: @@ -42,12 +38,10 @@ Q_SIGNALS: void destroySession(const QString &partitionNameSv, const QString &partitionNameWs); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_exmDtc; QMap m_destroyMap; QSet m_activeSessions; QTimer *m_destroyTimer; + NGL::INGLLogger &m_logger; }; } // namespace RoutingService - -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.cpp index 197f50c59..289351587 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.cpp @@ -9,15 +9,13 @@ #include "session.h" -#if BUILD_RTI namespace RoutingService { Session::Session(const QString &partitionNameSv, const QString &partitionNameWs) : m_partitionNameSv(partitionNameSv.toStdString()) , m_partitionNameWs(partitionNameWs.toStdString()) , m_logger(getLogger("Session")) -{ -} +{} Session::~Session() { @@ -58,4 +56,3 @@ void Session::shutdown() } // namespace RoutingService -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.h index 9e1be4888..ad15dfe53 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session.h @@ -9,13 +9,7 @@ #pragma once #include -#include - -#include "logger.h" - -#if BUILD_RTI #include "connection.h" -#endif namespace RoutingService { @@ -25,21 +19,18 @@ public: explicit Session(const QString &partitionNameSv, const QString &partitionNameWs); ~Session(); -#if BUILD_RTI bool init(const dds::domain::DomainParticipant &dpIn, const dds::domain::DomainParticipant &dpOut, const std::vector &topicsToRouteToWs, const std::vector &topicsToRouteToSv); void shutdown(); -#endif private: - NGL::INGLLogger &m_logger; std::string m_partitionNameSv; std::string m_partitionNameWs; -#if BUILD_RTI std::unique_ptr m_connectionSvToWs; std::unique_ptr m_connectionWsToSv; -#endif + + NGL::INGLLogger &m_logger; }; } // namespace RoutingService diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp index 3419906e8..fd3368a3a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.cpp @@ -9,14 +9,9 @@ #include "session_handler.h" #include -#if BUILD_RTI #include -#else -#include "stubs/topic_type_plugin_stub.hpp" -#endif -#include +#include -#if BUILD_RTI namespace RoutingService { @@ -26,6 +21,7 @@ SessionHandler::SessionHandler(IDL::PartitionType partitionType, : m_partitionType(partitionType) , m_ddsConnectorSv(ddsConnectorSv) , m_ddsConnectorWs(ddsConnectorWs) + , m_logger(getLogger("SessionHandler")) { } @@ -142,4 +138,3 @@ std::vector SessionHandler::topicsToRouteToSv() cons } } // namespace RoutingService -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h index 3b9d908a3..4cdd2c68c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/RoutingServiceNG/session_handler.h @@ -8,15 +8,12 @@ #pragma once -#include -#include +#include +#include -#include "rsccommon_export.h" +#include #include "logger.h" #include "session.h" - -#if BUILD_RTI - #include namespace LtsPluginManager @@ -47,7 +44,6 @@ public Q_SLOTS: void onCreateSession(const QString &partitionNameSv, const QString &partitionNameWs); void onDestroySession(const QString &partitionNameSv, const QString &partitionNameWs); private: - NGL::INGLLogger &m_logger; bool loadPlugins(); bool loadPlugin(const LtsPluginManager::PluginInstance &pi); @@ -55,7 +51,6 @@ private: std::vector topicsToRouteToSv() const; private: - NGL::INGLLogger &m_logger; std::vector m_topicTypePlugins; IDL::PartitionType m_partitionType; @@ -63,7 +58,7 @@ private: std::shared_ptr m_ddsConnectorWs; QMap m_sessionMap; + + NGL::INGLLogger &m_logger; }; } // namespace RoutingService - -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ScreenRecording/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ScreenRecording/CMakeLists.txt index d46d54612..2531e31bb 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ScreenRecording/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ScreenRecording/CMakeLists.txt @@ -12,7 +12,7 @@ SET(SRCS_common scr_dummy.cpp) # Generate aes_dt[s,c]_types.h, aes_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcScrDummy SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcScrDummy SHARED ${SRCS_common}) NGL_TARGET_LINK_LIBRARIES(svcScrDummy PRIVATE Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/CMakeLists.txt index 9685a3e29..058d96792 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate scm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(SV AAR WS svcScmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(SV AAR WS svcScmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcScmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcScmCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcScmCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcScmCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate scm_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcScmClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(WS AAR SV svcScmClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcScmClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcScmClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcScmClient svcScmCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcScmClient) # @@ -88,14 +84,13 @@ SET(SRCS_server # generate scm_[d|f]ts.h, scm_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(SV AAR svcScmServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(SV AAR svcScmServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcScmServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcScmServer PRIVATE RTI::nddscpp2 @@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcScmServer svcScmCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcScmServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.cpp index e45046011..51d0499ed 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.cpp @@ -12,17 +12,18 @@ #include #include -#include +#include #include #include #include -#include -#include +#include +#include -DataTopicTests::DataTopicTests() : m_domainParticipantPub(nullptr) +DataTopicTests::DataTopicTests() + : m_domainParticipantPub(nullptr) , m_domainParticipantSub(nullptr) , m_domainId(0) , m_ddsPublisher(nullptr) @@ -34,8 +35,8 @@ DataTopicTests::DataTopicTests() : m_domainParticipantPub(nullptr) , m_dtcServiceInformation(nullptr) , m_dtcGroupInformation(nullptr) , m_mainThreadId(QThread::currentThreadId()) - .getNGLLogger("UnitTests.DataTopicTests")), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("UnitTests.DataTopicTests")) +{ if (!DDS::QosProfile::setDefault()) ERROR_LOG(m_logger) << "Error setting default QoS from xml-file "; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.h index 3be6383b9..53ac3f308 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include // For Topic Exercise #include @@ -16,7 +16,7 @@ #include #include -#include +#include #include @@ -44,7 +44,6 @@ public: ServiceManagement::GroupInformation getReceivedGroupInformationData() const; protected: - NGL::INGLLogger &m_logger; // Subscriber Methods void processData(const ServiceManagement::ServiceInformation& instance, DataModification modType); void processData(const ServiceManagement::GroupInformation& instance, DataModification modType); @@ -74,6 +73,8 @@ private: // For returning TestData ServiceManagement::ServiceInformation m_receivedServiceInformationData; ServiceManagement::GroupInformation m_receivedGroupInformationData; + + NGL::INGLLogger& m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.cpp index fc6bfce80..c037585b0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.cpp @@ -10,7 +10,7 @@ #include "data_topic_tests_main.h" #include "data_topic_tests.h" -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.h index 8cc220555..78f6b9ebf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/UnitTests/data_topic_tests_main.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include #include @@ -35,11 +35,11 @@ private Q_SLOTS: protected: - NGL::INGLLogger &m_logger; private: ServiceManagement::ServiceInformation m_sentServiceInformationData; ServiceManagement::GroupInformation m_sentGroupInformationData; QSignalSpy *m_serviceInformationDataArrivedSpy = nullptr; QSignalSpy *m_groupInformationDataArrivedSpy = nullptr; DataTopicTests *m_dtTest = nullptr; + NGL::INGLLogger &m_logger; }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/Messages/reply_message.h index 36c908110..e3e2f396b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/Messages/reply_message.h @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/data_manager.cpp index 072f79c15..56b4314b6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/data_manager.cpp @@ -11,10 +11,10 @@ #include "main_handler.h" -#include -#include -#include -#include +#include +#include +#include +#include namespace ServiceManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/websocket_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/websocket_interface_handler.cpp index 7b9c4b1ad..81865feaa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/websocket_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/WebSocketInterface/websocket_interface_handler.cpp @@ -24,6 +24,7 @@ WebSocketInterfaceHandler::WebSocketInterfaceHandler(MainHandler *mainHandler, Q , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WebSocketInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.cpp index 925d4d345..ad43a73bd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.cpp @@ -15,6 +15,7 @@ namespace ServiceManagement DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Any)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.h index 018e92b42..d3c9051db 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/dds_handler.h @@ -29,10 +29,11 @@ public: std::shared_ptr fts() const; std::shared_ptr connector() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace ServiceManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group.cpp index 8a97623cf..157f9824f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group.cpp @@ -7,7 +7,6 @@ */ #include "group.h" -#include #include #include @@ -40,6 +39,7 @@ Group::Group(const std::shared_ptr &ddsHandler, , m_groupId(s_idCounter++) , m_groupData(groupData) , m_completeCoreTimeout(0) + , m_logger(getLogger("Group")) { INFO_LOG(m_logger) << "Group " << m_scheme->groupType @@ -52,7 +52,7 @@ Group::Group(const std::shared_ptr &ddsHandler, Group::~Group() { setRunningState(Core::RunningState::StoppedNormally); - for (ServiceProcess *serviceProc :std::as_const(m_serviceProcs)) + for (ServiceProcess *serviceProc :qAsConst(m_serviceProcs)) m_ddsHandler->dts()->removeServiceInformationByKey(serviceProc->serviceProcessId()); qDeleteAll(m_serviceProcs); // in Service they are removed via ServiceProcess::destroyed signal m_ddsHandler->dts()->removeGroupInformationByKey(m_groupId); @@ -60,7 +60,7 @@ Group::~Group() void Group::init() { - for (int serviceId : std::as_const(m_scheme->services)) + for (int serviceId : qAsConst(m_scheme->services)) { if (m_serviceProcs.contains(serviceId)) continue; @@ -92,11 +92,11 @@ bool Group::setRunningState(Core::RunningState newState) case Core::RunningState::Starting: // make sure all services are there init(); - for (ServiceProcess *serviceProc : std::as_const(m_serviceProcs)) + for (ServiceProcess *serviceProc : qAsConst(m_serviceProcs)) serviceProc->start(); return true; case Core::RunningState::StoppedNormally: - for (ServiceProcess *serviceProc : std::as_const(m_serviceProcs)) + for (ServiceProcess *serviceProc : qAsConst(m_serviceProcs)) serviceProc->terminate(); return true; default: @@ -118,7 +118,7 @@ void Group::startCore() init(); // ExerciseManagement must be started ... - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if (proc->serviceName() == QLatin1String("ExerciseManagement")) { @@ -160,7 +160,7 @@ void Group::start() // make sure all services are there init(); // get list of prio - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if ( !prioList.contains(proc->prio())) { @@ -176,7 +176,7 @@ void Group::start() // m_actPrio = getNextPrio(prioList); //} - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if ( m_actPrio == proc->prio()) { @@ -198,7 +198,7 @@ void Group::start() void Group::stop() { - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if (proc->state() != QProcess::NotRunning) proc->stopFromRequest(); @@ -209,7 +209,7 @@ void Group::restart() { // make sure all services are there init(); - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) proc->restart(); } @@ -269,7 +269,7 @@ void Group::onNewServiceInfo() m_elapsedTimer.start(); std::vector serviceIds; serviceIds.reserve(m_serviceProcs.size()); - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) serviceIds.push_back(proc->serviceProcessId()); GroupInformation info(m_groupId, @@ -297,7 +297,7 @@ void Group::onCompleteCoreTick() ServiceProcess *exmProc = nullptr; // get EXM proc - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if (proc->serviceName() == QLatin1String("ExerciseManagement")) { @@ -315,7 +315,7 @@ void Group::onCompleteCoreTick() if (exmProc->runningState() == Core::RunningState::Running) { // get list of prio - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if ( !prioList.contains(proc->prio())) { @@ -327,7 +327,7 @@ void Group::onCompleteCoreTick() } // start rest of group core - for (ServiceProcess *proc : std::as_const(m_serviceProcs)) + for (ServiceProcess *proc : qAsConst(m_serviceProcs)) { if (proc->state() != QProcess::Running && proc->prio() == m_actPrio) { @@ -352,7 +352,7 @@ void Group::onCompleteCoreTick() ServiceProcess *Group::procFromPid(Q_PID pid) { - for (ServiceProcess *proc :std::as_const(m_serviceProcs)) + for (ServiceProcess *proc :qAsConst(m_serviceProcs)) { if (proc->pid() == pid) return proc; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.cpp index 08097c23e..9e2f5a2d0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.cpp @@ -7,7 +7,6 @@ */ #include "group_handler.h" -#include #include "group.h" #include "heartbeat_listener.h" #include "service_donator.h" @@ -24,6 +23,7 @@ GroupHandler::GroupHandler(const std::shared_ptr &ddsHandler, , m_serviceDonator(donator) , m_ddsHandler(ddsHandler) , m_heartbeatListener(new HeartbeatListener(ddsHandler->connector(), donator)) + , m_logger(getLogger("GroupHandler")) { } @@ -65,7 +65,7 @@ QVector GroupHandler::groups() const GroupScheme *GroupHandler::groupSchemeFromType(Core::ServiceGroupType type) { - for (GroupScheme *scheme : std::as_const(m_groupSchemes)) + for (GroupScheme *scheme : qAsConst(m_groupSchemes)) { if (scheme->groupType == type) return scheme; @@ -240,7 +240,7 @@ Core::FunctionReplyObject GroupHandler::onStopAllForExercise(int domainId, int e int cntStopped = 0; int cntAlive = 0; - for (Group *group : std::as_const(m_groups)) + for (Group *group : qAsConst(m_groups)) { if (group->exercisePartitionId() == exercisePartitionId && group->domainId() == domainId) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.h index d53b8b254..309816820 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/group_handler.h @@ -8,9 +8,9 @@ #pragma once -#include -#include -#include +#include +#include +#include #include "logger.h" #include "dds_handler.h" diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/heartbeat_listener.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/heartbeat_listener.cpp index 8fa8c4ca7..ce5d56c4e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/heartbeat_listener.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/heartbeat_listener.cpp @@ -9,9 +9,11 @@ #include "heartbeat_listener.h" #include "service_donator.h" -ServiceManagement::HeartbeatListener::HeartbeatListener(const std::shared_ptr &connector, const std::shared_ptr &serviceDonator) : m_ddsConnector(connector) - , m_serviceDonator(serviceDonator), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +ServiceManagement::HeartbeatListener::HeartbeatListener(const std::shared_ptr &connector, const std::shared_ptr &serviceDonator) + : m_ddsConnector(connector) + , m_serviceDonator(serviceDonator) + , m_logger(getLogger("HeartbeatListener")) +{} ServiceManagement::HeartbeatListener::~HeartbeatListener() {} diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.cpp index 49b992984..391fde3cf 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.cpp @@ -7,9 +7,8 @@ */ #include "licence_handler.h" -#include #include "dds_handler.h" -#include +#include #include @@ -21,6 +20,7 @@ LicenceHandler::LicenceHandler(const std::shared_ptr &ddsHandler, co , Interface::Fts::FreeLicenceRequestHandler(ddsHandler->fts()) , m_ddsHandler(ddsHandler) , m_xmlFileName(licenceFile) + , m_logger(getLogger("LicenceHandler")) { INFO_LOG(m_logger) << "Start ServiceManagement LicenceHandler. Filename: " << m_xmlFileName; } // end of ctor() @@ -28,7 +28,7 @@ LicenceHandler::LicenceHandler(const std::shared_ptr &ddsHandler, co LicenceHandler::~LicenceHandler() { - for (const LtsLicence::Licence &info : std::as_const(m_licenceVec)) + for (const LtsLicence::Licence &info : qAsConst(m_licenceVec)) m_ddsHandler->dts()->removeLicenceInformationByKey(info.name.toStdString()); } // end of dtor() //----------------------------------------------------------------------------- @@ -302,7 +302,7 @@ QString LicenceHandler::dumpLicenceInformation(const LtsLicence::Licence &licenc void LicenceHandler::publishAllData() { - for (const LtsLicence::Licence &info : std::as_const(m_licenceVec)) + for (const LtsLicence::Licence &info : qAsConst(m_licenceVec)) publishData(info); } // end of publishAllData() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.h index d9d2e5b5a..5f44dab67 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/licence_handler.h @@ -10,9 +10,9 @@ #include "licence_donator.h" #include "dds_handler.h" #include "logger.h" -#include -#include -#include +#include +#include +#include #include @@ -45,8 +45,6 @@ public: bool freeLicence(const QString &licenceName) override; private: // Methoden - -NGL::INGLLogger &m_logger; bool readLicenceFile(); Core::FunctionReplyObject getLicenceInternal(const QString &licenceName); @@ -65,5 +63,7 @@ private: // attributes std::shared_ptr m_ddsHandler; QString m_xmlFileName; QVector m_licenceVec; + NGL::INGLLogger &m_logger; + }; // class LicenceHandler } // namespace ServiceManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/logger.h index ed913ec5f..bdfd11c7e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcscmcommon_export.h" +#include "scm_export.h" namespace ServiceManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/main_handler.cpp index 97ab01867..7d87abb70 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/main_handler.cpp @@ -24,13 +24,15 @@ namespace ServiceManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) , m_groupHandler(nullptr) , m_licenceHandler(nullptr) , m_serviceHandler(nullptr) - , m_websocketHandler(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_websocketHandler(nullptr) + , m_logger(getLogger("MainHandler")) +{ QtSingleCoreApplication *sa = qobject_cast(QCoreApplication::instance()); Q_ASSERT(sa); connect(sa, &QtSingleCoreApplication::messageReceived, diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service.cpp index 9b69e9331..f6ee046c3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service.cpp @@ -7,7 +7,6 @@ */ #include "service.h" -#include #include @@ -26,6 +25,7 @@ ServiceManagement::Service::Service(const QString &name, const QString &exe, con , m_id(idCounter ++) , m_licenceDonator(nullptr) , m_prio(prio) + , m_logger(getLogger("Service")) {} int ServiceManagement::Service::id() const @@ -83,7 +83,7 @@ ServiceManagement::ServiceProcess *ServiceManagement::Service::toServiceProcess( ServiceManagement::ServiceProcess *ServiceManagement::Service::procFromPid(qint64 pid) { - for (ServiceProcess *currentProc : std::as_const(m_procs)) + for (ServiceProcess *currentProc : qAsConst(m_procs)) { if (currentProc->usablePid() == pid) return currentProc; @@ -93,7 +93,7 @@ ServiceManagement::ServiceProcess *ServiceManagement::Service::procFromPid(qint6 ServiceManagement::ServiceProcess *ServiceManagement::Service::procFromServiceProcId(int32_t id) { - for (ServiceProcess *currentProc : std::as_const(m_procs)) + for (ServiceProcess *currentProc : qAsConst(m_procs)) { if (currentProc->serviceProcessId() == id) return currentProc; @@ -103,13 +103,13 @@ ServiceManagement::ServiceProcess *ServiceManagement::Service::procFromServicePr void ServiceManagement::Service::stopAllProcs() { - for (ServiceProcess *currentProc : std::as_const(m_procs)) + for (ServiceProcess *currentProc : qAsConst(m_procs)) currentProc->terminate(); } void ServiceManagement::Service::waitForStopped() { - for (ServiceProcess *currentProc : std::as_const(m_procs)) + for (ServiceProcess *currentProc : qAsConst(m_procs)) currentProc->waitForFinished(5000); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_donator.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_donator.h index c221a692f..58a6f24fd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_donator.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_donator.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.cpp index 7ce280c90..16e968a25 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.cpp @@ -7,17 +7,16 @@ */ #include "service_handler.h" -#include -#include -#include -#include +#include +#include +#include #include "service.h" #include "service_process.h" #include "dds_handler.h" #include "settings.h" -#include +#include ServiceManagement::ServiceHandler::ServiceHandler(const std::shared_ptr &ddsHandler, const std::shared_ptr &licenceDonator) @@ -26,6 +25,7 @@ ServiceManagement::ServiceHandler::ServiceHandler(const std::shared_ptrstopAllProcs(); - for (Service *service : std::as_const(m_services)) + for (Service *service : qAsConst(m_services)) service->waitForStopped(); INFO_LOG(m_logger) << "... all Services stopped :)"; @@ -147,9 +147,9 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr if (proc == nullptr) { bool found = false; - for (Service *currentService : std::as_const(m_services)) + for (Service *currentService : qAsConst(m_services)) { - for (ServiceProcess *currentProc : std::as_const(currentService->allProcs())) + for (ServiceProcess *currentProc : qAsConst(currentService->allProcs())) { if (currentProc->remotePid() == data.pid()) { @@ -182,7 +182,7 @@ void ServiceManagement::ServiceHandler::onNewServiceInfoFromDds(const Core::Curr ServiceManagement::Service *ServiceManagement::ServiceHandler::serviceFromId(int id) { - for (Service *service : std::as_const(m_services)) + for (Service *service : qAsConst(m_services)) { if (service->id() == id) return service; @@ -192,7 +192,7 @@ ServiceManagement::Service *ServiceManagement::ServiceHandler::serviceFromId(int ServiceManagement::ServiceProcess *ServiceManagement::ServiceHandler::serviceProcessFromPid(qint64 pid) { - for (Service *service : std::as_const(m_services)) + for (Service *service : qAsConst(m_services)) { ServiceProcess *result = service->procFromPid(pid); if (result) @@ -203,7 +203,7 @@ ServiceManagement::ServiceProcess *ServiceManagement::ServiceHandler::servicePro ServiceManagement::ServiceProcess *ServiceManagement::ServiceHandler::serviceProcessFromServiceProcId(int32_t id) { - for (Service *service : std::as_const(m_services)) + for (Service *service : qAsConst(m_services)) { ServiceProcess *result = service->procFromServiceProcId(id); if (result) @@ -218,9 +218,9 @@ void ServiceManagement::ServiceHandler::onHeartBeatObserverTimerTimeout() const qint64 minHeartbeatAge = tNow - HEARTBEAT_OBSERVER_INTERVAL; const qint64 minHeartbeatAgeStartup = tNow - HEARTBEAT_OBSERVER_INTERVAL * 6; - for (Service *currentService : std::as_const(m_services)) + for (Service *currentService : qAsConst(m_services)) { - for (ServiceProcess *currentProc : std::as_const(currentService->allProcs())) + for (ServiceProcess *currentProc : qAsConst(currentService->allProcs())) { // dev mode for this proc -> we're not repsonsible for if (currentProc->devMode()) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.h index 21eb0473c..2a26902c1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_handler.h @@ -8,8 +8,8 @@ #pragma once -#include -#include +#include +#include #include "logger.h" #include "service_donator.h" @@ -52,8 +52,6 @@ private Q_SLOTS: void onHeartBeatObserverTimerTimeout(); private: // methods - -NGL::INGLLogger &m_logger; Service *serviceFromId(int id); ServiceProcess *serviceProcessFromPid(qint64 pid); ServiceProcess *serviceProcessFromServiceProcId(int32_t id); @@ -66,5 +64,7 @@ private: // attributes int HEARTBEAT_OBSERVER_INTERVAL = 10000; QSet m_unknownPidsWarned; + + LOGGER_T m_logger; }; } // namespace ServiceManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp index d5cf497ba..e8826b2a2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/service_process.cpp @@ -17,7 +17,8 @@ int ServiceManagement::ServiceProcess::s_serviceProcessIdCounter = 0; -ServiceManagement::ServiceProcess::ServiceProcess(const GroupRequest &groupData, ServiceManagement::Service *parentService) : QProcess(parentService) +ServiceManagement::ServiceProcess::ServiceProcess(const GroupRequest &groupData, ServiceManagement::Service *parentService) + : QProcess(parentService) , m_serviceId(parentService->id()) , m_serviceProcessId(s_serviceProcessIdCounter++) , m_abbreviation(parentService->abbreviation()) @@ -32,8 +33,9 @@ ServiceManagement::ServiceProcess::ServiceProcess(const GroupRequest &groupData, , m_isInDevMode(parentService->devMode()) , m_failedStartAttemptCounter(0) , m_stoppedFromRequest(false) - , m_pidProc(new QProcess(this)), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_pidProc(new QProcess(this)) + , m_logger(getLogger("ServiceProcess")) +{ QStringList args({QStringLiteral("-e"), QString::number(m_groupData.exercisePartitionId()), QStringLiteral("-d"), QString::number(m_groupData.domainId())}); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/settings.h index eb2e9d045..4f3930d7c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceMonitor/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceMonitor/CMakeLists.txt index 5d5f2cdc2..09d0e75fc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceMonitor/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/ServiceMonitor/CMakeLists.txt @@ -12,7 +12,7 @@ SET(SRCS_common smo_dummy.cpp) # Generate aes_dt[s,c]_types.h, aes_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcSmoDummy SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcSmoDummy SHARED ${SRCS_common}) NGL_TARGET_LINK_LIBRARIES(svcSmoDummy PRIVATE Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationMap/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationMap/CMakeLists.txt index 90ab66512..93290e1da 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationMap/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationMap/CMakeLists.txt @@ -12,7 +12,7 @@ SET(SRCS_common map_dummy.cpp) # Generate aes_dt[s,c]_types.h, aes_ft[s,c]_types.h CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(WS AAR SV svcMapDummy SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(WS AAR SV svcMapDummy SHARED ${SRCS_common}) NGL_TARGET_LINK_LIBRARIES(svcMapDummy PRIVATE Qt6::Core diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/CMakeLists.txt index 6a353faf1..e4aa1da81 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/CMakeLists.txt @@ -33,13 +33,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) # SV needed for topic type plugin -NGL_ADD_LIBRARY2(WS AAR SV svcSrpCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(WS AAR SV svcSrpCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSrpCommon PRIVATE RTI::nddscpp2 @@ -49,7 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSrpCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSrpCommon) # @@ -61,14 +59,13 @@ SET(SRCS_client # generate srp_ftc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(WS svcSrpClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(WS svcSrpClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSrpClient PRIVATE RTI::nddscpp2 @@ -77,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSrpClient svcSrpCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSrpClient) # @@ -89,14 +85,13 @@ SET(SRCS_server # generate srp_[d|f]ts.h, srp_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcSrpServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV WS svcSrpServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSrpServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSrpServer PRIVATE RTI::nddscpp2 @@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSrpServer svcSrpCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSrpServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.cpp index e7504ed22..aaee2fc33 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.cpp @@ -12,18 +12,20 @@ #include #include -#include +#include #include //--------------------------------------------------------------------------------- namespace SituationReplay { -SrpDtTests::SrpDtTests(QObject *parent) : QObject(parent) +SrpDtTests::SrpDtTests(QObject *parent) + : QObject(parent) , m_replayPartitionId(0) , m_situationReplayId(0) - , m_bTestsSuccessful(true), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_bTestsSuccessful(true) + , m_logger(getLogger("DtTest")) +{ qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.h index c870c73b6..9754a88e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_dt_tests.h @@ -30,7 +30,7 @@ #include #include -//#include +//#include namespace SituationReplay { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.cpp index ac88444c7..79ede83b0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.cpp @@ -12,7 +12,7 @@ #include #include -#include +#include #include @@ -25,6 +25,7 @@ SrpFtTests::SrpFtTests(QObject *parent) , m_replayPartitionId(0) , m_testId(All) , m_bTestsSuccessful(true) + , m_logger(getLogger("FtTest")) { qRegisterMetaType("Core::FunctionReply"); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.h index 74df6a25d..85ac55000 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/ModuleTests/srp_ft_tests.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include namespace SituationReplay diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.cpp index 7dcc47530..a2edbee4a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.cpp @@ -22,6 +22,7 @@ DbReader::DbReader(const std::shared_ptr &ddsConnect , m_query(nullptr) , m_ddsConnector(ddsConnector) , m_bCanHandleSchemas(bCanHandleSchemas) + , m_logger(getLogger("DbReader")) {} DbReader::~DbReader() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.h index 0a7519c19..f931da3f1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/db_reader.h @@ -35,15 +35,15 @@ public: void waitForAsyncOperations(qint64 desiredTime); void clearData(); private: - NGL::INGLLogger &m_logger; bool loadPlugin(const LtsPluginManager::PluginInstance &pi); private: - NGL::INGLLogger &m_logger; int m_exerciseId; NSqlQuery *m_query; std::shared_ptr m_ddsConnector; bool m_bCanHandleSchemas; std::vector m_plugins; + + LOGGER_T m_logger; }; } // namespace RecordingManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.cpp index 41ae2b811..1a8c11e47 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.cpp @@ -10,7 +10,7 @@ #include #include -#include +#include namespace SituationReplay { @@ -34,6 +34,7 @@ static std::shared_ptr makeConnector(const Connectio DdsHandler::DdsHandler(const ConnectionParams &output) : m_ddsConnectorReplay(makeConnector(output, IDL::PartitionType::Replay, DDS::QosProfile::ConnectionType::ShmUdpLocalhost)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler Replay(" << output.partitionId << ") for partition: " << m_ddsConnectorReplay->getDefaultPartition(); } @@ -41,6 +42,7 @@ DdsHandler::DdsHandler(const ConnectionParams &output) DdsHandler::DdsHandler(const ConnectionParams &input, const ConnectionParams &output) : m_ddsConnectorExercise(makeConnector(input, IDL::PartitionType::Exercise, DDS::QosProfile::ConnectionType::Client)) , m_ddsConnectorReplay(makeConnector(output, IDL::PartitionType::Replay, DDS::QosProfile::ConnectionType::Shm)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler Exercise(" << input.partitionId << ") for partition: " << m_ddsConnectorExercise->getDefaultPartition(); DEBUG_LOG(m_logger) << "DdsHandler Replay(" << output.partitionId << ") for partition: " << m_ddsConnectorReplay->getDefaultPartition(); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.h index e3d4f0104..23aa50b50 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/dds_handler.h @@ -46,16 +46,16 @@ public: static bool parseOptions(const QString &opts, ConnectionParams ¶ms); private: - NGL::INGLLogger &m_logger; void initReplayRouting(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnectorExercise; std::shared_ptr m_ddsConnectorReplay; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; std::unique_ptr m_dtsPartitionTime; std::unique_ptr m_sessionRouting; + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.cpp index fad00536e..d7e9c578c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.cpp @@ -13,7 +13,7 @@ #include #include -#include +#include #include namespace SituationReplay @@ -29,6 +29,7 @@ HandlerSituationReplay::HandlerSituationReplay(const std::shared_ptr , m_dbReader(dbReader) , m_exerciseId(0) , m_partitionId(0) + , m_logger(getLogger("HandlerSituationReplay")) {} HandlerSituationReplay::~HandlerSituationReplay() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.h index fa9ff45d6..4f947e63d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay.h @@ -8,7 +8,7 @@ */ #pragma once -#include +#include #include #include @@ -37,7 +37,6 @@ public: bool init(int exerciseId, int partitionId); private: - NGL::INGLLogger &m_logger; bool createObject(const Database::SrpSituationReplay &newData); Core::FunctionReplyObject startReplayRequest(const ChangeReplayStateRequest &request); Core::FunctionReplyObject stopReplayRequest(const ChangeReplayStateRequest &request); @@ -47,7 +46,6 @@ private: const ChangeReplayStateRequest &request) override; private: - NGL::INGLLogger &m_logger; ObjectSituationReplay *m_objSrp; // only one (!) replay per partition possible const std::shared_ptr m_ddsHandler; const std::shared_ptr m_db; @@ -55,5 +53,8 @@ private: int m_exerciseId; int m_partitionId; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.cpp index de87d572a..eaa74b378 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.cpp @@ -23,6 +23,7 @@ HandlerSituationReplaySqlite::HandlerSituationReplaySqlite(const std::shared_ptr , m_partitionId(0) , m_beginTime(0) , m_endTime(0) + , m_logger(getLogger("HandlerSituationReplaySqlite")) {} HandlerSituationReplaySqlite::~HandlerSituationReplaySqlite() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.h index c1e191714..50bc69676 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/handler_situation_replay_sqlite.h @@ -8,10 +8,10 @@ */ #pragma once -#include "situationreplaysqlite_export.h" +#include #include -#include +#include #include #include "logger.h" @@ -52,10 +52,8 @@ public: bool onChangeReplayStateRequest(const SrpState &newState, double newPace); bool onPaceChangeRequest(double newPace); private: - NGL::INGLLogger &m_logger; bool createObject(const Database::SrpSituationReplay &newData); private: - NGL::INGLLogger &m_logger; ObjectSituationReplay *m_objSrp; // only one (!) replay per partition possible const std::shared_ptr m_ddsHandler; const std::shared_ptr m_dbReader; @@ -64,5 +62,8 @@ private: int m_partitionId; qint64 m_beginTime; qint64 m_endTime; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/logger.h index e1269b7fc..c32bf5db8 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/logger.h @@ -10,7 +10,7 @@ #pragma once #include -#include "svcsrpcommon_export.h" +#include "srp_export.h" namespace SituationReplay { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.cpp index 1e2ad5d46..6e43b9b0c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.cpp @@ -21,6 +21,7 @@ MainHandler::MainHandler() : m_handlerSrp(nullptr) , m_ddsInterface(nullptr) , m_dbHandler(nullptr) + , m_logger(getLogger("MainHandler")) {} MainHandler::~MainHandler() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.h index 1f6609ddd..665548ec6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler.h @@ -34,14 +34,14 @@ public: const ConnectionParams &output); private: - NGL::INGLLogger &m_logger; bool initSrpHandler(int partitionIdIn, int partitionIdOut); private: - NGL::INGLLogger &m_logger; std::unique_ptr m_handlerSrp; std::shared_ptr m_ddsInterface; std::shared_ptr m_dbHandler; std::shared_ptr m_dbReader; + NGL::INGLLogger &m_logger; + }; } // namespace SituationReplay diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler_sqlite.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler_sqlite.cpp index 2f1d81b02..27c10686a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler_sqlite.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/main_handler_sqlite.cpp @@ -7,7 +7,6 @@ */ #include "main_handler_sqlite.h" -#include #include "db_reader.h" #include "static_publisher.h" @@ -16,12 +15,12 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include -#include -#include +#include +#include namespace SituationReplay { @@ -32,6 +31,7 @@ MainHandlerSqlite::MainHandlerSqlite() , m_staticPublisher(nullptr) , m_ddsInterface(nullptr) , m_dbHandler(nullptr) + , m_logger(getLogger("MainHandlerSqlite")) {} MainHandlerSqlite::~MainHandlerSqlite() @@ -254,7 +254,7 @@ void MainHandlerSqlite::maybeAddNewOverlay(qint64 curTime) void MainHandlerSqlite::removeOutdatedOverlays(qint64 curTime) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " curTime = "<< curTime + DEBUG_LOG(m_logger) << LOGFUNCTION << " curTime = "<< curTime << " m_currentVisibleOverlays.size()= "<< m_currentVisibleOverlays.size(); const qint64 curTimeRelative = curTime - m_replay.timeSpan.begin + m_replay.relativeTimeSpan.begin; // + m_replay.relativeTimeSpan.begin @@ -262,7 +262,7 @@ void MainHandlerSqlite::removeOutdatedOverlays(qint64 curTime) { const qint64 endTime = m_currentVisibleOverlays.at(i).relativeTimeSpan.end; - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " curTimeRelative = " << curTimeRelative << " endTime = " << endTime; + DEBUG_LOG(m_logger) << LOGFUNCTION << " curTimeRelative = " << curTimeRelative << " endTime = " << endTime; if (curTimeRelative > endTime) { @@ -277,16 +277,16 @@ void MainHandlerSqlite::replayTimeMaybeJumpedOverlays(qint64 curTime) // not really optimal QSet oldOverlayIds; oldOverlayIds.reserve(m_currentVisibleOverlays.size()); - for (const FilterInformation &overlay : std::as_const(m_currentVisibleOverlays)) + for (const FilterInformation &overlay : qAsConst(m_currentVisibleOverlays)) oldOverlayIds += overlay.overlayId; m_curOverlayArrayIdx = -1; m_currentVisibleOverlays.clear(); maybeAddNewOverlay(curTime); - for (const FilterInformation &overlay : std::as_const(m_currentVisibleOverlays)) + for (const FilterInformation &overlay : qAsConst(m_currentVisibleOverlays)) oldOverlayIds -= overlay.overlayId; - for (const int overlayId : std::as_const(oldOverlayIds)) + for (const int overlayId : qAsConst(oldOverlayIds)) emit removeOverlay(overlayId); } @@ -308,7 +308,7 @@ int MainHandlerSqlite::findNextIndex(qint64 curTime, int curIdx, const QVector -#include "situationreplaysqlite_export.h" +#include namespace DDSConnector { @@ -103,7 +103,6 @@ Q_SIGNALS: void removeOverlay(int overlayId); void fileContentAvailable(const FileManagement::Database::FlmFileContent &data); private: - NGL::INGLLogger &m_logger; bool initSrpHandler(int partitionIdIn, int partitionIdOut, qint64 beginTime, qint64 endTime); bool initStaticPublisher(); bool loadReplayConfig(const QString &replayConfigPath); @@ -118,7 +117,6 @@ private Q_SLOTS: void onReplayTimeMaybeJumped(qint64 curTime); private: - NGL::INGLLogger &m_logger; QVector m_filter; QVector m_overlays; QVector m_currentVisibleOverlays; @@ -131,5 +129,7 @@ private: std::shared_ptr m_dbHandler; std::shared_ptr m_dbReader; QSqlDatabase m_dbSqlite; + NGL::INGLLogger &m_logger; + }; } // namespace SituationReplay diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.cpp index 944a5c440..f19f813e3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.cpp @@ -11,8 +11,8 @@ #include "db_reader.h" #include "logger.h" -#include -#include +#include +#include #include namespace SituationReplay @@ -20,13 +20,15 @@ namespace SituationReplay ObjectSituationReplay::ObjectSituationReplay(const std::shared_ptr &ddsHandler, const std::shared_ptr &db, const std::shared_ptr &dbReader, - int exerciseId) : m_ddsInterface(ddsHandler) + int exerciseId) + : m_ddsInterface(ddsHandler) , m_db(db) , m_dbReader(dbReader) , m_exerciseId(exerciseId) , m_replayTimer(new QTimer(this)) - , m_currentReplayTime(0), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { + , m_currentReplayTime(0) + , m_logger(getLogger("ObjectSituationReplay")) +{ connect(m_replayTimer, &QTimer::timeout, this, &ObjectSituationReplay::onReplayTimerTimeout); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.h index 445c5cb02..4e1ca8c42 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/object_situation_replay.h @@ -7,11 +7,11 @@ */ #pragma once -#include -#include +#include +#include #include "dds_handler.h" #include "db_reader.h" -#include +#include // Generated #include @@ -63,7 +63,6 @@ protected Q_SLOTS: void onReplayTimerTimeout(); private: - NGL::INGLLogger &m_logger; bool checkPublishData(); Q_SIGNALS: @@ -75,7 +74,6 @@ Q_SIGNALS: void stopped(); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsInterface; std::shared_ptr m_db; std::shared_ptr m_dbReader; @@ -83,5 +81,8 @@ private: int m_exerciseId; QTimer *m_replayTimer; qint64 m_currentReplayTime; + + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/settings.h index e176eb926..04683748b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/settings.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.cpp index f1705a141..a2d0bc109 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.cpp @@ -7,10 +7,9 @@ */ #include "static_publisher.h" -#include -#include -#include -#include +#include +#include +#include #include @@ -158,7 +157,7 @@ void StaticPublisher::publishMainStructureElement(const std::shared_ptr seId2mseId; - for (const auto &mse : std::as_const(mainStructureElements)) + for (const auto &mse : qAsConst(mainStructureElements)) { auto mseDds = InfrastructureManagement::Database::convert(mse); auto itContSe = structureElements.constFind(mse.id); @@ -189,7 +188,7 @@ void StaticPublisher::publishMainStructureElement(const std::shared_ptr &cont : std::as_const(footprintSorted)) + for (const QMap &cont : qAsConst(footprintSorted)) { if (cont.empty()) continue; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.h index 5467f1751..1013a5417 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplay/static_publisher.h @@ -8,8 +8,8 @@ #pragma once #include "dds_handler.h" -#include -#include +#include +#include #include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/CMakeLists.txt index c50c6675d..381d32b03 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/CMakeLists.txt @@ -30,13 +30,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # generate srm_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcSrmCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcSrmCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSrmCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSrmCommon PRIVATE RTI::nddscpp2 @@ -45,5 +44,4 @@ NGL_TARGET_LINK_LIBRARIES(svcSrmCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSrmCommon) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/logger.h index d4545f921..42eb07d0c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SituationReplayManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcsrmcommon_export.h" +#include "srm_export.h" namespace SituationReplayManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/CMakeLists.txt index 7b6fc013f..ba1e74298 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate som_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcSomCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcSomCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSomCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSomCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSomCommon ngldb NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSomCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate som_[d|f]tc.h, som_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcSomClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcSomClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSomClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSomClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSomClient svcSomCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSomClient) # @@ -89,14 +85,13 @@ SET(SRCS_server # generate som_[d|f]ts.h, som_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcSomServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcSomServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcSomServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcSomServer PRIVATE RTI::nddscpp2 @@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcSomServer PUBLIC svcSomCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcSomServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.cpp index 0ca5b6414..4afef2f67 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.cpp @@ -16,6 +16,7 @@ namespace SoundManagement DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.h index 10205fdec..2e897eb45 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/dds_handler.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include #include @@ -49,7 +49,6 @@ public: qint64 currentPartitionTime() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_pacemaker; @@ -60,6 +59,8 @@ private: std::shared_ptr m_dtsSom; ///< Pointer to DTS SoundManagement interface object std::shared_ptr m_dtcSom; ///< Pointer to DTC SoundManagement interface object std::shared_ptr m_ftsSom; ///< Pointer to FTS SoundManagement interface object + + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.cpp index aef1b4b67..d190df10c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.cpp @@ -7,15 +7,14 @@ */ #include "handler_sounds.h" -#include #include "settings.h" #include "dds_handler.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include namespace SoundManagement @@ -31,6 +30,7 @@ HandlerSounds::HandlerSounds(const std::shared_ptr &ddsHandler, , ControlSoundRequestHandler(ddsHandler->ftsSom()) , m_ddsHandler(ddsHandler) , m_dbHandler(dbHandler) + , m_logger(getLogger("HandlerSounds")) { } // end of ctor() @@ -63,7 +63,7 @@ bool HandlerSounds::init() return false; } - for (const Database::SomSound &data : std::as_const(soundVec)) + for (const Database::SomSound &data : qAsConst(soundVec)) { static int index = 0; DEBUG_LOG(m_logger) << "SomSound from DB data: id=" << data.id @@ -632,7 +632,7 @@ int HandlerSounds::getAssetId(const QString &hostName) int HandlerSounds::getSoundIndex(const SoundCategory &category, const QString &name) { - for (const SoundStr &soundName: std::as_const(m_soundNames)) + for (const SoundStr &soundName: qAsConst(m_soundNames)) if ((category == soundName.category) && (name == soundName.name)) return soundName.index; return -1; @@ -640,7 +640,7 @@ int HandlerSounds::getSoundIndex(const SoundCategory &category, const QString &n int HandlerSounds::getDuration(const SoundManagement::SoundCategory& category,const int soundId) { - for (const SoundStr &soundName: std::as_const(m_soundNames)) + for (const SoundStr &soundName: qAsConst(m_soundNames)) { if ( soundId == soundName.soundId && category == soundName.category) @@ -682,7 +682,7 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host) // TODO Pruefen, ob in der lokalen Verwaltung noch Sounds sind, die geloescht und vom DDS-Bus genommen // werden muessen. - for (const QJsonValue &valSound : std::as_const(sounds)) + for (const QJsonValue &valSound : qAsConst(sounds)) { const QJsonObject &sound = valSound.toObject(); bool found = false; @@ -705,7 +705,7 @@ void HandlerSounds::handleSoundReport(const QString &json, const QString &host) << " soundId=" << soundId << " time=" << soundState.sampleTime(); - for (const SoundManagement::SoundState& item : std::as_const(m_soundStates)) + for (const SoundManagement::SoundState& item : qAsConst(m_soundStates)) { if ( (item.egcuId() == soundState.egcuId()) && (item.category() == soundState.category()) && diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.h index e02bf0cbc..28ecd0a64 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/handler_sounds.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" #include @@ -20,8 +20,8 @@ #include // HTTP Request -#include -#include +#include +#include #include @@ -72,8 +72,6 @@ private Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; QString httpFinishedBlocking(QNetworkReply *reply); void onGetActiveSoundsRequest(const rti::core::SampleIdentity &cookie, @@ -134,5 +132,6 @@ private: // attributes QVector m_soundStates{QVector()}; int m_topicId{0}; QHash m_mountingPointAsset; // Key= structureElementId, value= assetId + NGL::INGLLogger &m_logger; }; } // namespace SoundManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/logger.h index 645a2bef4..ca15ad38a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcsomcommon_export.h" +#include "som_export.h" namespace SoundManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.cpp index 2a3117f9f..ee5ce3eea 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.cpp @@ -14,15 +14,17 @@ #include "som_db.h" #include "settings.h" -#include +#include namespace SoundManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) - , m_dbHandler(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_dbHandler(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.h index 5a4308046..b6a61081b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "handler_sounds.h" @@ -39,10 +39,12 @@ public: private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_handlerSounds; + + + NGL::INGLLogger &m_logger; }; } // namespace SoundManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/settings.h index 7aae2c7e6..e8b7a7f01 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/SoundManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/CMakeLists.txt index e170c1f8e..68acf03d2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate tgt_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcTgtCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcTgtCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcTgtCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcTgtCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcTgtCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcTgtCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate tgt_[d|f]tc.h, tgt_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcTgtClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcTgtClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcTgtClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcTgtClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcTgtClient svcTgtCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcTgtClient) # @@ -89,14 +85,13 @@ SET(SRCS_server # generate tgt_[d|f]ts.h, tgt_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcTgtServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcTgtServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcTgtServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcTgtServer PRIVATE RTI::nddscpp2 @@ -106,7 +101,6 @@ NGL_TARGET_LINK_LIBRARIES(svcTgtServer PUBLIC svcTgtCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcTgtServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.cpp index 453cb9716..96ad9890d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.cpp @@ -9,10 +9,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include /* ---------------------------------------------------------------------------------- * Ablauf: * ---------------------------------------------------------------------------------- @@ -54,6 +54,7 @@ namespace TargetManagement { TgtTests::TgtTests(QObject *parent) : QObject(parent) + , m_logger(getLogger("TgtTests")) {} // ------------------------------------------------------------------ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.h index 30c49f849..284c10f42 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/ModuleTests/tgt_tests.h @@ -53,7 +53,6 @@ protected Q_SLOTS: void ExitSuccess(); protected: - NGL::INGLLogger &m_logger; void onConfigureTargetReply(const Core::FunctionReplyObject &replyObject) override final; void onShootbackAreaModifyReply(const Core::FunctionReplyObject &replyObject) override final; void onShootbackAreaRemoveReply(const Core::FunctionReplyObject &replyObject) override final; @@ -72,6 +71,8 @@ private: int m_operatorId{-1}; int m_participantIndex{0}; int m_shootbackAreaId{-1}; + + NGL::INGLLogger &m_logger; }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.cpp index a8631a523..858486553 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.cpp @@ -7,13 +7,12 @@ */ #include "unit_test.h" -#include #include #include #include -#include +#include #include #include @@ -21,8 +20,8 @@ #include -#include -#include +#include +#include #include @@ -100,7 +99,7 @@ tgtTestShootbackTarget::~tgtTestShootbackTarget() void tgtTestShootbackTarget::initTestCase() { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " do testing with" + NOTICE_LOG(m_logger) << LOGFUNCTION << " do testing with" << " domainId=" << m_domainId << " exerciseId=" << m_exerciseId; @@ -128,7 +127,7 @@ void tgtTestShootbackTarget::initTestCase() removeTestObjects(); if (!bRet) - FATAL_LOG(m_logger) << Q_FUNC_INFO << " init failed!!!"; + FATAL_LOG(m_logger) << LOGFUNCTION << " init failed!!!"; } @@ -155,7 +154,7 @@ void tgtTestShootbackTarget::testShootbackArea() // time to process reply QTest::qWait(100); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId; // modify @@ -169,7 +168,7 @@ void tgtTestShootbackTarget::testShootbackArea() // verify mod { TargetManagement::ShootbackArea modData = m_dtcTgt->shootbackArea(m_replyShootbackAreaId); - INFO_LOG(m_logger) << Q_FUNC_INFO << "modData=" << modData; + INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData; QVERIFY2((modData.id() == m_replyShootbackAreaId), " shootbackArea failed"); QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed"); } @@ -207,7 +206,7 @@ void tgtTestShootbackTarget::testShootbackTarget() // time to process reply QTest::qWait(100); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId; // modify @@ -220,13 +219,13 @@ void tgtTestShootbackTarget::testShootbackTarget() QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::shootbackTargetChanged); if (spy.count() == 0) spy.wait(2000); - INFO_LOG(m_logger) << Q_FUNC_INFO << "spy.count()=" << spy.count(); + INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count(); QVERIFY2((spy.count() == 1), " spy failed"); // verify mod { TargetManagement::ShootbackTarget modData = m_dtcTgt->shootbackTarget(m_replyShootbackTargetId); - INFO_LOG(m_logger) << Q_FUNC_INFO << "modData=" << modData; + INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData; QVERIFY2((modData.id() == m_replyShootbackTargetId), " shootbackTarget failed"); QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed"); } @@ -268,7 +267,7 @@ void tgtTestShootbackTarget::testTargetAreaAssignment() QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::targetAreaAssignmentChanged); if (spy.count() == 0) spy.wait(2000); - INFO_LOG(m_logger) << Q_FUNC_INFO << "spy.count()=" << spy.count(); + INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count(); QVERIFY2((spy.count() == 1), " spy failed"); // time to process reply @@ -288,13 +287,13 @@ void tgtTestShootbackTarget::testTargetAreaAssignment() QSignalSpy spy(m_dtcTgt.get(), &TargetManagement::Interface::Dtc::targetAreaAssignmentChanged); if (spy.count() == 0) spy.wait(2000); - INFO_LOG(m_logger) << Q_FUNC_INFO << "spy.count()=" << spy.count(); + INFO_LOG(m_logger) << LOGFUNCTION << "spy.count()=" << spy.count(); QVERIFY2((spy.count() == 1), " spy failed"); // verify mod { TargetManagement::TargetAreaAssignment modData = m_dtcTgt->targetAreaAssignment(m_replyTargetAreaAssignmentId); - INFO_LOG(m_logger) << Q_FUNC_INFO << "modData=" << modData; + INFO_LOG(m_logger) << LOGFUNCTION << "modData=" << modData; QVERIFY2((modData.id() == m_replyTargetAreaAssignmentId), " targetAreaAssignment failed"); QVERIFY2((modData.name().compare(request.name()) == 0), " verify name failed"); } @@ -321,38 +320,38 @@ void tgtTestShootbackTarget::removeTestObjects() // first, remove all TargetAreaAssignments: { QMap allObj = m_dtcTgt->targetAreaAssignments(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " TargetAreaAssignments)"; - for (auto item: std::as_const(allObj)) + NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " TargetAreaAssignments)"; + for (auto item: qAsConst(allObj)) if (item.name().substr(0, 8).compare("UnitTest") == 0) removeAssignment(item.id()); QTest::qWait(250); // time to process reply allObj = m_dtcTgt->targetAreaAssignments(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove targetAreaAssignments finished -> " << allObj.size() << " TargetAreaAssignments"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " remove targetAreaAssignments finished -> " << allObj.size() << " TargetAreaAssignments"; } // remove all Areas: { QMap allObj = m_dtcTgt->shootbackAreas(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " Areas)"; - for (auto item: std::as_const(allObj)) + NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Areas)"; + for (auto item: qAsConst(allObj)) if (item.name().substr(0, 8).compare("UnitTest") == 0) removeArea(item.id()); QTest::qWait(250); // time to process reply allObj = m_dtcTgt->shootbackAreas(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove shootbackAreas finished -> " << allObj.size() << " Areas"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " remove shootbackAreas finished -> " << allObj.size() << " Areas"; } // remove all Targets: { QMap allObj = m_dtcTgt->shootbackTargets(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove... (" << allObj.size() << " Targets)"; - for (auto item: std::as_const(allObj)) + NOTICE_LOG(m_logger) << LOGFUNCTION << " remove... (" << allObj.size() << " Targets)"; + for (auto item: qAsConst(allObj)) if (item.name().substr(0, 8).compare("UnitTest") == 0) removeTarget(item.id()); QTest::qWait(250); // time to process reply allObj = m_dtcTgt->shootbackTargets(); - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " remove shootbackTargets finished -> " << allObj.size() << " Targets"; + NOTICE_LOG(m_logger) << LOGFUNCTION << " remove shootbackTargets finished -> " << allObj.size() << " Targets"; } QTest::qWait(1000); // time to process } @@ -387,7 +386,7 @@ void tgtTestShootbackTarget::createArea(int &areaIdInOut, const QString &name, d // time to process reply QTest::qWait(100); - INFO_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId; + INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackAreaId: " << m_replyShootbackAreaId; areaIdInOut = m_replyShootbackAreaId; } @@ -447,7 +446,7 @@ void tgtTestShootbackTarget::createTarget(int &targetIdOut, int targetParticipan // time to process reply QTest::qWait(100); - INFO_LOG(m_logger) << Q_FUNC_INFO << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId; + INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyShootbackTargetId: " << m_replyShootbackTargetId; targetIdOut = m_replyShootbackTargetId; } @@ -515,7 +514,7 @@ void tgtTestShootbackTarget::createAssignment(int areaId, int targetParticipantI // time to process reply QTest::qWait(100); - INFO_LOG(m_logger) << Q_FUNC_INFO << " got m_replyTargetAreaAssignmentId: " << m_replyTargetAreaAssignmentId; + INFO_LOG(m_logger) << LOGFUNCTION << " got m_replyTargetAreaAssignmentId: " << m_replyTargetAreaAssignmentId; assignmentIdOut = m_replyTargetAreaAssignmentId; } @@ -564,7 +563,7 @@ void tgtTestShootbackTarget::moveParticipant(int participantId, double lon, doub if (!m_dtsPpm) return; - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move Participant: id = " << participantId; + NOTICE_LOG(m_logger) << LOGFUNCTION << " move Participant: id = " << participantId; ParticipantManagement::ParticipantPosition posReq; posReq.participantId(participantId); posReq.sampleTime(currentSampleTime()); @@ -572,7 +571,7 @@ void tgtTestShootbackTarget::moveParticipant(int participantId, double lon, doub posReq.partyId(2); // 0 and 1 will be skipped if (!m_dtsPpm->publish(posReq)) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error publish posReq"; + ERROR_LOG(m_logger) << LOGFUNCTION << " Error publish posReq"; return; } } @@ -727,7 +726,7 @@ void tgtTestShootbackTarget::testPlayerMovesLos() // move assigned target 1 slightly: { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move target1 ..."; + NOTICE_LOG(m_logger) << LOGFUNCTION << " move target1 ..."; modifyTarget(m_targetDataId1, g_targetParticipantId_1, QStringLiteral("UnitTest-TargetDataId1_Moved"), 0.149, 0.926, 55.0); QTest::qWait(250); // time to process @@ -736,7 +735,7 @@ void tgtTestShootbackTarget::testPlayerMovesLos() // move (z) assigned target 1 to interrupt line of sight: { - NOTICE_LOG(m_logger) << Q_FUNC_INFO << " move target1 ..."; + NOTICE_LOG(m_logger) << LOGFUNCTION << " move target1 ..."; modifyTarget(m_targetDataId1, g_targetParticipantId_1, QStringLiteral("UnitTest-TargetDataId1_Moved"), 0.152, 0.926, 2.0); QTest::qWait(250); // time to process diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.h index ce6926181..57d4d9b30 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/UnitTests/UnitTestShootback/unit_test.h @@ -18,7 +18,7 @@ #include -#include +#include #include #include @@ -70,8 +70,6 @@ private Q_SLOTS: void cleanupTestCase(); // one time at the end protected: - -NGL::INGLLogger &m_logger; void onShootbackAreaModifyReply(const Core::FunctionReplyObject &reply) override final; void onShootbackAreaRemoveReply(const Core::FunctionReplyObject &reply) override final; @@ -126,5 +124,8 @@ private: int m_replyShootbackAreaId = -1; int m_replyShootbackTargetId = -1; int m_replyTargetAreaAssignmentId = -1; + + NGL::INGLLogger &m_logger; + }; } // namespace diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.cpp index 9bc70d6f8..d721a8b8a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.cpp @@ -16,6 +16,7 @@ namespace TargetManagement DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.h index 7ac33ce9a..1522a4f47 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/dds_handler.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include #include #include @@ -18,7 +18,7 @@ #include #include #include -#include +#include #include #include @@ -65,7 +65,6 @@ private Q_SLOTS: void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType); private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtcCore; std::shared_ptr m_pacemaker; @@ -78,6 +77,8 @@ private: QMap m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number QMap m_equipNo2partIdMap; ///< Reference map equipment number (player) to participant + + NGL::INGLLogger &m_logger; }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.cpp index 77cc26d46..38434731f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.cpp @@ -19,22 +19,23 @@ HandlerShootbackArea::HandlerShootbackArea(MainHandler *mainHandler) , ShootbackAreaRemoveRequestHandler(mainHandler->dds()->ftsTgt()) , m_mainHandler(mainHandler) , m_dtsTgt(m_mainHandler->dds()->dtsTgt()) + , m_logger(getLogger("HandlerShootbackArea")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- HandlerShootbackArea::~HandlerShootbackArea() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- bool HandlerShootbackArea::init() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged, // this, &HandlerShootbackArea::onTargetDataChanged); @@ -90,7 +91,7 @@ void HandlerShootbackArea::onShootbackAreaModifyRequest(const rti::core::SampleI //-------------------------------------------------------------------------- Core::FunctionReplyObject HandlerShootbackArea::shootbackAreaModifyRequest(const ShootbackArea &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // modify if (request.id() > 0) { @@ -109,7 +110,7 @@ Core::FunctionReplyObject HandlerShootbackArea::shootbackAreaModifyRequest(const } else m_objectMap.insert(ifs->getId(), ifs); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return ret; } @@ -117,7 +118,7 @@ Core::FunctionReplyObject HandlerShootbackArea::shootbackAreaModifyRequest(const void HandlerShootbackArea::onShootbackAreaRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " request=" << request; + TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request; Core::FunctionReplyObject ret; ObjectShootbackArea *ifs = m_objectMap.value(request.id()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.h index f3b35597c..9a00d2a60 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_area.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -56,8 +56,6 @@ Q_SIGNALS: private Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; void onShootbackAreaModifyRequest(const rti::core::SampleIdentity &cookie, const ShootbackArea &request) override; Core::FunctionReplyObject shootbackAreaModifyRequest(const ShootbackArea &request); @@ -69,7 +67,7 @@ private: // attributes QHash m_objectMap; MainHandler *m_mainHandler; std::shared_ptr m_dtsTgt; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.cpp index 713c02255..e417f4c98 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.cpp @@ -7,7 +7,6 @@ */ #include "main_handler.h" -#include #include "handler_target_area_assignment.h" #include "handler_shootback_target.h" #include "object_shootback_target.h" @@ -20,22 +19,23 @@ HandlerShootbackTarget::HandlerShootbackTarget(MainHandler *mainHandler) , ShootbackTargetRemoveRequestHandler(mainHandler->dds()->ftsTgt()) , m_mainHandler(mainHandler) , m_dtsTgt(m_mainHandler->dds()->dtsTgt()) + , m_logger(getLogger("HandlerShootbackTarget")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- HandlerShootbackTarget::~HandlerShootbackTarget() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- bool HandlerShootbackTarget::init() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged, // this, &HandlerShootbackTarget::onTargetDataChanged); @@ -68,7 +68,7 @@ bool HandlerShootbackTarget::init() ObjectShootbackTarget *HandlerShootbackTarget::dataForTargetParticipantId(int targetParticipantId) const { - for (ObjectShootbackTarget *item : std::as_const(m_objectMap)) + for (ObjectShootbackTarget *item : qAsConst(m_objectMap)) { if (!item) continue; @@ -103,7 +103,7 @@ void HandlerShootbackTarget::onShootbackTargetModifyRequest(const rti::core::Sam //-------------------------------------------------------------------------- Core::FunctionReplyObject HandlerShootbackTarget::shootbackTargetModifyRequest(const ShootbackTarget &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // modify if (request.id() > 0) { @@ -127,7 +127,7 @@ Core::FunctionReplyObject HandlerShootbackTarget::shootbackTargetModifyRequest(c } else m_objectMap.insert(ifs->getId(), ifs); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return ret; } @@ -135,7 +135,7 @@ Core::FunctionReplyObject HandlerShootbackTarget::shootbackTargetModifyRequest(c void HandlerShootbackTarget::onShootbackTargetRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " request=" << request; + TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request; Core::FunctionReplyObject ret; ObjectShootbackTarget *ifs = m_objectMap.value(request.id()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.h index f34329aaf..01f698d45 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_shootback_target.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -54,8 +54,6 @@ Q_SIGNALS: private Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; void onShootbackTargetModifyRequest(const rti::core::SampleIdentity &cookie, const ShootbackTarget &request) override; Core::FunctionReplyObject shootbackTargetModifyRequest(const ShootbackTarget &request); @@ -67,7 +65,7 @@ private: // attributes QHash m_objectMap; MainHandler *m_mainHandler; std::shared_ptr m_dtsTgt; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.cpp index 31fdbb4fe..e1cd1e756 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.cpp @@ -7,7 +7,6 @@ */ #include "main_handler.h" -#include #include "handler_target_area_assignment.h" #include "object_target_area_assignment.h" @@ -19,22 +18,23 @@ HandlerTargetAreaAssignment::HandlerTargetAreaAssignment(MainHandler *mainHandle , TargetAreaAssignmentRemoveRequestHandler(mainHandler->dds()->ftsTgt()) , m_mainHandler(mainHandler) , m_dtsTgt(m_mainHandler->dds()->dtsTgt()) + , m_logger(getLogger("HandlerTargetAreaAssignment")) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- HandlerTargetAreaAssignment::~HandlerTargetAreaAssignment() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //-------------------------------------------------------------------------- bool HandlerTargetAreaAssignment::init() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // connect(m_dtcTab.get(), &TrainingAreaBase::Interface::Dtc::targetDataChanged, // this, &HandlerTargetAreaAssignment::onTargetDataChanged); @@ -67,7 +67,7 @@ bool HandlerTargetAreaAssignment::init() bool HandlerTargetAreaAssignment::isAreaIdUsedInAny(int areaId) { - for (const ObjectTargetAreaAssignment *sample : std::as_const(m_objectMap)) + for (const ObjectTargetAreaAssignment *sample : qAsConst(m_objectMap)) if (sample && (sample->getData().areaId() == areaId)) return true; return false; @@ -75,7 +75,7 @@ bool HandlerTargetAreaAssignment::isAreaIdUsedInAny(int areaId) bool HandlerTargetAreaAssignment::isTargetDataIdUsedInAny(int targetDataId) { - for (const ObjectTargetAreaAssignment *sample : std::as_const(m_objectMap)) + for (const ObjectTargetAreaAssignment *sample : qAsConst(m_objectMap)) if (sample && (sample->getData().targetParticipantId() == targetDataId)) return true; return false; @@ -97,7 +97,7 @@ void HandlerTargetAreaAssignment::onTargetAreaAssignmentModifyRequest(const rti: //-------------------------------------------------------------------------- Core::FunctionReplyObject HandlerTargetAreaAssignment::TargetAreaAssignmentModifyRequest(const TargetAreaAssignment &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // modify if (request.id() > 0) { @@ -116,7 +116,7 @@ Core::FunctionReplyObject HandlerTargetAreaAssignment::TargetAreaAssignmentModif } else m_objectMap.insert(ifs->getId(), ifs); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return ret; } @@ -124,7 +124,7 @@ Core::FunctionReplyObject HandlerTargetAreaAssignment::TargetAreaAssignmentModif void HandlerTargetAreaAssignment::onTargetAreaAssignmentRemoveRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " request=" << request; + TRACE_LOG(m_logger) << LOGFUNCTION << " request=" << request; Core::FunctionReplyObject ret; ObjectTargetAreaAssignment *ifs = m_objectMap.value(request.id()); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.h index 8848cf2dd..910d595b4 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_area_assignment.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -48,8 +48,6 @@ Q_SIGNALS: private Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; void onTargetAreaAssignmentModifyRequest(const rti::core::SampleIdentity &cookie, const TargetAreaAssignment &request) override; Core::FunctionReplyObject TargetAreaAssignmentModifyRequest(const TargetAreaAssignment &request); @@ -61,7 +59,7 @@ private: // attributes QHash m_objectMap; MainHandler *m_mainHandler; std::shared_ptr m_dtsTgt; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.cpp index 84130361a..cc6cd733f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.cpp @@ -8,7 +8,7 @@ #include "settings.h" #include "handler_target_config.h" -#include +#include using namespace TargetManagement; @@ -19,6 +19,7 @@ HandlerTargetConfig::HandlerTargetConfig(const std::shared_ptr &ddsH , m_ddsHandler(ddsHandler) , m_dtcTab(ddsHandler->dtcTab()) , m_dtsTgt(ddsHandler->dtsTgt()) + , m_logger(getLogger("HandlerTargetConfig")) { } // end of ctor() //----------------------------------------------------------------------------- diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.h index 7498e965f..005c1e395 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/handler_target_config.h @@ -8,7 +8,7 @@ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -55,8 +55,6 @@ private Q_SLOTS: void onTargetDataChanged(const TrainingAreaBase::TargetData &targetData, DataModification modType); private: // methoden - -NGL::INGLLogger &m_logger; void onConfigureTargetRequest(const rti::core::SampleIdentity &cookie, const ConfigureTargetRequest &request) override; Core::FunctionReplyObject configureTargetRequest(const ConfigureTargetRequest &request); @@ -66,7 +64,7 @@ private: // attributes std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler std::shared_ptr m_dtcTab; std::shared_ptr m_dtsTgt; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/logger.h index b7aaab003..719808123 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svctgtcommon_export.h" +#include "tgt_export.h" namespace TargetManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.cpp index a0731848a..61fc4875d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.cpp @@ -13,15 +13,17 @@ #include #include "settings.h" -#include +#include namespace TargetManagement { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) - , m_dbHandler(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_dbHandler(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { @@ -83,7 +85,7 @@ bool MainHandler::init(int domainId, int exerciseId) QFileInfo fi(elevationFileAbs); if (!fi.exists(elevationFileAbs)) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << ", elevationFile '" << elevationFileAbs << "' doesn't exists"; + ERROR_LOG(m_logger) << LOGFUNCTION << ", elevationFile '" << elevationFileAbs << "' doesn't exists"; return false; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.h index 411a10657..5c32b2f3f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "tgt_db.h" @@ -42,7 +42,6 @@ public: private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; @@ -56,5 +55,7 @@ private: std::shared_ptr m_elevationMap; std::shared_ptr m_shootbackController; // : L400 + + NGL::INGLLogger &m_logger; }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.cpp index d47a9e92f..479d472cc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.cpp @@ -13,19 +13,21 @@ //------------------------------------------------------------------------------ namespace TargetManagement { -ObjectShootbackArea::ObjectShootbackArea(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; +ObjectShootbackArea::ObjectShootbackArea(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectShootbackArea")) +{ + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ ObjectShootbackArea::~ObjectShootbackArea() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isValid()) m_mainHandler->dds()->dtsTgt()->removeShootbackAreaByKey(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ @@ -43,7 +45,7 @@ bool ObjectShootbackArea::isUsed() const //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectShootbackArea::createObject(const ShootbackArea &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; m_data = data; if (m_data.id() <= 0) @@ -62,14 +64,14 @@ Core::FunctionReplyObject ObjectShootbackArea::createObject(const ShootbackArea // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectShootbackArea::updateObject(const ShootbackArea &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (!isValid()) return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); @@ -85,7 +87,7 @@ Core::FunctionReplyObject ObjectShootbackArea::updateObject(const ShootbackArea // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } @@ -106,7 +108,7 @@ Core::FunctionReplyObject ObjectShootbackArea::setUsed(bool isUsed) //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectShootbackArea::removeObject() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isUsed()) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackArea still in use")); @@ -116,7 +118,7 @@ Core::FunctionReplyObject ObjectShootbackArea::removeObject() if (!m_mainHandler->dds()->dtsTgt()->removeShootbackAreaByKey(m_data.id())) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackArea with id %1 can not be removed from DDS")).arg(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.h index 2deb04dc2..bd7c071c6 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_area.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -48,11 +48,12 @@ public: static ShootbackArea toDdsData(const Database::TgtShootbackArea &dbData); // db -> dds protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; ShootbackArea m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.cpp index e0bf553f4..27dbb68a2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.cpp @@ -13,19 +13,21 @@ //------------------------------------------------------------------------------ namespace TargetManagement { -ObjectShootbackTarget::ObjectShootbackTarget(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; +ObjectShootbackTarget::ObjectShootbackTarget(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectShootbackTarget")) +{ + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ ObjectShootbackTarget::~ObjectShootbackTarget() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isValid()) m_mainHandler->dds()->dtsTgt()->removeShootbackTargetByKey(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ @@ -43,7 +45,7 @@ bool ObjectShootbackTarget::isUsed() const //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectShootbackTarget::createObject(const ShootbackTarget &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; m_data = data; if (m_data.id() <= 0) @@ -62,14 +64,14 @@ Core::FunctionReplyObject ObjectShootbackTarget::createObject(const ShootbackTar // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectShootbackTarget::updateObject(const ShootbackTarget &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, id=" << data.id() + TRACE_LOG(m_logger) << LOGFUNCTION << " START, id=" << data.id() << " size =" << data.visibleParticipants().size(); if (!isValid()) return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); @@ -89,7 +91,7 @@ Core::FunctionReplyObject ObjectShootbackTarget::updateObject(const ShootbackTar // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, id=" << data.id() + TRACE_LOG(m_logger) << LOGFUNCTION << " END, id=" << data.id() << " size =" << data.visibleParticipants().size(); return Core::FunctionReplyObject(m_data.id()); } @@ -111,7 +113,7 @@ Core::FunctionReplyObject ObjectShootbackTarget::setUsed(bool isUsed) //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectShootbackTarget::removeObject() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isUsed()) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackTarget still in use")); @@ -121,7 +123,7 @@ Core::FunctionReplyObject ObjectShootbackTarget::removeObject() if (!m_mainHandler->dds()->dtsTgt()->removeShootbackTargetByKey(m_data.id())) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "ShootbackTarget with id %1 can not be removed from DDS")).arg(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.h index 596835aa5..09397dc63 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_shootback_target.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -54,11 +54,12 @@ public: bool isDifferent(const Database::TgtShootbackTarget &dbData); protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; ShootbackTarget m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.cpp index dbccfb05d..d72861186 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.cpp @@ -13,19 +13,21 @@ //------------------------------------------------------------------------------ namespace TargetManagement { -ObjectTargetAreaAssignment::ObjectTargetAreaAssignment(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; +ObjectTargetAreaAssignment::ObjectTargetAreaAssignment(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectTargetAreaAssignment")) +{ + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ ObjectTargetAreaAssignment::~ObjectTargetAreaAssignment() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isValid()) m_mainHandler->dds()->dtsTgt()->removeTargetAreaAssignmentByKey(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } //------------------------------------------------------------------------------ @@ -43,7 +45,7 @@ bool ObjectTargetAreaAssignment::isUsed() const //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTargetAreaAssignment::createObject(const TargetAreaAssignment &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; m_data = data; if (m_data.id() <= 0) @@ -69,14 +71,14 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::createObject(const TargetA // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTargetAreaAssignment::updateObject(const TargetAreaAssignment &data) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (!isValid()) return Core::FunctionReplyObject(data.id(), tr_lts("dds", "Object not valid/blocked")); @@ -92,7 +94,7 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::updateObject(const TargetA // Publish Data via DTS onPublishData(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } @@ -113,7 +115,7 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::setUsed(bool isUsed) //------------------------------------------------------------------------------ Core::FunctionReplyObject ObjectTargetAreaAssignment::removeObject() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; if (isUsed()) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetAreaAssignment still in use")); @@ -123,7 +125,7 @@ Core::FunctionReplyObject ObjectTargetAreaAssignment::removeObject() if (!m_mainHandler->dds()->dtsTgt()->removeTargetAreaAssignmentByKey(m_data.id())) return Core::FunctionReplyObject(m_data.id(), tr_lts("dds", "TargetAreaAssignment with id %1 can not be removed from DDS")).arg(m_data.id()); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return Core::FunctionReplyObject(m_data.id()); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.h index 6f603487f..4251788b7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/object_target_area_assignment.h @@ -10,7 +10,7 @@ #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -48,11 +48,12 @@ public: static TargetAreaAssignment toDdsData(const Database::TgtTargetAreaAssignment &dbData); // db -> dds protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; TargetAreaAssignment m_data; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/settings.h index 540d37dd2..49bdd545a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp index 95b61ee94..94852741a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.cpp @@ -7,19 +7,18 @@ */ #include "shootback_controller.h" -#include #include "object_shootback_area.h" #include "object_shootback_target.h" #include "object_target_area_assignment.h" #include "main_handler.h" -#include // isPositionTimeOutdated +#include // isPositionTimeOutdated #include #include #include -#include +#include #include //------------------------------------------------------------------------------ @@ -67,18 +66,20 @@ QString toString(const std::vector &cont) // // class ShootbackController // -ShootbackController::ShootbackController(MainHandler *mainHandler) : BaseClass(mainHandler) +ShootbackController::ShootbackController(MainHandler *mainHandler) + : BaseClass(mainHandler) , m_mainHandler(mainHandler) , m_elevationMap(nullptr) - , m_losCalculation(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + , m_losCalculation(nullptr) + , m_logger(getLogger("ShootbackController")) +{ + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } ShootbackController::~ShootbackController() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // disconnect external "signals".. disconnect(m_mainHandler->dds()->dtcPpm().get()); @@ -90,27 +91,27 @@ ShootbackController::~ShootbackController() delete m_losCalculation; m_losCalculation = nullptr; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } bool ShootbackController::initLOS(SituationMap::ElevationMap *elevationMap) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, elevationMap = " << elevationMap + TRACE_LOG(m_logger) << LOGFUNCTION << " START, elevationMap = " << elevationMap << " isValid = " << elevationMap->isValid(); if (!elevationMap->isValid()) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " elevationMap not valid -> return"; + ERROR_LOG(m_logger) << LOGFUNCTION << " elevationMap not valid -> return"; return false; } delete m_losCalculation; m_elevationMap = elevationMap; - INFO_LOG(m_logger) << Q_FUNC_INFO << " m_elevationMap.isValid() =" << m_elevationMap->isValid(); + INFO_LOG(m_logger) << LOGFUNCTION << " m_elevationMap.isValid() =" << m_elevationMap->isValid(); m_losCalculation = new SituationMap::LineOfSightCalculation(m_elevationMap); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; return true; } @@ -150,7 +151,7 @@ bool ShootbackController::initDds(std::shared_ptr handlerA void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId << " removed=" << removed; + TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " shootbackAreaId=" << areaId << " removed=" << removed; if (removed) { @@ -167,7 +168,7 @@ void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed) auto it = areaMap.find(areaId); if (it == areaMap.end()) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " obj changes, but connot be found" << " shootbackAreaId=" << areaId; + ERROR_LOG(m_logger) << LOGFUNCTION << " obj changes, but connot be found" << " shootbackAreaId=" << areaId; return; } onShootbackAreaChanged2(*(it.value())); @@ -175,13 +176,13 @@ void ShootbackController::onShootbackAreaChanged1(qint32 areaId, bool removed) } syncExternal(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId << " removed=" << removed; + TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " shootbackAreaId=" << areaId << " removed=" << removed; } void ShootbackController::onShootbackAreaChanged2(const TargetManagement::ObjectShootbackArea &area) { const int areaId = area.getId(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " shootbackAreaId=" << areaId; + TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " shootbackAreaId=" << areaId; // handle new/modified area and check all participants: const QMap &participantPositions = @@ -192,12 +193,12 @@ void ShootbackController::onShootbackAreaChanged2(const TargetManagement::Object updateInternal_participantPerArea(area, posData); } // for - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " shootbackAreaId=" << areaId; + TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " shootbackAreaId=" << areaId; } void ShootbackController::onShootbackTargetChanged(qint32 targetId, bool removed) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << ", targetId=" << targetId << ", removed=" << removed; + TRACE_LOG(m_logger) << LOGFUNCTION << " START" << ", targetId=" << targetId << ", removed=" << removed; // Note: // updateInternalLos is not required if (removed == true) @@ -213,12 +214,12 @@ void ShootbackController::onShootbackTargetChanged(qint32 targetId, bool removed updateInternalLos({}, {}, {targetId}); syncExternal(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " targetId=" << targetId << " removed=" << removed; + TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " targetId=" << targetId << " removed=" << removed; } void ShootbackController::onTargetAreaAssignmentChanged(qint32 assignmentId, bool removed) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " assignmentId=" << assignmentId << " removed=" << removed; + TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " assignmentId=" << assignmentId << " removed=" << removed; // Note: // updateInternalLos is not required on removed == true @@ -230,16 +231,16 @@ void ShootbackController::onTargetAreaAssignmentChanged(qint32 assignmentId, boo updateInternalLos({assignmentId}, {}, {}); syncExternal(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " assignmentId=" << assignmentId << " removed=" << removed; + TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " assignmentId=" << assignmentId << " removed=" << removed; } void ShootbackController::onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &posData, DataModification modType) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " participantId changed, participantId=" << posData << " mod=" << modType; + TRACE_LOG(m_logger) << LOGFUNCTION << " participantId changed, participantId=" << posData << " mod=" << modType; if (!participantPositionTopicIsValid(posData)) { -// DEBUG_LOG(m_logger) << Q_FUNC_INFO << " NOT VALID, participantId=" << posData.participantId(); +// DEBUG_LOG(m_logger) << LOGFUNCTION << " NOT VALID, participantId=" << posData.participantId(); return; } @@ -248,24 +249,24 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme bool bIsTarget = false; if (isTarget(participantId, bIsTarget) && bIsTarget) { - INFO_LOG(m_logger) << Q_FUNC_INFO << " TARGET, participantId=" << participantId; + INFO_LOG(m_logger) << LOGFUNCTION << " TARGET, participantId=" << participantId; ObjectShootbackTarget *osbTarget = m_handlerShootbackTarget->dataForTargetParticipantId(participantId); if (!osbTarget) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " ObjectShootbackTarget not found for participantId=" << participantId; + ERROR_LOG(m_logger) << LOGFUNCTION << " ObjectShootbackTarget not found for participantId=" << participantId; return; } osbTarget->updateVolatileData(posData.pos()); } - INFO_LOG(m_logger) << Q_FUNC_INFO << " participantId=" << participantId << ", isTarget=" << bIsTarget; + INFO_LOG(m_logger) << LOGFUNCTION << " participantId=" << participantId << ", isTarget=" << bIsTarget; if ((modType == DataModification::eAdded) || (modType == DataModification::eModified)) { // update const QHash &objMap = m_handlerShootbackArea->getObjectMap(); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " objMap.size" << objMap.size(); + DEBUG_LOG(m_logger) << LOGFUNCTION << " objMap.size" << objMap.size(); QMapIterator< int, QSet> it(m_participantsPerArea); while (it.hasNext()) @@ -274,7 +275,7 @@ void ShootbackController::onParticipantPositionChanged(const ParticipantManageme DEBUG_LOG(m_logger) << " areaId = " << it.key() << "-> partIdRef VORHERXX" << toString(it.value()); } - for (const auto &area : std::as_const(objMap)) + for (const auto &area : qAsConst(objMap)) { if (area) updateInternal_participantPerArea(*area, posData); @@ -321,7 +322,7 @@ bool ShootbackController::isTarget(qint32 participantId, bool &bIsTarget) const std::shared_ptr dtcPpm = m_mainHandler->dds()->dtcPpm(); if (!dtcPpm) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " no dtcPpm, return"; + ERROR_LOG(m_logger) << LOGFUNCTION << " no dtcPpm, return"; return false; } @@ -373,7 +374,7 @@ void ShootbackController::updateInternal_participantPerArea(const ObjectShootbac DEBUG_LOG(m_logger) << " areaId = " << area.getId() << " ---> partIdRef VORHER" << toString(partIdRef); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " " + DEBUG_LOG(m_logger) << LOGFUNCTION << " " << " shootbackAreaId=" << areaId << " shootbackAreaName=" << area.getName() << " area.position=" << area.getData().position() @@ -386,13 +387,13 @@ void ShootbackController::updateInternal_participantPerArea(const ObjectShootbac { // ENTER partIdRef.insert(participantId); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId; + DEBUG_LOG(m_logger) << LOGFUNCTION << " ENTER: participantId=" << participantId << " areaId=" << areaId; } else if (!contains && alreadyInCont) { // LEAVE - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " ENTER: participantId=" << participantId << " areaId=" << areaId; + DEBUG_LOG(m_logger) << LOGFUNCTION << " ENTER: participantId=" << participantId << " areaId=" << areaId; partIdRef.remove(participantId); } @@ -452,7 +453,7 @@ QSet ShootbackController::areasWithParticipant(qint32 participantId) const QSet ShootbackController::assignmentsWithTargetParticipantId(qint32 targetParticipantId) const { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START" << " targetParticipantId=" << targetParticipantId; + TRACE_LOG(m_logger) << LOGFUNCTION << " START" << " targetParticipantId=" << targetParticipantId; QSet ret; // all assignments @@ -466,7 +467,7 @@ QSet ShootbackController::assignmentsWithTargetParticipantId(qint32 targetP ret += targetAreaAssignment->getId(); } // for - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" << " areaId=" << targetParticipantId; + TRACE_LOG(m_logger) << LOGFUNCTION << " END" << " areaId=" << targetParticipantId; return ret; } @@ -482,7 +483,7 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI const QSet &changingTartgetIds, // ~dynamic int changedParticipantId) // ~dynamic { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START" + DEBUG_LOG(m_logger) << LOGFUNCTION << " START" << ", changingAssigmentIds=" << toString(changingAssignmentIds) << ", changingAreaIds=" << toString(changingAreaIds) << ", changingTartgetIds=" << toString(changingTartgetIds) @@ -490,13 +491,13 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI // loop over every assignment const QHash &allAssignments = m_handlerTargetAreaAssignment->getObjectMap(); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " allAssignments.size() " << allAssignments.size(); + DEBUG_LOG(m_logger) << LOGFUNCTION << " allAssignments.size() " << allAssignments.size(); for (ObjectTargetAreaAssignment *assignment : allAssignments) { if (!assignment) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId(); + DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId(); continue; } @@ -504,7 +505,7 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI const int assignmentId = assignment->getId(); if (!idIsRelevantHelper(changingAssignmentIds, assignmentId)) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId(); + DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId(); continue; } @@ -514,7 +515,7 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI const int areaId = assignmentData.areaId(); if (!idIsRelevantHelper(changingAreaIds, areaId)) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId(); + DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId(); continue; } @@ -523,7 +524,7 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI const int targetDataId = m_handlerShootbackTarget->targetDataIdForTargetParticipantId(targetParticpantId); if (!idIsRelevantHelper(changingTartgetIds, targetDataId)) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId() + DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId() << ", changingTartgetIds=" << toString(changingTartgetIds) << ", targetParticpantId=" << targetParticpantId << ", targetDataId=" << targetDataId; @@ -535,13 +536,13 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI { // Note: m_participantsPerArea is up-to-date QSet areasWithPart = areasWithParticipant(changedParticipantId); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " areasWithPart=" << areasWithPart.size(); - for (auto curAreaId : std::as_const(areasWithPart)) - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " -> curAreaId=" << curAreaId; + DEBUG_LOG(m_logger) << LOGFUNCTION << " areasWithPart=" << areasWithPart.size(); + for (auto curAreaId : qAsConst(areasWithPart)) + DEBUG_LOG(m_logger) << LOGFUNCTION << " -> curAreaId=" << curAreaId; if (!idIsRelevantHelper(areasWithPart, areaId)) { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " continue, curAssignment " << assignment->getId(); + DEBUG_LOG(m_logger) << LOGFUNCTION << " continue, curAssignment " << assignment->getId(); continue; } } @@ -550,11 +551,11 @@ void ShootbackController::updateInternalLos(const QSet &changingAssignmentI // one assignment -> single target, single area, some participants (which are in that single area): if (!updateInternalLosSingleAssignment(assignment)) - ERROR_LOG(m_logger) << Q_FUNC_INFO << " updateInternalLosSingleAssignment failed, assignmentId=" << assignment->getId(); + ERROR_LOG(m_logger) << LOGFUNCTION << " updateInternalLosSingleAssignment failed, assignmentId=" << assignment->getId(); } // for - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END" + TRACE_LOG(m_logger) << LOGFUNCTION << " END" << ", changingAssigmentIds=" << changingAssignmentIds.size() << ", changingAreaIds=" << changingAreaIds.size() << ", changingTartgetIds=" << changingTartgetIds.size() @@ -566,14 +567,14 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi if (!assignment) return false; const int assignmentId = assignment->getId(); - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, assignmentId=" << assignmentId; + TRACE_LOG(m_logger) << LOGFUNCTION << " START, assignmentId=" << assignmentId; const TargetAreaAssignment &assignmentData = assignment->getData(); const int areaId = assignmentData.areaId(); const int targetParticipantId = assignmentData.targetParticipantId(); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START, assignmentId=" << assignmentId + DEBUG_LOG(m_logger) << LOGFUNCTION << " START, assignmentId=" << assignmentId << ", areaId = " << areaId << ", targetParticipantId = " << targetParticipantId; @@ -584,14 +585,14 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi // Neverless, for this assignment -> area there are no participants visible: // clear container: m_visibleParticipantsPerAssignment[assignmentId] = {}; - ERROR_LOG(m_logger) << Q_FUNC_INFO << " no area for areaId=" << areaId; + ERROR_LOG(m_logger) << LOGFUNCTION << " no area for areaId=" << areaId; return false; } ObjectShootbackTarget *target = m_handlerShootbackTarget->dataForTargetParticipantId(targetParticipantId); if (!target) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " no target for targetParticipantId=" << targetParticipantId; + ERROR_LOG(m_logger) << LOGFUNCTION << " no target for targetParticipantId=" << targetParticipantId; return false; } @@ -600,10 +601,10 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi if (m_participantsPerArea.contains(areaId)) { QSet &partIdRef = m_participantsPerArea[areaId]; - for (auto participantId : std::as_const(partIdRef)) + for (auto participantId : qAsConst(partIdRef)) { // check lineOfSight: - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " check lineOfSight for: assignmentId=" << assignmentId + DEBUG_LOG(m_logger) << LOGFUNCTION << " check lineOfSight for: assignmentId=" << assignmentId << ", areaId = " << areaId << ", targetParticipantId = " << targetParticipantId << ", participantId=" << participantId; @@ -618,13 +619,13 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi if (participantPos.participantId() != participantId) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " no position for participantId=" << participantId; + ERROR_LOG(m_logger) << LOGFUNCTION << " no position for participantId=" << participantId; return false; } const Core::GeoPosition &participantGeoPos = participantPos.pos(); bool visi = lineOfSight(sbTargetGeoPos, participantGeoPos); - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " current targetId = " << target->getId() << " visi = " << visi; + DEBUG_LOG(m_logger) << LOGFUNCTION << " current targetId = " << target->getId() << " visi = " << visi; if (visi) visiPartCont.insert(participantId); @@ -634,19 +635,19 @@ bool ShootbackController::updateInternalLosSingleAssignment(ObjectTargetAreaAssi } // if (m_participantsPerArea.contains(areaId)) - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " assignmentId = " << assignmentId + DEBUG_LOG(m_logger) << LOGFUNCTION << " assignmentId = " << assignmentId << " visiPartCont.size() " << visiPartCont.size(); // store at member m_visibleParticipantsPerAssignment[assignmentId] = visiPartCont; - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, assignmentId=" << assignmentId; + TRACE_LOG(m_logger) << LOGFUNCTION << " END, assignmentId=" << assignmentId; return true; } QSet ShootbackController::visibleParticipantsPerTargetParticipantId(int targetParticipantId) { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, targetParticipantId = " << targetParticipantId; + TRACE_LOG(m_logger) << LOGFUNCTION << " START, targetParticipantId = " << targetParticipantId; QSet visiPartPerTarget; @@ -657,19 +658,19 @@ QSet ShootbackController::visibleParticipantsPerTargetParticipantId(int tar visiPartPerTarget += m_visibleParticipantsPerAssignment[assignmentId]; } - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END, targetParticipantId = " << targetParticipantId + TRACE_LOG(m_logger) << LOGFUNCTION << " END, targetParticipantId = " << targetParticipantId << ", visiPartPerTarget = " << toString(visiPartPerTarget); return visiPartPerTarget; } void ShootbackController::syncExternal() { - TRACE_LOG(m_logger) << Q_FUNC_INFO << " START"; + TRACE_LOG(m_logger) << LOGFUNCTION << " START"; // loop over all targets const QHash &allTargets = m_handlerShootbackTarget->getObjectMap(); - INFO_LOG(m_logger) << Q_FUNC_INFO << " allTargets.size() " << allTargets.size(); + INFO_LOG(m_logger) << LOGFUNCTION << " allTargets.size() " << allTargets.size(); for (ObjectShootbackTarget *target : allTargets) { @@ -679,8 +680,8 @@ void ShootbackController::syncExternal() const QSet &visiPartPerTarget = visibleParticipantsPerTargetParticipantId(target->getTargetParticipantId()); // QSet -> unique and sorted std::vector visiPartPerTargetStd; visiPartPerTargetStd.reserve(visiPartPerTarget.size()); - INFO_LOG(m_logger) << Q_FUNC_INFO << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget); - for (auto id : std::as_const(visiPartPerTarget)) + INFO_LOG(m_logger) << LOGFUNCTION << " targetId " << target->getId() << ", visiPartPerTarget = " << toString(visiPartPerTarget); + for (auto id : qAsConst(visiPartPerTarget)) visiPartPerTargetStd.push_back(id); @@ -688,26 +689,26 @@ void ShootbackController::syncExternal() if (visiPartPerTargetStd != sbTarget.visibleParticipants()) { // data has changed - INFO_LOG(m_logger) << Q_FUNC_INFO << " targetId differ -> updateObject.."; - INFO_LOG(m_logger) << Q_FUNC_INFO << " visiOld =" << toString(sbTarget.visibleParticipants()); - INFO_LOG(m_logger) << Q_FUNC_INFO << " visiNew =" << toString(visiPartPerTargetStd); + INFO_LOG(m_logger) << LOGFUNCTION << " targetId differ -> updateObject.."; + INFO_LOG(m_logger) << LOGFUNCTION << " visiOld =" << toString(sbTarget.visibleParticipants()); + INFO_LOG(m_logger) << LOGFUNCTION << " visiNew =" << toString(visiPartPerTargetStd); target->updateVolatileData(visiPartPerTargetStd); // update and publish } } // for - TRACE_LOG(m_logger) << Q_FUNC_INFO << " END"; + TRACE_LOG(m_logger) << LOGFUNCTION << " END"; } bool ShootbackController::lineOfSight(const Core::GeoPosition &observerPos, const Core::GeoPosition &targetPos) const { - DEBUG_LOG(m_logger) << Q_FUNC_INFO << " calculate m_losCalculation = " << m_losCalculation + DEBUG_LOG(m_logger) << LOGFUNCTION << " calculate m_losCalculation = " << m_losCalculation << ", observerPos=" << observerPos << ", targetPos=" << targetPos; if (!m_losCalculation) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error: no m_losCalculation"; + ERROR_LOG(m_logger) << LOGFUNCTION << " Error: no m_losCalculation"; return false; } @@ -719,7 +720,7 @@ bool ShootbackController::lineOfSight(const Core::GeoPosition &observerPos, cons if (!success) { - ERROR_LOG(m_logger) << Q_FUNC_INFO << " calculate failed:" + ERROR_LOG(m_logger) << LOGFUNCTION << " calculate failed:" << " observerPos=" << observerPos << " targetPos=" << targetPos; return false; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.h b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.h index f03eacfec..e6c4e0a6a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/TargetManagement/shootback_controller.h @@ -14,7 +14,7 @@ #include "handler_shootback_target.h" #include "handler_target_area_assignment.h" -#include +#include namespace NGL { @@ -61,7 +61,6 @@ protected Q_SLOTS: void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &posData, DataModification modType); protected: - NGL::INGLLogger &m_logger; bool participantPositionTopicIsValid(const ParticipantManagement::ParticipantPosition &posData); bool isTarget(qint32 participantId, bool &bIsTarget) const; @@ -98,6 +97,9 @@ private: SituationMap::ElevationMap *m_elevationMap; // do not delete at dtor SituationMap::LineOfSightCalculation *m_losCalculation; + + + NGL::INGLLogger &m_logger; }; } // namespace TargetManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt index b8599c873..ba2879d1e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/CMakeLists.txt @@ -33,7 +33,6 @@ CODEGEN_HANDLE_SVC_XML(SRCS_exe ${xml_FILE}) NGL_ADD_SVC_ICON(SRCS_exe) NGL_ADD_EXECUTABLE(AAR SV svcVideoOverlayManagement ${SRCS_exe}) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcVideoOverlayManagement Qt6::Core Qt6::Network @@ -49,17 +48,6 @@ NGL_TARGET_LINK_LIBRARIES(svcVideoOverlayManagement ddscore ngltools ) -ELSE(BUILD_RTI) -NGL_TARGET_LINK_LIBRARIES(svcVideoOverlayManagement - Qt6::Core - Qt6::Network - nglsettings - LtsCommandLineParser - NGLLogger - nglcoreapplication - ngltools -) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcVideoOverlayManagement) NGL_INSTALL(AAR SV FILES log4cxx_vom.props DESTINATION bin) NGL_ADD_TARGET_LINK(svcVideoOverlayManagement sVOM) diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.cpp index 920afd306..d3bf7b139 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.cpp @@ -9,23 +9,25 @@ #include "avs_interface.h" #include "settings.h" -#include -#include +#include +#include #include #include namespace VideoOverlayManagement { -AvsInterface::AvsInterface(bool enableTryReconnect, QObject *parent) : QObject(parent) +AvsInterface::AvsInterface(bool enableTryReconnect, QObject *parent) + : QObject(parent) , m_waitTime(1) , m_enableTryReconnect(enableTryReconnect) , m_tryReconnect(false) , m_avsKeepAliveTimer(new QTimer(this)) , m_keepAliveTime(Settings::getAvsKeepAliveTime()) , m_avsIfConnectionState(AvsIfConnectionState::Undefined) - , m_socket(nullptr), - m_logger(NGL::getMemoryLogger()) { + , m_socket(nullptr) + , m_logger(getLogger("AVS_Interface")) +{ doConnect(); connect(m_avsKeepAliveTimer, &QTimer::timeout, @@ -54,7 +56,7 @@ void AvsInterface::doConnect() this, &AvsInterface::onConnected); connect(m_socket, &QTcpSocket::disconnected, this, &AvsInterface::onDisonnected); - connect(m_socket, QOverload::of(&QTcpSocket::errorOccurred), + connect(m_socket, QOverload::of(&QTcpSocket::error), this, &AvsInterface::onError); connect(m_socket, &QTcpSocket::readyRead, this, &AvsInterface::onReadyRead); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h index 070d06b72..f48c8e6ff 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/avs_interface.h @@ -99,7 +99,6 @@ protected Q_SLOTS: void onAvsKeepAliveTimeout(); private: // methode - void tryReconnect(); private: // attributes @@ -117,10 +116,8 @@ private: // attributes QTcpSocket *m_socket; ///< pointer to tcpsocket object - NGL::INGLLogger &m_logger; - QByteArray m_buffer; ///< data buffer to hold incoming data form tcpsocket - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.cpp index 9e4fb123f..a2c0f74e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.cpp @@ -8,7 +8,6 @@ #include "dds_handler.h" -#if BUILD_RTI #include namespace VideoOverlayManagement @@ -16,6 +15,7 @@ namespace VideoOverlayManagement DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Exercise, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } // end of ctor() @@ -43,4 +43,3 @@ bool DdsHandler::init(const QStringList &qosFileList) } // Namespace VideoOverlayManagement -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h index d55f3db5d..0d41c78da 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/dds_handler.h @@ -7,11 +7,9 @@ */ #pragma once -#include "logger.h" - -#if BUILD_RTI #include -#endif + +#include "logger.h" namespace Core { @@ -23,24 +21,11 @@ namespace VideoOverlayManagement class DdsHandler final { public: -#if BUILD_RTI DdsHandler(int domainId, int exerciseId); -#else - DdsHandler(int domainId, int exerciseId) - : m_logger(NGL::getMemoryLogger()) - { - Q_UNUSED(domainId); Q_UNUSED(exerciseId); - } -#endif ~DdsHandler() = default; -#if BUILD_RTI bool init(const QStringList &qosFileList = QStringList()); -#else - bool init(const QStringList &qosFileList = QStringList()) { Q_UNUSED(qosFileList); return true; } -#endif -#if BUILD_RTI std::shared_ptr pacemaker() const { return m_pacemaker; @@ -49,17 +34,12 @@ public: { return m_ddsConnector; } -#else - std::shared_ptr pacemaker() const { return nullptr; } - void* dds() const { return nullptr; } -#endif private: - NGL::INGLLogger &m_logger; -#if BUILD_RTI std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; -#endif + + NGL::INGLLogger &m_logger; }; } // namespace VideoOverlayManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.cpp index 1bedda5a9..0349df92c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.cpp @@ -7,18 +7,18 @@ */ #include "handler_infrastructure_data.h" - -#if BUILD_RTI #include "settings.h" -#include +#include using namespace VideoOverlayManagement; -HandlerInfrastructureData::HandlerInfrastructureData(const std::shared_ptr &ddsHandler, QObject *parent) : QObject(parent) +HandlerInfrastructureData::HandlerInfrastructureData(const std::shared_ptr &ddsHandler, QObject *parent) + : QObject(parent) , m_ddsHandler(ddsHandler) - , m_exerciseId(0), - m_logger(NGL::getMemoryLogger()) { + , m_exerciseId(0) + , m_logger(getLogger("HandlerInfrastructureData")) +{ } // end of ctor() //----------------------------------------------------------------------------- @@ -160,5 +160,3 @@ int HandlerInfrastructureData::getRoomIdFromAssetId(int assetId) const return m_assetId2RoomIdMap.value(assetId, -1); } // end of getRoomIdFromAssetId() //----------------------------------------------------------------------------- - -#endif // BUILD_RTI diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.h index 864aa7236..7d41e133a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_infrastructure_data.h @@ -8,20 +8,17 @@ #pragma once +#include "dds_handler.h" #include "logger.h" +#include + #include #include -#if BUILD_RTI -#include "dds_handler.h" -#include -#endif - namespace VideoOverlayManagement { -#if BUILD_RTI class HandlerInfrastructureData : public QObject { Q_OBJECT @@ -59,8 +56,6 @@ private Q_SLOTS: void onAssetChanged(const InfrastructureManagement::InstrumentationAsset &data, DataModification modType); private: // methoden - -NGL::INGLLogger &m_logger; /** * Returns the room id for the given assetId * @param[in] assetId Id of the asset to get the room id for @@ -77,22 +72,8 @@ private: // attributes QMap m_roomId2CameraNameMap; ///< Reference map roomId to camera name(roomId, cameraName) Condition: per room one camera! int m_exerciseId; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; -#else -// Stub implementation when BUILD_RTI is disabled -class HandlerInfrastructureData : public QObject -{ - Q_OBJECT -public: - explicit HandlerInfrastructureData(QObject *parent = nullptr) : QObject(parent) {} - ~HandlerInfrastructureData() = default; - bool init(int /*exerciseId*/) { return false; } - bool isCameraAvailable(int /*roomId*/) const { return false; } - QString getStreamNameFromRoomId(int /*roomId*/) const { return {}; } -}; -#endif - } // namespace VideoOverlayManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp index 67f16d81a..af3c57021 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.cpp @@ -7,11 +7,10 @@ */ #include "handler_overlays.h" -#include #include "handler_participant_data.h" #include "settings.h" -#include +#include using namespace VideoOverlayManagement; @@ -19,12 +18,14 @@ HandlerOverlays::HandlerOverlays(AvsInterface *avsIf, const std::shared_ptr &handlerParticipantData, const std::shared_ptr &handlerInfrastructureData, int exerciseId, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_avsIf(avsIf) , m_handlerParticipantData(handlerParticipantData) , m_handlerInfrastructureData(handlerInfrastructureData) - , m_exerciseId(exerciseId), - m_logger(NGL::getMemoryLogger()) { + , m_exerciseId(exerciseId) + , m_logger(getLogger("HandlerOverlays")) +{ } // end of ctor() //----------------------------------------------------------------------------- @@ -43,11 +44,9 @@ bool HandlerOverlays::init() // Get assigned participants to roomId data from Player Management ... initParticipantsInRoomMap(); -#if BUILD_RTI // Subscribe for external changes connect(m_handlerParticipantData.get(), &HandlerParticipantData::participantPositionChanged, this, &HandlerOverlays::onParticipantPositionChanged); -#endif INFO_LOG(m_logger) << "VOM Handler initialized. "; @@ -228,7 +227,7 @@ QString HandlerOverlays::getAllEquipmentNumbers(QSet data, bool isParticipa if (isParticipantIds) data = convertParticipantIdsToEquipmentNo(data); - for (int currentDataId : std::as_const(data)) + for (int currentDataId : qAsConst(data)) { qs.append(QString::number(currentDataId)); qs.append(QLatin1String(", ")); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h index ac762e06a..5b6b85a87 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_overlays.h @@ -9,7 +9,7 @@ #pragma once #include -#include +#include #include "avs_interface.h" #include "handler_participant_data.h" @@ -116,7 +116,7 @@ private: // attributes std::shared_ptr m_handlerParticipantData; ///< Pointer to participant data handler std::shared_ptr m_handlerInfrastructureData; ///< Pointer to infrastructure data handler int m_exerciseId; ///< Exercise id - NGL::INGLLogger &m_logger; ///< Logger instance + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility QMap> m_participantsInRoomMap; ///< Includes all participants (player) in one room (roomId, Set) }; diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.cpp index 4418fd8a0..8642f9211 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.cpp @@ -7,17 +7,17 @@ */ #include "handler_participant_data.h" - -#if BUILD_RTI #include "settings.h" -#include +#include using namespace VideoOverlayManagement; -HandlerParticipantData::HandlerParticipantData(const std::shared_ptr &ddsHandler, QObject *parent) : QObject(parent) - , m_ddsHandler(ddsHandler), - m_logger(NGL::getMemoryLogger()) { +HandlerParticipantData::HandlerParticipantData(const std::shared_ptr &ddsHandler, QObject *parent) + : QObject(parent) + , m_ddsHandler(ddsHandler) + , m_logger(getLogger("HandlerParticipantData")) +{ } // end of ctor() //----------------------------------------------------------------------------- @@ -128,5 +128,3 @@ void HandlerParticipantData::onParticipantPositionChanged(const ParticipantManag } // end of onParticipantPositionChanged() //----------------------------------------------------------------------------- -#endif // BUILD_RTI - diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.h index 73764a21e..e3045d237 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/handler_participant_data.h @@ -8,20 +8,17 @@ #pragma once +#include "dds_handler.h" #include "logger.h" +#include + #include #include -#if BUILD_RTI -#include "dds_handler.h" -#include -#endif - namespace VideoOverlayManagement { -#if BUILD_RTI class HandlerParticipantData : public QObject { Q_OBJECT @@ -63,8 +60,6 @@ private Q_SLOTS: private: // methoden - -NGL::INGLLogger &m_logger; private: // attributes std::shared_ptr m_ddsHandler; ///< Pointer to VOM DDS handler @@ -73,22 +68,8 @@ private: // attributes QMap m_partId2EquipNoMap; ///< Reference map participant (player) to equipment number (participantId, equipmentNo) QMap m_participantsPositionMap; ///< Reference map participant (player) to room id (participantId, roomId) - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; -#else -// Stub implementation when BUILD_RTI is disabled -class HandlerParticipantData : public QObject -{ - Q_OBJECT -public: - explicit HandlerParticipantData(QObject *parent = nullptr) : QObject(parent) {} - ~HandlerParticipantData() = default; - bool init() { return false; } - int getEquipmentNumber(int /*participantId*/) const { return 0; } - QMap getAllAssignedParticipants() const { return {}; } -}; -#endif - } // namespace VideoOverlayManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp index c3403fbb6..2cfd05e99 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.cpp @@ -7,12 +7,7 @@ */ #include "logger.h" - -#if BUILD_RTI #include -#else -#include -#endif namespace VideoOverlayManagement { @@ -26,7 +21,6 @@ LOGGER_T getLogger(const char *name) loggerName.append(ns, sizeof(ns) - 1); loggerName.append(name, len); -#if BUILD_RTI try { return NGL::NGLLoggerBootstrap::getNGLRootLogger(). @@ -37,9 +31,6 @@ LOGGER_T getLogger(const char *name) fprintf(stderr, "Error retrieving logger: %s", ex.what()); abort(); } -#else - return NGL::getMemoryLogger().getNGLLogger(loggerName); -#endif } } // namespace VideoOverlayManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.h index 47f0b5665..884c306cc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/logger.h @@ -9,6 +9,7 @@ #pragma once #include +#include "vom_export.h" namespace VideoOverlayManagement { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.cpp index a1863b628..120d93b1f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.cpp @@ -9,36 +9,32 @@ #include "main_handler.h" #include "settings.h" -#include +#include -#if BUILD_RTI #include -#endif using namespace VideoOverlayManagement; -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_exerciseId(0) , m_avsIf(new AvsInterface(true, this)) , m_avsConnectionState(AvsIfConnectionState::Undefined) -#if BUILD_RTI , m_ddsHandler(nullptr) -#endif , m_handlerParticipantData(nullptr) , m_handlerInfrastructureData(nullptr) , m_handlerOverlays(nullptr) , m_checkConnectTimer(new QTimer(this)) , m_keepAliveTriggerTimer(new QTimer(this)) - , m_bAvsSocketWarnedOnce(false), - m_logger(NGL::getMemoryLogger()) { + , m_bAvsSocketWarnedOnce(false) + , m_logger(getLogger("MainHandler")) +{ } // end of ctor() //----------------------------------------------------------------------------- MainHandler::~MainHandler() { -#if BUILD_RTI m_ddsHandler.reset(); -#endif } // end of dtor() //----------------------------------------------------------------------------- @@ -68,7 +64,6 @@ bool MainHandler::init(int domainId, int exerciseId) connect(m_keepAliveTriggerTimer, &QTimer::timeout, this, &MainHandler::onSendKeepAlive); -#if BUILD_RTI // initialize DDS // for VideoOverlayManagement => exerciseId = partitionId m_ddsHandler.reset(new DdsHandler(domainId, exerciseId)); @@ -99,7 +94,6 @@ bool MainHandler::init(int domainId, int exerciseId) m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StartingError); return false; } -#endif // Initialisation of OverlayHandler wait until AVS is connected connect(m_checkConnectTimer, &QTimer::timeout, @@ -107,9 +101,7 @@ bool MainHandler::init(int domainId, int exerciseId) m_checkConnectTimer->start(1000); INFO_LOG(m_logger) << "VOM Handler initialized. (Connection to AVS may be still pending) "; -#if BUILD_RTI m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Starting); -#endif return true; } // end of init() @@ -138,16 +130,12 @@ bool MainHandler::onTryToInitOverlayHandler() if (!m_handlerOverlays->init()) { ERROR_LOG(m_logger) << "Initialisation HandlerOverlays failed."; -#if BUILD_RTI m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StoppedError); -#endif return false; } INFO_LOG(m_logger) << "VOM Handler initialized. (Connection to AVS established) "; -#if BUILD_RTI m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running); -#endif return true; } // end of onTryToInitOverlayHandler() @@ -170,9 +158,7 @@ void MainHandler::onAvsIfConnectionState(AvsIfConnectionState state) case AvsIfConnectionState::ConnectionError: ERROR_LOG(m_logger) << "AvsIfConnectionState::ConnectionError !"; m_keepAliveTriggerTimer->stop(); -#if BUILD_RTI m_ddsHandler->pacemaker()->setNewState(Core::RunningState::StoppedError); -#endif break; case AvsIfConnectionState::Undefined: default: diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h index 9198305d1..d885ff335 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/main_handler.h @@ -9,7 +9,6 @@ #pragma once #include -#include #include "avs_interface.h" #include "handler_participant_data.h" @@ -18,6 +17,8 @@ #include "dds_handler.h" #include "logger.h" +class QTimer; + namespace VideoOverlayManagement { // Forwarddeclarations @@ -50,13 +51,10 @@ private Q_SLOTS: private: // attributes - int m_exerciseId; ///< Exercise id AvsInterface *m_avsIf; ///< Pointer to AVS-Interface AvsIfConnectionState m_avsConnectionState; ///< AVS connection state -#if BUILD_RTI std::shared_ptr m_ddsHandler; ///< Pointer to DDS handler -#endif std::shared_ptr m_handlerParticipantData; ///< Pointer to participant data handler std::shared_ptr m_handlerInfrastructureData; ///< Pointer to infrastructure data handler std::unique_ptr m_handlerOverlays; ///< Pointer to overlay handler @@ -64,9 +62,8 @@ private: // attributes QTimer *m_checkConnectTimer; ///< Wait for AVS connected. QTimer *m_keepAliveTriggerTimer; ///< Timer for triggering the keep alive request bool m_bAvsSocketWarnedOnce; - NGL::INGLLogger &m_logger; - + NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility }; } // namespace VideoOverlayManagement diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/settings.h index 359894ed5..70c66fbc5 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/VideoOverlayManagement/settings.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/CMakeLists.txt index a32f4b21d..075dc99f1 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/CMakeLists.txt @@ -32,13 +32,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate whg_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcWhgCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcWhgCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcWhgCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcWhgCommon PRIVATE RTI::nddscpp2 @@ -48,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcWhgCommon NGLLogger ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcWhgCommon) # @@ -60,14 +58,13 @@ SET(SRCS_client # generate whg_[d|f]tc.h, whg_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcWhgClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcWhgClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcWhgClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcWhgClient PRIVATE RTI::nddscpp2 @@ -76,7 +73,6 @@ NGL_TARGET_LINK_LIBRARIES(svcWhgClient svcWhgCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcWhgClient) # @@ -88,14 +84,13 @@ SET(SRCS_server # generate whg_[d|f]ts.h, whg_[d|f]ts_impl.[cpp|h] CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcWhgServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcWhgServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcWhgServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcWhgServer PRIVATE RTI::nddscpp2 @@ -105,7 +100,6 @@ NGL_TARGET_LINK_LIBRARIES(svcWhgServer svcWhgCommon ngldb ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcWhgServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.cpp index 9d4ece2dd..bbc8bfd31 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.cpp @@ -11,12 +11,12 @@ #include #include -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include #include @@ -37,6 +37,7 @@ WhgTests::WhgTests(QObject *parent) , m_boxId(0) , m_eTestStep(eUnknown) , m_bTestsSuccessful(true) + , m_logger(getLogger("Test")) { qRegisterMetaType("Core::FunctionReply"); } // end of ctor() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.h index 1c6b67f0e..0d9a700ec 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/ModuleTests/whg_tests.h @@ -68,7 +68,6 @@ protected Q_SLOTS: void onReceiveEqtTypeChanged(const WarehouseGuez::EquipmentTypeWh &data, DataModification modType); protected: - NGL::INGLLogger &m_logger; // Callbackfunctions for FTC void onModifyEquipmentTypeWhReply(const Core::FunctionReplyObject &replyObject) override final; void onRemoveEquipmentTypeWhReply(const Core::FunctionReplyObject &replyObject) override final; @@ -117,6 +116,8 @@ private: } m_eTestStep; bool m_bTestsSuccessful; + NGL::INGLLogger &m_logger; + }; } // namespace WarehouseGuez diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/client_message.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/client_message.cpp index 888e9b3a1..575690edc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/client_message.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/client_message.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/reply_message.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/reply_message.h index a65ddaf9a..61e161ee0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/reply_message.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/Messages/reply_message.h @@ -12,8 +12,8 @@ #include -#include -#include +#include +#include #include #include diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp index b1c419b09..6b114360c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.cpp @@ -8,7 +8,6 @@ * Created by Philipp Dassow, SLST, 2017-12-05 */ #include "WsBaseDataInterface/data_manager.h" -#include #include #include @@ -20,12 +19,12 @@ #include "main_handler.h" -#include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include +#include namespace WarehouseGuez @@ -502,7 +501,7 @@ void DataManager::reconnectSignals() QVector vecExercises; m_mainHandler->db()->select(vecExercises); - for (const auto &exercise : std::as_const(vecExercises)) + for (const auto &exercise : qAsConst(vecExercises)) { createTriggerForExercise(q, exercise.id); const QString tn = triggerName(exercise.id); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.h index c5c134e71..28449abaa 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/data_manager.h @@ -16,10 +16,10 @@ #include #include -#include +#include -#include -#include +#include +#include class NSqlQuery; namespace WarehouseGuez diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/ws_base_data_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/ws_base_data_interface_handler.cpp index bade5fed4..f04549a36 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/ws_base_data_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBaseDataInterface/ws_base_data_interface_handler.cpp @@ -24,6 +24,7 @@ WsBaseDataInterfaceHandler::WsBaseDataInterfaceHandler(MainHandler *mainHandler, , m_messageFactory(nullptr) , m_dataManager(nullptr) , m_mainHandler(mainHandler) + , m_logger(getLogger("WsBaseDataInterfaceHandler")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/client_connection.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/client_connection.h index 74ba5e842..6c801382e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/client_connection.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/client_connection.h @@ -46,14 +46,14 @@ private Q_SLOTS: void onSocketDisconnect(); private: // methods - -NGL::INGLLogger &m_logger; void sendMessages(); private: // attributes QWebSocket *m_socket; QQueue m_messageQueue; QHostAddress m_ip; + + LOGGER_T m_logger; }; // class ClientConnection } // namespace Connection } // namespace WsBiteInterface diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.cpp index 83ec4a99b..22b713b0d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.cpp @@ -7,7 +7,6 @@ * Created by Hannes Fritsche, SLSE, 2017-09-07 */ #include "connection_handler.h" -#include #include "client_connection.h" #include "WsBiteInterface/Messages/message_transmitter.h" @@ -19,13 +18,15 @@ using namespace WarehouseGuez::WsBiteInterface::Connection; -ConnectionHandler::ConnectionHandler() : m_server(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +ConnectionHandler::ConnectionHandler() + : m_server(nullptr) + , m_logger(getLogger("ConnectionHandler")) +{ } ConnectionHandler::~ConnectionHandler() { - for (auto s : std::as_const(m_connections)) + for (auto s : qAsConst(m_connections)) s->disconnect(this); qDeleteAll(m_connections); } @@ -106,7 +107,7 @@ void ConnectionHandler::onDisconnected(ClientConnection *conn) /* void ConnectionHandler::onPositions(const ::WsBiteInterface::Messages::ReplyMessage &positionsCnr) { - for (ClientConnection *currentConnection : std::as_const(m_connections)) + for (ClientConnection *currentConnection : qAsConst(m_connections)) currentConnection->addMessage(positionsCnr); } */ diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.h index 3ce47be6f..d66e5464f 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Connection/connection_handler.h @@ -50,10 +50,10 @@ private Q_SLOTS: void onDisconnected(ClientConnection *conn); private: // attributes - -NGL::INGLLogger &m_logger; QWebSocketServer *m_server; QVector m_connections; + + LOGGER_T m_logger; }; } // namespace Connection } // namespace WsBiteInterface diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.cpp index 229cce507..ddbfc891b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.cpp @@ -18,8 +18,10 @@ namespace WsBiteInterface namespace Messages { -MessageHandler::MessageHandler(DataManager *dataManager) : m_dataManager(dataManager), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) { +MessageHandler::MessageHandler(DataManager *dataManager) + : m_dataManager(dataManager) + , m_logger(getLogger("MessageHandler")) +{ Q_ASSERT(dataManager); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.h index 6455e8c96..2832d5333 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/Messages/message_handler.h @@ -34,9 +34,9 @@ public Q_SLOTS: void onNewTextMessage(MessageTransmitter *transmitter, const QString &message); private: - -NGL::INGLLogger &m_logger; DataManager *m_dataManager; + + LOGGER_T m_logger; }; } // namespace Messages } // namespace WsBiteInterface diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.cpp index baa9098fe..c7761328c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.cpp @@ -13,13 +13,13 @@ #include -#include +#include #include -#include -#include -#include +#include +#include +#include namespace WarehouseGuez { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.h index 1de7c1719..9c15f435c 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/bite_data_manager.h @@ -10,9 +10,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include "logger.h" @@ -66,8 +66,6 @@ private Q_SLOTS: private: // methods - -NGL::INGLLogger &m_logger; void connectToTabWebSocket(int port, int exerciseId); private: // attributes @@ -94,6 +92,8 @@ private: // attributes std::shared_ptr m_ddsHandler; std::shared_ptr m_tabDtc; ///< Pointer to DTC Training Area Base interface object QTimer *m_timer = nullptr; + + LOGGER_T m_logger; }; // class DataManager } // namespace WsBiteInterface } // namespace WarehouseGuez diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/ws_bite_interface_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/ws_bite_interface_handler.cpp index 3669f525c..34e9f85ad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/ws_bite_interface_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/WsBiteInterface/ws_bite_interface_handler.cpp @@ -23,6 +23,7 @@ WsBiteInterfaceHandler::WsBiteInterfaceHandler(DataManager *dataManager) : m_dataManager(dataManager) , m_connectionHandler(nullptr) , m_messageHandler(nullptr) + , m_logger(getLogger("WsBiteInterfaceHandler")) { Q_ASSERT(dataManager); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.cpp index 04ac7b478..a54de4afc 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.cpp @@ -14,6 +14,7 @@ namespace WarehouseGuez DdsHandler::DdsHandler(int domainId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::Global)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.h index 2d50fe3cf..c04fb5ab3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/dds_handler.h @@ -44,12 +44,13 @@ public: std::shared_ptr dds() const { return m_ddsConnector; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_pacemaker; std::shared_ptr m_topicLockMaster; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace WarehouseGuez diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.cpp index 3f0dff779..69c3f906d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.cpp @@ -17,6 +17,7 @@ HandlerEquipmentTypeWh::HandlerEquipmentTypeWh(MainHandler *mainHandler) : Interface::Fts::ModifyEquipmentTypeWhRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::RemoveEquipmentTypeWhRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerEquipmentTypeWh")) {} HandlerEquipmentTypeWh::~HandlerEquipmentTypeWh() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.h index 15dfce004..d0a252e4a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_equipment_type_wh.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "logger.h" #include "main_handler.h" @@ -27,14 +27,13 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onModifyEquipmentTypeWhRequest(const rti::core::SampleIdentity &cookie, const EquipmentTypeWh &request) override final; void onRemoveEquipmentTypeWhRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request) override final; void sendToEXCON(); private: - NGL::INGLLogger &m_logger; QHash m_equipmenttypewhObjMap; MainHandler *m_mainHandler; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.cpp index e2b5327b7..692bb1e97 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.cpp @@ -18,6 +18,7 @@ HandlerInjuryModel::HandlerInjuryModel(MainHandler *mainHandler) : Interface::Fts::ModifyInjuryModelAgdusWhRequestHandler(mainHandler->dds()->fts()) , Interface::Fts::RemoveInjuryModelAgdusWhRequestHandler(mainHandler->dds()->fts()) , m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerInjuryModel")) {} HandlerInjuryModel::~HandlerInjuryModel() diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.h index 79f433da9..0d73f5ddd 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_injury_model.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "main_handler.h" #include "logger.h" @@ -26,13 +26,13 @@ public: bool init(); private: - NGL::INGLLogger &m_logger; void onModifyInjuryModelAgdusWhRequest(const rti::core::SampleIdentity &cookie, const InjuryModelAgdusWh &request); void onRemoveInjuryModelAgdusWhRequest(const rti::core::SampleIdentity &cookie, const Core::RemoveElementRequest &request); private: - NGL::INGLLogger &m_logger; QHash m_injurymodelObjMap; MainHandler* m_mainHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.cpp index 57ff06608..1ab5b8a6e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.cpp @@ -13,8 +13,10 @@ namespace WarehouseGuez { -HandlerTypes::HandlerTypes(MainHandler *mainHandler) : m_mainHandler(mainHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} +HandlerTypes::HandlerTypes(MainHandler *mainHandler) + : m_mainHandler(mainHandler) + , m_logger(getLogger("HandlerTypes")) +{} bool HandlerTypes::init() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.h index ed1edabbe..c07a7ac91 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/handler_types.h @@ -7,9 +7,9 @@ */ #pragma once -#include +#include -#include +#include #include "main_handler.h" #include "logger.h" @@ -28,8 +28,9 @@ private Q_SLOTS: void onTypeChanged(const ParticipantManagement::Type &data, DataModification modType); private: - NGL::INGLLogger &m_logger; MainHandler* m_mainHandler; std::shared_ptr m_ppmDtc; ///< Pointer to DTC ParticipantManagement interface object + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/logger.h index 3b8715f04..85c4cd0ad 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcwhgcommon_export.h" +#include "whg_export.h" namespace WarehouseGuez { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/main_handler.h index a24959aba..cd26c38b2 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/main_handler.h @@ -45,7 +45,6 @@ public: std::shared_ptr wsBaseDataHandler() { return m_wsBaseDataHandler; } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; std::shared_ptr m_handlerEquipTypeWh; @@ -54,5 +53,7 @@ private: std::shared_ptr m_wsBaseDataHandler; std::shared_ptr m_wsBiteInterfaceHandler; std::shared_ptr m_wsBiteDataManager; + NGL::INGLLogger &m_logger; + }; } // namespace WarehouseGuez diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.cpp index 848133e04..019c37d7b 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.cpp @@ -12,6 +12,7 @@ namespace WarehouseGuez ObjectEquipmentTypeWh::ObjectEquipmentTypeWh(MainHandler *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectEquipmentTypeWh")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.h index e6ed74712..29cecd5c9 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_equipment_type_wh.h @@ -9,7 +9,7 @@ #include "logger.h" #include "main_handler.h" -#include +#include namespace WarehouseGuez { @@ -27,11 +27,11 @@ public: Database::EquipmentTypeWh getData() const { return m_data; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; Database::EquipmentTypeWh m_data; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.cpp index 8f28abd4e..d9e9b2a9e 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.cpp @@ -12,6 +12,7 @@ namespace WarehouseGuez ObjectInjuryModel::ObjectInjuryModel(MainHandler *mainHandler) : m_mainHandler(mainHandler) + , m_logger(getLogger("ObjectInjuryModel")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.h index 643bd583e..c6b3b273d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/object_injury_model.h @@ -9,7 +9,7 @@ #include "logger.h" #include "main_handler.h" -#include +#include namespace WarehouseGuez { @@ -27,11 +27,11 @@ public: Database::InjuryModelAgdusWh getData() const { return m_data; } protected: - NGL::INGLLogger &m_logger; void onPublishData(); private: MainHandler *m_mainHandler; Database::InjuryModelAgdusWh m_data; + NGL::INGLLogger &m_logger; }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/settings.h index 1e5d6d60e..3958551ec 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/WarehouseGuez/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/CMakeLists.txt b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/CMakeLists.txt index 301be3b64..edaceaa52 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/CMakeLists.txt +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/CMakeLists.txt @@ -30,13 +30,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE}) # Generate xxx_[d|f]tc.h CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcXxxCommon SHARED ${SRCS_common}) +NGL_ADD_LIBRARY(AAR SV WS svcXxxCommon SHARED ${SRCS_common}) NGL_TARGET_INCLUDE_DIRECTORIES(svcXxxCommon PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcXxxCommon PRIVATE RTI::nddscpp2 @@ -45,7 +44,6 @@ NGL_TARGET_LINK_LIBRARIES(svcXxxCommon ddscore NGLLogger ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcXxxCommon) # @@ -57,14 +55,13 @@ SET(SRCS_client # generate xxx_[d|f]tc.h, xxx_[d|f]tc_impl.[cpp|h] CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV WS svcXxxClient SHARED ${SRCS_client}) +NGL_ADD_LIBRARY(AAR SV WS svcXxxClient SHARED ${SRCS_client}) NGL_TARGET_INCLUDE_DIRECTORIES(svcXxxClient PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcXxxClient PRIVATE RTI::nddscpp2 @@ -73,7 +70,6 @@ NGL_TARGET_LINK_LIBRARIES(svcXxxClient svcXxxCommon ddsftc ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcXxxClient) # @@ -87,14 +83,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE}) # Generate xxx_db_impl.cpp/.h, xxx_db.h CODEGEN_DATABASE(SRCS_server ${xml_FILE}) -NGL_ADD_LIBRARY2(AAR SV svcXxxServer SHARED ${SRCS_server}) +NGL_ADD_LIBRARY(AAR SV svcXxxServer SHARED ${SRCS_server}) NGL_TARGET_INCLUDE_DIRECTORIES(svcXxxServer PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/../ ${CMAKE_CURRENT_BINARY_DIR}/../ ) -IF(BUILD_RTI) NGL_TARGET_LINK_LIBRARIES(svcXxxServer PRIVATE RTI::nddscpp2 @@ -104,7 +99,6 @@ NGL_TARGET_LINK_LIBRARIES(svcXxxServer PUBLIC svcXxxCommon ) -ENDIF(BUILD_RTI) NGL_INSTALL_TARGET(svcXxxServer) # diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.cpp index 964d27410..a4a606cb3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.cpp @@ -19,6 +19,7 @@ namespace XxxXxxXxx DdsHandler::DdsHandler(int domainId, int exerciseId) : m_ddsConnector(std::make_shared(domainId, IDL::PartitionType::FIXME, exerciseId)) + , m_logger(getLogger("DdsHandler")) { DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition(); } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.h index 3b8b56ab1..f8060af19 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/dds_handler.h @@ -45,12 +45,13 @@ public: } private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsConnector; std::shared_ptr m_dtsCurrentRunningState; std::shared_ptr m_pacemaker; std::shared_ptr m_ddsDts; std::shared_ptr m_ddsFts; + + NGL::INGLLogger &m_logger; }; } // namespace XxxXxxXxx diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/logger.h b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/logger.h index c97f1e00a..2b699861d 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/logger.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/logger.h @@ -9,7 +9,7 @@ #pragma once #include -#include "svcxxxcommon_export.h" +#include "xxx_export.h" namespace XxxXxxXxx { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.cpp index a85181439..97ac971ac 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.cpp @@ -13,10 +13,12 @@ namespace XxxXxxXxx { -MainHandler::MainHandler(QObject *parent) : QObject(parent) +MainHandler::MainHandler(QObject *parent) + : QObject(parent) , m_ddsHandler(nullptr) - , m_dbHandler(nullptr), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_dbHandler(nullptr) + , m_logger(getLogger("MainHandler")) +{} MainHandler::~MainHandler() { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.h b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.h index c295b14f3..1a9a5a2d0 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/main_handler.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include #include #include "dds_handler.h" #include "xxx_db.h" @@ -33,8 +33,10 @@ public: std::shared_ptr db() const; private: - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; + + NGL::INGLLogger &m_logger; + }; } // namespace XxxXxxXxx diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/settings.h b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/settings.h index de814b0b8..faeebd66a 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/settings.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/base/settings.h @@ -6,7 +6,7 @@ */ #pragma once -#include +#include namespace NGL { diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.cpp index dcbc0176a..2c645e3e7 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.cpp @@ -7,12 +7,11 @@ */ #include "handler_xxx_xxx.h" -#include #include "object_xxx_xxx.h" #include "yyy_db.h" #include "db_handler.h" -#include +#include #include namespace YyyYyyYyy @@ -20,10 +19,12 @@ namespace YyyYyyYyy HandlerXxx::HandlerXxx(const std::shared_ptr &ddsHandler, const std::shared_ptr &dbHandler, - QObject *parent) : QObject(parent) + QObject *parent) + : QObject(parent) , m_ddsHandler(ddsHandler) - , m_dbHandler(dbHandler), - m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {} + , m_dbHandler(dbHandler) + , m_logger(getLogger("HandlerXxx")) +{} HandlerXxx::~HandlerXxx() {} @@ -39,7 +40,7 @@ bool HandlerXxx::init() } // create languageHmi objects - for (const Database::YyyXxx &data : std::as_const(dataVec)) + for (const Database::YyyXxx &data : qAsConst(dataVec)) { ObjectXxx *ifs(new ObjectXxx(m_ddsHandler, m_dbHandler, this)); Core::FunctionReplyObject ret = ifs->createObject(data); diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.h b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.h index 1f43b5d72..3f62ce555 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/handler_xxx.h @@ -7,7 +7,7 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" @@ -29,11 +29,11 @@ public: private: - NGL::INGLLogger &m_logger; private: - NGL::INGLLogger &m_logger; QMap m_xxxObjMap; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; + NGL::INGLLogger &m_logger; + }; } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.cpp b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.cpp index f2f28ea95..dfc26a1c3 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.cpp +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.cpp @@ -20,6 +20,7 @@ namespace YyyYyyYyy : QObject(parent) , m_ddsHandler(ddsHandler) , m_dbHandler(dbHandler) + , m_logger(getLogger("ObjectXxx")) { } diff --git a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.h b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.h index 1abd27b54..9630ad714 100755 --- a/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.h +++ b/qt6-after/qt6-migrated-legatus/Lts/Services/skeleton/stub/object_xxx.h @@ -6,11 +6,11 @@ */ #pragma once -#include +#include #include "dds_handler.h" #include "logger.h" -#include +#include // Generated #include @@ -39,10 +39,11 @@ namespace YyyYyyYyy void onPublishData(); private: - - NGL::INGLLogger &m_logger; std::shared_ptr m_ddsHandler; std::shared_ptr m_dbHandler; Database::YyyXxx m_data; + + NGL::INGLLogger &m_logger; + }; }