Session 026: Lts/Services Qt5:: to Qt6:: migration

- Migrated all 104 CMakeLists.txt files in Lts/Services
- Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg,
  Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test,
  Qt5::SerialPort with Qt6:: equivalents
- 1244 files modified (CMakeLists.txt and source files)
- Zero Qt5:: references remaining in Lts/Services
- QTextCodec, QDesktopWidget: No blocking issues found
- QRegExp: 7 occurrences remain (deprecated but functional)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
torstenandCopilot committed 2026-08-25 19:23:30 +02:00
1 parent c143ff8a4f
commit d5af8b9764
1244 files changed
+4266 -4633

No files matched your search

@@ -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)
#
@@ -7,7 +7,6 @@
*/
#include "central_aes_data_builder.h"
#include <utility>
#include "LtsUtils/LtsUtilsCore/qbytearray_byteaccess.h"
#include "QLineF"
@@ -456,7 +455,7 @@ void addSegments(QByteArray &buf, const std::vector<AreaEffectSimulation::MineSe
AreaEffectSimulation::MineSegment lastSeg;
for (const AreaEffectSimulation::MineSegment &currentMineSegment : std::as_const(segments))
for (const AreaEffectSimulation::MineSegment &currentMineSegment : qAsConst(segments))
{
addPosition2D(buf, currentMineSegment.positionStart());
lastSeg = currentMineSegment;
@@ -11,8 +11,10 @@
namespace OcSituationServer
{
CentralAesDataQueue::CentralAesDataQueue(QObject *parent) : QObject(parent),
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
CentralAesDataQueue::CentralAesDataQueue(QObject *parent)
: QObject(parent)
, m_logger(getLogger("CentralAesDataQueue"))
{
}
@@ -9,10 +9,10 @@
#include <QQueue>
#include "oc_situation.h"
#include <QtCore/QObject>
#include <QObject>
#include "logger.h"
#include <QtCore/QMutex>
#include <QtCore/QMutexLocker>
#include <QMutex>
#include <QMutexLocker>
#include "central_aes_data_builder.h"
namespace OcSituationServer
@@ -15,6 +15,7 @@ namespace OcSituationServer
DdsHandler::DdsHandler(int domainId, int exerciseId)
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
, m_logger(getLogger("DdsHandler"))
{
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
}
@@ -39,12 +39,13 @@ public:
Q_SIGNALS:
void partitionTimeChanged(qint64 partitionTime);
private:
NGL::INGLLogger &m_logger;
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<Core::Pacemaker> m_pacemaker;
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
std::shared_ptr<OcSituationServer::Interface::Dts> m_ddsDts;
std::shared_ptr<OcSituationServer::Interface::Fts> m_ddsFts;
NGL::INGLLogger &m_logger;
};
} // namespace OcSituationServer
@@ -7,13 +7,12 @@
*/
#include "handler_oc_aes_data.h"
#include <utility>
#include <functional>
#include <QtCore/QByteArray>
#include <QByteArray>
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
#include <LtsUtils/qbytearray_byteaccess.h>
#include <LtsUtilsCore/dds_vector.h>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
#include "settings.h"
@@ -34,6 +33,7 @@ HandlerOcAesData::HandlerOcAesData(MainHandler *mainHandler,
, m_demandingEquipments(QMap<OcSituation::AesType, QSet<int>>())
, m_iedPositionsToBeSend(QMap<int, GuezIedManagement::IedPosition>())
, 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
@@ -7,10 +7,10 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtCore/QMap>
#include <QtCore/QSet>
#include <QObject>
#include <QTimer>
#include <QMap>
#include <QSet>
#include <functional>
#include "main_handler.h"
@@ -7,15 +7,14 @@
*/
#include "handler_oc_central_aes_data.h"
#include <utility>
#include <LtsCoordTrans/lts_coord_trans.h>
#include <LtsUtils/qbytearray_byteaccess.h>
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
#include <LtsUtils/LtsUtilsCore/outdated_position.h>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
#include <LtsUtilsCore/dds_vector.h>
#include <LtsUtilsCore/outdated_position.h>
#include <ParticipantManagement/ppm_common.h>
#include "settings.h"
#include <QtCore/QLineF>
#include <QLineF>
#include "central_aes_data_queue.h"
#include <QMultiMap>
@@ -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<qreal, qint32> 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<Core::GeoPo
QPolygonF result;
result.reserve(form.size());
for (const Core::GeoPosition &currentPosition : std::as_const(form))
for (const Core::GeoPosition &currentPosition : qAsConst(form))
result.append(PositionConverter::relativeFromGeographic({currentPosition.lon(), currentPosition.lat()}, m_baseCoordinate));
return result;
@@ -701,7 +700,7 @@ void HandlerOcCentralAesData::removeKickedOutAesItems(const QSet<qint32> &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<qint32> &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();
@@ -7,16 +7,16 @@
*/
#pragma once
#include <QtCore/QMutex>
#include <QtCore/QObject>
#include <QtCore/QTimer>
#include <QtCore/QThread>
#include <QtCore/QVector>
#include <QMutex>
#include <QObject>
#include <QTimer>
#include <QThread>
#include <QVector>
#include <QPolygonF>
#include <QtCore/QSet>
#include <QSet>
#include <AreaEffectSimulation/aes_dtc.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include "main_handler.h"
#include "position_converter.h"
@@ -8,10 +8,10 @@
#include "handler_oc_data.h"
#include <QtCore/QMutexLocker>
#include <QMutexLocker>
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
#include <LtsUtils/qbytearray_byteaccess.h>
#include <LtsUtilsCore/dds_vector.h>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
#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()
@@ -10,9 +10,9 @@
#include "main_handler.h"
#include "logger.h"
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include <QtCore/QTimer>
#include <QMap>
#include <QMutex>
#include <QTimer>
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<int, ThreadOcCentralAesData *> m_centralAesDataThreads; // equipmentId, thread for central aes data handling
QMutex m_accessMutex; // Mutex-Object
QTimer *m_stateInformationTimer;
NGL::INGLLogger &m_logger;
};
}
@@ -7,12 +7,11 @@
*/
#include "handler_oc_situation_data.h"
#include <utility>
#include <LtsCoordTrans/lts_coord_trans.h>
#include <LtsUtils/qbytearray_byteaccess.h>
#include <LtsUtils/LtsUtilsCore/dds_vector.h>
#include <LtsUtils/LtsUtilsCore/outdated_position.h>
#include <LtsUtilsCore/qbytearray_byteaccess.h>
#include <LtsUtilsCore/dds_vector.h>
#include <LtsUtilsCore/outdated_position.h>
#include <ParticipantManagement/ppm_common.h>
#include "settings.h"
#include <algorithm>
@@ -161,7 +160,7 @@ void HandlerOcSituationData::setRequestOcSituationData(OcSituation::SituationCen
QSet<ParticipantManagement::TypeClass::type> 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<int> curParticipants;
const QHash<int, ParticipantManagement::Participant> 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<int, float> &p1,
QVector<QPair<int, float>> HandlerOcSituationData::createPrioQueue() const
{
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << Q_FUNC_INFO;
TRACE_LOG(m_logger) << "Thread " << QThread::currentThreadId() << " function: " << LOGFUNCTION;
QVector<QPair<int, float>> 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<QPair<int, float>> HandlerOcSituationData::createPrioQueue() const
QByteArray HandlerOcSituationData::createDataStream(int maxSize,
const QVector<QPair<int, float>> &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<int> 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<int, OcSituation::ModificationBits>::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);
@@ -7,17 +7,17 @@
*/
#pragma once
#include <QtCore/QMap>
#include <QtCore/QMutex>
#include <QtCore/QObject>
#include <QtCore/QPair>
#include <QtCore/QSet>
#include <QtCore/QTimer>
#include <QtCore/QThread>
#include <QtCore/QVector>
#include <QMap>
#include <QMutex>
#include <QObject>
#include <QPair>
#include <QSet>
#include <QTimer>
#include <QThread>
#include <QVector>
#include <AreaEffectSimulation/aes_dtc.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include "main_handler.h"
#include "position_converter.h"
@@ -9,7 +9,7 @@
#pragma once
#include <NGLLogger/INGLLogger.h>
#include "svcosscommon_export.h"
#include "oss_export.h"
namespace OcSituationServer
{
@@ -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()
{
@@ -7,7 +7,7 @@
*/
#pragma once
#include <QtCore/QObject>
#include <QObject>
#include <memory>
#include <AreaEffectSimulation/aes_dtc.h>
@@ -15,7 +15,7 @@
#include <Evaluations/evl_ftc.h>
#include <GuezIedManagement/gim_dtc.h>
#include <Messaging/msg_ftc.h>
#include <ParticipantManagement/ppm.hpp>
#include <ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/ppm_ftc.h>
#include <TrainingAreaBase/tab_dtc.h>
@@ -63,7 +63,6 @@ public:
int exerciseId() const { return m_exerciseId; }
private:
NGL::INGLLogger &m_logger;
int m_exerciseId;
std::shared_ptr<DdsHandler> m_ddsHandler;
@@ -80,5 +79,7 @@ private:
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ppmFtc;
std::shared_ptr<TrainingAreaBase::Interface::Dtc> m_tabDtc;
std::shared_ptr<TrainingAreaBase::Interface::Ftc> m_tabFtc;
NGL::INGLLogger &m_logger;
};
} // namespace OcSituationServer
@@ -10,16 +10,18 @@
#include <AssetManagement/asm_dtc.h>
#include <ExerciseManagement/exm_dtc.h>
#include <QtCore/QMutex>
#include <QMutex>
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();
}
@@ -6,7 +6,7 @@
*/
#pragma once
#include <QtCore/QString>
#include <QString>
namespace NGL
{