Compare commits
14
Commits
4e29022c06
...
29002f2a48
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
29002f2a48 | ||
|
|
c3eda18234 | ||
|
|
6a8c31b735 | ||
|
|
3ec4208139 | ||
|
|
95071993f5 | ||
|
|
bdb2461737 | ||
|
|
a09979afdd | ||
|
|
2df80f90a7 | ||
|
|
40f767fc4d | ||
|
|
82356f23e5 | ||
|
|
472f537313 | ||
|
|
e8d07af320 | ||
|
|
cf62b17d58 | ||
|
|
220ca64679 |
No files matched your search
@@ -75,6 +75,12 @@ ENDIF()
|
||||
|
||||
ADD_DEFINITIONS(-DAPP6C)
|
||||
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
# Resolve <DDS/...> and other framework includes to the real headers under
|
||||
# Lts/ BEFORE the migration stub tree in include/. The stub tree shadows them
|
||||
# otherwise and opens namespace DDSGeneric around framework includes, which
|
||||
# pulls Qt/std definitions into that namespace and breaks every consumer.
|
||||
# (The qt5 legacy has no include/ tree; Lts/ is the real include root.)
|
||||
include_directories(BEFORE ${CMAKE_SOURCE_DIR}/Lts)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
# Include directory for generated export headers
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
@@ -108,6 +114,11 @@ include_directories(${CMAKE_BINARY_DIR}/Lts/Services/ReportManagement)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/ReportManagement)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/SituationReplay)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/SituationReplay)
|
||||
# Evaluations' generated evl_db_structs.h includes <evl_enums.hpp> by bare name, and that
|
||||
# header is consumed from OcBaseDownload as well, so its build dir must be visible tree-wide
|
||||
# like the services above. There is no include/Evaluations stub tree, so only the build dir
|
||||
# is added (same shape as FileManagement above, which has no stub tree either).
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/Evaluations)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/Buildings)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Proxies/GuezNasat)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/DDS)
|
||||
@@ -117,12 +128,43 @@ include_directories(${CMAKE_SOURCE_DIR}/include/DDS/Generic)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/TrainingAreaBaseOC)
|
||||
# Generated DDS headers (BUILD_RTI=ON)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts)
|
||||
# <Core/core.hpp> consumers (LtsCoordinate, AES/CES, HLA proxies) resolve the
|
||||
# rtiddsgen-generated core.hpp from the DDS build dir (the qt5 include order);
|
||||
# the OFF-era stub copies in include/Core/ have been removed.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/DDS)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Common)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Common/LtsUtils)
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsCore)
|
||||
# LtsUtilsSettings's generated ltsutilssettings_export.h is included by bare name from
|
||||
# settings.h. Consumer targets that reach settings.h transitively (without linking
|
||||
# LtsUtilsSettings themselves) cannot see it through the target's PUBLIC interface, so the
|
||||
# directory holding the generated header has to be visible tree-wide. The directory contains
|
||||
# only that generated header, so appending it cannot shadow an existing include.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Common/LtsUtils/LtsUtilsSettings)
|
||||
# DDSConnector's generated ddsconnector_export.h is included by bare name from
|
||||
# dds_connector.h and pub_sub_base.h, and reaches targets (the AES ModuleTests) that include
|
||||
# DDSConnector headers without linking ddsconnector. Same shape as LtsUtilsSettings above: the
|
||||
# directory holds only the generated header.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/DDS/DDSConnector)
|
||||
# The generated msg_db_structs.h includes <msg_enums.hpp> by bare name, and Messaging is
|
||||
# reached transitively from OcBaseDownload and the proxy handlers, so its build dir must be
|
||||
# visible tree-wide like the services above. Unlike them there is no include/Messaging stub
|
||||
# tree, so only the build dir is added.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/Messaging)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Z/src/NGLLogger)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/OperatorManagement)
|
||||
# The generated opm_db_structs.h includes <opm_enums.hpp> by bare name and is reached
|
||||
# transitively from OcBaseDownload, so the OperatorManagement build dir has to be visible
|
||||
# tree-wide next to its include/ stub tree above.
|
||||
include_directories(${CMAKE_BINARY_DIR}/Lts/Services/OperatorManagement)
|
||||
# The plugin interface headers live under Lts/Plugins/<Svc>/ and are included both as
|
||||
# <Plugins/<Svc>/x.h> (the qt5 spelling, resolved through the Lts/ root) and, since the
|
||||
# migration dropped the leading segment, as <Svc>/x.h>. Lts/Plugins is therefore needed on
|
||||
# the path. It is appended last so it can only ever resolve includes that were unresolvable
|
||||
# before: every include that resolves today is found in an earlier directory, so no existing
|
||||
# resolution can change.
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Plugins)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/forward-declarations)
|
||||
SET(CMAKE_CXX_STANDARD 17)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
@@ -311,6 +353,13 @@ if(NOT TARGET Qt6::Gui AND EXISTS "${QT6_LIB_DIR}/libQt6Gui.so.6")
|
||||
)
|
||||
endif()
|
||||
|
||||
# Set variable for legacy code that uses ${Qt6_Gui} — like Qt6_Widgets below,
|
||||
# subdirectory CMakeLists contain `set(Qt6_Gui ${Qt6_Gui})` optional-guard
|
||||
# no-ops that keep this root-scope value.
|
||||
if(TARGET Qt6::Gui)
|
||||
set(Qt6_Gui Qt6::Gui)
|
||||
endif()
|
||||
|
||||
# Qt6::Widgets - create manual target (find_package fails without OpenGL)
|
||||
if(EXISTS "${QT6_LIB_DIR}/libQt6Widgets.so.6")
|
||||
if(NOT TARGET Qt6::Widgets)
|
||||
@@ -475,6 +524,13 @@ if(NOT TARGET Qt6::WebSockets)
|
||||
message(STATUS "Created stub target for Qt6::WebSockets (library not available)")
|
||||
endif()
|
||||
|
||||
# Set variable for legacy code that uses ${Qt6_WebSockets} — subdirectory
|
||||
# CMakeLists contain `set(Qt6_WebSockets ${Qt6_WebSockets})` optional-guard
|
||||
# no-ops that keep this root-scope value.
|
||||
if(TARGET Qt6::WebSockets)
|
||||
set(Qt6_WebSockets Qt6::WebSockets)
|
||||
endif()
|
||||
|
||||
# The real Qt6 WebSockets module is available (either via find_package or the
|
||||
# manual import above): enable the real websocket code paths in httq,
|
||||
# LtsWebSocket and the migrated services (they check this macro; without it
|
||||
@@ -526,7 +582,20 @@ IF(BUILD_RTI)
|
||||
|
||||
# RTI Include-Pfade auch an MOC weitergeben (für Q_OBJECT Header mit RTI Types)
|
||||
SET(CMAKE_AUTOMOC_INCLUDE_DIRECTORIES ${CMAKE_AUTOMOC_INCLUDE_DIRECTORIES} ${RTI_INCLUDE_DIRS})
|
||||
|
||||
|
||||
# The generated <svc>_topic_type_plugin.h / <svc>_record_replay_plugin.h
|
||||
# headers use Q_INTERFACES(DDSGeneric::TopicTypePlugin), so moc must see
|
||||
# the Q_DECLARE_INTERFACE in Lts/DDS/... (resolved through the Lts include
|
||||
# root). Without this path every <svc>TopicTypePlugin fails with
|
||||
# "Undefined interface" even though the compiler sees the header.
|
||||
SET(CMAKE_AUTOMOC_INCLUDE_DIRECTORIES ${CMAKE_AUTOMOC_INCLUDE_DIRECTORIES} ${CMAKE_SOURCE_DIR}/Lts)
|
||||
|
||||
# The ElevationMapManager stub header (include/Viewer/SituationMap/ElevationMap/)
|
||||
# lives apart from its source (src/...), so moc needs its directory explicitly.
|
||||
# NOTE: this must be set at root scope - subdir-scope appends do not reach
|
||||
# the AutogenInfo MOC_INCLUDES.
|
||||
SET(CMAKE_AUTOMOC_INCLUDE_DIRECTORIES ${CMAKE_AUTOMOC_INCLUDE_DIRECTORIES} ${CMAKE_SOURCE_DIR}/include/Viewer/SituationMap/ElevationMap)
|
||||
|
||||
# IMPORTED Targets für RTI Libraries erstellen
|
||||
# Debug und Release Varianten korrekt konfigurieren
|
||||
FOREACH(lib nddsc nddscore nddscpp nddscpp2 nddsctesthelpers)
|
||||
|
||||
@@ -43,7 +43,8 @@ QString DataTopicWrapper::typeFq() const
|
||||
|
||||
QString MemberInformationWrapper::ddsToQVariant() const
|
||||
{
|
||||
return QStringLiteral("toQVariant(data.") + cppMemberName() + QStringLiteral("())");
|
||||
// rtiddsgen 7.7 generates plain public members - access them directly.
|
||||
return QStringLiteral("toQVariant(data.") + cppMemberName() + QStringLiteral(")");
|
||||
}
|
||||
|
||||
QString MemberInformationWrapper::qVariantToDds() const
|
||||
@@ -51,7 +52,7 @@ QString MemberInformationWrapper::qVariantToDds() const
|
||||
const QString ddsType =
|
||||
isOptional() ? (QStringLiteral("dds::core::optional<") + cppDdsType() + QLatin1Char('>')) : (cppDdsType());
|
||||
|
||||
return QStringLiteral("data.") + cppMemberName() + QStringLiteral("() = fromQVariant<") + ddsType +
|
||||
return QStringLiteral("data.") + cppMemberName() + QStringLiteral(" = fromQVariant<") + ddsType +
|
||||
QStringLiteral(">(q.value(i++))");
|
||||
}
|
||||
|
||||
@@ -61,14 +62,15 @@ QString MemberInformationWrapper::ddsToJsonElement() const
|
||||
if (cppMemberName().isEmpty())
|
||||
return QStringLiteral("obj[QStringLiteral(\"") + cppType() + QStringLiteral("\")] = element;");
|
||||
|
||||
const QString memberAccess = isCppStruct() ? cppMemberName() : cppMemberName() + QStringLiteral("()");
|
||||
// rtiddsgen 7.7 generates plain public members for every kind of
|
||||
// member (struct or not), so no getter call is emitted.
|
||||
const QString memberAccess = cppMemberName();
|
||||
if (!isOptional())
|
||||
return QStringLiteral("obj[QStringLiteral(\"") + cppMemberName() + QStringLiteral("\")] = ") + cppToJsonPre() +
|
||||
QStringLiteral("element.") + memberAccess + cppToJsonPost();
|
||||
|
||||
const QString optionalAccess =
|
||||
isCppStruct() ? cppMemberName() + QStringLiteral(".is_set()") : cppMemberName() + QStringLiteral("().is_set()");
|
||||
const QString getValue = isCppStruct() ? cppMemberName() : cppMemberName() + QStringLiteral("()");
|
||||
const QString optionalAccess = cppMemberName() + QStringLiteral(".is_set()");
|
||||
const QString getValue = cppMemberName();
|
||||
return QStringLiteral("if (element.") + optionalAccess + QStringLiteral(") ") +
|
||||
QStringLiteral("obj[QStringLiteral(\"") + cppMemberName() + QStringLiteral("\")] = ") + cppToJsonPre() +
|
||||
QStringLiteral("*element.") + getValue + cppToJsonPost();
|
||||
@@ -86,12 +88,10 @@ QString MemberInformationWrapper::jsonElementToDds() const
|
||||
if (isOptional())
|
||||
ret += QStringLiteral("if (!val.isNull()) ");
|
||||
|
||||
if (isCppStruct())
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral(" = ") + cppFromJsonPre2() +
|
||||
QStringLiteral("val") + cppFromJsonPost();
|
||||
else
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral("(") + cppFromJsonPre2() +
|
||||
QStringLiteral("val") + cppFromJsonPost() + QStringLiteral(")");
|
||||
// rtiddsgen 7.7 generates plain public members - assign instead of
|
||||
// calling a setter.
|
||||
ret += QStringLiteral("element.") + cppMemberName() + QStringLiteral(" = ") + cppFromJsonPre2() +
|
||||
QStringLiteral("val") + cppFromJsonPost();
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -874,6 +874,13 @@ bool StructBuilder::fixupQVariantConversions(MemberInformation& mi) const
|
||||
datatype == QLatin1String("long long"))
|
||||
{
|
||||
mi.cpp.type = QStringLiteral("qint64");
|
||||
// IDL `long long` is int64_t (long) in the rtiddsgen 4.7 output, while the Qt side is
|
||||
// qint64 (long long). Those are distinct types, so assignments such as
|
||||
// `optional<int64_t> = optional<qint64>` do not compile. Carry the generated type
|
||||
// separately, as the sequence<octet> branch below already does, so the DDS-facing code
|
||||
// emitted from cppDdsType() names the type the struct member really has. The spelling
|
||||
// is the one rtiddsgen itself writes, matching what the `long` branch does with int32_t.
|
||||
mi.cpp.ddsType = QStringLiteral("int64_t");
|
||||
mi.cpp.fromVariantPost = QStringLiteral(".toLongLong()");
|
||||
mi.cpp.fromJsonPost = QStringLiteral(".toDouble()");
|
||||
mi.cpp.toJsonPre = QStringLiteral("static_cast<qint64>(");
|
||||
@@ -1039,7 +1046,7 @@ QVector<MemberInformation> StructBuilder::buildDbTableInformationFromIdlData(con
|
||||
pre += columnNamePrefix;
|
||||
pre += member.name + QLatin1Char('_');
|
||||
ret += buildDbTableInformationFromIdlData(cttiChild, tableName, StructBuilder::camelCaseToUnderline(pre),
|
||||
cppStructure + member.name + QStringLiteral("()."));
|
||||
cppStructure + member.name + QStringLiteral("."));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
@@ -48,6 +48,18 @@ QJsonValue toJson(qint64 vec)
|
||||
{
|
||||
return QJsonValue(QString::number(vec));
|
||||
}
|
||||
// IDL 64-bit integers map to int64_t, which is 'long' on LP64 and therefore
|
||||
// distinct from qint64 ('long long'); without this overload the generic
|
||||
// toJson(std::vector<T>) is ambiguous for sequence<int64_t> members.
|
||||
QJsonValue toJson(long vec)
|
||||
{
|
||||
return QJsonValue(QString::number(vec));
|
||||
}
|
||||
template<>
|
||||
long fromJson(const QJsonValue &val, type<long>)
|
||||
{
|
||||
return val.toString().toLong();
|
||||
}
|
||||
|
||||
// std::string
|
||||
QJsonValue toJson(const std::string &element)
|
||||
|
||||
+23
-9
@@ -198,6 +198,17 @@ long long fromQVariant(const QVariant &val, type<long long>)
|
||||
return val.toLongLong();
|
||||
}
|
||||
|
||||
// rtiddsgen 4.7 spells the 64 bit integer members int64_t, which is `long` on LP64 and thus
|
||||
// a different type from the Qt side's qint64 (`long long`). The tag dispatch above is keyed on
|
||||
// the exact type, so the generated type needs its own conversion even though the two are the
|
||||
// same width. GrantleeWrappers::cppDdsType() names the generated member type, so this is the
|
||||
// overload the record replay code instantiates for those members.
|
||||
template<>
|
||||
int64_t fromQVariant(const QVariant &val, type<int64_t>)
|
||||
{
|
||||
return static_cast<int64_t>(val.toLongLong());
|
||||
}
|
||||
|
||||
template<>
|
||||
double fromQVariant(const QVariant &val, type<double>)
|
||||
{
|
||||
@@ -555,7 +566,7 @@ bool RecordReplayPlugin::write{{ dt.name }}(NSqlQuery &q, QHash<QString, qint64>
|
||||
for (const auto &sample : samples)
|
||||
{
|
||||
const DATA &data = sample.data();
|
||||
INFO_LOG(m_logger) << "m_dtc{{ dt.name }} {{ dt.recTable.ddsKey.cppMemberName }}: " << data.{{ dt.recTable.ddsKey.cppMemberName }}();
|
||||
INFO_LOG(m_logger) << "m_dtc{{ dt.name }} {{ dt.recTable.ddsKey.cppMemberName }}: " << data.{{ dt.recTable.ddsKey.cppMemberName }};
|
||||
|
||||
{% for row in dt.recTable.cppMember %}
|
||||
q.bindValue(QStringLiteral(":{{ row.dbColumnName }}"), {{ row.ddsToQVariant }});
|
||||
@@ -565,7 +576,10 @@ bool RecordReplayPlugin::write{{ dt.name }}(NSqlQuery &q, QHash<QString, qint64>
|
||||
if (!q.exec())
|
||||
return false;
|
||||
|
||||
minRecordSampleTime = std::min(minRecordSampleTime, data.sampleTime());
|
||||
// rtiddsgen 4.7 declares sample_time as int64_t (long), while the record
|
||||
// boundary is qint64 (long long); std::min requires both arguments to be
|
||||
// the same type, so narrow the generated member explicitly.
|
||||
minRecordSampleTime = std::min(minRecordSampleTime, static_cast<qint64>(data.sampleTime));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -645,10 +659,10 @@ bool RecordReplayPlugin::readLastSnapshotFor{{ dt.name }}(NSqlQuery &q, qint64 s
|
||||
{% endfor %}
|
||||
|
||||
if (bIsAlive)
|
||||
m_{{ dt.nameFlc }}Map.insert(data.sampleTime(), data);
|
||||
m_{{ dt.nameFlc }}Map.insert(data.sampleTime, data);
|
||||
else
|
||||
m_{{ dt.nameFlc }}DisposedMap.insert(data.sampleTime(), data);
|
||||
m_{{ dt.nameFlc }}Keys.insert(data.{{ dt.key.name }}());
|
||||
m_{{ dt.nameFlc }}DisposedMap.insert(data.sampleTime, data);
|
||||
m_{{ dt.nameFlc }}Keys.insert(data.{{ dt.key.name }});
|
||||
}
|
||||
m_snapshot{{ dt.name }}MapTime = timeSnapshot;
|
||||
|
||||
@@ -677,10 +691,10 @@ bool RecordReplayPlugin::read{{ dt.name }}(NSqlQuery &q, qint64 fromTime, qint64
|
||||
{% endfor %}
|
||||
|
||||
if (bIsAlive)
|
||||
m_{{ dt.nameFlc }}Map.insert(data.sampleTime(), data);
|
||||
m_{{ dt.nameFlc }}Map.insert(data.sampleTime, data);
|
||||
else
|
||||
m_{{ dt.nameFlc }}DisposedMap.insert(data.sampleTime(), data);
|
||||
m_{{ dt.nameFlc }}Keys.insert(data.{{ dt.key.name }}());
|
||||
m_{{ dt.nameFlc }}DisposedMap.insert(data.sampleTime, data);
|
||||
m_{{ dt.nameFlc }}Keys.insert(data.{{ dt.key.name }});
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -795,7 +809,7 @@ void RecordReplayPlugin::clearData{{ dt.name }}()
|
||||
{{ dt.name }} tmpData;
|
||||
for (auto key : m_{{ dt.nameFlc }}Keys)
|
||||
{
|
||||
tmpData.{{ dt.key.name }}(key);
|
||||
tmpData.{{ dt.key.name }} = key;
|
||||
m_dts{{ dt.name }}->remove(tmpData);
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -18,8 +18,10 @@
|
||||
#include <{{ include_prefix }}/{{ namespace_abbr }}_dts_types.h>
|
||||
#include <{{ include_prefix }}/logger.h>
|
||||
|
||||
// TODO: Problem with QT5_WRAP_CPP ...
|
||||
#include <../../Common/PluginInterfaces/record_replay_plugin.h>
|
||||
// Resolved from the Lts include root (see include_directories(BEFORE .../Lts)
|
||||
// in the root CMakeLists); the old <../../Common/...> spelling only worked
|
||||
// for in-source builds.
|
||||
#include <Common/PluginInterfaces/record_replay_plugin.h>
|
||||
|
||||
#include <LtsUtilsCore/pgarray.h>
|
||||
|
||||
|
||||
@@ -15,8 +15,10 @@
|
||||
#include <Common/ProjectConfig/project_defines.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
// TODO: Problem with QT5_WRAP_CPP ...
|
||||
#include <../../DDS/Generic/topic_type_plugin.h>
|
||||
// Resolved from the Lts include root (see include_directories(BEFORE .../Lts)
|
||||
// in the root CMakeLists); the old <../../DDS/...> spelling only worked for
|
||||
// in-source builds because moc/gcc do not resolve it relative to this file.
|
||||
#include <DDS/Generic/topic_type_plugin.h>
|
||||
|
||||
namespace {{ namespace }}
|
||||
{
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ltscoordinate_export.h"
|
||||
#include <LtsCoordinate/ltscoordinate_export.h>
|
||||
|
||||
#include <Core/core.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -48,7 +48,7 @@ class LTSCOORDINATE_EXPORT LtsCoordVector
|
||||
utmVectorRef.reserve(m_geo_coordinates.size());
|
||||
|
||||
for (const auto& geoCoord : std::as_const(m_geo_coordinates))
|
||||
utmVectorRef.push_back(LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat(), zone));
|
||||
utmVectorRef.push_back(LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon, geoCoord.lat, zone));
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -29,13 +29,13 @@ double LtsCoordinate::elevationAt(double defaultElevation, bool* bIsCovered) con
|
||||
if (!std::isnan(m_elevation))
|
||||
return m_elevation;
|
||||
if (m_getElevationCB)
|
||||
m_elevation = m_getElevationCB(m_geo.lon(), m_geo.lat(), defaultElevation, bIsCovered);
|
||||
m_elevation = m_getElevationCB(m_geo.lon, m_geo.lat, defaultElevation, bIsCovered);
|
||||
return m_elevation;
|
||||
}
|
||||
|
||||
void LtsCoordinate::setZValueAccordingElevation(double defaultElevation)
|
||||
{
|
||||
m_geo.z(elevationAt(defaultElevation));
|
||||
m_geo.z = elevationAt(defaultElevation);
|
||||
}
|
||||
|
||||
double LtsCoordinate::elevationAt(const LtsCoordinate& coordinate, double defaultElevation, bool* bIsCovered)
|
||||
@@ -46,7 +46,7 @@ double LtsCoordinate::elevationAt(const LtsCoordinate& coordinate, double defaul
|
||||
void LtsCoordinate::replaceZValueByElevationIfValue(double zValueToBeReplaced, double defaultElevation)
|
||||
{
|
||||
|
||||
if ((std::isnan(zValueToBeReplaced) && std::isnan(m_geo.z())) || qFuzzyCompare(m_geo.z(), zValueToBeReplaced))
|
||||
if ((std::isnan(zValueToBeReplaced) && std::isnan(m_geo.z)) || qFuzzyCompare(m_geo.z, zValueToBeReplaced))
|
||||
setZValueAccordingElevation(defaultElevation);
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void LtsCoordinate::convertGeoToUtm() const
|
||||
|
||||
int zone = -1;
|
||||
|
||||
if (std::isnan(m_geo.lon()) || std::isnan(m_geo.lat()))
|
||||
if (std::isnan(m_geo.lon) || std::isnan(m_geo.lat))
|
||||
{
|
||||
fprintf(stderr, "Error while fromGeographic, value is NaN\n");
|
||||
m_utm2D = LtsCoordTrans::UtmCoordinate();
|
||||
@@ -90,7 +90,7 @@ void LtsCoordinate::convertGeoToUtm() const
|
||||
++s_conversion_counter;
|
||||
#endif
|
||||
|
||||
m_utm2D = LtsCoordTrans::UtmCoordinate::fromGeographic(m_geo.lon(), m_geo.lat(), zone);
|
||||
m_utm2D = LtsCoordTrans::UtmCoordinate::fromGeographic(m_geo.lon, m_geo.lat, zone);
|
||||
Q_ASSERT_X(m_utm2D.zone > 0, "LtsCoordinate", "zone has to be set");
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ltscoordinate_export.h"
|
||||
#include <LtsCoordinate/ltscoordinate_export.h>
|
||||
|
||||
#include <Core/core.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
@@ -35,7 +35,7 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
|
||||
explicit LtsCoordinate(const Core::GeoPosition& geoPos) : m_geo(geoPos) {}
|
||||
|
||||
explicit LtsCoordinate(const Core::GeoPosition2D& geoPos2D) : m_geo(geoPos2D.lon(), geoPos2D.lat(), std::nan("")) {}
|
||||
explicit LtsCoordinate(const Core::GeoPosition2D& geoPos2D) : m_geo(geoPos2D.lon, geoPos2D.lat, std::nan("")) {}
|
||||
|
||||
LtsCoordinate(const LtsCoordTrans::UtmCoordinate& utm2D, double zValue) = delete;
|
||||
|
||||
@@ -67,7 +67,7 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
|
||||
bool hasGeo() const
|
||||
{
|
||||
return !(valueIsNullOrNan(m_geo.lon()) || valueIsNullOrNan(m_geo.lat()));
|
||||
return !(valueIsNullOrNan(m_geo.lon) || valueIsNullOrNan(m_geo.lat));
|
||||
}
|
||||
|
||||
bool hasUtm() const
|
||||
@@ -95,7 +95,7 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
|
||||
Core::GeoPosition2D geoPosition2D() const
|
||||
{
|
||||
return Core::GeoPosition2D(m_geo.longitude, m_geo.latitude);
|
||||
return Core::GeoPosition2D(m_geo.lon, m_geo.lat);
|
||||
}
|
||||
|
||||
const LtsCoordTrans::UtmCoordinate& utmCoordinate() const
|
||||
@@ -107,23 +107,23 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
|
||||
double& rz()
|
||||
{
|
||||
return m_geo.altitude;
|
||||
return m_geo.z;
|
||||
}
|
||||
|
||||
double z() const
|
||||
{
|
||||
return m_geo.z();
|
||||
return m_geo.z;
|
||||
}
|
||||
|
||||
void setZ(double value)
|
||||
{
|
||||
m_geo.z(value);
|
||||
m_geo.z = value;
|
||||
}
|
||||
|
||||
LtsCoordTrans::UtmCoordinate utmCoordinateDiffZone(int zone) const
|
||||
{
|
||||
|
||||
m_utm2D_differentZone = LtsCoordTrans::UtmCoordinate::fromGeographic(m_geo.lon(), m_geo.lat(), zone);
|
||||
m_utm2D_differentZone = LtsCoordTrans::UtmCoordinate::fromGeographic(m_geo.lon, m_geo.lat, zone);
|
||||
return m_utm2D_differentZone;
|
||||
}
|
||||
|
||||
@@ -146,17 +146,17 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
|
||||
QPointF toGeoPointF() const
|
||||
{
|
||||
return QPointF(m_geo.lon(), m_geo.lat());
|
||||
return QPointF(m_geo.lon, m_geo.lat);
|
||||
}
|
||||
|
||||
QPoint3D toGeoPoint3D() const
|
||||
{
|
||||
return QPoint3D(m_geo.lon(), m_geo.lat(), m_geo.z());
|
||||
return QPoint3D(m_geo.lon, m_geo.lat, m_geo.z);
|
||||
}
|
||||
|
||||
UtmCoordinate3D toUtmCoordinate3D() const
|
||||
{
|
||||
return UtmCoordinate3D(utmCoordinate(), m_geo.z());
|
||||
return UtmCoordinate3D(utmCoordinate(), m_geo.z);
|
||||
}
|
||||
|
||||
using elevationCbFunc = std::function<double(double, double, double, bool*)>;
|
||||
@@ -174,7 +174,7 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
|
||||
double heightOverElevation() const
|
||||
{
|
||||
return m_geo.z() - elevationAt();
|
||||
return m_geo.z - elevationAt();
|
||||
}
|
||||
|
||||
double distanceUtm2D(const LtsCoordinate& other) const
|
||||
@@ -203,13 +203,13 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
void clearGeo() const
|
||||
{
|
||||
clearGeoLonLat();
|
||||
m_geo.z(std::nan(""));
|
||||
m_geo.z = std::nan("");
|
||||
}
|
||||
|
||||
void clearGeoLonLat() const
|
||||
{
|
||||
m_geo.lon(0);
|
||||
m_geo.lat(0);
|
||||
m_geo.lon = 0;
|
||||
m_geo.lat = 0;
|
||||
}
|
||||
|
||||
void clearUtm() const
|
||||
@@ -245,7 +245,7 @@ class LTSCOORDINATE_EXPORT LtsCoordinate
|
||||
const auto& utmTemp = utmCoordinateInternal(zone);
|
||||
pntRef.rx() = utmTemp.x;
|
||||
pntRef.ry() = utmTemp.y;
|
||||
pntRef.rz() = m_geo.z();
|
||||
pntRef.rz() = m_geo.z;
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -31,9 +31,6 @@ if(QT6_GUI_AVAILABLE)
|
||||
PRIVATE
|
||||
NGLLogger
|
||||
## LtsSessionDataDds
|
||||
## ExmDataPluginInterface # External dependency - missing
|
||||
## situationMapCommon # External dependency - missing
|
||||
## situationMapElevationMap # External dependency - missing
|
||||
PUBLIC
|
||||
LtsUtilsCoreHeaderOnly
|
||||
Qt6::Core
|
||||
@@ -42,7 +39,14 @@ if(QT6_GUI_AVAILABLE)
|
||||
endif()
|
||||
|
||||
if(BUILD_RTI)
|
||||
target_link_libraries(LtsElevation PRIVATE AsmDataPluginInterface)
|
||||
# All ElevationMapManager / resource_path / exm-dtc usages live inside
|
||||
# #ifdef BUILD_RTI in lts_elevation_manager.cpp (Qt5 dependencies restored).
|
||||
target_link_libraries(LtsElevation PRIVATE
|
||||
AsmDataPluginInterface
|
||||
ExmDataPluginInterface
|
||||
situationMapCommon
|
||||
situationMapElevationMap
|
||||
)
|
||||
endif()
|
||||
|
||||
ADD_SUBDIRECTORY(UnitTest_Elevation)
|
||||
@@ -6,6 +6,12 @@
|
||||
#include <AssetManagement/asm_data_plugin_interface.h>
|
||||
#include <ExerciseManagement/exm_data_plugin_interface.h>
|
||||
#include <Viewer/SituationMap/ElevationMap/elevation_map_manager.h>
|
||||
#include <Viewer/SituationMap/Common/resource_path.h>
|
||||
|
||||
#include <QDir>
|
||||
#include <QHash>
|
||||
#include <QSharedPointer>
|
||||
#include <QUrl>
|
||||
|
||||
static_assert((int)SituationMap::ElevationMapManager::LineOfSight::LOS_UNDEFINED ==
|
||||
(int)LtsElevation::LineOfSight::LOS_UNDEFINED,
|
||||
@@ -106,15 +112,71 @@ LtsElevationManager::createInstance(int exerciseId, const std::shared_ptr<Exerci
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QStringList filePaths_rough_to_fine;
|
||||
// Qt5 logic restored (the qt6 port had dropped the exerciseId->trainingAreaId
|
||||
// caching and always returned nullptr here).
|
||||
#ifdef BUILD_RTI
|
||||
filePaths_rough_to_fine = getFilenamesForExercise(exerciseId);
|
||||
int trainingAreaId = -1;
|
||||
|
||||
// remember for future calls
|
||||
// (so createInstance should work WITHOUT dtcs)
|
||||
// Idea: MainHandler: createInstance with exerciseId and valid dtcs
|
||||
// Plugin or simular: createInstance with exerciseId and no dtcs
|
||||
static QHash<int, int> s_exIdToTaIdStore;
|
||||
|
||||
const auto exTaIt = s_exIdToTaIdStore.find(exerciseId);
|
||||
if (exTaIt != s_exIdToTaIdStore.end())
|
||||
{
|
||||
// CASE 1:
|
||||
// already created:
|
||||
trainingAreaId = *exTaIt;
|
||||
}
|
||||
else
|
||||
{
|
||||
// CASE 2:
|
||||
// ... or create on demand:
|
||||
if (!exmDtc || !asmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs for exerciseId=" << exerciseId
|
||||
<< ", asmDtc=" << asmDtc
|
||||
<< ", exmDtc=" << exmDtc;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// exId to taId
|
||||
trainingAreaId = exerciseIdToTrainingAreaId(exerciseId, exmDtc);
|
||||
if (trainingAreaId <= 0)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error getting trainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId
|
||||
<< ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// store and remember:
|
||||
s_exIdToTaIdStore[exerciseId] = trainingAreaId;
|
||||
}
|
||||
|
||||
// CASE 1: Following should work even with invalid asmDtc:
|
||||
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId, asmDtc);
|
||||
if (!temp)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on createInstanceForTrainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId
|
||||
<< ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// add exmDtc
|
||||
temp->initDDS(exmDtc, asmDtc);
|
||||
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END, exerciseId=" << exerciseId;
|
||||
return temp;
|
||||
#else
|
||||
Q_UNUSED(exerciseId);
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " BUILD_RTI=OFF, cannot get filenames for exercise";
|
||||
#endif
|
||||
Q_UNUSED(filePaths_rough_to_fine);
|
||||
Q_UNUSED(exmDtc);
|
||||
Q_UNUSED(asmDtc);
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " BUILD_RTI=OFF, cannot create instance";
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::getInstance(int exerciseId)
|
||||
@@ -291,19 +353,19 @@ QStringList LtsElevationManager::getFilenamesForTrainingArea(int trainingAreaId)
|
||||
{
|
||||
d->m_asmDtc->waitForHistoricalDataTrainingArea(1000);
|
||||
const AssetManagement::TrainingArea& ta = d->m_asmDtc->trainingArea(trainingAreaId);
|
||||
if (ta.id() != trainingAreaId)
|
||||
if (ta.id != trainingAreaId)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " Error on s_asmDtc->trainingArea"
|
||||
<< ", trainingAreaId=" << trainingAreaId;
|
||||
return {};
|
||||
}
|
||||
const std::vector<AssetManagement::MapDescription>& mdVec = ta.elevation();
|
||||
const std::vector<AssetManagement::MapDescription>& mdVec = ta.elevation;
|
||||
filePaths_rough_to_fine.reserve(mdVec.size());
|
||||
|
||||
for (const AssetManagement::MapDescription& md : std::as_const(mdVec))
|
||||
{
|
||||
|
||||
QUrl url(QString::fromStdString(md.url()));
|
||||
QUrl url(QString::fromStdString(md.url));
|
||||
QString filePathAbs = url.toLocalFile();
|
||||
if (QDir::isRelativePath(filePathAbs))
|
||||
filePathAbs = SituationMap::getResourcePath() + QStringLiteral("/elevation/") + filePathAbs;
|
||||
@@ -372,13 +434,13 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId,
|
||||
exmDtc->waitForHistoricalDataExercise(1000);
|
||||
|
||||
const ExerciseManagement::Exercise& exm = exmDtc->exercise(exerciseId);
|
||||
if (exm.id() != exerciseId)
|
||||
if (exm.id != exerciseId)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on m_exmDtc->exercise"
|
||||
<< ", exerciseId=" << exerciseId;
|
||||
return -1;
|
||||
}
|
||||
trainingAreaId = exm.trainingAreaId();
|
||||
trainingAreaId = exm.trainingAreaId;
|
||||
|
||||
if (trainingAreaId <= 0)
|
||||
{
|
||||
|
||||
@@ -293,7 +293,9 @@ bool LtsPluginLoader::loadPlugins(PluginType requestedPluginType,
|
||||
}
|
||||
|
||||
const QString jsonIid = iid.value().toString().toLower(); // LOWERCASE ! (pun intended)
|
||||
const QVector<QStringRef> iidParameters = jsonIid.splitRef(QLatin1Char(':'));
|
||||
// Qt6: QStringRef/QString::splitRef were removed; QStringView::split
|
||||
// provides the same zero-copy tokenization.
|
||||
const QList<QStringView> iidParameters = QStringView{jsonIid}.split(QLatin1Char(':'));
|
||||
|
||||
DEBUG_LOG(logger) << "Plugin " << absoluteFilePath << " provides iid '" << jsonIid;
|
||||
|
||||
|
||||
+6
-18
@@ -46,21 +46,15 @@ RequestHelper::RequestHelper(QObject* parent, bool quiet,
|
||||
}
|
||||
|
||||
void RequestHelper::addRequest(const std::function<int64_t()>& requestFunction,
|
||||
const std::function<void(const FunctionReplyType& baseReply)>& baseReplyHandler)
|
||||
const std::function<void(const Core::FunctionReply& baseReply)>& baseReplyHandler)
|
||||
{
|
||||
m_requestFunctions.append(RequestFunctionContainer(requestFunction, baseReplyHandler));
|
||||
}
|
||||
|
||||
bool RequestHelper::requestReply(const FunctionReplyType& baseReply)
|
||||
bool RequestHelper::requestReply(const Core::FunctionReply& baseReply)
|
||||
{
|
||||
#ifdef BUILD_RTI
|
||||
// Bei BUILD_RTI=ON: baseReply ist Core::FunctionReply, cast von dds::core::Reference
|
||||
// Die Implementation erwartet Core::FunctionReplyObject
|
||||
const Core::FunctionReplyObject fro(baseReply.id(), baseReply.errorString(), baseReply.errorParams());
|
||||
#else
|
||||
// Stub-Version: nur id und error string
|
||||
const Core::FunctionReplyObject fro(baseReply.id(), baseReply.str().c_str());
|
||||
#endif
|
||||
// rtiddsgen 7.7 generates plain public members (no getters/setters)
|
||||
const Core::FunctionReplyObject fro(baseReply.id, baseReply.errorString, baseReply.errorParams);
|
||||
return _requestReply(fro, &baseReply);
|
||||
}
|
||||
|
||||
@@ -69,7 +63,7 @@ bool RequestHelper::requestReply(const Core::FunctionReplyObject& replyObject)
|
||||
return _requestReply(replyObject, nullptr);
|
||||
}
|
||||
|
||||
bool RequestHelper::_requestReply(const Core::FunctionReplyObject& fro, const FunctionReplyType* baseReply)
|
||||
bool RequestHelper::_requestReply(const Core::FunctionReplyObject& fro, const Core::FunctionReply* baseReply)
|
||||
{
|
||||
m_errorString = fro.translated();
|
||||
|
||||
@@ -100,14 +94,8 @@ bool RequestHelper::_requestReply(const Core::FunctionReplyObject& fro, const Fu
|
||||
if (baseReply)
|
||||
m_singleRequestCustomFunctionReply(*baseReply);
|
||||
else
|
||||
#ifdef BUILD_RTI
|
||||
m_singleRequestCustomFunctionReply(
|
||||
Core::FunctionReply(fro.id(), fro.str(), fro.args(), fro.additionalInfo()));
|
||||
#else
|
||||
// Stub-Version: FunctionReply mit passendem Konstruktor
|
||||
m_singleRequestCustomFunctionReply(
|
||||
Core::FunctionReply(fro.id(), fro.str(), fro.args(), fro.additionalInfo()));
|
||||
#endif
|
||||
}
|
||||
|
||||
if (fro.error())
|
||||
@@ -195,7 +183,7 @@ void RequestHelper::slotNextRequest()
|
||||
|
||||
void RequestHelper::startSingleBackgroundRequest(
|
||||
const std::function<int64_t()>& requestFunction,
|
||||
const std::function<void(const FunctionReplyType&)>& baseReplyHandler)
|
||||
const std::function<void(const Core::FunctionReply&)>& baseReplyHandler)
|
||||
{
|
||||
m_blockingCall = false;
|
||||
startSingleRequest(requestFunction, baseReplyHandler);
|
||||
|
||||
@@ -22,6 +22,10 @@ NGL_ADD_LIBRARY2(AAR SV WS HLA ddsconnector SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ddsconnector
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
# dds_connector.h includes the generated ddsconnector_export.h with a
|
||||
# quoted include; consumers (svcFilterManagement etc.) resolve it only
|
||||
# if the binary dir with the GENERATE_EXPORT_HEADER output is exported.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_SOURCE_DIR}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsconnector
|
||||
|
||||
@@ -47,7 +47,6 @@ class FunctionTopicTests : public QObject
|
||||
const DdsUnitTests::FunctionRequestWithState& request);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void requestWithState();
|
||||
|
||||
private:
|
||||
|
||||
@@ -31,6 +31,10 @@ NGL_ADD_LIBRARY2(WS AAR SV HLA ddsfts SHARED ${SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(ddsfts
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
# generic_fts_internal.h includes the generated ddsfts_export.h with a
|
||||
# quoted include; consumers (the generated *_topic_type_plugin.cpp)
|
||||
# resolve it only if the binary dir with the export header is exported.
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../../Proxies/TrainingAreaBase
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(ddsfts
|
||||
|
||||
-1
@@ -36,7 +36,6 @@ class AesInfoDialog : public LtsWidgets::LtsDialog,
|
||||
}
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void retranslate() override;
|
||||
|
||||
void handleNContamination(const AesItemView& aesItemView);
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ class TopicEditor : public TopicEditorBase::TopicEditor
|
||||
~TopicEditor();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void updateInternalData() override final;
|
||||
void retranslate() override final;
|
||||
|
||||
|
||||
-1
@@ -47,7 +47,6 @@ class BldConfigDialog : public LtsWidgets::LtsDialog,
|
||||
void slotCmbStatusCurrentIndexChanged(int index);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void fillCbx();
|
||||
|
||||
private:
|
||||
|
||||
-1
@@ -58,7 +58,6 @@ class InfoDialogBase : public LtsWidgets::LtsDialog
|
||||
void onShowEgcuMonitor();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger& m_logger;
|
||||
virtual void showBuildingInfos() = 0;
|
||||
virtual QString buildingDisplayName() const = 0;
|
||||
|
||||
|
||||
-2
@@ -49,7 +49,6 @@ public:
|
||||
int changedCallbackCount() { return m_settingsChangedCb.size() ;}
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void callSettingsChangedCb(Part part);
|
||||
static SymbolVisibility readSymbolVisibility(const QJsonObject &obj,
|
||||
const QString &val,
|
||||
@@ -62,7 +61,6 @@ private Q_SLOTS:
|
||||
void onParticipantChanged(const ParticipantManagement::Participant &data, ParticipantManagement::DataModification mod);
|
||||
void onRebuildCollapsExpandFilter();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool isInCollapsedTree(int participantId, QSet<int> &visitedIds) const;
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
-1
@@ -63,7 +63,6 @@ public:
|
||||
void showSnapshot();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSnapshotRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onReplayPartitionRemoveReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject);}
|
||||
void onChangeReplayStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject);}
|
||||
|
||||
-1
@@ -49,7 +49,6 @@ public:
|
||||
void onFolderModifyReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override final;
|
||||
int createFolder(int parentFolderId, const QString &folderName, int userId, bool isHidden = false);
|
||||
|
||||
-2
@@ -36,7 +36,6 @@ public:
|
||||
~ParticipantEditItemWidgetBase();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool init(const std::shared_ptr<ParticipantManagement::Interface::Dtc> &dtc,
|
||||
const std::shared_ptr<ParticipantManagement::ForeignGuiComboboxInterface> &ppmGuiCbxIfc,
|
||||
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asb,
|
||||
@@ -57,7 +56,6 @@ protected Q_SLOTS:
|
||||
void onChangeSymbol(const QString &sidc);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
ParticipantManagement::TypeClass typeClassIdFromTypeId(int typeId) const;
|
||||
bool isUnitType(int typeId) const;
|
||||
|
||||
|
||||
-1
@@ -101,7 +101,6 @@ public:
|
||||
QString getHierarchyFromIndex(const QModelIndex &index) const;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void gatherParticipants(QHash<int, ParticipantData> &tmap,
|
||||
QHash<int, QSet<int>> &parentId2id) const;
|
||||
|
||||
|
||||
-2
@@ -35,7 +35,6 @@ class PPMCOMMON_EXPORT ParticipantIconModelBase : public NGLTreeModel
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
ParticipantIconModelBase(const std::shared_ptr<Interface::Dtc> &ppmDtc,
|
||||
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbIfc,
|
||||
const QStringList &hdr,
|
||||
@@ -54,7 +53,6 @@ protected:
|
||||
bool updateIcon(const QModelIndex ¤tIndex, NGLTreeItem *itemToUpdate, const QIcon &icon);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onTypeChanged(const ParticipantManagement::Type &data, DataModification modType);
|
||||
|
||||
protected:
|
||||
|
||||
-1
@@ -60,7 +60,6 @@ public:
|
||||
const std::shared_ptr<AdvancedSymbology::ForeignDataInterface> &asbIfc);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override;
|
||||
void showIsSimulated();
|
||||
|
||||
-1
@@ -64,7 +64,6 @@ Q_SIGNALS:
|
||||
void modifyParticipantData(const QVector<ParticipantData> &participantData, const QString &originatorMimeType);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool moveFromPartyToPool(int rootParticipantId, const QString &mimeType);
|
||||
QVector<Participant> getSuperiorParticipants(int participantId);
|
||||
bool convertFromParticipantTemplateToParticipantData(const ParticipantManagement::TemplateParticipant &inputParticipant, ParticipantManagement::ParticipantData &outPutData);
|
||||
|
||||
-1
@@ -61,7 +61,6 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onModifyStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onInitParticipantReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void onSendMessageReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
-1
@@ -103,7 +103,6 @@ public:
|
||||
QString getHierarchyFromIndex(const QModelIndex &index) const;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void gatherParticipants(QHash<int, ParticipantData> &tmap,
|
||||
QHash<int, QSet<int>> &parentId2id) const;
|
||||
|
||||
|
||||
-1
@@ -47,7 +47,6 @@ public:
|
||||
bool init(LtsSession::LtsSession *session, bool showAllOptions = false);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override final;
|
||||
void onSelectiveReammunitionReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
-2
@@ -78,7 +78,6 @@ public:
|
||||
~ParticipantSetInjuryDialog();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onModifyStateReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
||||
void retranslate() override;
|
||||
|
||||
@@ -94,7 +93,6 @@ private slots:
|
||||
void resetRadioStates(bool onlySides = false);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool apply() override final;
|
||||
|
||||
private:
|
||||
|
||||
-1
@@ -46,7 +46,6 @@ public:
|
||||
private slots:
|
||||
void onQualificationChanged();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void fillCb();
|
||||
void setCbxName();
|
||||
qint64 getProcedures();
|
||||
|
||||
-1
@@ -61,7 +61,6 @@ public:
|
||||
bool loadTemplate(int templateRootId, bool isSupport = false);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool initButtons();
|
||||
QByteArray getMimeData(const Type &type, const QImage &image);
|
||||
|
||||
-1
@@ -95,7 +95,6 @@ public:
|
||||
QString getHierarchyFromIndex(const QModelIndex &index) const;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void gatherParticipants(QHash<int, ParticipantData> &tmap,
|
||||
QHash<int, QSet<int>> &parentId2id) const;
|
||||
|
||||
|
||||
-1
@@ -55,7 +55,6 @@ public Q_SLOTS:
|
||||
bool apply() override final;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
QModelIndex selectedIndexView() const;
|
||||
bool isContainer(const QModelIndex &index);
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ private slots:
|
||||
void onOperatorChanged(const OperatorManagement::User &data, DataModification modType);
|
||||
void onSelectionOperatorChanged(const int index);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void retranslate() override;
|
||||
bool apply() override;
|
||||
void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override { m_requestHelper->requestReply(replyObject); }
|
||||
|
||||
-1
@@ -30,7 +30,6 @@ public:
|
||||
|
||||
static bool createTable(NSqlQuery &q, const QString &tableName, const QSqlRecord &record, const QSqlIndex &pk, NGL::INGLLogger &logger);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
-1
@@ -70,7 +70,6 @@ private slots:
|
||||
void slotRunExportStep();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<ExportStep *> parseFilterSteps(
|
||||
int parentTopicId, QJsonObject &detailData, const QVector<TopicReplay::Interface::SituationReplayTime> &allSitReplayTimes
|
||||
);
|
||||
|
||||
-1
@@ -18,7 +18,6 @@ public:
|
||||
bool exportDynamicData(qint64 fromTime, qint64 toTime);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
struct StaticTableToCopy
|
||||
{
|
||||
QString schema;
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ void DataPlugin::onTranslationBlobChanged(const ProjectDataManagement::Translati
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
NGL::setTranslationDataJson(LtsUtils::toQByteArray(data.payload()), data.md5sum().c_str(), true);
|
||||
NGL::setTranslationDataJson(LtsUtils::toQByteArray(data.payload), data.md5sum.c_str(), true);
|
||||
}
|
||||
|
||||
|
||||
|
||||
-1
@@ -234,7 +234,6 @@ private slots:
|
||||
void onParticipantOwnPositionChanged(const Point3D &newPos, int64_t sampleTime);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void startChangedDelayTimer();
|
||||
void startOwnPositionOutdatedTimer();
|
||||
QList<Sim2SituationMapBase *> listOfSim2Map() const;
|
||||
|
||||
-1
@@ -67,7 +67,6 @@ public:
|
||||
QVector<ProjectDataManagement::CasEffect> casEffects(const AreaEffectSimulation::ChargeStruct &chargeStruct);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initializePdm();
|
||||
void onChargeTypeChanged(const ProjectDataManagement::ChargeType &data, DataModification mod);
|
||||
void onGearTypeChargeTypeChanged(const ProjectDataManagement::GearTypeChargeType &data, DataModification mod);
|
||||
|
||||
-1
@@ -168,7 +168,6 @@ public:
|
||||
void setSourceModel(QAbstractItemModel *sourceModel) override;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool lessThan(const QModelIndex &source_left, const QModelIndex &source_right) const override;
|
||||
|
||||
protected:
|
||||
|
||||
+8
@@ -12,6 +12,14 @@ else()
|
||||
endif()
|
||||
|
||||
|
||||
# <logger.h> from the subdirectories (BSM, Json, VWM, ControlEffects) must
|
||||
# resolve to this directory's logger.h (namespace BuildingControlUnit), as in
|
||||
# the qt5 build. The root CMakeLists puts Lts/Proxies/TrainingAreaBase on the
|
||||
# global include path, which would otherwise shadow it with
|
||||
# TrainingAreaBase/logger.h (whose svctabcommon_export.h lives only in the
|
||||
# build tree), breaking these targets.
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
ADD_SUBDIRECTORY(BSM)
|
||||
ADD_SUBDIRECTORY(Json)
|
||||
ADD_SUBDIRECTORY(VWM)
|
||||
|
||||
+15
-16
@@ -259,7 +259,6 @@ double Room::calcRemainingEffect(double SG_alt, double ZF, double WF)
|
||||
|
||||
Building::Building()
|
||||
: m_lastHitPosition(HitPosition())
|
||||
, m_logger(BuildingControlUnit::getLogger("VWM.Building"))
|
||||
{}
|
||||
|
||||
int Building::checkPolygons()
|
||||
@@ -308,12 +307,12 @@ int Building::cleanupPolygons()
|
||||
cleanupDublicatePointsInPolygon(room.id(), owIdx, elemIdx, "room", candidate);
|
||||
if (candidate.size() < 4)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << "wall was made planar: Building '" << m_name << "' -> "
|
||||
NOTICE_LOG(logger()) << "wall was made planar: Building '" << m_name << "' -> "
|
||||
<< " in room " << room.id() << " OuterWall[" << owIdx
|
||||
<< "], element[" << elemIdx << "] "
|
||||
<< " makePlanar and cleanupDublicatePointsInPolygon would generate short polygon, size=" << candidate.size();
|
||||
for (auto point : std::as_const(candidate))
|
||||
NOTICE_LOG(m_logger) << " point= " << point;
|
||||
NOTICE_LOG(logger()) << " point= " << point;
|
||||
|
||||
bMakePlanarDone = false;
|
||||
|
||||
@@ -324,7 +323,7 @@ int Building::cleanupPolygons()
|
||||
|
||||
|
||||
if (bMakePlanarDone)
|
||||
NOTICE_LOG(m_logger) << "wall was made planar: Building '" << m_name << "' -> "
|
||||
NOTICE_LOG(logger()) << "wall was made planar: Building '" << m_name << "' -> "
|
||||
<< " in room " << room.id() << " OuterWall[" << owIdx
|
||||
<< "], element[" << elemIdx << "] "
|
||||
<< " smallestDim=" << (int)makePlanar.getSmallestDim()
|
||||
@@ -354,7 +353,7 @@ int Building::cleanupDublicatePointsInPolygon(int roomId, int idx, int subIdx, c
|
||||
auto p2 = points.at(j);
|
||||
if (qFuzzyCompare(p1, p2))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Building '" << m_name << "' -> "
|
||||
DEBUG_LOG(logger()) << "Building '" << m_name << "' -> "
|
||||
<< "Polygon point " << i << " (" << p1 << ") and " << j << " (" << p2
|
||||
<< ") in room " << roomId << ", " << type << "[" << idx
|
||||
<< "], element[" << subIdx << "] are the same! -> REMOVE";
|
||||
@@ -410,7 +409,7 @@ QVector<HitRoom> Building::roomStates() const
|
||||
hr.fortifyFactor = room.fortifyFactor();
|
||||
hr.directHit = room.isDirectHit();
|
||||
ret += hr;
|
||||
DEBUG_LOG(m_logger) << "HitRoom " << hr.roomId
|
||||
DEBUG_LOG(logger()) << "HitRoom " << hr.roomId
|
||||
<< " damage: " << hr.damagePercent
|
||||
<< "%, remainEffect: " << hr.remainingEffectPercent << "%"
|
||||
<< ", remainingEffectChargeTypeId: " << hr.remainingEffectChargeTypeId << "%"
|
||||
@@ -448,7 +447,7 @@ void Building::setRoomState(DamageState damageState, const QVector<int> &afffect
|
||||
auto it = m_rooms.find(roomId);
|
||||
if (it == m_rooms.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find room with id " << roomId;
|
||||
WARNING_LOG(logger()) << "Could not find room with id " << roomId;
|
||||
continue;
|
||||
}
|
||||
if (damageState == DamageState::Destroyed)
|
||||
@@ -465,7 +464,7 @@ void Building::setFortifyInfo(const QVector<FortifyInfo> &foritfyInfos)
|
||||
auto it = m_rooms.find(info.roomId);
|
||||
if (it == m_rooms.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find room with id " << info.roomId;
|
||||
WARNING_LOG(logger()) << "Could not find room with id " << info.roomId;
|
||||
continue;
|
||||
}
|
||||
Room &room = it.value();
|
||||
@@ -538,14 +537,14 @@ bool Building::hit(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir,
|
||||
const bool bBelowGround = isLastHitPositionBelowGroundHack();
|
||||
if (bBelowGround)
|
||||
{
|
||||
INFO_LOG(m_logger) << " XXXX CES belowGround, reduce charge: " << charge;
|
||||
INFO_LOG(logger()) << " XXXX CES belowGround, reduce charge: " << charge;
|
||||
charge.destructiveFactor *= 0.25;
|
||||
charge.penetrationEffect *= 0.25;
|
||||
INFO_LOG(m_logger) << " XXXX CES belowGround, reduce charge: " << charge;
|
||||
INFO_LOG(logger()) << " XXXX CES belowGround, reduce charge: " << charge;
|
||||
}
|
||||
|
||||
|
||||
INFO_LOG(m_logger) << "XXXXX HitPosition: state=" << m_lastHitPosition.state
|
||||
INFO_LOG(logger()) << "XXXXX HitPosition: state=" << m_lastHitPosition.state
|
||||
<< ", m_name=" << m_name
|
||||
<< ", m_modelId=" << m_modelId
|
||||
<< ", roomId=" << m_lastHitPosition.roomId
|
||||
@@ -560,7 +559,7 @@ bool Building::hit(const LtsUtils::QPoint3D &pos, const LtsUtils::QPoint3D &dir,
|
||||
Room &hitRoom = m_rooms[m_lastHitPosition.roomId];
|
||||
if (!hitRoom.isValid())
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Internal error in hit calculation - could not find room with id " << m_lastHitPosition.roomId;
|
||||
ERROR_LOG(logger()) << "Internal error in hit calculation - could not find room with id " << m_lastHitPosition.roomId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -651,7 +650,7 @@ QMap<int, Building::NeighboursToCheck> Building::checkHitNeighbours(const QMap<i
|
||||
auto itRoom = m_rooms.find(neighbourRoomId);
|
||||
if (itRoom == m_rooms.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Could not find room with id " << neighbourRoomId;
|
||||
WARNING_LOG(logger()) << "Could not find room with id " << neighbourRoomId;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -670,7 +669,7 @@ QMap<int, Building::NeighboursToCheck> Building::checkHitNeighbours(const QMap<i
|
||||
|
||||
const double oldRe = neighbour.remainingEffect();
|
||||
neighbour.setRemainingEffect(neighbourRoom.remainEffect * TF);
|
||||
DEBUG_LOG(m_logger) << "room " << neighbourRoomId << " remaining effect old: "
|
||||
DEBUG_LOG(logger()) << "room " << neighbourRoomId << " remaining effect old: "
|
||||
<< oldRe << " -> new: " << neighbour.remainingEffect();
|
||||
|
||||
|
||||
@@ -740,7 +739,7 @@ int Building::checkDublicatePointsInPolygon(int roomId, int idx, int subIdx, con
|
||||
if (qFuzzyCompare(p1, p2))
|
||||
{
|
||||
++numberOfDuplicates;
|
||||
WARNING_LOG(m_logger) << "Building '" << m_name << "' -> "
|
||||
WARNING_LOG(logger()) << "Building '" << m_name << "' -> "
|
||||
<< "Polygon point " << i << " (" << p1 << ") and " << j << " (" << p2
|
||||
<< ") in room " << roomId << ", " << type << "[" << idx
|
||||
<< "], element[" << subIdx << "] are the same! (size=" << points.size() << ")";
|
||||
@@ -750,7 +749,7 @@ int Building::checkDublicatePointsInPolygon(int roomId, int idx, int subIdx, con
|
||||
|
||||
if (numberOfDuplicates > 0)
|
||||
for (auto point : points)
|
||||
WARNING_LOG(m_logger) << "Building '" << m_name << "' -> " << "point =" << point << " (same points)";
|
||||
WARNING_LOG(logger()) << "Building '" << m_name << "' -> " << "point =" << point << " (same points)";
|
||||
return numberOfDuplicates;
|
||||
}
|
||||
|
||||
|
||||
+1
-2
@@ -28,9 +28,8 @@ public:
|
||||
double transitionFactor() const { return m_transitionFactor; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
int m_id = 0;
|
||||
double m_transitionFactor = 0;
|
||||
};
|
||||
|
||||
-1
@@ -37,7 +37,6 @@ private Q_SLOTS:
|
||||
void onSwitchRelayRequest(const QString &hostname, const SwitchRelayValues &switchRelayValues);
|
||||
void webSocketSendInitialData(QWebSocket *ws);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<int> getAffectedRoomIds(const QVector<HitRoom> &allHitRooms) const;
|
||||
QVector<int> getSegmentDamage(const QVector<HitRoom> &allHitRooms, const int damagePercentNew) const;
|
||||
int getHitRoomId(const QVector<HitRoom> &allHitRooms) const;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
# Make ${Qt6_Gui} optional
|
||||
if(QT6_GUI_AVAILABLE AND TARGET Qt6::Gui)
|
||||
set(Qt6_Gui ${Qt6_Gui})
|
||||
set(Qt6_Gui Qt6::Gui)
|
||||
else()
|
||||
set(Qt6_Gui "")
|
||||
endif()
|
||||
@@ -42,12 +42,6 @@ CODEGEN_DATABASE(SRCS_common ${xml_FILE})
|
||||
|
||||
# Generate *.cpp/*.hpp from idl
|
||||
RTIDDSGEN(SRCS_common bld_enums.idl)
|
||||
# Stub file for compilation (fallback when no IDL exists)
|
||||
CONFIGURE_FILE(
|
||||
${CMAKE_SOURCE_DIR}/include/Buildings/bld_enums.hpp.stub
|
||||
${CMAKE_BINARY_DIR}/Lts/Proxies/Buildings/bld_enums.hpp
|
||||
COPYONLY
|
||||
)
|
||||
RTIDDSGEN(SRCS_common bld.idl)
|
||||
|
||||
# Generate bld_dt[s,c]_types.h, bld_ft[s,c]_types.h
|
||||
@@ -85,6 +79,11 @@ SET(SRCS_client
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcBldClient SHARED ${SRCS_client})
|
||||
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
|
||||
# MAKE_<SYMBOL>_LIB compile guard, but the generated bld_[d|f]tc_impl.h
|
||||
# headers that this target compiles carry such a guard — same situation as
|
||||
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
|
||||
TARGET_COMPILE_DEFINITIONS(svcBldClient PRIVATE MAKE_SVCBLDCLIENT_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcBldClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -113,6 +112,9 @@ SET(SRCS_server
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcBldServer SHARED ${SRCS_server})
|
||||
# Same guard rationale as svcBldClient above: the generated
|
||||
# bld_[d|f]ts_impl.h headers require MAKE_SVCBLDSERVER_LIB.
|
||||
TARGET_COMPILE_DEFINITIONS(svcBldServer PRIVATE MAKE_SVCBLDSERVER_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcBldServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
// Stub file for BUILD_GRANTLEE=OFF
|
||||
// Auto-generated during Qt6 migration
|
||||
namespace DDS { class Topic; }
|
||||
@@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
// Stub file for BUILD_GRANTLEE=OFF
|
||||
// Auto-generated during Qt6 migration
|
||||
@@ -39,7 +39,6 @@ public Q_SLOTS:
|
||||
void setEffectStates(const int buildingId, const int assetId, const QByteArray &properties);
|
||||
void onRelayInfoChanged(const AssetManagement::RelayInfo &info, const DataModification mod);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSetBuildingContaminationStateRequest(const rti::core::SampleIdentity &cookie,
|
||||
const SetBuildingContaminationStateRequest &request) override;
|
||||
void onSetBuildingStatesRequest(const rti::core::SampleIdentity &cookie,
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Buildings
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
BLD_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
SVCBLDCOMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
|
||||
@@ -18,7 +18,6 @@ public:
|
||||
QMap<int, ProjectDataManagement::BuildingChargeEffect> buildingChargeEffects();
|
||||
QMap<int, ProjectDataManagement::ChargeType> chargeTypes();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void initializePdm();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
@@ -28,7 +28,6 @@ public:
|
||||
bool sendPosition();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool sendTelegramInternal() const;
|
||||
bool sendbuildingInfos() const;
|
||||
QJsonObject ObjectFromString(const QString& in);
|
||||
|
||||
+22
-22
@@ -40,7 +40,7 @@ T fromJson(const QByteArray &json)
|
||||
QJsonObject frequencyPlanningJson(QJsonObject obj, const QString &name, FrequencyBand freqBand, int radioStationId)
|
||||
{
|
||||
obj.insert(QStringLiteral("Name"), name);
|
||||
obj.insert(QStringLiteral("FrequencyBand"), freqBand.underlying());
|
||||
obj.insert(QStringLiteral("FrequencyBand"), freqBand);
|
||||
obj.insert(QStringLiteral("RadioStationId"), radioStationId);
|
||||
return obj;
|
||||
}
|
||||
@@ -59,8 +59,8 @@ bool RadioCircuitHF::isValid() const
|
||||
QJsonObject RadioCircuitHF::toJson() const
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj.insert(QStringLiteral("ModulationType"), modulationType.underlying());
|
||||
obj.insert(QStringLiteral("ChannelSpacing"), channelSpacing.underlying());
|
||||
obj.insert(QStringLiteral("ModulationType"), modulationType);
|
||||
obj.insert(QStringLiteral("ChannelSpacing"), channelSpacing);
|
||||
obj.insert(QStringLiteral("Frequency"), frequency);
|
||||
obj.insert(QStringLiteral("Squelch"), squelch);
|
||||
|
||||
@@ -70,8 +70,8 @@ QJsonObject RadioCircuitHF::toJson() const
|
||||
RadioCircuitHF* RadioCircuitHF::fromJson(const QJsonObject &obj)
|
||||
{
|
||||
RadioCircuitHF *spec = new RadioCircuitHF();
|
||||
spec->modulationType = static_cast<ModulationType::inner_enum>(obj.value(QStringLiteral("ModulationType")).toInt(-1));
|
||||
spec->channelSpacing = static_cast<ChannelSpacingHF::inner_enum>(obj.value(QStringLiteral("ChannelSpacing")).toInt());
|
||||
spec->modulationType = static_cast<ModulationType>(obj.value(QStringLiteral("ModulationType")).toInt(-1));
|
||||
spec->channelSpacing = static_cast<ChannelSpacingHF>(obj.value(QStringLiteral("ChannelSpacing")).toInt());
|
||||
spec->frequency = obj.value(QStringLiteral("Frequency")).toInt();
|
||||
spec->squelch = obj.value(QStringLiteral("Squelch")).toInt(-1);
|
||||
if (spec->isValid())
|
||||
@@ -94,8 +94,8 @@ bool RadioCircuitUHF::isValid() const
|
||||
QJsonObject RadioCircuitUHF::toJson() const
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj.insert(QStringLiteral("ModulationType"), modulationType.underlying());
|
||||
obj.insert(QStringLiteral("ChannelSpacing"), channelSpacing.underlying());
|
||||
obj.insert(QStringLiteral("ModulationType"), modulationType);
|
||||
obj.insert(QStringLiteral("ChannelSpacing"), channelSpacing);
|
||||
obj.insert(QStringLiteral("Frequency"), frequency);
|
||||
obj.insert(QStringLiteral("Squelch"), squelchDB);
|
||||
obj.insert(QStringLiteral("Clipper"), clipper);
|
||||
@@ -107,8 +107,8 @@ QJsonObject RadioCircuitUHF::toJson() const
|
||||
RadioCircuitUHF* RadioCircuitUHF::fromJson(const QJsonObject &obj)
|
||||
{
|
||||
RadioCircuitUHF *spec = new RadioCircuitUHF();
|
||||
spec->modulationType = static_cast<ModulationType::inner_enum>(obj.value(QStringLiteral("ModulationType")).toInt(-1));
|
||||
spec->channelSpacing = static_cast<ChannelSpacing::inner_enum>(obj.value(QStringLiteral("ChannelSpacing")).toInt());
|
||||
spec->modulationType = static_cast<ModulationType>(obj.value(QStringLiteral("ModulationType")).toInt(-1));
|
||||
spec->channelSpacing = static_cast<ChannelSpacing>(obj.value(QStringLiteral("ChannelSpacing")).toInt());
|
||||
spec->frequency = obj.value(QStringLiteral("Frequency")).toInt();
|
||||
spec->squelchDB = obj.value(QStringLiteral("Squelch")).toInt(-1);
|
||||
auto clipper = obj.value(QStringLiteral("Clipper"));
|
||||
@@ -128,7 +128,7 @@ RadioCircuitUHF* RadioCircuitUHF::fromJson(const QJsonObject &obj)
|
||||
QJsonObject RadioCircuitVHF::toJson() const
|
||||
{
|
||||
QJsonObject obj;
|
||||
obj.insert(QStringLiteral("OperatingMode"), operatingMode.underlying());
|
||||
obj.insert(QStringLiteral("OperatingMode"), operatingMode);
|
||||
obj.insert(QStringLiteral("FrequencySetDataId"), freqSetDataId);
|
||||
obj.insert(QStringLiteral("PilotTone"), pilotTone);
|
||||
|
||||
@@ -138,7 +138,7 @@ QJsonObject RadioCircuitVHF::toJson() const
|
||||
RadioCircuitVHF* RadioCircuitVHF::fromJson(const QJsonObject &obj)
|
||||
{
|
||||
RadioCircuitVHF *spec = new RadioCircuitVHF();
|
||||
spec->operatingMode = static_cast<RcOperatingMode::inner_enum>(obj.value(QStringLiteral("OperatingMode")).toInt(-1));
|
||||
spec->operatingMode = static_cast<RcOperatingMode>(obj.value(QStringLiteral("OperatingMode")).toInt(-1));
|
||||
spec->freqSetDataId = obj.value(QStringLiteral("FrequencySetDataId")).toInt();
|
||||
auto pilotTone = obj.value(QStringLiteral("PilotTone"));
|
||||
if (pilotTone.isUndefined() || !pilotTone.isBool())
|
||||
@@ -195,19 +195,19 @@ QVector<RadioCircuit*> fromJson(const std::string &json)
|
||||
{
|
||||
RadioCircuit *rc = nullptr;
|
||||
const QJsonObject obj = val.toObject();
|
||||
FrequencyBand ft = static_cast<FrequencyBand::inner_enum>(obj[QStringLiteral("FrequencyBand")].toInt());
|
||||
switch (ft.underlying())
|
||||
FrequencyBand ft = static_cast<FrequencyBand>(obj[QStringLiteral("FrequencyBand")].toInt());
|
||||
switch (ft)
|
||||
{
|
||||
case FrequencyBand_def::HF:
|
||||
case FrequencyBand::HF:
|
||||
rc = RadioCircuitHF::fromJson(obj);
|
||||
break;
|
||||
case FrequencyBand_def::UHF:
|
||||
case FrequencyBand::UHF:
|
||||
rc = RadioCircuitUHF::fromJson(obj);
|
||||
break;
|
||||
case FrequencyBand_def::VHF:
|
||||
case FrequencyBand::VHF:
|
||||
rc = RadioCircuitVHF::fromJson(obj);
|
||||
break;
|
||||
case FrequencyBand_def::REL:
|
||||
case FrequencyBand::REL:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -237,10 +237,10 @@ QSet<int> frequencySetDataIds(const std::string &frequencyPlanDataProperties)
|
||||
for(const QJsonValue &val : std::as_const(arr))
|
||||
{
|
||||
const QJsonObject obj = val.toObject();
|
||||
FrequencyBand ft = static_cast<FrequencyBand::inner_enum>(obj[QStringLiteral("FrequencyBand")].toInt());
|
||||
switch (ft.underlying())
|
||||
FrequencyBand ft = static_cast<FrequencyBand>(obj[QStringLiteral("FrequencyBand")].toInt());
|
||||
switch (ft)
|
||||
{
|
||||
case FrequencyBand_def::VHF:
|
||||
case FrequencyBand::VHF:
|
||||
{
|
||||
RadioCircuitVHF *rcVhf = RadioCircuitVHF::fromJson(obj);
|
||||
if(!rcVhf)
|
||||
@@ -249,8 +249,8 @@ QSet<int> frequencySetDataIds(const std::string &frequencyPlanDataProperties)
|
||||
delete rcVhf;
|
||||
break;
|
||||
}
|
||||
case FrequencyBand_def::UHF:
|
||||
case FrequencyBand_def::HF:
|
||||
case FrequencyBand::UHF:
|
||||
case FrequencyBand::HF:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
-1
@@ -40,7 +40,6 @@ private Q_SLOTS:
|
||||
void onSocketDisconnect();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void sendMessages();
|
||||
|
||||
private:
|
||||
|
||||
@@ -61,6 +61,11 @@ SET(SRCS_client
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(SV WS svcCmoClient SHARED ${SRCS_client})
|
||||
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
|
||||
# MAKE_<SYMBOL>_LIB compile guard, but the generated cmo_[d|f]tc_impl.h
|
||||
# headers that this target compiles carry such a guard — same situation as
|
||||
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
|
||||
TARGET_COMPILE_DEFINITIONS(svcCmoClient PRIVATE MAKE_SVCCMOCLIENT_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcCmoClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -90,6 +95,9 @@ SET(SRCS_server
|
||||
CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(SV svcCmoServer SHARED ${SRCS_server})
|
||||
# Same guard rationale as svcCmoClient above: the generated
|
||||
# cmo_[d|f]ts_impl.h headers require MAKE_SVCCMOSERVER_LIB.
|
||||
TARGET_COMPILE_DEFINITIONS(svcCmoServer PRIVATE MAKE_SVCCMOSERVER_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcCmoServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
@@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
// Stub file for BUILD_GRANTLEE=OFF
|
||||
// Auto-generated during Qt6 migration
|
||||
namespace DDS { class Topic; }
|
||||
@@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
// Stub file for BUILD_GRANTLEE=OFF
|
||||
// Auto-generated during Qt6 migration
|
||||
@@ -10,7 +10,7 @@ namespace ComponentMonitor
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
CMO_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
SVCCMOCOMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
|
||||
@@ -66,6 +66,11 @@ SET(SRCS_client
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcGnaClient SHARED ${SRCS_client})
|
||||
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
|
||||
# MAKE_<SYMBOL>_LIB compile guard, but the generated gna_[d|f]tc_impl.h
|
||||
# headers that this target compiles carry such a guard — same situation as
|
||||
# ddscore, which defines MAKE_DDSCORE_LIB explicitly for the same reason.
|
||||
TARGET_COMPILE_DEFINITIONS(svcGnaClient PRIVATE MAKE_SVCGNACLIENT_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcGnaClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
|
||||
@@ -30,7 +30,6 @@ Q_SIGNALS:
|
||||
void simulationStatusReceived(const NasatSimulationStatus &data);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void textMessageReceived(const QByteArray &msg);
|
||||
bool sendTelegram(const NasatBase *tele);
|
||||
virtual bool sendTelegramInternal(const QByteArray &tele) = 0;
|
||||
|
||||
@@ -107,9 +107,9 @@ int Participant2Dds::partyId(int participantId) const
|
||||
auto ret = -1;
|
||||
std::function<bool(const ParticipantManagement::Participant&)> cb = [participantId, &ret](const ParticipantManagement::Participant &p)
|
||||
{
|
||||
if (p.id() != participantId)
|
||||
if (p.id != participantId)
|
||||
return false;
|
||||
ret = p.partyId();
|
||||
ret = p.partyId;
|
||||
return true;
|
||||
};
|
||||
m_ppmDtc->participants(cb);
|
||||
@@ -120,15 +120,15 @@ void Participant2Dds::onParticipantChanged(const ParticipantManagement::Particip
|
||||
{
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged: " << data.id()
|
||||
<< ", " << m_participantsToWatch.contains(data.id())
|
||||
DEBUG_LOG(m_logger) << "onParticipantChanged: " << data.id
|
||||
<< ", " << m_participantsToWatch.contains(data.id)
|
||||
<< ", " << m_participantsToWatch.size()
|
||||
<< ", " << m_participantsToWatch.contains(data.id())
|
||||
<< ", " << data.isDeleted();
|
||||
if (!m_participantsToWatch.contains(data.id()))
|
||||
<< ", " << m_participantsToWatch.contains(data.id)
|
||||
<< ", " << data.isDeleted;
|
||||
if (!m_participantsToWatch.contains(data.id))
|
||||
return;
|
||||
if (data.isDeleted())
|
||||
emit participantRemoved(m_ddsConnector->getPartitionId(), data.id());
|
||||
if (data.isDeleted)
|
||||
emit participantRemoved(m_ddsConnector->getPartitionId(), data.id);
|
||||
}
|
||||
|
||||
|
||||
@@ -137,6 +137,7 @@ void Participant2Dds::onParticipantChanged(const ParticipantManagement::Particip
|
||||
|
||||
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(ddsConnector->getDomainParticipant(), IDL::PartitionType::AllExercises))
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -70,6 +70,12 @@ private:
|
||||
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> m_aesFtc;
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_pdmDtc;
|
||||
QHash<int, std::weak_ptr<Participant2Dds>> m_nasatParticipant2Dds;
|
||||
|
||||
// Qt5 declared m_logger in *both* classes of this header (Participant2Dds at line 54
|
||||
// and DdsHandler at line 79). A dedup pass kept only one of them, which left
|
||||
// DdsHandler's DEBUG_LOG(m_logger) uses in dds_handler.cpp without a member. Restored
|
||||
// to match the Qt5 declaration; this is fidelity, not a new member.
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,4 +0,0 @@
|
||||
#pragma once
|
||||
// Stub file for BUILD_GRANTLEE=OFF
|
||||
// Auto-generated during Qt6 migration
|
||||
namespace DDS { class Topic; }
|
||||
@@ -1,3 +0,0 @@
|
||||
#pragma once
|
||||
// Stub file for BUILD_GRANTLEE=OFF
|
||||
// Auto-generated during Qt6 migration
|
||||
@@ -13,20 +13,20 @@ namespace GuezNasat
|
||||
Database::NasatAircraft toDb(const NasatAircraft &dds)
|
||||
{
|
||||
Database::NasatAircraft ret;
|
||||
ret.id = dds.id();
|
||||
ret.nasatId = dds.nasatId();
|
||||
ret.simulationActive = dds.simulationActive();
|
||||
ret.name = QString::fromStdString(dds.name());
|
||||
ret.id = dds.id;
|
||||
ret.nasatId = dds.nasatId;
|
||||
ret.simulationActive = dds.simulationActive;
|
||||
ret.name = QString::fromStdString(dds.name);
|
||||
return ret;
|
||||
}
|
||||
|
||||
NasatAircraft fromDb(const Database::NasatAircraft &db)
|
||||
{
|
||||
NasatAircraft ret;
|
||||
ret.id(db.id);
|
||||
ret.nasatId(db.nasatId);
|
||||
ret.simulationActive(db.simulationActive);
|
||||
ret.name(db.name.toStdString());
|
||||
ret.id = db.id;
|
||||
ret.nasatId = db.nasatId;
|
||||
ret.simulationActive = db.simulationActive;
|
||||
ret.name = db.name.toStdString();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ HandlerNasatAircraft::HandlerNasatAircraft(Initialization *mainHandler)
|
||||
HandlerNasatAircraft::~HandlerNasatAircraft()
|
||||
{
|
||||
for (const auto &data : std::as_const(m_nasatAircrafts))
|
||||
m_dts->removeNasatAircraftByKey(data.id());
|
||||
m_dts->removeNasatAircraftByKey(data.id);
|
||||
}
|
||||
|
||||
bool HandlerNasatAircraft::init()
|
||||
@@ -50,9 +50,9 @@ bool HandlerNasatAircraft::init()
|
||||
auto cb = [this](const Database::NasatAircraft & data)
|
||||
{
|
||||
auto dds(fromDb(data));
|
||||
dds.simulationActive(false);
|
||||
dds.simulationActive = false;
|
||||
emit activateNasatAircraftSimulation(data.nasatId, false);
|
||||
m_nasatAircrafts[dds.id()] = dds;
|
||||
m_nasatAircrafts[dds.id] = dds;
|
||||
m_dts->publish(dds);
|
||||
};
|
||||
m_db->select(cb);
|
||||
@@ -64,7 +64,7 @@ int HandlerNasatAircraft::nasatIdFromNasatAircraftId(int nasatAircraftId) const
|
||||
auto it = m_nasatAircrafts.find(nasatAircraftId);
|
||||
if (it == m_nasatAircrafts.end())
|
||||
return -1;
|
||||
return it.value().nasatId();
|
||||
return it.value().nasatId;
|
||||
}
|
||||
|
||||
void HandlerNasatAircraft::simulationStatusChanged(const NasatSimulationStatus &data)
|
||||
@@ -76,11 +76,11 @@ void HandlerNasatAircraft::flaFluSimulationChanged(int nasatId, bool bSimulation
|
||||
{
|
||||
for (NasatAircraft &na : m_nasatAircrafts)
|
||||
{
|
||||
if (na.nasatId() != nasatId)
|
||||
if (na.nasatId != nasatId)
|
||||
continue;
|
||||
if (na.simulationActive() == bSimulationActive)
|
||||
if (na.simulationActive == bSimulationActive)
|
||||
return;
|
||||
na.simulationActive(bSimulationActive);
|
||||
na.simulationActive = bSimulationActive;
|
||||
m_dts->publish(na);
|
||||
return;
|
||||
}
|
||||
@@ -91,7 +91,7 @@ void HandlerNasatAircraft::onModifyNasatAircraftRequest(const rti::core::SampleI
|
||||
const NasatAircraft &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onModifyNasatAircraftRequest: " << request;
|
||||
auto ret = request.id() > 0 ? modifyNasatAircraftRequest(request) : createNasatAircraftRequest(request);
|
||||
auto ret = request.id > 0 ? modifyNasatAircraftRequest(request) : createNasatAircraftRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_fts->modifyNasatAircraftReply(cookie, ret);
|
||||
@@ -104,7 +104,7 @@ Core::FunctionReplyObject HandlerNasatAircraft::createNasatAircraftRequest(const
|
||||
naDb.id = 0;
|
||||
|
||||
if (!m_db->insert(naDb))
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not create Aircraft information - error inserting values in database"));
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not create Aircraft information - error inserting values in database"));
|
||||
|
||||
emit activateNasatAircraftSimulation(naDb.nasatId, naDb.simulationActive);
|
||||
|
||||
@@ -113,48 +113,48 @@ Core::FunctionReplyObject HandlerNasatAircraft::createNasatAircraftRequest(const
|
||||
m_dts->publish(nasatAircraftData);
|
||||
m_nasatAircrafts[naDb.id] = nasatAircraftData;
|
||||
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
}
|
||||
|
||||
Core::FunctionReplyObject HandlerNasatAircraft::modifyNasatAircraftRequest(const NasatAircraft &request)
|
||||
{
|
||||
auto it = m_nasatAircrafts.find(request.id());
|
||||
auto it = m_nasatAircrafts.find(request.id);
|
||||
if (it == m_nasatAircrafts.end())
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not modify Aircraft information - id %1 not found")).arg(request.id());
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not modify Aircraft information - id %1 not found")).arg(request.id);
|
||||
|
||||
if (request.nasatId() == 0 && request.name().size() == 0)
|
||||
if (request.nasatId == 0 && request.name.size() == 0)
|
||||
{
|
||||
|
||||
if (!m_db->removeNasatAircraft(request.id()))
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not remove Aircraft information - error removing values from database"));
|
||||
if (!m_db->removeNasatAircraft(request.id))
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not remove Aircraft information - error removing values from database"));
|
||||
m_nasatAircrafts.erase(it);
|
||||
m_mainHandler->nasatAircraftParticipant()->aircraftRemoved(request.id());
|
||||
m_dts->removeNasatAircraftByKey(request.id());
|
||||
if (it.value().simulationActive())
|
||||
emit activateNasatAircraftSimulation(request.nasatId(), false);
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
m_mainHandler->nasatAircraftParticipant()->aircraftRemoved(request.id);
|
||||
m_dts->removeNasatAircraftByKey(request.id);
|
||||
if (it.value().simulationActive)
|
||||
emit activateNasatAircraftSimulation(request.nasatId, false);
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
}
|
||||
|
||||
const int oldNasatId = it.value().nasatId();
|
||||
const int oldNasatId = it.value().nasatId;
|
||||
|
||||
|
||||
Database::NasatAircraft naDb(toDb(request));
|
||||
if (!m_db->update(naDb))
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not modify Aircraft information - error updating values in database"));
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not modify Aircraft information - error updating values in database"));
|
||||
|
||||
const bool simulationChanged = it.value().simulationActive() != request.simulationActive();
|
||||
const bool simulationChanged = it.value().simulationActive != request.simulationActive;
|
||||
|
||||
|
||||
const auto nasatAircraftData(fromDb(naDb));
|
||||
m_dts->publish(nasatAircraftData);
|
||||
it.value() = nasatAircraftData;
|
||||
|
||||
if (request.nasatId() != oldNasatId)
|
||||
if (request.nasatId != oldNasatId)
|
||||
emit nasatIdChanged(oldNasatId, naDb.nasatId);
|
||||
if (simulationChanged)
|
||||
emit activateNasatAircraftSimulation(naDb.nasatId, request.simulationActive());
|
||||
emit activateNasatAircraftSimulation(naDb.nasatId, request.simulationActive);
|
||||
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
+42
-42
@@ -15,20 +15,20 @@ namespace GuezNasat
|
||||
Database::NasatAircraftParticipant toDb(const NasatAircraftParticipant &dds)
|
||||
{
|
||||
Database::NasatAircraftParticipant ret;
|
||||
ret.id = dds.id();
|
||||
ret.nasatAircraftId = dds.nasatAircraftId();
|
||||
ret.exerciseId = dds.exerciseId();
|
||||
ret.participantId = dds.participantId();
|
||||
ret.id = dds.id;
|
||||
ret.nasatAircraftId = dds.nasatAircraftId;
|
||||
ret.exerciseId = dds.exerciseId;
|
||||
ret.participantId = dds.participantId;
|
||||
return ret;
|
||||
}
|
||||
|
||||
NasatAircraftParticipant fromDb(const Database::NasatAircraftParticipant &db)
|
||||
{
|
||||
NasatAircraftParticipant ret;
|
||||
ret.id(db.id);
|
||||
ret.nasatAircraftId(db.nasatAircraftId);
|
||||
ret.exerciseId(db.exerciseId);
|
||||
ret.participantId(db.participantId);
|
||||
ret.id = db.id;
|
||||
ret.nasatAircraftId = db.nasatAircraftId;
|
||||
ret.exerciseId = db.exerciseId;
|
||||
ret.participantId = db.participantId;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ HandlerNasatAircraftParticipant::~HandlerNasatAircraftParticipant()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
for (const auto &data : std::as_const(m_nasatAircraftParticipants))
|
||||
m_dts->removeNasatAircraftByKey(data.id());
|
||||
m_dts->removeNasatAircraftByKey(data.id);
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
@@ -59,8 +59,8 @@ bool HandlerNasatAircraftParticipant::init()
|
||||
auto cb = [this](const Database::NasatAircraftParticipant & data)
|
||||
{
|
||||
const auto dds(fromDb(data));
|
||||
DEBUG_LOG(m_logger) << "m_nasatAircraftParticipants.insert(" << dds.id() << ")";
|
||||
m_nasatAircraftParticipants.insert(dds.id(), dds);
|
||||
DEBUG_LOG(m_logger) << "m_nasatAircraftParticipants.insert(" << dds.id << ")";
|
||||
m_nasatAircraftParticipants.insert(dds.id, dds);
|
||||
m_dts->publish(dds);
|
||||
m_mainHandler->handlerParticipant()->onNasatAircraftParticipantCreated(dds);
|
||||
};
|
||||
@@ -133,7 +133,7 @@ void HandlerNasatAircraftParticipant::aircraftRemoved(int nasatAircraftId)
|
||||
while (it != m_nasatAircraftParticipants.end())
|
||||
{
|
||||
const auto &val = it.value();
|
||||
if (val.nasatAircraftId() == nasatAircraftId)
|
||||
if (val.nasatAircraftId == nasatAircraftId)
|
||||
{
|
||||
removeNasatAircraftParticipant(val);
|
||||
it = m_nasatAircraftParticipants.erase(it);
|
||||
@@ -150,8 +150,8 @@ void HandlerNasatAircraftParticipant::participantRemoved(int exerciseId, int par
|
||||
while (it != m_nasatAircraftParticipants.end())
|
||||
{
|
||||
const auto &val = it.value();
|
||||
if (val.participantId() == participantId &&
|
||||
val.exerciseId() == exerciseId)
|
||||
if (val.participantId == participantId &&
|
||||
val.exerciseId == exerciseId)
|
||||
{
|
||||
removeNasatAircraftParticipant(val);
|
||||
it = m_nasatAircraftParticipants.erase(it);
|
||||
@@ -161,7 +161,7 @@ void HandlerNasatAircraftParticipant::participantRemoved(int exerciseId, int par
|
||||
}
|
||||
}
|
||||
|
||||
bool isExerciseStateValid(ExerciseManagement::ExerciseState_def::type state)
|
||||
bool isExerciseStateValid(ExerciseManagement::ExerciseState::type state)
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
@@ -181,17 +181,17 @@ void HandlerNasatAircraftParticipant::onExerciseChanged(const ExerciseManagement
|
||||
{
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START" << " , exercise" << exercise << " , modType" << modType;
|
||||
|
||||
const int exId = exercise.id();
|
||||
const int exId = exercise.id;
|
||||
switch (modType)
|
||||
{
|
||||
case DataModification::eAdded:
|
||||
{
|
||||
m_exercises[exId] = exercise;
|
||||
const bool valid = isExerciseStateValid(exercise.state().underlying());
|
||||
const bool valid = isExerciseStateValid(exercise.state);
|
||||
if (!valid)
|
||||
{
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " STATE of exId=" << exId
|
||||
<< " , state=" << exercise.state();
|
||||
<< " , state=" << exercise.state;
|
||||
int cnt = removeNapsOfExercise(exId);
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " STATE of exId=" << exId << " not valid : counter of removed naps=" << cnt;
|
||||
}
|
||||
@@ -200,14 +200,14 @@ void HandlerNasatAircraftParticipant::onExerciseChanged(const ExerciseManagement
|
||||
case DataModification::eModified:
|
||||
{
|
||||
const ExerciseManagement::Exercise &exerciseRef = m_exercises[exId];
|
||||
if (exerciseRef.state() != exercise.state())
|
||||
if (exerciseRef.state != exercise.state)
|
||||
{
|
||||
const bool valid = isExerciseStateValid(exercise.state().underlying());
|
||||
const bool valid = isExerciseStateValid(exercise.state);
|
||||
if (!valid)
|
||||
{
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " STATE change of exId=" << exId
|
||||
<< " , old state=" << exerciseRef.state()
|
||||
<< " , new state=" << exercise.state();
|
||||
<< " , old state=" << exerciseRef.state
|
||||
<< " , new state=" << exercise.state;
|
||||
int cnt = removeNapsOfExercise(exId);
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " STATE change of exId=" << exId << " : counter of removed naps=" << cnt;
|
||||
}
|
||||
@@ -231,15 +231,15 @@ void HandlerNasatAircraftParticipant::removeNasatAircraftParticipant(const Nasat
|
||||
{
|
||||
m_mainHandler->handlerParticipant()->onNasatAircraftParticipantRemoved(val);
|
||||
|
||||
m_db->removeNasatAircraftParticipant(val.id());
|
||||
m_dts->removeNasatAircraftParticipantByKey(val.id());
|
||||
m_db->removeNasatAircraftParticipant(val.id);
|
||||
m_dts->removeNasatAircraftParticipantByKey(val.id);
|
||||
}
|
||||
|
||||
void HandlerNasatAircraftParticipant::onModifyNasatAircraftParticipantRequest(const rti::core::SampleIdentity &cookie,
|
||||
const NasatAircraftParticipant &request)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onModifyNasatAircraftParticipantRequest: " << request;
|
||||
auto ret = request.id() <= 0 ? createNasatAircraftParticipantRequest(request) : modifyNasatAircraftParticipantRequest(request);
|
||||
auto ret = request.id <= 0 ? createNasatAircraftParticipantRequest(request) : modifyNasatAircraftParticipantRequest(request);
|
||||
if (ret.error())
|
||||
WARNING_LOG(m_logger) << ret();
|
||||
m_fts->modifyNasatAircraftParticipantReply(cookie, ret);
|
||||
@@ -251,50 +251,50 @@ Core::FunctionReplyObject HandlerNasatAircraftParticipant::createNasatAircraftPa
|
||||
Database::NasatAircraftParticipant napDb(toDb(request));
|
||||
napDb.id = 0;
|
||||
if (!m_db->insert(napDb))
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not create Aircraft Participant connection - error inserting values in database"));
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not create Aircraft Participant connection - error inserting values in database"));
|
||||
|
||||
|
||||
const auto dds(fromDb(napDb));
|
||||
m_dts->publish(dds);
|
||||
m_nasatAircraftParticipants.insert(dds.id(), dds);
|
||||
m_nasatAircraftParticipants.insert(dds.id, dds);
|
||||
m_mainHandler->handlerParticipant()->onNasatAircraftParticipantCreated(request);
|
||||
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
}
|
||||
|
||||
Core::FunctionReplyObject HandlerNasatAircraftParticipant::modifyNasatAircraftParticipantRequest(const NasatAircraftParticipant &request)
|
||||
{
|
||||
auto it = m_nasatAircraftParticipants.find(request.id());
|
||||
auto it = m_nasatAircraftParticipants.find(request.id);
|
||||
if (it == m_nasatAircraftParticipants.end())
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not modify Aircraft Participant connection - id %1 not found")).arg(request.id());
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not modify Aircraft Participant connection - id %1 not found")).arg(request.id);
|
||||
|
||||
if (request == *it)
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
|
||||
if ((request.exerciseId() == 0 && request.participantId() == 0) ||
|
||||
request.nasatAircraftId() == 0)
|
||||
if ((request.exerciseId == 0 && request.participantId == 0) ||
|
||||
request.nasatAircraftId == 0)
|
||||
{
|
||||
removeNasatAircraftParticipant(it.value());
|
||||
m_nasatAircraftParticipants.erase(it);
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
}
|
||||
|
||||
Database::NasatAircraftParticipant napDb(toDb(request));
|
||||
if (!m_db->update(napDb))
|
||||
return Core::FunctionReplyObject(request.id(), tr_lts("dds", "Can not modify Aircraft Participant connection - error updating values in database"));
|
||||
return Core::FunctionReplyObject(request.id, tr_lts("dds", "Can not modify Aircraft Participant connection - error updating values in database"));
|
||||
|
||||
|
||||
m_mainHandler->handlerParticipant()->onNasatAircraftParticipantRemoved(*it);
|
||||
const auto dds(fromDb(napDb));
|
||||
m_dts->publish(dds);
|
||||
m_nasatAircraftParticipants.insert(dds.id(), dds);
|
||||
m_nasatAircraftParticipants.insert(dds.id, dds);
|
||||
|
||||
|
||||
m_dts->publish(fromDb(napDb));
|
||||
|
||||
|
||||
m_mainHandler->handlerParticipant()->onNasatAircraftParticipantCreated(request);
|
||||
return Core::FunctionReplyObject(request.id());
|
||||
return Core::FunctionReplyObject(request.id);
|
||||
}
|
||||
|
||||
int HandlerNasatAircraftParticipant::removeNapsOfExercise(int exerciseId)
|
||||
@@ -306,15 +306,15 @@ int HandlerNasatAircraftParticipant::removeNapsOfExercise(int exerciseId)
|
||||
|
||||
for (const NasatAircraftParticipant &nap : std::as_const(napsCopy))
|
||||
{
|
||||
if (nap.exerciseId() == exerciseId)
|
||||
if (nap.exerciseId == exerciseId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " nap has to be removed: nap=" << nap;
|
||||
|
||||
NasatAircraftParticipant napToTriggerRemoving;
|
||||
napToTriggerRemoving.id(nap.id());
|
||||
napToTriggerRemoving.exerciseId(0);
|
||||
napToTriggerRemoving.participantId(0);
|
||||
napToTriggerRemoving.nasatAircraftId(0);
|
||||
napToTriggerRemoving.id = nap.id;
|
||||
napToTriggerRemoving.exerciseId = 0;
|
||||
napToTriggerRemoving.participantId = 0;
|
||||
napToTriggerRemoving.nasatAircraftId = 0;
|
||||
modifyNasatAircraftParticipantRequest(napToTriggerRemoving);
|
||||
++count;
|
||||
}
|
||||
|
||||
@@ -133,12 +133,12 @@ void HandlerNasatImpact::nasatImpact(int nasatId, const Core::GeoPosition &pos,
|
||||
const qint64 tNow = dtNow.toMSecsSinceEpoch() + 5000;
|
||||
|
||||
AreaEffectSimulation::ExplosionClusterSingleEffectOnlyRequest ecReq;
|
||||
ecReq.id(0);
|
||||
ecReq.effectStart(impactTimeMsec > tNow ? impactTimeMsec : tNow);
|
||||
ecReq.name(QStringLiteral("NASAT_%1_%2_%3").arg(nasatId).arg(munitionCode).arg(dtNow.toString(QStringLiteral("dd hh:mm:ss"))).toStdString());
|
||||
ecReq.element(ecReq.name());
|
||||
ecReq.impactPosition(Core::GeoPosition2D(pos.lon(), pos.lat()));
|
||||
ecReq.chargeTypeId(chargeTypeIdVal);
|
||||
ecReq.id = 0;
|
||||
ecReq.effectStart = impactTimeMsec > tNow ? impactTimeMsec : tNow;
|
||||
ecReq.name = QStringLiteral("NASAT_%1_%2_%3").arg(nasatId).arg(munitionCode).arg(dtNow.toString(QStringLiteral("dd hh:mm:ss"))).toStdString();
|
||||
ecReq.element = ecReq.name;
|
||||
ecReq.impactPosition(Core::GeoPosition2D(pos.lon, pos.lat));
|
||||
ecReq.chargeTypeId = chargeTypeIdVal;
|
||||
|
||||
|
||||
|
||||
@@ -153,31 +153,31 @@ void HandlerNasatImpact::nasatImpact(int nasatId, const Core::GeoPosition &pos,
|
||||
|
||||
|
||||
AreaEffectSimulation::ExplosionClusterModifyRequest ecCommonModifyRequest;
|
||||
ecCommonModifyRequest.id(0);
|
||||
ecCommonModifyRequest.id = 0;
|
||||
|
||||
ecCommonModifyRequest.effectStart(impactTimeMsec > tNow ? impactTimeMsec : tNow);
|
||||
ecCommonModifyRequest.effectDuration(1000);
|
||||
ecCommonModifyRequest.effectSourceId(ProjectDataManagement::EffectSource::ES_Internal);
|
||||
ecCommonModifyRequest.effectStart = impactTimeMsec > tNow ? impactTimeMsec : tNow;
|
||||
ecCommonModifyRequest.effectDuration = 1000;
|
||||
ecCommonModifyRequest.effectSourceId = ProjectDataManagement::EffectSource::ES_Internal;
|
||||
|
||||
|
||||
ecCommonModifyRequest.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint);
|
||||
ecCommonModifyRequest.explosionGeometry = AreaEffectSimulation::AesExplosionGeometry::EgPoint;
|
||||
|
||||
|
||||
ecCommonModifyRequest.chargeStruct().chargeTypeId(chargeTypeIdVal);
|
||||
ecCommonModifyRequest.chargeStruct().igniterTypeId(fuseTypeToPdmIgniterType(fuseType));
|
||||
ecCommonModifyRequest.chargeStruct.chargeTypeId = chargeTypeIdVal;
|
||||
ecCommonModifyRequest.chargeStruct.igniterTypeId = fuseTypeToPdmIgniterType(fuseType);
|
||||
|
||||
ecCommonModifyRequest.area().cornerBottomLeft(Core::GeoPosition2D(pos.lon(), pos.lat()));
|
||||
ecCommonModifyRequest.area.cornerBottomLeft(Core::GeoPosition2D(pos.lon, pos.lat));
|
||||
|
||||
ecCommonModifyRequest.name(QStringLiteral("NASAT_%1_%2_%3").arg(nasatId).arg(munitionCode).arg(dtNow.toString(QStringLiteral("dd hh:mm:ss"))).toStdString());
|
||||
ecCommonModifyRequest.element(ecReq.name());
|
||||
ecCommonModifyRequest.name = QStringLiteral("NASAT_%1_%2_%3").arg(nasatId).arg(munitionCode).arg(dtNow.toString(QStringLiteral("dd hh:mm:ss"))).toStdString();
|
||||
ecCommonModifyRequest.element = ecReq.name;
|
||||
|
||||
ecCommonModifyRequest.mhpCount(1);
|
||||
ecCommonModifyRequest.impactCount(1);
|
||||
ecCommonModifyRequest.mhpCount = 1;
|
||||
ecCommonModifyRequest.impactCount = 1;
|
||||
|
||||
|
||||
|
||||
|
||||
ecCommonModifyRequest.flightDuration(flightTimeMsec);
|
||||
ecCommonModifyRequest.flightDuration = flightTimeMsec;
|
||||
|
||||
|
||||
|
||||
@@ -197,10 +197,10 @@ void HandlerNasatImpact::nasatImpact(int nasatId, const Core::GeoPosition &pos,
|
||||
|
||||
|
||||
|
||||
ecReq.partyId(nap->partyId());
|
||||
ecReq.partyId = nap->partyId();
|
||||
|
||||
ecCommonModifyRequest.partyId(nap->partyId());
|
||||
ecCommonModifyRequest.participantId(nap->participantId());
|
||||
ecCommonModifyRequest.partyId = nap->partyId();
|
||||
ecCommonModifyRequest.participantId = nap->participantId();
|
||||
|
||||
|
||||
int success = nap->publisher()->publish(ecCommonModifyRequest, this);
|
||||
@@ -247,17 +247,17 @@ void HandlerNasatImpact::nasatImpact(int nasatId, const Core::GeoPosition &pos,
|
||||
|
||||
void HandlerNasatImpact::onChargeTypeChanged(const ProjectDataManagement::ChargeType &ct)
|
||||
{
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(QByteArray::fromRawData(ct.properties().c_str(), ct.properties().size())));
|
||||
const QJsonDocument doc(QJsonDocument::fromJson(QByteArray::fromRawData(ct.properties.c_str(), ct.properties.size())));
|
||||
const QJsonObject obj(doc.object());
|
||||
if (!obj.contains(QLatin1String("nasatId")))
|
||||
return;
|
||||
int nasatId = obj.value(QLatin1String("nasatId")).toInt();
|
||||
if (nasatId == 0)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Found charge with an invalid property 'nasatId', id: " << ct.id();
|
||||
WARNING_LOG(m_logger) << "Found charge with an invalid property 'nasatId', id: " << ct.id;
|
||||
return;
|
||||
}
|
||||
m_chargeMapping.insert(nasatId, ct.id());
|
||||
m_chargeMapping.insert(nasatId, ct.id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ public Q_SLOTS:
|
||||
void nasatImpact(int nasatId, const Core::GeoPosition &pos, qint64 flightTimeMsec, qint64 impactTimeMsec, int munitionCode, FuseType fuseType = FuseType::Instant);
|
||||
void onChargeTypeChanged(const ProjectDataManagement::ChargeType &ct);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int chargeTypeFromMunitionCode(int nasatChargeCode) const;
|
||||
int fuseTypeToPdmIgniterType(FuseType fusetype) const;
|
||||
private:
|
||||
|
||||
@@ -35,7 +35,7 @@ static Nasat9Liner createDds9Liner(const NasatNineLiner &nasatNineLiner)
|
||||
{
|
||||
Nasat9Liner nl;
|
||||
const qint64 tsMSec = nasatNineLiner.timestamp <= 0 ? QDateTime::currentMSecsSinceEpoch() : qRound64(nasatNineLiner.timestamp * 1000);
|
||||
nl.sampleTime(tsMSec);
|
||||
nl.sampleTime = tsMSec;
|
||||
|
||||
if (nasatNineLiner.initialPointMode != 0)
|
||||
nl.initialPoint(Core::GeoPosition2D(LtsCoordTrans::deg2rad() * nasatNineLiner.initialPoint.lon,
|
||||
@@ -43,19 +43,19 @@ static Nasat9Liner createDds9Liner(const NasatNineLiner &nasatNineLiner)
|
||||
|
||||
if (nasatNineLiner.heading2InitialPointMode != Heading2InitialPointMode::Undefined)
|
||||
{
|
||||
nl.hdg2InitialPointMode(static_cast<Hdg2InitialPointMode::inner_enum>(nasatNineLiner.heading2InitialPointMode));
|
||||
nl.hdgInitialPoint2Target(nasatNineLiner.headingInitialPoint2Target);
|
||||
nl.hdg2InitialPointMode = static_cast<Hdg2InitialPointMode>(nasatNineLiner.heading2InitialPointMode);
|
||||
nl.hdgInitialPoint2Target = nasatNineLiner.headingInitialPoint2Target;
|
||||
}
|
||||
else
|
||||
{
|
||||
nl.hdg2InitialPointMode(Hdg2InitialPointMode_def::Undefined);
|
||||
nl.hdgInitialPoint2Target(-1);
|
||||
nl.hdg2InitialPointMode = Hdg2InitialPointMode::Undefined;
|
||||
nl.hdgInitialPoint2Target = -1;
|
||||
}
|
||||
|
||||
if (nasatNineLiner.distance2InitialPointMode != 0)
|
||||
nl.distanceInitialPoint2Target(nasatNineLiner.distanceInitialPoint2Target);
|
||||
nl.distanceInitialPoint2Target = nasatNineLiner.distanceInitialPoint2Target;
|
||||
else
|
||||
nl.distanceInitialPoint2Target(-1);
|
||||
nl.distanceInitialPoint2Target = -1;
|
||||
|
||||
if (nasatNineLiner.targetPositionMode != 0)
|
||||
{
|
||||
@@ -66,41 +66,41 @@ static Nasat9Liner createDds9Liner(const NasatNineLiner &nasatNineLiner)
|
||||
}
|
||||
else
|
||||
{
|
||||
nl.targetPosition(Core::GeoPosition(std::nan(""), std::nan(""), std::nan("")));
|
||||
nl.targetPosition = Core::GeoPosition(std::nan(""), std::nan(""), std::nan(""));
|
||||
}
|
||||
|
||||
if (nasatNineLiner.modeFriendlies != 0)
|
||||
{
|
||||
nl.friendliesBearing(nasatNineLiner.friendlies.bearing);
|
||||
nl.friendliesDistance(nasatNineLiner.friendlies.distance);
|
||||
nl.friendliesBearing = nasatNineLiner.friendlies.bearing;
|
||||
nl.friendliesDistance = nasatNineLiner.friendlies.distance;
|
||||
}
|
||||
else
|
||||
{
|
||||
nl.friendliesBearing(-1);
|
||||
nl.friendliesDistance(-1);
|
||||
nl.friendliesBearing = -1;
|
||||
nl.friendliesDistance = -1;
|
||||
}
|
||||
|
||||
if (nasatNineLiner.finalAttackHeadingMode != FinalAttackHeadingMode::None)
|
||||
{
|
||||
nl.finalAttackHeading(nasatNineLiner.finalAttackHeading.heading);
|
||||
nl.finalAttackHeading = nasatNineLiner.finalAttackHeading.heading;
|
||||
if (nasatNineLiner.finalAttackHeadingMode == FinalAttackHeadingMode::HeadingWithSector)
|
||||
{
|
||||
nl.finalAttackHeadingLow(nasatNineLiner.finalAttackHeading.headingLow);
|
||||
nl.finalAttackHeadingHigh(nasatNineLiner.finalAttackHeading.headingHigh);
|
||||
nl.finalAttackHeadingLow = nasatNineLiner.finalAttackHeading.headingLow;
|
||||
nl.finalAttackHeadingHigh = nasatNineLiner.finalAttackHeading.headingHigh;
|
||||
}
|
||||
else
|
||||
{
|
||||
nl.finalAttackHeadingLow(-1);
|
||||
nl.finalAttackHeadingHigh(-1);
|
||||
nl.finalAttackHeadingLow = -1;
|
||||
nl.finalAttackHeadingHigh = -1;
|
||||
}
|
||||
}
|
||||
else
|
||||
nl.finalAttackHeading(-1);
|
||||
nl.finalAttackHeading = -1;
|
||||
|
||||
if (nasatNineLiner.timeForTargetMode != TimeForTargetMode::None)
|
||||
nl.timeForTarget(nasatNineLiner.timeForTargetMode == TimeForTargetMode::TimeToTarget ? -nl.timeForTarget() : nl.timeForTarget());
|
||||
nl.timeForTarget = nasatNineLiner.timeForTargetMode == TimeForTargetMode::TimeToTarget ? -nl.timeForTarget : nl.timeForTarget;
|
||||
else
|
||||
nl.timeForTarget(0);
|
||||
nl.timeForTarget = 0;
|
||||
|
||||
return nl;
|
||||
}
|
||||
@@ -125,7 +125,7 @@ void HandlerNasatNineLiner::nineLinerReceived(const NasatNineLiner &nasatNineLin
|
||||
Nasat9Liner nl = createDds9Liner(nasatNineLiner);
|
||||
for (auto it = participants.begin(); it != participants.end(); ++it)
|
||||
{
|
||||
nl.id(s_id++);
|
||||
nl.id = s_id++;
|
||||
const auto &exerciseParticipantId = it.key();
|
||||
auto nape = it.value();
|
||||
|
||||
@@ -134,8 +134,8 @@ void HandlerNasatNineLiner::nineLinerReceived(const NasatNineLiner &nasatNineLin
|
||||
<< ", exerciseParticipantId.participantId=" << exerciseParticipantId.participantId;
|
||||
|
||||
auto &nineLinerParticipant = m_nineLiner[exerciseParticipantId];
|
||||
nl.isCurrent(true);
|
||||
nl.participantId(exerciseParticipantId.participantId);
|
||||
nl.isCurrent = true;
|
||||
nl.participantId = exerciseParticipantId.participantId;
|
||||
|
||||
nineLinerParticipant.push_back(nl);
|
||||
|
||||
@@ -170,7 +170,7 @@ void HandlerNasatNineLiner::onNasatAircraftParticipantRemoved(const NasatAircraf
|
||||
|
||||
|
||||
|
||||
const int nasatId = m_mainHandler->nasatAircraft()->nasatIdFromNasatAircraftId(nap.nasatAircraftId());
|
||||
const int nasatId = m_mainHandler->nasatAircraft()->nasatIdFromNasatAircraftId(nap.nasatAircraftId);
|
||||
INFO_LOG(m_logger) << " onNasatAircraftParticipantRemoved, nap = " << nap << ", nasatId = " << nasatId;
|
||||
if (nasatId < 0)
|
||||
{
|
||||
@@ -182,7 +182,7 @@ void HandlerNasatNineLiner::onNasatAircraftParticipantRemoved(const NasatAircraf
|
||||
if (participants.isEmpty())
|
||||
{
|
||||
INFO_LOG(m_logger) << "No exercise participants found to publish 9-liner for nasat aircraft with id "
|
||||
<< nap.nasatAircraftId();
|
||||
<< nap.nasatAircraftId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -200,13 +200,13 @@ void HandlerNasatNineLiner::onNasatAircraftParticipantRemoved(const NasatAircraf
|
||||
if (!nineLinerParticipant.isEmpty())
|
||||
{
|
||||
auto &oldLast = nineLinerParticipant.last();
|
||||
if (oldLast.isCurrent())
|
||||
if (oldLast.isCurrent)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " updating for removing "
|
||||
<< ", exerciseParticipantId.exerciseId=" << exerciseParticipantId.exerciseId
|
||||
<< ", exerciseParticipantId.participantId=" << exerciseParticipantId.participantId;
|
||||
oldLast.sampleTime(QDateTime::currentMSecsSinceEpoch());
|
||||
oldLast.isCurrent(false);
|
||||
oldLast.sampleTime = QDateTime::currentMSecsSinceEpoch();
|
||||
oldLast.isCurrent = false;
|
||||
nape->publisher()->publish(oldLast);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,14 +29,14 @@ NasatAircraftParticipantEx::NasatAircraftParticipantEx(const NasatAircraftPartic
|
||||
, m_publisher(publisher)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_publisher->addParticipantToWatch(m_nap.participantId());
|
||||
m_publisher->addParticipantToWatch(m_nap.participantId);
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
NasatAircraftParticipantEx::~NasatAircraftParticipantEx()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
m_publisher->removeParticipantToWatch(m_nap.participantId());
|
||||
m_publisher->removeParticipantToWatch(m_nap.participantId);
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
|
||||
@@ -51,6 +51,7 @@ int NasatAircraftParticipantEx::partyId() const
|
||||
|
||||
HandlerParticipant::HandlerParticipant(Initialization *mainHandler)
|
||||
: m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ParticipantPositionPublisher"))
|
||||
{}
|
||||
|
||||
HandlerParticipant::~HandlerParticipant()
|
||||
@@ -66,30 +67,30 @@ QHash<ExerciseParticipantKey, NasatAircraftParticipantEx *> HandlerParticipant::
|
||||
|
||||
void HandlerParticipant::onNasatAircraftParticipantCreated(const NasatAircraftParticipant &nap)
|
||||
{
|
||||
const int nasatId = m_mainHandler->nasatAircraft()->nasatIdFromNasatAircraftId(nap.nasatAircraftId());
|
||||
const int nasatId = m_mainHandler->nasatAircraft()->nasatIdFromNasatAircraftId(nap.nasatAircraftId);
|
||||
auto it = m_activePublisher.find(nasatId);
|
||||
if (it == m_activePublisher.end())
|
||||
return createNasatAircraftParticipant(nap, nasatId);
|
||||
|
||||
auto itParticipants = it.value().find(ExerciseParticipantKey(nap.exerciseId(), nap.participantId()));
|
||||
auto itParticipants = it.value().find(ExerciseParticipantKey(nap.exerciseId, nap.participantId));
|
||||
if (itParticipants == it.value().end())
|
||||
return createNasatAircraftParticipant(nap, nasatId);
|
||||
}
|
||||
|
||||
void HandlerParticipant::onNasatAircraftParticipantRemoved(const NasatAircraftParticipant &nap)
|
||||
{
|
||||
const int nasatId = m_mainHandler->nasatAircraft()->nasatIdFromNasatAircraftId(nap.nasatAircraftId());
|
||||
const int nasatId = m_mainHandler->nasatAircraft()->nasatIdFromNasatAircraftId(nap.nasatAircraftId);
|
||||
auto it = m_activePublisher.find(nasatId);
|
||||
if (it == m_activePublisher.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No publisher for NasatAircraftParticipant " << nasatId << "(" << nap.nasatAircraftId() << ") found !?";
|
||||
WARNING_LOG(m_logger) << "No publisher for NasatAircraftParticipant " << nasatId << "(" << nap.nasatAircraftId << ") found !?";
|
||||
return;
|
||||
}
|
||||
auto itParticipants = it.value().find(ExerciseParticipantKey(nap.exerciseId(), nap.participantId()));
|
||||
auto itParticipants = it.value().find(ExerciseParticipantKey(nap.exerciseId, nap.participantId));
|
||||
if (itParticipants == it.value().end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No participant entry for NasatAircraftParticipant " << nasatId << "("
|
||||
<< nap.exerciseId() << "," << nap.participantId() << ") found !?";
|
||||
<< nap.exerciseId << "," << nap.participantId << ") found !?";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -154,11 +155,11 @@ void HandlerParticipant::onNasatAircraftPosition(int nasatId, const Core::GeoPos
|
||||
|
||||
const auto &h = it.value();
|
||||
TrainingAreaBase::EquipmentPosition tabPos;
|
||||
tabPos.position().position(pos);
|
||||
tabPos.sampleTime(ts);
|
||||
tabPos.position.position = pos;
|
||||
tabPos.sampleTime = ts;
|
||||
for (const NasatAircraftParticipantEx *napEx : h)
|
||||
{
|
||||
tabPos.equipmentNumber(-napEx->participantId());
|
||||
tabPos.equipmentNumber = -napEx->participantId();
|
||||
int success = napEx->publisher()->publish(tabPos);
|
||||
if (success)
|
||||
DEBUG_LOG(m_logger) << "Publishing positon: " << tabPos << " to exercise " << napEx->exerciseId()
|
||||
@@ -183,8 +184,8 @@ void HandlerParticipant::createNasatAircraftParticipant(const NasatAircraftParti
|
||||
DEBUG_LOG(m_logger) << "Creating position publisher for " << nap
|
||||
<< ", nasatId=" << nasatId;
|
||||
auto *napEx = new NasatAircraftParticipantEx(nap,
|
||||
m_mainHandler->dds()->ddsParticipant(nap.exerciseId()));
|
||||
m_activePublisher[nasatId][ExerciseParticipantKey(nap.exerciseId(), nap.participantId())] = napEx;
|
||||
m_mainHandler->dds()->ddsParticipant(nap.exerciseId));
|
||||
m_activePublisher[nasatId][ExerciseParticipantKey(nap.exerciseId, nap.participantId)] = napEx;
|
||||
connect(napEx->publisher().get(), &Participant2Dds::participantRemoved,
|
||||
m_mainHandler->nasatAircraftParticipant().get(), &HandlerNasatAircraftParticipant::participantRemoved,
|
||||
Qt::QueuedConnection);
|
||||
|
||||
@@ -24,9 +24,9 @@ struct NasatAircraftParticipantEx final
|
||||
|
||||
std::shared_ptr<Participant2Dds> publisher() const { return m_publisher; }
|
||||
|
||||
int exerciseId() const { return m_nap.exerciseId(); }
|
||||
int exerciseId() const { return m_nap.exerciseId; }
|
||||
int partyId() const;
|
||||
int participantId() const { return m_nap.participantId(); }
|
||||
int participantId() const { return m_nap.participantId; }
|
||||
const NasatAircraftParticipant &participant() const { return m_nap; }
|
||||
|
||||
Q_DISABLE_COPY(NasatAircraftParticipantEx)
|
||||
@@ -84,6 +84,10 @@ private:
|
||||
|
||||
QHash<int, QHash<ExerciseParticipantKey, NasatAircraftParticipantEx*>> m_activePublisher;
|
||||
|
||||
// Qt5 declares m_logger in both classes of this header (Participant2Dds above and
|
||||
// HandlerParticipant here); the dedup pass kept only the first, so the uses in
|
||||
// handler_participant.cpp had no member. Restored to match the Qt5 declaration.
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
QHash<int, Core::GeoPosition> m_lastNasatPositionsAsCoreGeoposition;
|
||||
Initialization *m_mainHandler;
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace GuezNasat
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
GNA_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
SVCGNACOMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
|
||||
@@ -90,7 +90,6 @@ public slots:
|
||||
void participantCesHitInformationRequest(const TrainingAreaBase::TetraIcd::CesHitInformation &request);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void createParticipant(const ParticipantManagement::Participant &participant);
|
||||
bool createHuman(const ParticipantManagement::Participant &participant);
|
||||
bool createGroundVehicle(const ParticipantManagement::Participant &participant);
|
||||
|
||||
-1
@@ -54,7 +54,6 @@ public Q_SLOTS:
|
||||
void onExternalEquipmentNumberRemoved(int equipNo);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void sendDataCommunicationState(int equipNo, bool bIsAvailable);
|
||||
bool sendTelegramInternal(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data,
|
||||
const QString &type, int exerciseId);
|
||||
|
||||
@@ -87,7 +87,6 @@ private Q_SLOTS:
|
||||
#endif
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
template <typename T>
|
||||
void onSendRequest(const T &item);
|
||||
template <typename T>
|
||||
|
||||
@@ -89,7 +89,6 @@ public slots:
|
||||
void participantBiteRequest(const TrainingAreaBase::TetraIcd::DemandBite &request);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void createParticipant(const ParticipantManagement::Participant &participant);
|
||||
bool createHuman(const ParticipantManagement::Participant &participant);
|
||||
bool createGroundVehicle(const ParticipantManagement::Participant &participant);
|
||||
|
||||
-1
@@ -53,7 +53,6 @@ public Q_SLOTS:
|
||||
void onExternalEquipmentNumberRemoved(int equipNo);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void sendDataCommunicationState(int equipNo, bool bIsAvailable);
|
||||
bool sendTelegramInternal(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data,
|
||||
const QString &type, int exerciseId);
|
||||
|
||||
@@ -152,6 +152,11 @@ IF(BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS HLA svcTabClient SHARED ${SRCS_client})
|
||||
# NGL_ADD_LIBRARY2 (unlike NGL_ADD_LIBRARY) does not define the
|
||||
# MAKE_<SYMBOL>_LIB compile guard, but the generated tab_[d|f]tc_impl.h
|
||||
# headers require MAKE_SVCTABCLIENT_LIB — same situation as
|
||||
# svcCoreClient/ddscore, which define their guards explicitly.
|
||||
TARGET_COMPILE_DEFINITIONS(svcTabClient PRIVATE MAKE_SVCTABCLIENT_LIB)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcTabClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
@@ -184,6 +189,8 @@ IF(BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR HLA SV svcTabServer SHARED ${SRCS_server}) # NGL_ADD_LIBRARY2 won't work here - no time for investigations
|
||||
# Generated tab_[d|f]ts_impl.h require MAKE_SVCTABSERVER_LIB (see svcTabClient above).
|
||||
TARGET_COMPILE_DEFINITIONS(svcTabServer PRIVATE MAKE_SVCTABSERVER_LIB)
|
||||
if(BUILD_SV OR BUILD_HLA)
|
||||
GENERATE_EXPORT_HEADER(svcTabServer) # FIXME: quick workaround
|
||||
endif()
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ NGL_TARGET_INCLUDE_DIRECTORIES(saaTelegrams
|
||||
${CMAKE_BINARY_DIR}/Lts/Services
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(saaTelegrams
|
||||
# svcPdmClient # Externe Dependency - nicht verfügbar
|
||||
svcPdmClient # qt5 parity: brings the RTI platform defines (RTI_LINUX etc.)
|
||||
Qt6::Core
|
||||
${Qt6_WebSockets}
|
||||
)
|
||||
|
||||
-1
@@ -34,7 +34,6 @@ public:
|
||||
std::shared_ptr<AssetManagement::Interface::Ftc> getFtc() { return m_ftcAsm; }
|
||||
void modifyAssetAdlerProperties(int assetId, bool isSaaConnected = false);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onAssetModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
|
||||
private:
|
||||
|
||||
-1
@@ -41,7 +41,6 @@ class FlmHandler
|
||||
void initHQFolders(int partyId);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onFileContentModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onPathCreateReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
+6
-6
@@ -489,7 +489,7 @@ void GenerateTelegrams::generateStellungsmeldungFS(AdlerJson::ExFeuerstellungFS
|
||||
req.feuerstellungsdaten.status = ProjectDataManagement::L28_Status::Einsatzbereit;
|
||||
req.feuerstellungsdaten.feuereinheit.verein = QStringLiteral("verein ExFeuerstellungFS");
|
||||
req.feuerstellungsdaten.feuereinheit.r = 5;
|
||||
req.feuerstellungsdaten.feuereinheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_L19_Oi_F3;
|
||||
req.feuerstellungsdaten.feuereinheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_F3;
|
||||
req.feuerstellungsdaten.mittelpunkt.koordinate.latitude = 53.37791;
|
||||
req.feuerstellungsdaten.mittelpunkt.koordinate.longitude = 8.759;
|
||||
req.feuerstellungsdaten.mittelpunkt.hoehe = 20;
|
||||
@@ -526,7 +526,7 @@ void GenerateTelegrams::generateStellungsmeldungWS(AdlerJson::ExFeuerstellungWS
|
||||
req.waffensystemdaten.status = ProjectDataManagement::L28_Status::Einsatzbereit;
|
||||
req.waffensystemdaten.einheit.verein = QStringLiteral("AB7X");
|
||||
req.waffensystemdaten.einheit.r = 6;
|
||||
req.waffensystemdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_L19_Oi_F6;
|
||||
req.waffensystemdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_F6;
|
||||
|
||||
AdlerJson::Geschoss geschoss1;
|
||||
AdlerJson::Geschoss geschoss2;
|
||||
@@ -558,7 +558,7 @@ void GenerateTelegrams::generateStellungsmeldungWS_Gmlrs(AdlerJson::ExFeuerstell
|
||||
req.waffensystemdaten.status = ProjectDataManagement::L28_Status::NichtEinsatzbereit;
|
||||
req.waffensystemdaten.einheit.verein = QStringLiteral("AB13X");
|
||||
req.waffensystemdaten.einheit.r = 6;
|
||||
req.waffensystemdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_L19_Oi_F6;
|
||||
req.waffensystemdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_F6;
|
||||
|
||||
AdlerJson::Geschoss geschoss1;
|
||||
AdlerJson::Geschoss geschoss2;
|
||||
@@ -591,7 +591,7 @@ void GenerateTelegrams::generateStellungsmeldungWS_Dm72(AdlerJson::ExFeuerstellu
|
||||
req.waffensystemdaten.status = ProjectDataManagement::L28_Status::NichtEinsatzbereit;
|
||||
req.waffensystemdaten.einheit.verein = QStringLiteral("AB72X");
|
||||
req.waffensystemdaten.einheit.r = 1;
|
||||
req.waffensystemdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_L19_Oi_F1;
|
||||
req.waffensystemdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_F1;
|
||||
|
||||
AdlerJson::Geschoss geschoss1;
|
||||
AdlerJson::Geschoss geschoss2;
|
||||
@@ -622,7 +622,7 @@ void GenerateTelegrams::generateStellungsmeldungLP(AdlerJson::ExFeuerstellungLP
|
||||
{
|
||||
req.ladeplatzdaten.einheit.r = 5;
|
||||
req.ladeplatzdaten.einheit.verein = QStringLiteral("verein StellungsmeldungLP");
|
||||
req.ladeplatzdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_L19_Oi_F3;
|
||||
req.ladeplatzdaten.einheit.oi = ProjectDataManagement::L19_Oi::L19_Oi_F3;
|
||||
|
||||
req.ladeplatzdaten.koordinate.koordinate.latitude = 53.37791;
|
||||
req.ladeplatzdaten.koordinate.koordinate.longitude = 8.759;
|
||||
@@ -644,7 +644,7 @@ void GenerateTelegrams::generateStellungsmeldungLP(AdlerJson::ExFeuerstellungLP
|
||||
|
||||
void GenerateTelegrams::generateStellungswechsel(AdlerJson::ExStellungswechsel &req)
|
||||
{
|
||||
req.stellungswechseldaten.oi = ProjectDataManagement::L19_Oi::L19_Oi_L19_Oi_F3;
|
||||
req.stellungswechseldaten.oi = ProjectDataManagement::L19_Oi::L19_Oi_F3;
|
||||
req.stellungswechseldaten.r = 5;
|
||||
req.stellungswechseldaten.verein = QStringLiteral("verein ExStellungswechsel");
|
||||
}
|
||||
|
||||
-1
@@ -65,7 +65,6 @@ private slots:
|
||||
void onDynamicParticipantDataChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType);
|
||||
void onSendParticipantDataTimeout();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void handleParticipantPositionChangedExternal(const ParticipantManagement::ParticipantPosition &position);
|
||||
void handleParticipantPositionChangedInternal(const ParticipantManagement::ParticipantPosition &position);
|
||||
|
||||
|
||||
+19
-19
@@ -750,15 +750,15 @@ struct SAATELEGRAMS_EXPORT Treffpunkt
|
||||
// EX-L49 Wirkmittel Feuerkommando Rakete
|
||||
struct SAATELEGRAMS_EXPORT WirkmittelFeuerkommandoRakete
|
||||
{
|
||||
ProjectDataManagement::L27_EffectorId kenner {ProjectDataManagement::L27_EffectorId_def::get_default()}; // EX-L27
|
||||
ProjectDataManagement::L27_EffectorId kenner {ProjectDataManagement::L27_EffectorId::A}; // EX-L27
|
||||
QVector<Treffpunkt> treffpunkte;
|
||||
double flugzeit {0.0};
|
||||
int gipfelhoehe {0};
|
||||
double schussrichtung {0.0};
|
||||
int fallwinkel {0};
|
||||
ProjectDataManagement::L48_TrajectoryRocket anflug {ProjectDataManagement::L48_TrajectoryRocket_def::get_default()};
|
||||
ProjectDataManagement::L48_TrajectoryRocket anflug {ProjectDataManagement::L48_TrajectoryRocket::Nominal};
|
||||
FeuerkommandoGeschosse geschoss;
|
||||
ProjectDataManagement::L46_GpsFrequency gps {ProjectDataManagement::L46_GpsFrequency_def::get_default()};
|
||||
ProjectDataManagement::L46_GpsFrequency gps {ProjectDataManagement::L46_GpsFrequency::L1};
|
||||
int wirkzeit {-1};
|
||||
};
|
||||
|
||||
@@ -1442,17 +1442,17 @@ const QMap<QString, ProjectDataManagement::L7_Request> ForderungMap = {
|
||||
|
||||
// EX-L19 Orts ID
|
||||
const QMap<QString, ProjectDataManagement::L19_Oi> ortsIdMap = {
|
||||
{QStringLiteral("Empty"), ProjectDataManagement::L19_Oi::Empty}, // Orts ID nicht gesetzt
|
||||
{QStringLiteral("F1"), ProjectDataManagement::L19_Oi::F1}, // 1. Feuerstellung
|
||||
{QStringLiteral("F2"), ProjectDataManagement::L19_Oi::F2}, // 2. Feuerstellung
|
||||
{QStringLiteral("F3"), ProjectDataManagement::L19_Oi::F3}, // 3. Feuerstellung
|
||||
{QStringLiteral("F4"), ProjectDataManagement::L19_Oi::F4}, // 4. Feuerstellung
|
||||
{QStringLiteral("F5"), ProjectDataManagement::L19_Oi::F5}, // 5. Feuerstellung
|
||||
{QStringLiteral("F6"), ProjectDataManagement::L19_Oi::F6}, // 6. Feuerstellung
|
||||
{QStringLiteral("F7"), ProjectDataManagement::L19_Oi::F7}, // 7. Feuerstellung
|
||||
{QStringLiteral("F8"), ProjectDataManagement::L19_Oi::F8}, // 8. Feuerstellung
|
||||
{QStringLiteral("F9"), ProjectDataManagement::L19_Oi::F9}, // 9. Feuerstellung
|
||||
{QStringLiteral("L"), ProjectDataManagement::L19_Oi::L} // Ladeplatz
|
||||
{QStringLiteral("Empty"), ProjectDataManagement::L19_Oi::L19_Oi_Empty}, // Orts ID nicht gesetzt
|
||||
{QStringLiteral("F1"), ProjectDataManagement::L19_Oi::L19_Oi_F1}, // 1. Feuerstellung
|
||||
{QStringLiteral("F2"), ProjectDataManagement::L19_Oi::L19_Oi_F2}, // 2. Feuerstellung
|
||||
{QStringLiteral("F3"), ProjectDataManagement::L19_Oi::L19_Oi_F3}, // 3. Feuerstellung
|
||||
{QStringLiteral("F4"), ProjectDataManagement::L19_Oi::L19_Oi_F4}, // 4. Feuerstellung
|
||||
{QStringLiteral("F5"), ProjectDataManagement::L19_Oi::L19_Oi_F5}, // 5. Feuerstellung
|
||||
{QStringLiteral("F6"), ProjectDataManagement::L19_Oi::L19_Oi_F6}, // 6. Feuerstellung
|
||||
{QStringLiteral("F7"), ProjectDataManagement::L19_Oi::L19_Oi_F7}, // 7. Feuerstellung
|
||||
{QStringLiteral("F8"), ProjectDataManagement::L19_Oi::L19_Oi_F8}, // 8. Feuerstellung
|
||||
{QStringLiteral("F9"), ProjectDataManagement::L19_Oi::L19_Oi_F9}, // 9. Feuerstellung
|
||||
{QStringLiteral("L"), ProjectDataManagement::L19_Oi::L19_Oi_L} // Ladeplatz
|
||||
};
|
||||
|
||||
// EX-20 TargetType -> pdm_target_type
|
||||
@@ -1460,11 +1460,11 @@ const QMap<QString, ProjectDataManagement::L19_Oi> ortsIdMap = {
|
||||
|
||||
// EX-L22 Feuer HALT Kategorie
|
||||
const QMap<QString, ProjectDataManagement::L22_FireHaltCategory> feuerHaltKategorieMap = {
|
||||
{QStringLiteral("A"), ProjectDataManagement::L22_FireHaltCategory::A}, // Feuer HALT Allgemein
|
||||
{QStringLiteral("R"), ProjectDataManagement::L22_FireHaltCategory::R}, // Feuer HALT Referenziert
|
||||
{QStringLiteral("E"), ProjectDataManagement::L22_FireHaltCategory::E}, // Feuer Einstellen
|
||||
{QStringLiteral("C"), ProjectDataManagement::L22_FireHaltCategory::C}, // Aufheben Feuer HALT Allgemein
|
||||
{QStringLiteral("F"), ProjectDataManagement::L22_FireHaltCategory::F}, // Aufheben Feuer HALT Referenziert
|
||||
{QStringLiteral("A"), ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_A}, // Feuer HALT Allgemein
|
||||
{QStringLiteral("R"), ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_R}, // Feuer HALT Referenziert
|
||||
{QStringLiteral("E"), ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_E}, // Feuer Einstellen
|
||||
{QStringLiteral("C"), ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_C}, // Aufheben Feuer HALT Allgemein
|
||||
{QStringLiteral("F"), ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_F}, // Aufheben Feuer HALT Referenziert
|
||||
};
|
||||
|
||||
// EX-L24 HQ(G) Art
|
||||
|
||||
-1
@@ -31,7 +31,6 @@ public:
|
||||
Q_SIGNALS:
|
||||
void participantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
template<typename T>
|
||||
void rxData(const T &data);
|
||||
|
||||
|
||||
-1
@@ -74,7 +74,6 @@ public slots:
|
||||
void onGenericTelegram(const QJsonObject &telegram);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool sendToTx(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data, bool bForce = false);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
-1
@@ -35,7 +35,6 @@ public:
|
||||
public Q_SLOTS:
|
||||
void onTimeout();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void doCleanup();
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
-1
@@ -24,7 +24,6 @@ public:
|
||||
Q_SIGNALS:
|
||||
void participantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
template<typename T>
|
||||
void rxData(const T &data);
|
||||
private:
|
||||
|
||||
-1
@@ -73,7 +73,6 @@ public:
|
||||
public Q_SLOTS:
|
||||
void onParticipantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool sendToTx(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data, bool bForce = false);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
-1
@@ -16,7 +16,6 @@ public:
|
||||
virtual ~ConvertFromJson() = default;
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool handleTelegram(const QByteArray &baJson, int &recvCounter);
|
||||
virtual void handleAcknowledge(qint64 timeStamp, int counter) = 0;
|
||||
virtual void handleTetraConnectionChanged(bool bConnected) = 0;
|
||||
|
||||
-1
@@ -72,7 +72,6 @@ public:
|
||||
Q_SIGNALS:
|
||||
void outgoingMessage(const QByteArray &msg);
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_sendCounter;
|
||||
|
||||
-1
@@ -64,7 +64,6 @@ public:
|
||||
bool txData(const TrainingAreaBase::TetraIcd::SetDevicePowerRequest &data) override;
|
||||
bool txData(const TrainingAreaBase::TetraIcd::UAVPerformMission &data) override;
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
template <typename T>
|
||||
bool sendToTxMixin(const T *data);
|
||||
private:
|
||||
|
||||
-1
@@ -67,7 +67,6 @@ public:
|
||||
Q_SIGNALS:
|
||||
void outgoingMessage(const QByteArray &msg);
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_sendCounter = 1;
|
||||
|
||||
-1
@@ -27,7 +27,6 @@ public:
|
||||
Q_SIGNALS:
|
||||
void participantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void sfmData(const TrainingAreaBase::TetraIcd::WlsBinarySfmData &data);
|
||||
|
||||
template<typename T>
|
||||
|
||||
-1
@@ -68,7 +68,6 @@ public:
|
||||
public Q_SLOTS:
|
||||
void onParticipantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
template <typename T>
|
||||
bool sendToTxBinary(const T *data);
|
||||
bool sendToTx(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data,
|
||||
|
||||
@@ -54,7 +54,6 @@ private Q_SLOTS:
|
||||
void onMainFootprintChanged(const InfrastructureManagement::MainFootprint &data, DataModification modType);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void rotateBuildingFootprint(int mseId);
|
||||
void removeOpsDataByStructureElementId(int structureElementId);
|
||||
void removeOpsAsset(int assetId);
|
||||
|
||||
Loaded 100 of 708 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user