Adds immediate migration results

This commit is contained in:
torsten committed 2026-08-18 22:12:24 +02:00
1 parent ba4121728b
commit 6a2a0667ab
2395 files changed
+357322 -2524

No files matched your search

@@ -7,7 +7,7 @@
# Created by Julius Ewert, ESIM, 2024-03-20
#
SET(SRCS_SAA
SET(SRCS_SAA
telegrams.h
telegrams.cpp
generatetelegrams.cpp
@@ -15,7 +15,7 @@ SET(SRCS_SAA
adler_export.h
)
NGL_ADD_LIBRARY(AAR SV WS saaTelegrams SHARED ${SRCS_SAA})
NGL_ADD_LIBRARY(WS AAR SV HLA saaTelegrams SHARED ${SRCS_SAA})
NGL_INSTALL_TARGET(saaTelegrams)
NGL_TARGET_INCLUDE_DIRECTORIES(saaTelegrams
@@ -25,8 +25,8 @@ NGL_TARGET_INCLUDE_DIRECTORIES(saaTelegrams
)
NGL_TARGET_LINK_LIBRARIES(saaTelegrams
svcPdmClient
Qt5::Core
Qt5::WebSockets
Qt6::Core
Qt6::WebSockets
)
SET(SRCS
@@ -72,9 +72,9 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginAdler
NGLLogger
nglsettings
ngltools
Qt5::Core
Qt5::Network
Qt5::WebSockets
Qt6::Core
Qt6::Network
Qt6::WebSockets
tabPluginInterface
OpmDataPluginInterface
tabTelegrams
@@ -68,9 +68,9 @@ ADD_EXECUTABLE(tabModuleTestAdler ${LinkedSources} ${UnitTestSources}
nglsettings
nglapplication
saaTelegrams
Qt5::Network
Qt5::WebSockets
Qt5::Test
Qt6::Network
Qt6::WebSockets
Qt6::Test
)
# ADD_TEST(NAME tabModuleTestAdler COMMAND $<TARGET_FILE:aesUnitTestTneAlgorithmen>)
@@ -1,5 +1,4 @@
#include "msgcompares.h"
#include "../telegrams.h"
#include <QtTest/QTest>
@@ -2,6 +2,7 @@
#include "aes_handler.h"
#include <utility>
#include "DDS/Core/function_reply_object.h"
#include "aes.hpp"
#include "json_dispatcher.h"
@@ -122,7 +123,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
std::vector<std::string> args;
args.reserve(argsList.size());
for (const auto &str : qAsConst(argsList))
for (const auto &str : std::as_const(argsList))
args.emplace_back(str.toStdString());
req.notification().content(content.toStdString());
@@ -165,7 +166,7 @@ void AesHandler::onEffectClusterModifyReply(const Core::FunctionReplyObject &rep
std::vector<NotificationManagement::Address> recipientIdsDds;
recipientIdsDds.reserve(recipientIds.size());
for (const auto &recipientId : qAsConst(recipientIds))
for (const auto &recipientId : std::as_const(recipientIds))
{
NotificationManagement::Address addr;
addr.addressId(recipientId);
@@ -336,7 +337,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
QVector<int> subordinates = m_dtcPpm->getSubordinatesByParticipant(participantId);
QVector<ParticipantManagement::ParticipantPosition> subordinatePositions;
for (int subordinate : qAsConst(subordinates))
for (int subordinate : std::as_const(subordinates))
{
DEBUG_LOG(m_logger) << "subordinates(" << participantId << ") :" << subordinate;
subordinatePositions.append(m_dtcPpm->participantPosition(subordinate));
@@ -352,7 +353,7 @@ void AesHandler::sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &dat
double grad = (data.zieldaten.zielachse / 6400.) * 360.0;
for (Flugbahnpunkt pos : qAsConst(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
for (Flugbahnpunkt pos : std::as_const(data.feuerkommando.wirkmittel.at(wirkmittelIndex).flugbahnpunkt))
{
@@ -597,7 +598,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
QList<QRectF> rects;
int zone = 0;
QVector<QPointF> vecPoints;
for (const WirkmittelFeuerkommando &effector : qAsConst(data.feuerkommando.wirkmittel))
for (const WirkmittelFeuerkommando &effector : std::as_const(data.feuerkommando.wirkmittel))
{
const QPointF centerPoint(effector.auftreffpunkt.koordinate.longitude * (M_PI / 180.0), effector.auftreffpunkt.koordinate.latitude * (M_PI / 180.0));
@@ -646,9 +647,9 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
int zone = 0;
QVector<QPointF> vecPoints;
for (const WirkmittelFeuerkommandoRakete &effector : qAsConst(data.feuerkommando.wirkmittelRakete))
for (const WirkmittelFeuerkommandoRakete &effector : std::as_const(data.feuerkommando.wirkmittelRakete))
{
for (const Treffpunkt &treffpunkt : qAsConst(effector.treffpunkte))
for (const Treffpunkt &treffpunkt : std::as_const(effector.treffpunkte))
{
const QPointF centerPoint(treffpunkt.koordinate.koordinate.longitude * (M_PI / 180.0), treffpunkt.koordinate.koordinate.latitude * (M_PI / 180.0));
@@ -716,7 +717,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
if (data.feuerkommando.wirkmittel.size() > 0)
{
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittel))
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittel))
{
AreaEffectSimulation::EffectorData effectorData;
effectorData.angleOfFall() = 0;
@@ -750,7 +751,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
const double useNewGrad = -90 + std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
DEBUG_LOG(m_logger) << "Atan2 Deg to: last point " << std::atan2(coordDiff.y, coordDiff.x) * (180.0 / M_PI);
for (const auto &flightPointAdler : qAsConst(effectorAdler.flugbahnpunkt))
for (const auto &flightPointAdler : std::as_const(effectorAdler.flugbahnpunkt))
{
Core::RelativePositionRelativeTime flightPoint;
flightPoint.offsetX() = 0;
@@ -798,7 +799,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
}
else if (data.feuerkommando.wirkmittelRakete.size() > 0)
{
for (const auto &effectorAdler : qAsConst(data.feuerkommando.wirkmittelRakete))
for (const auto &effectorAdler : std::as_const(data.feuerkommando.wirkmittelRakete))
{
AreaEffectSimulation::EffectorData effectorData;
@@ -823,7 +824,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
Core::GeoPosition mhpPos;
QPointF centroid;
for (const auto &treffpunkt : qAsConst(effectorAdler.treffpunkte))
for (const auto &treffpunkt : std::as_const(effectorAdler.treffpunkte))
centroid += {treffpunkt.koordinate.koordinate.latitude, treffpunkt.koordinate.koordinate.longitude};
centroid /= effectorAdler.treffpunkte.size();
@@ -861,7 +862,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
double currentFlightTime = 0.0;
const LtsCoordTrans::UtmCoordinate utmStartPos = LtsCoordTrans::UtmCoordinate::fromGeographic(participantPosition.pos().lon(), participantPosition.pos().lat());
for (const Core::GeoPosition &pos : qAsConst(trajectoryWithoutTime))
for (const Core::GeoPosition &pos : std::as_const(trajectoryWithoutTime))
{
const LtsCoordTrans::UtmCoordinate utmCurrentPos = LtsCoordTrans::UtmCoordinate::fromGeographic(pos.lon(), pos.lat());
@@ -907,7 +908,7 @@ void AesHandler::handleEffectCluster(const WirkfeldplanungData &data, int wsId)
std::vector<ProjectDataManagement::L27_EffectorId> refWirkmittel;
refWirkmittel.reserve(data.feuerkommando.wirkmittel.size());
for (const auto &wm : qAsConst(data.feuerkommando.wirkmittel))
for (const auto &wm : std::as_const(data.feuerkommando.wirkmittel))
{
ammoCounter += wm.geschoss.anzahl;
DEBUG_LOG(m_logger) << "INSERT KENNER INTO MAP: " << data.feuerkampfReferenz << "---------" << wm.kenner;
@@ -926,7 +927,7 @@ QList<qint32> AesHandler::findAllPendingEffectCluster(int partyId)
QList<qint32> ret;
const auto &effectClusters = m_dtcAes->effectClusters();
for (const auto &effectCluster : qAsConst(effectClusters))
for (const auto &effectCluster : std::as_const(effectClusters))
{
if (effectCluster.partyId() != partyId)
continue;
@@ -953,7 +954,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
const auto &aesEffetClusters = m_dtcAes->effectClusters();
for (const auto &aes : qAsConst(aesEffetClusters))
for (const auto &aes : std::as_const(aesEffetClusters))
{
if (aes.isDeleted() || aes.partyId() != saaPartyId || aes.element() != refTrimmed.toStdString())
{
@@ -984,7 +985,7 @@ void AesHandler::handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bo
{
auto refKenners = m_feuerkampfReferenzWirkmittel.value(refTrimmed);
for (const auto &kenner : qAsConst(refKenners))
for (const auto &kenner : std::as_const(refKenners))
{
ExVollzugsmeldung exvm;
exvm.feuerkampfdaten.feuerkampfReferenz = data.feuerkampfReferenz;
@@ -1016,7 +1017,7 @@ void AesHandler::removeAllPendingEffectCluster(int partyId)
INFO_LOG(m_logger) << "Pending effect cluster size: " << effectClusterIds.size();
Core::RemoveElementRequest req;
for (const qint32 id : qAsConst(effectClusterIds))
for (const qint32 id : std::as_const(effectClusterIds))
{
req.id(id);
INFO_LOG(m_logger) << "Remove effect cluster id: " << id;
@@ -2,6 +2,7 @@
#include "flm_handler.h"
#include <utility>
#include "FileManagement/flm_operator_rights.h"
#include "main_dispatcher.h"
#include "nglsettings/nglsettings_settings.h"
@@ -103,7 +104,7 @@ bool FlmHandler::processHQMessage(int partyId, const QString &name, int meldungs
}
int maxNumber = 0;
for (const QString &fileName : qAsConst(fileNames))
for (const QString &fileName : std::as_const(fileNames))
{
QString normalizedName = fileName.normalized(QString::NormalizationForm_C);
DEBUG_LOG(m_logger) << "normalized fileName: " << normalizedName << "|";
@@ -1,4 +1,5 @@
#include "generatetelegrams.h"
#include <QRandomGenerator>
GenerateTelegrams::GenerateTelegrams() {}
@@ -86,7 +87,7 @@ void GenerateTelegrams::generateEXFQBABBFK(AdlerJson::ExAwesPlanning &req)
AdlerJson::WirkfeldplanungData wfp;
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(qrand());
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(QRandomGenerator::global()->bounded(1000000));
generateZieldaten(wfp.zieldaten);
@@ -188,7 +189,7 @@ void GenerateTelegrams::generateEXFQBABBFK_Gmlrs(AdlerJson::ExAwesPlanning &req)
AdlerJson::WirkfeldplanungData wfp;
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(qrand());
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(QRandomGenerator::global()->bounded(1000000));
wfp.zieldaten.nummer = 143;
wfp.abfeuerungsArt = AdlerJson::Abfeuerungsart::F;
wfp.dauer = 0;
@@ -264,7 +265,7 @@ void GenerateTelegrams::generateEXFQBABBFK_Dm72(AdlerJson::ExAwesPlanning &req)
AdlerJson::WirkfeldplanungData wfp;
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(qrand());
wfp.feuerkampfReferenz = QStringLiteral("REF:%1").arg(QRandomGenerator::global()->bounded(1000000));
wfp.zieldaten.nummer = 143;
wfp.abfeuerungsArt = AdlerJson::Abfeuerungsart::B;
wfp.dauer = 0;
@@ -420,8 +421,8 @@ void GenerateTelegrams::generateFeuerkampf(AdlerJson::ExFeuerkampf &req)
AdlerJson::FeuerkommandoGeschosse geschoss;
geschoss.geschosssorte = QStringLiteral("Spreng DM121");
geschoss.ladung = QStringLiteral("M DM72");
geschoss.zuender = 4;
geschoss.zuenderFunktion = 2;
geschoss.zuender = QString::number(4);
geschoss.zuenderFunktion = QString::number(2);
geschoss.zuenderZeit = 0;
geschoss.anzahl = 1;
geschoss.intervall = 1.0;
@@ -507,12 +508,12 @@ void GenerateTelegrams::generateStellungsmeldungFS(AdlerJson::ExFeuerstellungFS
AdlerJson::Geschoss geschoss2;
geschoss1.geschosssorte = QStringLiteral("Mine DM72");
geschoss1.ladung = QStringLiteral("M DM72");
geschoss1.zuender = 11;
geschoss1.zuender = QString::number(11);
geschoss1.anzahl = 6;
geschoss2.geschosssorte = QStringLiteral("Leucht DM116");
geschoss2.ladung = QStringLiteral("B L8A1");
geschoss2.zuender = 3;
geschoss2.zuender = QString::number(3);
geschoss2.anzahl = 7;
req.feuerstellungsdaten.geschosse.append(geschoss1);
req.feuerstellungsdaten.geschosse.append(geschoss2);
@@ -2,6 +2,7 @@
#include "json_dispatcher.h"
#include <utility>
#include "json_handler_rx.h"
#include "json_handler_tx.h"
#include "settings.h"
@@ -904,7 +905,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
std::vector<std::string> args;
args.reserve(contentArgs.size());
for (const auto & str : qAsConst(contentArgs))
for (const auto & str : std::as_const(contentArgs))
args.emplace_back(str.toStdString());
notif.content(content.toStdString());
@@ -924,7 +925,7 @@ void JsonDispatcher::getCreateNotificationRequestData(const int wsId,
std::vector<NotificationManagement::Address> recipientIdsDds;
recipientIdsDds.reserve(recipientIds.size());
for (const auto &recipientId : qAsConst(recipientIds))
for (const auto &recipientId : std::as_const(recipientIds))
{
NotificationManagement::Address addr;
addr.addressId(recipientId);
@@ -2,6 +2,7 @@
#include "ppm_handler.h"
#include <utility>
#include "Core/core.hpp"
#include <QJsonDocument>
@@ -457,7 +458,7 @@ void PpmHandler::removeAllSAAParticipants(const int partyId)
return;
ParticipantManagement::ModifyParticipantDataRequest req;
std::vector<ParticipantManagement::ParticipantData> list;
for (const auto &part : qAsConst(participants))
for (const auto &part : std::as_const(participants))
{
const ParticipantManagement::Type &participantType = m_dtcPpm->type(part.typeId());
bool isUnitType
@@ -715,7 +716,7 @@ void PpmHandler::handleParticipantPositionChangedInternal(const ParticipantManag
{
const QVector<int32_t> mountedParticipantIds(position.mountedParticipants().get().begin(), position.mountedParticipants().get().end());
for (int mountedParticipantId : qAsConst(mountedParticipantIds))
for (int mountedParticipantId : std::as_const(mountedParticipantIds))
{
ParticipantManagement::Participant mountedParticipant = m_dtcPpm->participant(mountedParticipantId);
const bool isExternal = mountedParticipant.externalId() > 0;
@@ -851,7 +852,7 @@ QList<ParticipantManagement::Participant> PpmHandler::findAllSAAParticipants(con
{
QList<ParticipantManagement::Participant> ret;
const auto &list = m_dtcPpm->participants();
for (const auto &part : qAsConst(list))
for (const auto &part : std::as_const(list))
{
if (part.partyId() != partyId || part.isDeleted())
continue;
@@ -889,7 +890,7 @@ ParticipantManagement::ParticipantData PpmHandler::findRootUnit(const int partyI
{
ParticipantManagement::ParticipantData ret;
const auto &list = m_dtcPpm->participants();
for (const auto &part : qAsConst(list))
for (const auto &part : std::as_const(list))
{
if (part.partyId() != partyId || part.isDeleted())
continue;
@@ -910,7 +911,7 @@ ParticipantManagement::Participant PpmHandler::findParticipantByInternalName(con
ParticipantManagement::Participant pp;
DEBUG_LOG(m_logger) << "START find participant: " << internalName;
auto participantMap = m_dtcPpm->participants();
for (const auto &part : qAsConst(participantMap))
for (const auto &part : std::as_const(participantMap))
{
if (part.partyId() != partyId || part.isDeleted())
continue;
@@ -1,4 +1,5 @@
#include "saa_interface.h"
#include <utility>
#include "qpoint.h"
#include <LtsCoordTrans/lts_coord_trans.h>
#include <TrainingAreaBase/Plugins/AdlerJson/telegrams.h>
@@ -158,7 +159,7 @@ void SAAInterface::parseFlugbahndaten(const Flugbahndaten &flugbahndaten, int ae
matrix.rotate(useNewGrad);
for (Flugbahnpunkt pos : qAsConst(flugbahndaten.flugbahnpunkt))
for (Flugbahnpunkt pos : std::as_const(flugbahndaten.flugbahnpunkt))
{
@@ -1,4 +1,5 @@
#include "telegrams.h"
#include <utility>
#include <QDebug>
#include <QJsonDocument>
@@ -332,7 +333,7 @@ void SAATELEGRAMS_EXPORT zielmeldedatenFromJson(const QJsonObject &data, Zielmel
zielmeldedaten.forderung = ForderungMap.value(data[JsonKeys::FORDERUNG()].toString());
zielmeldedaten.dauer = toInteger(data[JsonKeys::DAUER()], bOk);
QJsonArray FeuerkommandoArray = data[JsonKeys::FEUERKOMMANDO()].toArray();
for (const QJsonValue &value : qAsConst(FeuerkommandoArray))
for (const QJsonValue &value : std::as_const(FeuerkommandoArray))
{
Feuerkommando feuerkommando;
feuerkommandoFromJson(value.toObject(), feuerkommando, bOk);
@@ -362,7 +363,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
einheitfromJson(data[JsonKeys::FEUEREINHEIT()].toObject(), feuerstellungsdaten.feuereinheit, bOk);
koordinateMitHoeheFromJson(data[JsonKeys::MITTELPUNKT()].toObject(), feuerstellungsdaten.mittelpunkt, bOk);
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
for (const QJsonValue &value : qAsConst(koordinatenArray))
for (const QJsonValue &value : std::as_const(koordinatenArray))
{
KoordinateMitHoehe koordinate;
koordinateMitHoeheFromJson(value.toObject(), koordinate, bOk);
@@ -370,7 +371,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenFromJson(const QJsonObject &data, Fe
}
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
for (const QJsonValue &value : qAsConst(geschosseArray))
for (const QJsonValue &value : std::as_const(geschosseArray))
{
Geschoss geschosse;
geschossfromJson(value.toObject(), geschosse, bOk);
@@ -394,7 +395,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
data[JsonKeys::MITTELPUNKT()] = mittelpunkt;
QJsonArray koordinaten;
for (const auto &koordinate : qAsConst(feuerstellungsdaten.koordinaten))
for (const auto &koordinate : std::as_const(feuerstellungsdaten.koordinaten))
{
QJsonObject koordinateObj;
koordinateMitHoeheToJson(koordinateObj, koordinate);
@@ -403,7 +404,7 @@ void SAATELEGRAMS_EXPORT feuerstellungsdatenToJson(QJsonObject &data, const Feue
data[JsonKeys::KOORDINATEN()] = koordinaten;
QJsonArray geschosse;
for (const auto &geschoss : qAsConst(feuerstellungsdaten.geschosse))
for (const auto &geschoss : std::as_const(feuerstellungsdaten.geschosse))
{
QJsonObject geschossObj;
geschossToJson(geschossObj, geschoss);
@@ -425,7 +426,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenFromJson(const QJsonObject &data, Waff
einheitfromJson(data[JsonKeys::EINHEIT()].toObject(), waffensystemdaten.einheit, bOk);
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
for (const QJsonValue &value : qAsConst(geschosseArray))
for (const QJsonValue &value : std::as_const(geschosseArray))
{
Geschoss geschosse;
geschossfromJson(value.toObject(), geschosse, bOk);
@@ -445,7 +446,7 @@ void SAATELEGRAMS_EXPORT waffensystemdatenToJson(QJsonObject &data, const Waffen
data[JsonKeys::EINHEIT()] = einheit;
QJsonArray geschosse;
for (const auto &geschoss : qAsConst(waffensystemdaten.geschosse))
for (const auto &geschoss : std::as_const(waffensystemdaten.geschosse))
{
QJsonObject geschossObj;
geschossToJson(geschossObj, geschoss);
@@ -469,7 +470,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenFromJson(const QJsonObject &data, Ladepla
koordinateMitHoeheFromJson(data[JsonKeys::KOORDINATE()].toObject(), ladeplatzdaten.koordinate, bOk);
QJsonArray geschosseArray = data[JsonKeys::GESCHOSSE()].toArray();
for (const QJsonValue &value : qAsConst(geschosseArray))
for (const QJsonValue &value : std::as_const(geschosseArray))
{
Geschoss geschosse;
geschossfromJson(value.toObject(), geschosse, bOk);
@@ -484,7 +485,7 @@ void SAATELEGRAMS_EXPORT ladeplatzdatenToJson(QJsonObject &data, const Ladeplatz
data[JsonKeys::EINHEIT()] = einheit;
QJsonArray geschosse;
for (const auto &geschoss : qAsConst(ladeplatzdaten.geschosse))
for (const auto &geschoss : std::as_const(ladeplatzdaten.geschosse))
{
QJsonObject geschossObj;
geschossToJson(geschossObj, geschoss);
@@ -536,7 +537,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenFromJson(const QJsonObject &data, Ko
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), koordinierungsdaten.bis, bOk);
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
for (const QJsonValue &value : qAsConst(koordinatenArray))
for (const QJsonValue &value : std::as_const(koordinatenArray))
{
Koordinate koordinate;
koordinatefromJson(value.toObject(), koordinate, bOk);
@@ -561,7 +562,7 @@ void SAATELEGRAMS_EXPORT koordinierungsdatenToJson(QJsonObject &data, const Koor
data[JsonKeys::BIS()] = objTimestamp;
QJsonArray koordinatenArray;
for (const auto &koordinate : qAsConst(koordinierungsdaten.koordinaten))
for (const auto &koordinate : std::as_const(koordinierungsdaten.koordinaten))
{
QJsonObject objKoordinate;
koordinateToJson(objKoordinate, koordinate);
@@ -817,7 +818,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
QJsonArray waffenplaetzeArray = data[JsonKeys::WAFFENPLAETZE()].toArray();
for (const QJsonValue &value : qAsConst(waffenplaetzeArray))
for (const QJsonValue &value : std::as_const(waffenplaetzeArray))
{
KoordinateMitHoehe koordinateMitHoehe;
koordinateMitHoeheFromJson(value.toObject(), koordinateMitHoehe, bOk);
@@ -829,7 +830,7 @@ void SAATELEGRAMS_EXPORT erkundungsstellungenFromJson(const QJsonObject &data, E
void SAATELEGRAMS_EXPORT erkundungsstellungenToJson(QJsonObject &data, const Erkundungsstellungen &erkundungsstellungen)
{
QJsonArray objWaffenplatzList;
for (const auto waffenplatz : qAsConst(erkundungsstellungen.waffenplaetze))
for (const auto waffenplatz : std::as_const(erkundungsstellungen.waffenplaetze))
{
QJsonObject objWaffenplatz;
koordinateMitHoeheToJson(objWaffenplatz, waffenplatz);
@@ -855,7 +856,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
else
{
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTEL()].toArray();
for (const QJsonValue &value : qAsConst(wirkmittelArray))
for (const QJsonValue &value : std::as_const(wirkmittelArray))
{
WirkmittelFeuerkommando wirkmittel;
wirkmittelFeuerkommandoFromJson(value.toObject(), wirkmittel, bOk);
@@ -867,7 +868,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
else
{
QJsonArray wirkmittelArray = data[JsonKeys::WIRKMITTELRAKETE()].toArray();
for (const QJsonValue &value : qAsConst(wirkmittelArray))
for (const QJsonValue &value : std::as_const(wirkmittelArray))
{
WirkmittelFeuerkommandoRakete wirkmittel;
wirkmittelFeuerkommandoRaketeFromJson(value.toObject(), wirkmittel, bOk);
@@ -878,7 +879,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoFromJson(const QJsonObject &data, Feuerkom
void SAATELEGRAMS_EXPORT feuerkommandosToJson(QJsonArray &data, const QVector<Feuerkommando> &feuerkommandos)
{
for (const auto &feuerkommando : qAsConst(feuerkommandos))
for (const auto &feuerkommando : std::as_const(feuerkommandos))
{
QJsonObject objFeuerkommand;
feuerkommandoToJson(objFeuerkommand, feuerkommando);
@@ -892,7 +893,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
data[JsonKeys::TYP()] = waffensystemtypMap.key(feuerkommando.typ);
QJsonArray objWirkmittelList;
QJsonArray objWirkmittelRaketeList;
for (const auto &kommando : qAsConst(feuerkommando.wirkmittel))
for (const auto &kommando : std::as_const(feuerkommando.wirkmittel))
{
QJsonObject objWirkmittel;
wirkmittelFeuerkommandoToJson(objWirkmittel, kommando);
@@ -900,7 +901,7 @@ void SAATELEGRAMS_EXPORT feuerkommandoToJson(QJsonObject &data, const Feuerkomma
}
data[JsonKeys::WIRKMITTEL()] = objWirkmittelList;
for (const auto &kommando : qAsConst(feuerkommando.wirkmittelRakete))
for (const auto &kommando : std::as_const(feuerkommando.wirkmittelRakete))
{
QJsonObject objWirkmittel;
wirkmittelFeuerkommandoRaketeToJson(objWirkmittel, kommando);
@@ -937,7 +938,7 @@ void wirkmittelFeuerkommandoFromJson(const QJsonObject &data, WirkmittelFeuerkom
void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
{
for (const auto &feuerkommando : qAsConst(wirkmittelFeuerkommando))
for (const auto &feuerkommando : std::as_const(wirkmittelFeuerkommando))
{
QJsonObject fkd;
wirkmittelFeuerkommandoToJson(fkd, feuerkommando);
@@ -947,7 +948,7 @@ void wirkmittelFeuerkommandosToJson(QJsonArray &data, const QVector<WirkmittelFe
void wirkmittelFeuerkommansdoToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommando> &wirkmittelFeuerkommando)
{
for (const auto &wfk : qAsConst(wirkmittelFeuerkommando))
for (const auto &wfk : std::as_const(wirkmittelFeuerkommando))
{
QJsonObject obj;
wirkmittelFeuerkommandoToJson(obj, wfk);
@@ -1007,7 +1008,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunktToJson(QJsonObject &data, const Flugbahnpu
void SAATELEGRAMS_EXPORT flugbahnpunkteFromJson(const QJsonArray &data, QVector<Flugbahnpunkt> &flugbahnpunkte, bool &bOk)
{
for (const QJsonValue &value : qAsConst(data))
for (const QJsonValue &value : std::as_const(data))
{
QJsonObject obj = value.toObject();
Flugbahnpunkt flugbahnpunkt;
@@ -1021,7 +1022,7 @@ void SAATELEGRAMS_EXPORT flugbahnpunkteToJson(QJsonArray &data, const QVector<Fl
if (flugbahnpunkte.isEmpty())
return;
for (const auto &flugpunkt : qAsConst(flugbahnpunkte))
for (const auto &flugpunkt : std::as_const(flugbahnpunkte))
{
QJsonObject objFlugpunkt;
flugbahnpunktToJson(objFlugpunkt, flugpunkt);
@@ -1168,7 +1169,7 @@ void treffpunktfromJson(const QJsonObject &data, Treffpunkt &treffpunkt, bool &b
void treffpunktefromJson(const QJsonArray &data, QVector<Treffpunkt> &treffpunkte, bool &bOk)
{
for (const QJsonValue &val : qAsConst(data))
for (const QJsonValue &val : std::as_const(data))
{
Treffpunkt treffpunkt;
treffpunktfromJson(val.toObject(), treffpunkt, bOk);
@@ -1215,7 +1216,7 @@ void trefferpunktToJson(QJsonObject &data, const Treffpunkt &treffpunkt)
void trefferpunkteToJson(QJsonArray &data, const QVector<Treffpunkt> &treffpunkte)
{
for (const auto &treffpunkt : qAsConst(treffpunkte))
for (const auto &treffpunkt : std::as_const(treffpunkte))
{
QJsonObject trp;
trefferpunktToJson(trp, treffpunkt);
@@ -1244,7 +1245,7 @@ void wirkmittelFeuerkommandoRaketeToJson(QJsonObject &data, const WirkmittelFeue
void wirkmittelFeuerkommandosRaketeToJson(QJsonArray &data, const QVector<WirkmittelFeuerkommandoRakete> &wirkmittelFeuerkommandoRakete)
{
for (const auto &feuerkommandoRakete : qAsConst(wirkmittelFeuerkommandoRakete))
for (const auto &feuerkommandoRakete : std::as_const(wirkmittelFeuerkommandoRakete))
{
QJsonObject fkr;
wirkmittelFeuerkommandoRaketeToJson(fkr, feuerkommandoRakete);
@@ -1292,7 +1293,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenFromJson(const QJsonObject &data, Fuehrun
zeitangabe_DTGFromJson(data[JsonKeys::AB()].toObject(), fuehrungsdaten.ab, bOk);
zeitangabe_DTGFromJson(data[JsonKeys::BIS()].toObject(), fuehrungsdaten.bis, bOk);
QJsonArray koordinatenArray = data[JsonKeys::KOORDINATEN()].toArray();
for (const QJsonValue &value : qAsConst(koordinatenArray))
for (const QJsonValue &value : std::as_const(koordinatenArray))
{
Koordinate koordinate;
koordinatefromJson(value.toObject(), koordinate, bOk);
@@ -1315,7 +1316,7 @@ void SAATELEGRAMS_EXPORT fuehrungsdatenToJson(QJsonObject &data, const Fuehrungs
data[JsonKeys::BIS()] = objTimestamp;
QJsonArray koordinatenArray;
for (const auto &koordinate : qAsConst(fuehrungsdaten.koordinaten))
for (const auto &koordinate : std::as_const(fuehrungsdaten.koordinaten))
{
QJsonObject objKoordinate;
koordinateToJson(objKoordinate, koordinate);
@@ -1378,7 +1379,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenFromJson(const QJsonObject &data, Flugbahn
flugbahndaten.fallwinkel = toInteger(data[JsonKeys::FALLWINKEL()], bOk);
QJsonArray flugbahnpunkteArray = data[JsonKeys::FLUGBAHNPUNKT()].toArray();
for (const QJsonValue &value : qAsConst(flugbahnpunkteArray))
for (const QJsonValue &value : std::as_const(flugbahnpunkteArray))
{
Flugbahnpunkt flugbahnpunkt;
flugbahnpunktFromJson(value.toObject(), flugbahnpunkt, bOk);
@@ -1410,7 +1411,7 @@ void SAATELEGRAMS_EXPORT flugbahndatenToJson(QJsonObject &data, const Flugbahnda
data[JsonKeys::FALLWINKEL()] = flugbahndaten.fallwinkel;
QJsonArray flugbahnpunkte;
for (const auto &flugbahnpunkt : qAsConst(flugbahndaten.flugbahnpunkt))
for (const auto &flugbahnpunkt : std::as_const(flugbahndaten.flugbahnpunkt))
{
QJsonObject flugbahnpunktObj;
flugbahnpunktToJson(flugbahnpunktObj, flugbahnpunkt);
@@ -37,9 +37,9 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginApHla
NGLLogger
nglsettings
ngltools
Qt5::Core
Qt5::Network
Qt5::WebSockets
Qt6::Core
Qt6::Network
Qt6::WebSockets
tabPluginInterface
tabTelegrams
svcTabCommon
@@ -26,8 +26,8 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginDebugJsonDir
tabTelegrams
NGLLogger
nglsettings
Qt5::Core
Qt5::WebSockets
Qt6::Core
Qt6::WebSockets
tabPluginInterface
xdr_qthandler_dir
)
@@ -26,6 +26,6 @@ NGL_TARGET_LINK_LIBRARIES(xdr_qthandler_dir
PRIVATE
NGLLogger
PUBLIC
Qt5::Core
Qt6::Core
)
NGL_INSTALL_TARGET(xdr_qthandler_dir)
@@ -27,9 +27,9 @@ NGL_INSTALL_TARGET(tabPluginHla)
NGL_TARGET_LINK_LIBRARIES(tabPluginHla
NGLLogger
nglsettings
Qt5::Core
Qt5::Network
Qt5::WebSockets
Qt6::Core
Qt6::Network
Qt6::WebSockets
tabPluginInterface
tabTelegrams
)
@@ -30,10 +30,10 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginNmea
NGLLogger
nglsettings
PrtCnvLib
Qt5::Core
Qt5::Network
Qt5::Sql
Qt5::WebSockets
Qt6::Core
Qt6::Network
Qt6::Sql
Qt6::WebSockets
tabPluginInterface
tabTelegrams
)
@@ -26,10 +26,10 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginTetraJson
CoPrtCnv
NGLLogger
nglsettings
Qt5::Core
Qt5::Network
Qt5::Sql
Qt5::WebSockets
Qt6::Core
Qt6::Network
Qt6::Sql
Qt6::WebSockets
tabPluginInterface
tabTelegrams
PrtCnvLib
@@ -29,9 +29,9 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginUAS
NGLLogger
nglsettings
Qt5::Core
Qt5::Gui
Qt5::Network
Qt6::Core
Qt6::Gui
Qt6::Network
tabTelegrams
tabPluginInterface
svcCesClient
@@ -66,8 +66,8 @@ PRIVATE
add_executable(TabUASTest6 test6.cpp)
target_link_libraries(TabUASTest6
PRIVATE
Qt5::Core
Qt5::Widgets
Qt6::Core
Qt6::Widgets
#TmsIfAdapter via dlopen !
TmsIfAdapterInterface
@@ -55,10 +55,10 @@ PRIVATE
LtsCoordTrans
NGLLogger
Qt5::Core
Qt5::Gui
Qt5::Network
Qt5::WebSockets
Qt6::Core
Qt6::Gui
Qt6::Network
Qt6::WebSockets
)
target_compile_definitions(TmsIfAdapter PUBLIC DDS_VENDOR_CYCLONE)
@@ -2,6 +2,7 @@
#include "report_mission_status.h"
#include <utility>
@@ -64,7 +65,7 @@ void Dispatcher::ReportMissionStatus(M_MissionCtrl::MissionStatusType const& Mis
std::vector<Task> currentlyAllowedTasks;
for (const auto &tmsIfTask : qAsConst(MissionStatus.CurrentlyAllowedTasks))
for (const auto &tmsIfTask : std::as_const(MissionStatus.CurrentlyAllowedTasks))
{
if (tmsIfTask.EnumeratedValue.empty())
{
@@ -83,7 +84,7 @@ void Dispatcher::ReportMissionStatus(M_MissionCtrl::MissionStatusType const& Mis
DEBUG_LOG(m_logger) << "missionName before: " << missionName;
if (missionName.empty())
{
for (const auto &additionalInfo : qAsConst(MissionStatus.CurrentAction.CurrentTask.AdditionalInfo))
for (const auto &additionalInfo : std::as_const(MissionStatus.CurrentAction.CurrentTask.AdditionalInfo))
{
if (additionalInfo.Name == "MissionName" && additionalInfo.StrValue != "NoMission")
{
@@ -39,10 +39,10 @@ NGL_TARGET_LINK_LIBRARIES(tabPluginWlsTetra
NGLLogger
nglsettings
PrtCnvLib
Qt5::Core
Qt5::Network
Qt5::Sql
Qt5::WebSockets
Qt6::Core
Qt6::Network
Qt6::Sql
Qt6::WebSockets
tabPluginInterface
tabTelegrams
)