Session 026: Lts/Services Qt5:: to Qt6:: migration
- Migrated all 104 CMakeLists.txt files in Lts/Services - Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg, Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test, Qt5::SerialPort with Qt6:: equivalents - 1244 files modified (CMakeLists.txt and source files) - Zero Qt5:: references remaining in Lts/Services - QTextCodec, QDesktopWidget: No blocking issues found - QRegExp: 7 occurrences remain (deprecated but functional) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
c143ff8a4f
commit
d5af8b9764
1244 files changed
+4266
-4633
No files matched your search
@@ -15,9 +15,6 @@ SET(SRCS_common
|
||||
alm_export.h
|
||||
logger.cpp
|
||||
logger.h
|
||||
alm_translation.h
|
||||
alm_translation.cpp
|
||||
alm_types.h
|
||||
)
|
||||
|
||||
# Generate alm_enums.idl / alm.idl
|
||||
@@ -34,13 +31,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# Generate alm_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcAlmCommon SHARED ${SRCS_common})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcAlmCommon SHARED ${SRCS_common})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -51,7 +47,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmCommon
|
||||
svcPdmCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAlmCommon)
|
||||
|
||||
#
|
||||
@@ -63,14 +58,13 @@ SET(SRCS_client
|
||||
# generate alm_[d|f]tc.h, tlm_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcAlmClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcAlmClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -80,7 +74,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmClient
|
||||
ddsftc
|
||||
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAlmClient)
|
||||
|
||||
#
|
||||
@@ -108,14 +101,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
# Generate alm.sql, alm.xml
|
||||
CODEGEN_SQL(SRCS_server ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV svcAlmServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(AAR SV svcAlmServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAlmServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAlmServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -141,7 +133,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAlmServer
|
||||
svcAlmCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAlmServer)
|
||||
|
||||
#
|
||||
|
||||
+5
-4
@@ -9,10 +9,10 @@
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
|
||||
/* ----------------------------------------------------------------------------------
|
||||
* HOW TO RUN THE TESTS
|
||||
@@ -34,6 +34,7 @@ AlmTests::AlmTests(QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_testId(0)
|
||||
, m_bTestsSuccessful(true)
|
||||
, m_logger(getLogger("AlmTests"))
|
||||
, m_participantIndex(0)
|
||||
{}
|
||||
|
||||
|
||||
@@ -46,7 +46,6 @@ protected Q_SLOTS:
|
||||
void ExitSuccess();
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onConfigureAlarmsReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
|
||||
private:
|
||||
@@ -61,6 +60,8 @@ private:
|
||||
int m_testId;
|
||||
bool m_bTestsSuccessful;
|
||||
int m_operatorId;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_participantIndex;
|
||||
|
||||
};
|
||||
|
||||
@@ -15,6 +15,7 @@ namespace AlarmManagement
|
||||
|
||||
DdsHandler::DdsHandler(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: m_ddsConnector(ddsConnector)
|
||||
, m_logger(getLogger("DdsHandler"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << m_ddsConnector->getDomainId() << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <AlarmManagement/alm_dts_types.h>
|
||||
#include <ExerciseEventManagement/eem_dtc.h>
|
||||
#include <MarkerManagement/mrk_ftc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <TrainingAreaBase/tab_dtc.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include "logger.h"
|
||||
@@ -49,7 +49,6 @@ public:
|
||||
qint64 currentPartitionTime() const;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
|
||||
std::shared_ptr<Core::TopicLockMaster> m_topicLockMaster;
|
||||
@@ -64,6 +63,10 @@ private:
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dtc> m_dtcTab;
|
||||
std::shared_ptr<DDSConnector::Publisher> m_dtsEmergencyCallPublisher;
|
||||
std::shared_ptr<DTS::AcknowledgeSOSInAllExercises> m_dtsEmergencyCall;
|
||||
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
+7
-7
@@ -7,12 +7,11 @@
|
||||
*/
|
||||
|
||||
#include "handler_configure_alarms.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QSet>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QSet>
|
||||
#include <QTimer>
|
||||
#include <ProjectDataManagement/pdm_translation.h>
|
||||
#include <LtsUtilsCore/json_object.h>
|
||||
|
||||
@@ -39,6 +38,7 @@ HandlerConfigureAlarms::HandlerConfigureAlarms(Initialization *mainHandler)
|
||||
: QObject()
|
||||
, ConfigureAlarmsRequestHandler(mainHandler->dds()->ftsAlm())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("HandlerConfigureAlarms"))
|
||||
, m_windowIndex(0)
|
||||
{
|
||||
} // end of ctor()
|
||||
@@ -245,7 +245,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
|
||||
// Schleife ueber jeden Participant in der Konfiguration
|
||||
// Vergleich Participant-ID Event mit Konfiguration Event
|
||||
// Wenn ja, Alarm an operatorId schicken
|
||||
for (const Database::AlmConfig &alarm : std::as_const(m_alarms))
|
||||
for (const Database::AlmConfig &alarm : qAsConst(m_alarms))
|
||||
{
|
||||
{
|
||||
/*DEBUG_LOG(m_logger) << " alarmConfigItem.id=" << alarm.id
|
||||
@@ -267,7 +267,7 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
|
||||
else
|
||||
participants.append(0);
|
||||
|
||||
for (int participantId : std::as_const(participants))
|
||||
for (int participantId : qAsConst(participants))
|
||||
{
|
||||
bool allVulnerabilityStates = alarm.vulnerabilityState == -1;
|
||||
bool vulnerabilityCheck = vulnerabilityState == alarm.vulnerabilityState;
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
#include <alm_db.h>
|
||||
@@ -48,8 +48,6 @@ private Q_SLOTS:
|
||||
void onEventChanged(const ExerciseEventManagement::Event &eventData, DataModification modType);
|
||||
|
||||
private: // methods
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onConfigureAlarmsRequest(const rti::core::SampleIdentity &cookie,
|
||||
const ConfigureAlarmsRequest &request) override;
|
||||
void sendWindow(const ExerciseEventManagement::Event &eventData,
|
||||
@@ -86,6 +84,8 @@ private: // attributes
|
||||
}
|
||||
};
|
||||
QMap<int, Database::AlmConfig> m_alarms; // Key = almConfig.id
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
int m_windowIndex;
|
||||
};
|
||||
} // namespace AlarmManagement
|
||||
+6
-6
@@ -7,16 +7,15 @@
|
||||
*/
|
||||
|
||||
#include "handler_emergency_call.h"
|
||||
#include <utility>
|
||||
#include "initialization.h"
|
||||
#include "handler_configure_alarms.h"
|
||||
#include "object_emergency_call.h"
|
||||
#include "alm_db.h"
|
||||
#include <DDS/DTS/generic_dts.h>
|
||||
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QDebug>
|
||||
namespace AlarmManagement
|
||||
{
|
||||
HandlerEmergencyCall::HandlerEmergencyCall(const std::shared_ptr<HandlerConfigureAlarms> &configAlarmHandler,
|
||||
@@ -25,6 +24,7 @@ HandlerEmergencyCall::HandlerEmergencyCall(const std::shared_ptr<HandlerConfigur
|
||||
, EmergencyCallAcknowledgeRequestHandler(mainHandler->dds()->ftsAlm())
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_configAlarmHandler(configAlarmHandler)
|
||||
, m_logger(getLogger("HandlerEmergencyCall"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ void HandlerEmergencyCall::onEmergencyCallAcknowledgeRequest(const rti::core::Sa
|
||||
Core::FunctionReplyObject HandlerEmergencyCall::emergencyCallAcknowledgeRequest(const EmergencyCallAcknowledgeRequest &request)
|
||||
{
|
||||
ObjectEmergencyCall *ifs = nullptr;
|
||||
for(auto _ifs : std::as_const(m_emergencyObjMap))
|
||||
for(auto _ifs : qAsConst(m_emergencyObjMap))
|
||||
{
|
||||
auto data = _ifs->getData();
|
||||
if (data.issi == request.issi()
|
||||
@@ -182,7 +182,7 @@ bool HandlerEmergencyCall::isExerciseValidForEmergencyCall() const
|
||||
|
||||
bool HandlerEmergencyCall::isNewEmergencyCall(const AlmEmergencyCall &newdata)
|
||||
{
|
||||
for(const auto &ifs : std::as_const(m_emergencyObjMap))
|
||||
for(const auto &ifs : qAsConst(m_emergencyObjMap))
|
||||
{
|
||||
const auto &data = ifs->getData();
|
||||
if (data.issi == newdata.issi()
|
||||
|
||||
+3
-3
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <AlarmManagement/alm_db.h>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
@@ -33,7 +33,6 @@ public:
|
||||
bool init();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
bool createEmergencyCallObject(const AlmEmergencyCall &data);
|
||||
void onEmergencyCallAcknowledgeRequest(const rti::core::SampleIdentity &cookie,
|
||||
const EmergencyCallAcknowledgeRequest &request) override final;
|
||||
@@ -46,9 +45,10 @@ private slots:
|
||||
void onAcknowledgeSOSInExercises(const AlarmManagement::AcknowledgeSOSInAllExercises &data, DataModification modType);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
Initialization *m_mainHandler;
|
||||
std::shared_ptr<HandlerConfigureAlarms> m_configAlarmHandler;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
QMap<int, ObjectEmergencyCall *> m_emergencyObjMap; // Key = DangerAreaId
|
||||
};
|
||||
|
||||
|
||||
@@ -11,9 +11,11 @@
|
||||
|
||||
using namespace AlarmManagement;
|
||||
|
||||
HandlerParticipant::HandlerParticipant(const std::shared_ptr<DdsHandler> &ddsHandler) : QObject()
|
||||
, m_ddsHandler(ddsHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
HandlerParticipant::HandlerParticipant(const std::shared_ptr<DdsHandler> &ddsHandler)
|
||||
: QObject()
|
||||
, m_ddsHandler(ddsHandler)
|
||||
, m_logger(getLogger("HandlerParticipant"))
|
||||
{
|
||||
} // end of ctor()
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
@@ -8,11 +8,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include "dds_handler.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QList>
|
||||
@@ -78,8 +78,6 @@ private Q_SLOTS:
|
||||
void onDynamicParticipantChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType);
|
||||
|
||||
private: // methoden
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<AlarmManagement::HandlerParticipant::ParticipantHierarchy> getInferiorParts(int participantId) const;
|
||||
|
||||
private: // attributes
|
||||
@@ -87,7 +85,7 @@ private: // attributes
|
||||
QMap<int, int> m_partId2VulnerabilityMap; ///< Reference map participant (player) to Vulnerability
|
||||
QHash<int, ParticipantHierarchy> m_participantHierarchy;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to VOM DDS handler
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace AlarmManagement
|
||||
|
||||
@@ -45,15 +45,13 @@ public:
|
||||
std::shared_ptr<HandlerParticipant> hdlParticipant() const { return m_handlerParticipant; }
|
||||
|
||||
private: // attributes
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler; ///< Pointer to DB handler
|
||||
std::shared_ptr<HandlerConfigureAlarms> m_handlerConfigureAlarms;
|
||||
std::shared_ptr<HandlerParticipant> m_handlerParticipant; ///< Pointer to handler for all participants
|
||||
std::shared_ptr<HandlerEmergencyCall> m_handlerEmergencyCall;
|
||||
|
||||
|
||||
NGL::INGLLogger &m_logger; ///< Interface to the Logging-Facility
|
||||
|
||||
};
|
||||
} // namespace MessagingDataManagement
|
||||
@@ -9,13 +9,13 @@
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <AlarmManagement/svcalmcommon_export.h>
|
||||
#include "alm_export.h"
|
||||
|
||||
namespace AlarmManagement
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
SVCALMCOMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
ALM_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
|
||||
+5
-3
@@ -4,9 +4,11 @@
|
||||
|
||||
namespace AlarmManagement{
|
||||
|
||||
ObjectEmergencyCall::ObjectEmergencyCall(Initialization *mainHandler, QObject *parent) : QObject(parent)
|
||||
, m_mainHandler(mainHandler),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
ObjectEmergencyCall::ObjectEmergencyCall(Initialization *mainHandler, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_mainHandler(mainHandler)
|
||||
, m_logger(getLogger("ObjectEmergencyCall"))
|
||||
{
|
||||
}
|
||||
|
||||
ObjectEmergencyCall::~ObjectEmergencyCall()
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <dds_handler.h>
|
||||
#include "logger.h"
|
||||
|
||||
#include <Core/core_types.h>
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
//Generated
|
||||
#include <AlarmManagement/alm_db.h>
|
||||
|
||||
@@ -32,9 +32,10 @@ protected Q_SLOTS:
|
||||
void onPublishData();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
Initialization *m_mainHandler;
|
||||
Database::AlmEmergencyCall m_data;
|
||||
NGL::INGLLogger &m_logger;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <QString>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
|
||||
@@ -70,13 +70,12 @@ CODEGEN_TOPIC_TYPEDEFS(SRCS_common ${xml_FILE})
|
||||
# generate aes_[d|f]tc.h
|
||||
CODEGEN_CLIENT_TOPICS_IFC(SRCS_common ${xml_FILE})
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS HLA svcAesCommon SHARED ${SRCS_common} )
|
||||
NGL_ADD_LIBRARY(AAR SV WS HLA svcAesCommon SHARED ${SRCS_common} )
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAesCommon
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAesCommon
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -95,7 +94,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAesCommon
|
||||
Trajectory
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAesCommon)
|
||||
|
||||
#
|
||||
@@ -109,14 +107,13 @@ SET(SRCS_client
|
||||
# generate aes_[d|f]tc_impl.[cpp|h]
|
||||
CODEGEN_CLIENT_TOPICS_IMPL(SRCS_client ${xml_FILE})
|
||||
# SV wegen ft unit test
|
||||
NGL_ADD_LIBRARY2(AAR SV HLA WS svcAesClient SHARED ${SRCS_client})
|
||||
NGL_ADD_LIBRARY(AAR SV HLA WS svcAesClient SHARED ${SRCS_client})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAesClient
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAesClient
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -127,7 +124,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAesClient
|
||||
ngltools
|
||||
ddsftc
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAesClient)
|
||||
|
||||
#
|
||||
@@ -143,14 +139,13 @@ CODEGEN_SERVER_TOPICS(SRCS_server ${xml_FILE})
|
||||
|
||||
#WS for Record Replay plugin stand alone build
|
||||
|
||||
NGL_ADD_LIBRARY2(AAR SV WS svcAesServer SHARED ${SRCS_server})
|
||||
NGL_ADD_LIBRARY(AAR SV WS svcAesServer SHARED ${SRCS_server})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(svcAesServer
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAesServer
|
||||
PRIVATE
|
||||
RTI::nddscpp2
|
||||
@@ -160,7 +155,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAesServer
|
||||
svcAesCommon
|
||||
ngldb
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAesServer)
|
||||
|
||||
#
|
||||
@@ -324,7 +318,6 @@ CODEGEN_SQL(SRCS_exe ${xml_FILE})
|
||||
|
||||
NGL_ADD_SVC_ICON(SRCS_exe)
|
||||
NGL_ADD_EXECUTABLE(AAR SV svcAreaEffectSimulation ${SRCS_exe})
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation
|
||||
svcAesServer
|
||||
svcCesClient
|
||||
@@ -352,7 +345,6 @@ NGL_TARGET_LINK_LIBRARIES(svcAreaEffectSimulation
|
||||
ngltools
|
||||
saaTelegrams
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(svcAreaEffectSimulation)
|
||||
NGL_INSTALL(AAR SV FILES log4cxx_aes.props DESTINATION bin)
|
||||
NGL_ADD_TARGET_LINK(svcAreaEffectSimulation sAES)
|
||||
@@ -410,7 +402,6 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_utils_test
|
||||
Utils/test_main.cpp
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_utils_test
|
||||
Qt6::Core
|
||||
Qt6::Widgets
|
||||
@@ -418,9 +409,9 @@ NGL_TARGET_LINK_LIBRARIES(aes_utils_test
|
||||
svcAesCommon
|
||||
ProjectConfig
|
||||
ddsconnector
|
||||
nglapplication
|
||||
LtsCoordTrans
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL(AAR SV TARGETS aes_utils_test DESTINATION bin/test)
|
||||
|
||||
#
|
||||
@@ -430,7 +421,6 @@ NGL_ADD_EXECUTABLE(SV NO_TRANSLATION aes_convert_mine_area
|
||||
ModuleTests/aes_convert_mine_area.cpp
|
||||
)
|
||||
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area
|
||||
Qt6::Core
|
||||
# Qt6::Widgets
|
||||
@@ -445,7 +435,6 @@ NGL_TARGET_LINK_LIBRARIES(aes_convert_mine_area
|
||||
nglsettings
|
||||
ngltools
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL(SV TARGETS aes_convert_mine_area DESTINATION bin/test)
|
||||
|
||||
|
||||
|
||||
+17
-16
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "abstract_firing_strategy.h"
|
||||
#include <utility>
|
||||
|
||||
#include "object_effector.h"
|
||||
#include "main_handler.h"
|
||||
@@ -16,9 +15,9 @@
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include "Trajectory/trajectory_transform.h"
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QJsonDocument>
|
||||
#include <QRandomGenerator>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
@@ -26,17 +25,19 @@ namespace AreaEffectSimulation
|
||||
|
||||
|
||||
|
||||
AbstractFiringStrategy::AbstractFiringStrategy(ObjectEffector *parent) : QObject(parent)
|
||||
, m_effector(parent),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
AbstractFiringStrategy::AbstractFiringStrategy(ObjectEffector *parent)
|
||||
: QObject(parent)
|
||||
, m_effector(parent)
|
||||
, m_logger(getLogger("FiringStrategy"))
|
||||
{
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
AbstractFiringStrategy::~AbstractFiringStrategy()
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void AbstractFiringStrategy::calculateDispersionTrajectory()
|
||||
@@ -49,7 +50,7 @@ void AbstractFiringStrategy::calculateDispersionTrajectory()
|
||||
// sanity check:
|
||||
if (intendendTrajectory.size() < 2)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION
|
||||
<< " size of intendendTrajectory not sufficiant, size=" << intendendTrajectory.size();
|
||||
return;
|
||||
}
|
||||
@@ -72,7 +73,7 @@ std::vector<Core::GeoPositionRelativeTime> AbstractFiringStrategy::buildTrajecto
|
||||
// sanity check:
|
||||
if (relativeTrajectory.size() < 2)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION
|
||||
<< " size of relativeTrajectory not sufficiant, size=" << relativeTrajectory.size();
|
||||
return {};
|
||||
}
|
||||
@@ -86,7 +87,7 @@ std::vector<Core::GeoPositionRelativeTime> AbstractFiringStrategy::buildTrajecto
|
||||
geometry.reserve(relativeTrajectory.size());
|
||||
|
||||
// Aehnlich wie Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/aes_handler.cpp Zeile 365
|
||||
for (const TrajectoryPoint &trajPntRelPos : std::as_const(relativeTrajectory))
|
||||
for (const TrajectoryPoint &trajPntRelPos : qAsConst(relativeTrajectory))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Flugbahnpunkt: trajPntRelPos :" << trajPntRelPos; // benefit from operator<<:
|
||||
|
||||
@@ -114,7 +115,7 @@ TrajectoryTimeAware AbstractFiringStrategy::buildTrajectoryTimeAware(const std::
|
||||
// sanity check:
|
||||
if (trajectoryGeometry.size() < 2)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION
|
||||
<< " size of trajectoryGeometry not sufficiant, size=" << trajectoryGeometry.size();
|
||||
return {};
|
||||
}
|
||||
@@ -139,7 +140,7 @@ int AbstractFiringStrategy::sendChargeEffect(const TrajectoryTimeAware &trajecto
|
||||
// sanity check:
|
||||
if (trajGeometry.size() < 2)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO
|
||||
ERROR_LOG(m_logger) << LOGFUNCTION
|
||||
<< " size of trajectoryTimeAware.geometry not sufficiant, size=" << trajGeometry.size();
|
||||
return -1;
|
||||
}
|
||||
@@ -186,7 +187,7 @@ int32_t AbstractFiringStrategy::gearTypeId(int chargeTypeId, int participantId)
|
||||
DEBUG_LOG(m_logger) << "gearSize " << dynamicParticipantData.gear().size();
|
||||
|
||||
const auto& participantData_gear = dynamicParticipantData.gear();
|
||||
for (const auto &gear : std::as_const(participantData_gear))
|
||||
for (const auto &gear : qAsConst(participantData_gear))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "gear.chargeTypeId(): " << gear.chargeTypeId() << ", chargeTypeId:" << chargeTypeId;
|
||||
if (gear.chargeTypeId() == chargeTypeId)
|
||||
|
||||
+2
-2
@@ -21,9 +21,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <AreaEffectSimulation/logger.h>
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <Core/core.hpp>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
+5
-6
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "dm72_firing_strategy.h"
|
||||
#include <utility>
|
||||
|
||||
#include "main_handler.h"
|
||||
#include "object_effector.h"
|
||||
@@ -16,10 +15,10 @@
|
||||
#include <TrainingAreaBase/Plugins/AdlerJson/telegrams.h>
|
||||
#include <Trajectory/trajectory_transform.h>
|
||||
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonValue>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonValue>
|
||||
#include <QTransform>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
@@ -73,7 +72,7 @@ void Dm72FiringStrategy::init()
|
||||
QVector<UtmWithHeight> tempUtmTreffpunkte;
|
||||
tempUtmTreffpunkte.reserve(wirkmittel.geschoss.anzahl);
|
||||
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(wirkmittel.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(wirkmittel.treffpunkte))
|
||||
{
|
||||
const UtmCoordinate utmTreffpunkt = UtmCoordinate::fromGeographic(treffpunkt.koordinate.koordinate.longitude * deg2rad(),
|
||||
treffpunkt.koordinate.koordinate.latitude * deg2rad(),
|
||||
|
||||
+3
-4
@@ -7,15 +7,14 @@
|
||||
*/
|
||||
|
||||
#include "gmlrs_firing_strategy.h"
|
||||
#include <utility>
|
||||
#include "object_effector.h"
|
||||
|
||||
#include <TrainingAreaBase/Plugins/AdlerJson/telegrams.h>
|
||||
#include <Trajectory/trajectory_transform.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
@@ -69,7 +68,7 @@ void GmlrsFiringStrategy::init()
|
||||
WirkmittelFeuerkommandoRakete wirkmittel;
|
||||
wirkmittelFeuerkommandoRaketeFromJson(properties, wirkmittel, bOk);
|
||||
|
||||
for (const Treffpunkt &treffpunkt : std::as_const(wirkmittel.treffpunkte))
|
||||
for (const Treffpunkt &treffpunkt : qAsConst(wirkmittel.treffpunkte))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate utmTreffpunkt =
|
||||
LtsCoordTrans::UtmCoordinate::fromGeographic(treffpunkt.koordinate.koordinate.longitude * LtsCoordTrans::deg2rad(),
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "abstract_firing_strategy.h"
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
+2
-2
@@ -13,8 +13,8 @@
|
||||
#include <TrainingAreaBase/Plugins/AdlerJson/telegrams.h>
|
||||
#include <TrajectorySplitter/trajectory_splitter.h>
|
||||
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
-6
@@ -13,12 +13,6 @@ SET(UnitTestSources
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesModuleTestEffectCluster ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestEffectCluster
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesModuleTestEffectCluster
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
|
||||
+14
-14
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "effect_cluster_module_test.h"
|
||||
#include <utility>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
|
||||
@@ -18,14 +17,14 @@
|
||||
// PPM
|
||||
#include "ParticipantManagement/ppm_ftc_types.h"
|
||||
#include "TrainingAreaBase/tab.hpp"
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QXmlStreamReader>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
#include <QFile>
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QTimer>
|
||||
#include <QVector>
|
||||
#include <QXmlStreamReader>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -75,6 +74,7 @@ double distanceMeter(const Core::GeoPosition2D &geoPos2D, const LtsCoordTrans::U
|
||||
ModuleTestEffectCluster::ModuleTestEffectCluster(int domainId, int exerciseId)
|
||||
: m_domainId(domainId)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("ModuleTestEffectCluster"))
|
||||
{
|
||||
m_timer = new QTimer(this);
|
||||
m_timer->setSingleShot(true);
|
||||
@@ -241,7 +241,7 @@ void ModuleTestEffectCluster::onTrajectoryTimeAwareChanged(const TrajectoryTimeA
|
||||
|
||||
void ModuleTestEffectCluster::dumpCnt()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " Counter: "
|
||||
DEBUG_LOG(m_logger) << LOGFUNCTION << " Counter: "
|
||||
<< " cntEffectCluster = " << m_counterDds.cntEffectCluster << ", cntAtEffectCluster = " << m_counterDds.cntAtEffectCluster
|
||||
<< ", cntGunToTargetLine = " << m_counterDds.cntAtEffectClusterGunToTargetLine << ", cntClusterEffects = " << m_counterDds.cntEffectClusterEffects
|
||||
<< ", cntTrajectory = " << m_counterDds.cntTrajectory;
|
||||
@@ -507,7 +507,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared; }, durPrep))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
@@ -515,7 +515,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated; }, durAct))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
@@ -523,7 +523,7 @@ void ModuleTestEffectCluster::waitForEffectStates(int lineNumber, int durPrep, i
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired; }, durExp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id() << ", lineNumber = " << lineNumber;
|
||||
@@ -934,7 +934,7 @@ int main(int argc, char *argv[])
|
||||
--argc;
|
||||
|
||||
const QStringList &slPositionalArgs = options.positionalArguments();
|
||||
for (const QString &item : std::as_const(slPositionalArgs))
|
||||
for (const QString &item : qAsConst(slPositionalArgs))
|
||||
std::cout << " item = " << item << std::endl;
|
||||
|
||||
ModuleTestEffectCluster tc(options.domainId(), options.exerciseId());
|
||||
|
||||
+4
-4
@@ -25,12 +25,12 @@
|
||||
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
|
||||
#include <TrainingAreaBase/tab_dts.h>
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include <QtTest/QTest>
|
||||
|
||||
@@ -61,8 +61,6 @@ public:
|
||||
ModuleTestEffectCluster(int domainId, int exerciseId);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onAcknowledgeExternalAesItemReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
@@ -187,6 +185,8 @@ private:
|
||||
}
|
||||
}
|
||||
m_counterDds;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
|
||||
-6
@@ -13,12 +13,6 @@ SET(UnitTestSources
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesModuleTestExplosionCluster ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestExplosionCluster
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesModuleTestExplosionCluster
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
|
||||
+121
-121
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "explosion_cluster_module_test.h"
|
||||
#include <utility>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -20,8 +19,8 @@
|
||||
#include <Buildings/bld_ftc.h>
|
||||
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -95,6 +94,7 @@ double distanceMeter(const Core::GeoPosition2D &geoPos2D , const LtsCoordTrans::
|
||||
ModuleTestExplosionCluster::ModuleTestExplosionCluster(int domainId, int exerciseId)
|
||||
: m_domainId(domainId)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("ModuleTestExplosionCluster"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -253,7 +253,7 @@ void ModuleTestExplosionCluster::onTrajectoryTimeAwareChanged(const TrajectoryTi
|
||||
|
||||
void ModuleTestExplosionCluster::dumpCnt()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " Counter: "
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " Counter: "
|
||||
<< " cntExplosionCluster = " << m_counterDds.cntExplosionCluster
|
||||
<< ", cntAtExplosionCluster = " << m_counterDds.cntAtExplosionCluster
|
||||
<< ", cntGunToTargetLine = " << m_counterDds.cntAtExplosionClusterGunToTargetLine
|
||||
@@ -265,7 +265,7 @@ void ModuleTestExplosionCluster::dumpCnt()
|
||||
void ModuleTestExplosionCluster::dumpBldgStates()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << " m_buildingStateVec.size() = " << m_buildingStateVec.size();
|
||||
for (const Buildings::BuildingState &bldgState : std::as_const(m_buildingStateVec))
|
||||
for (const Buildings::BuildingState &bldgState : qAsConst(m_buildingStateVec))
|
||||
NOTICE_LOG(m_logger) << " bldgState: "
|
||||
<< ", id = " << bldgState.id()
|
||||
<< ", damagePercent = " << bldgState.damagePercent()
|
||||
@@ -336,7 +336,7 @@ bool ModuleTestExplosionCluster::checkBldgStates(const QVector<int> &damagePerce
|
||||
QVector<int> damagePercentIst;
|
||||
damagePercentIst.reserve(m_buildingStateVec.size());
|
||||
|
||||
for (const Buildings::BuildingState &bldgState : std::as_const(m_buildingStateVec))
|
||||
for (const Buildings::BuildingState &bldgState : qAsConst(m_buildingStateVec))
|
||||
damagePercentIst.append(bldgState.damagePercent());
|
||||
|
||||
bool same = damagePercentIst == damagePercent;
|
||||
@@ -715,7 +715,7 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id()
|
||||
@@ -724,7 +724,7 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id()
|
||||
@@ -733,7 +733,7 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id()
|
||||
@@ -877,7 +877,7 @@ bool ModuleTestExplosionCluster::checkParticipant_89()
|
||||
const LtsUtils::QPoint3D ¢erCoordGeo = Polygons::calculateFiringUnitCenterNonRecursive(m_ppmDtc, partId, singlePositionsOut_unused, m_logger);
|
||||
if (centerCoordGeo.isNull() || std::isnan(centerCoordGeo.x()))
|
||||
{
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -896,7 +896,7 @@ bool ModuleTestExplosionCluster::checkParticipant_99()
|
||||
const LtsUtils::QPoint3D ¢erCoordGeo = Polygons::calculateFiringUnitCenterNonRecursive(m_ppmDtc, partId, singlePositionsOut_unused, m_logger);
|
||||
if (centerCoordGeo.isNull() || std::isnan(centerCoordGeo.x()))
|
||||
{
|
||||
WARNING_LOG(m_logger) << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
|
||||
WARNING_LOG(m_logger) << LOGFUNCTION << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ void ModuleTestExplosionCluster::resetBldgs()
|
||||
std::vector<Buildings::Building> buildingsVec;
|
||||
buildingsVec.reserve(m_bldgIdToName.size());
|
||||
auto bldgIds = m_bldgIdToName.keys();
|
||||
for (int bldgId : std::as_const(bldgIds))
|
||||
for (int bldgId : qAsConst(bldgIds))
|
||||
buildingsVec.push_back( Buildings::Building(bldgId, {}) );
|
||||
|
||||
Buildings::SetBuildingStatesRequest requestData;
|
||||
@@ -951,7 +951,7 @@ void ModuleTestExplosionCluster::resetBldgs()
|
||||
QTest::qWait(100);
|
||||
|
||||
// check states:
|
||||
for (int bldgId : std::as_const(bldgIds))
|
||||
for (int bldgId : qAsConst(bldgIds))
|
||||
{
|
||||
const ProjectDataManagement::VulnerabilityState& bldgState = m_bldDtc->buildingState(bldgId).vulnerabilityState();
|
||||
INFO_LOG(m_logger) << "resetBldgs: bldgId " << bldgId
|
||||
@@ -1175,19 +1175,19 @@ void ModuleTestExplosionCluster::init()
|
||||
|
||||
void ModuleTestExplosionCluster::test_justSetupParticipants()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
setupParticipants();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_TneVerificationBremen_00()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Bremen)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
|
||||
// AXXX Zentrale/DDS ToSFM (compassDegree + 90.0)
|
||||
@@ -1231,11 +1231,11 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Bremen)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
//
|
||||
// !!!!! ModuleTest_TneVerification -> randomNumber = 32767; !!!!!!!!!!!
|
||||
@@ -1292,7 +1292,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
|
||||
<< ", m_data.mhPoints().size()=" << m_data.mhPoints().size();
|
||||
|
||||
const std::vector<Core::GeoPosition> &formRef = itemView.form();
|
||||
for (const Core::GeoPosition &geoCoord : std::as_const(formRef))
|
||||
for (const Core::GeoPosition &geoCoord : qAsConst(formRef))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat());
|
||||
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
|
||||
@@ -1323,17 +1323,17 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
|
||||
QVERIFY2(distanceMeter(formRef[i++], LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32U MD 97002 78004"))) < 1, "ERROR, distanceMeter failed!!");
|
||||
|
||||
dumpCnt();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_TneVerificationBremen_02()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Bremen)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
//
|
||||
// !!!!! ModuleTest_TneVerification -> randomNumber = 32767; !!!!!!!!!!!
|
||||
@@ -1391,7 +1391,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_02()
|
||||
<< ", m_data.mhPoints().size()=" << m_data.mhPoints().size();
|
||||
|
||||
const std::vector<Core::GeoPosition> &formRef = itemView.form();
|
||||
for (const Core::GeoPosition &geoCoord : std::as_const(formRef))
|
||||
for (const Core::GeoPosition &geoCoord : qAsConst(formRef))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat());
|
||||
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
|
||||
@@ -1431,7 +1431,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_Proximity()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1441,7 +1441,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_Proximity()
|
||||
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1484,17 +1484,17 @@ void ModuleTestExplosionCluster::test_bldg_1104_Proximity()
|
||||
|
||||
QVERIFY2(bOk, "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
void ModuleTestExplosionCluster::test_bldg_1104_Impact()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1522,17 +1522,17 @@ void ModuleTestExplosionCluster::test_bldg_1104_Impact()
|
||||
// UNABHÄNGIG von [GUEZE-2766] Zünderarten Freifläche:
|
||||
QVERIFY2(checkBldgStates({14, 32, 49, 63}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
void ModuleTestExplosionCluster::test_bldg_1104_Delay()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1562,7 +1562,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_Delay()
|
||||
// UNABHÄNGIG von [GUEZE-2766] Zünderarten Freifläche:
|
||||
QVERIFY2(checkBldgStates({30, 56, 74, 90}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -1573,12 +1573,12 @@ void ModuleTestExplosionCluster::test_bldg_1106_Proximity()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1106"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_6(), "ERROR, checkParticipant_6 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1599,7 +1599,7 @@ void ModuleTestExplosionCluster::test_bldg_1106_Proximity()
|
||||
// Maybe Kanaele cover bldg_1106 from impact due to very simple algorithm:
|
||||
// CES/Plugins/Buildings/handler_aes_data.cpp:674 / findBuildingsBetween(impactPos, footprint)
|
||||
const bool bIsKanaeleAssigned = isKanaeleAssigned();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " bIsKanaeleAssigned = " << bIsKanaeleAssigned;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " bIsKanaeleAssigned = " << bIsKanaeleAssigned;
|
||||
if (bIsKanaeleAssigned)
|
||||
// QVERIFY2(checkBldgStates({14, 22, 29, 37}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
// since 13.11.2024 ; [GUEZE-2766] Zünderarten Freifläche:
|
||||
@@ -1607,18 +1607,18 @@ void ModuleTestExplosionCluster::test_bldg_1106_Proximity()
|
||||
else
|
||||
QVERIFY2(checkBldgStates({14, 30, 45, 61}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_bldg_1106_Impact()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_1106"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_6(), "ERROR, checkParticipant_6 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1640,23 +1640,23 @@ void ModuleTestExplosionCluster::test_bldg_1106_Impact()
|
||||
// Maybe Kanaele cover bldg_1106 from impact due to very simple algorithm:
|
||||
// CES/Plugins/Buildings/handler_aes_data.cpp:674 / findBuildingsBetween(impactPos, footprint)
|
||||
const bool bIsKanaeleAssigned = isKanaeleAssigned();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " bIsKanaeleAssigned = " << bIsKanaeleAssigned;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " bIsKanaeleAssigned = " << bIsKanaeleAssigned;
|
||||
if (bIsKanaeleAssigned)
|
||||
QVERIFY2(checkBldgStates({14, 28, 41, 56}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
else
|
||||
QVERIFY2(checkBldgStates({14, 41, 68, 88}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
void ModuleTestExplosionCluster::test_bldg_1106_Delay()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_1106"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_6(), "ERROR, checkParticipant_6 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1678,24 +1678,24 @@ void ModuleTestExplosionCluster::test_bldg_1106_Delay()
|
||||
// Maybe Kanaele cover bldg_1106 from impact due to very simple algorithm:
|
||||
// CES/Plugins/Buildings/handler_aes_data.cpp:674 / findBuildingsBetween(impactPos, footprint)
|
||||
const bool bIsKanaeleAssigned = isKanaeleAssigned();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " bIsKanaeleAssigned = " << bIsKanaeleAssigned;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " bIsKanaeleAssigned = " << bIsKanaeleAssigned;
|
||||
if (bIsKanaeleAssigned)
|
||||
QVERIFY2(checkBldgStates({14, 43, 72, 86 }, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
else
|
||||
QVERIFY2(checkBldgStates({14, 71, 90, 99}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_bldg_UBAHN_Proximity()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_U_Bahn"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1717,7 +1717,7 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Proximity()
|
||||
// since 13.11.2024 ; [GUEZE-2766] Zünderarten Freifläche:
|
||||
QVERIFY2(checkBldgStates({2, 4, 7, 7}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
// participantId(5)
|
||||
// Schuss 1: nearestWall.roomId = 2303
|
||||
@@ -1731,11 +1731,11 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Impact()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_U_Bahn"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1761,7 +1761,7 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Impact()
|
||||
|
||||
QVERIFY2(bCheckBldgOk, "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
// participantId(5)
|
||||
// Schuss 1: nearestWall.roomId = 2303
|
||||
@@ -1775,11 +1775,11 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Delay()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_U_Bahn"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1800,7 +1800,7 @@ void ModuleTestExplosionCluster::test_bldg_UBAHN_Delay()
|
||||
|
||||
QVERIFY2(checkBldgStates({8, 11, 13, 13}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
// participantId(5)
|
||||
// Schuss 1: nearestWall.roomId = 2132
|
||||
@@ -1814,11 +1814,11 @@ void ModuleTestExplosionCluster::test_bldg_3101_Proximity()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_3101"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1841,7 +1841,7 @@ void ModuleTestExplosionCluster::test_bldg_3101_Proximity()
|
||||
// since 13.11.2024 ; [GUEZE-2766] Zünderarten Freifläche:
|
||||
QVERIFY2(checkBldgStates({7, 14, 21, 28}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
|
||||
// participantId(89)
|
||||
@@ -1856,11 +1856,11 @@ void ModuleTestExplosionCluster::test_bldg_3101_Impact()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_3101"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1881,7 +1881,7 @@ void ModuleTestExplosionCluster::test_bldg_3101_Impact()
|
||||
|
||||
QVERIFY2(checkBldgStates({7, 13, 25, 36}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
// participantId(89)
|
||||
// Schuss 1:
|
||||
@@ -1895,11 +1895,11 @@ void ModuleTestExplosionCluster::test_bldg_3101_Delay()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
const QString bldgName(QStringLiteral("bldg_3101"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -1920,7 +1920,7 @@ void ModuleTestExplosionCluster::test_bldg_3101_Delay()
|
||||
|
||||
QVERIFY2(checkBldgStates({7, 13, 37, 58}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
|
||||
// participantId(89)
|
||||
// Schuss 1:
|
||||
@@ -1934,10 +1934,10 @@ void ModuleTestExplosionCluster::test_remove_effect_start()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
|
||||
AreaEffectSimulation::ExplosionCluster eaData = getEcFor1104(QStringLiteral("ModuleTest_RemoveEffectStart_ec__"));
|
||||
@@ -1964,7 +1964,7 @@ void ModuleTestExplosionCluster::test_remove_effect_start()
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared...";
|
||||
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, 2))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id();
|
||||
@@ -1979,19 +1979,19 @@ void ModuleTestExplosionCluster::test_remove_effect_start()
|
||||
|
||||
QTimer::singleShot(waitSec*1000, this, [this, eaData]
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " ACTION: prepared back to created ... ";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " ACTION: prepared back to created ... ";
|
||||
AreaEffectSimulation::ExplosionCluster copy = eaData;
|
||||
copy.id(m_data.id());
|
||||
copy.effectStart().reset(); // 'remove' -> prepared back to created
|
||||
|
||||
int ret = doExplosionClusterModifyRequest(copy);
|
||||
QVERIFY2(ret != 0, "ERROR, explosionClusterModifyRequest failed!!");
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " ACTION: prepared back to created ... DONE";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " ACTION: prepared back to created ... DONE";
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting to make sure, that next step is never reached:";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting to make sure, that next step is never reached:";
|
||||
if (waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, 60))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Next step is accidentically reached of explosion cluster with id " << m_data.id();
|
||||
@@ -1999,27 +1999,27 @@ void ModuleTestExplosionCluster::test_remove_effect_start()
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " object effectState: " << m_data.effectStateId();
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " object effectState: " << m_data.effectStateId();
|
||||
QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsCreated, "ERROR, ExplosionCluster in wrong state");
|
||||
dumpCnt();
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_create_bulk()
|
||||
{
|
||||
if (!ModuleTestExplosionCluster::m_enable_create_bulk)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase, has to be call explicitly called by user";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase, has to be call explicitly called by user";
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
QVERIFY2(checkParticipant_89(), "ERROR, checkParticipant_89 failed!!");
|
||||
|
||||
@@ -2048,19 +2048,19 @@ void ModuleTestExplosionCluster::test_create_bulk()
|
||||
QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired, "ERROR, effectStateId failed!!");
|
||||
|
||||
dumpCnt();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_point_geometry_bldg_1104()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -2099,7 +2099,7 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104()
|
||||
|
||||
QVERIFY2(checkBldgStates({29}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity()
|
||||
@@ -2111,12 +2111,12 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity()
|
||||
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104_SMArt"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -2126,10 +2126,10 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity()
|
||||
eaData.chargeStruct().igniterTypeId(s_IgniterTypeImpact);
|
||||
eaData.chargeStruct().chargeTypeId(374); // 374: isSMArt=true ; radius == 25, diameter == 50m
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << "Vor eaData.flightCurve().is_set()";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << "Vor eaData.flightCurve().is_set()";
|
||||
|
||||
QVERIFY2(eaData.flightCurve().is_set(), "ERROR, flightCurve() not set !!");
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << "Nach eaData.flightCurve().is_set()";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << "Nach eaData.flightCurve().is_set()";
|
||||
|
||||
eaData.flightCurve().get().requestedRelativePeakHeight(500);
|
||||
|
||||
@@ -2163,19 +2163,19 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_SMArt_Proximity()
|
||||
|
||||
QVERIFY2(checkBldgStates({29}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_bldg_1104_OC()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
// QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
// setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -2209,7 +2209,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_OC()
|
||||
waitForEffectStates(__LINE__, 5, 60, 30);
|
||||
QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired, "ERROR, effectStateId failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
// light -> no curve
|
||||
@@ -2217,12 +2217,12 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_light()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -2267,19 +2267,19 @@ void ModuleTestExplosionCluster::test_point_geometry_bldg_1104_light()
|
||||
|
||||
// QVERIFY2(checkBldgStates({29}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster:: test_point_geometry_bldg_1104_single_effect_only()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
// // QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -2298,7 +2298,7 @@ void ModuleTestExplosionCluster:: test_point_geometry_bldg_1104_single_effect_on
|
||||
|
||||
const QPointF impactPointF(0.20256382834808495, 0.9161105453111705);
|
||||
request.impactPosition(Core::GeoPosition2D(impactPointF.x(), impactPointF.y()));
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " requested impact position = " << LtsCoordTrans::UtmCoordinate::fromGeographic(impactPointF).mgrs();
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " requested impact position = " << LtsCoordTrans::UtmCoordinate::fromGeographic(impactPointF).mgrs();
|
||||
|
||||
request.chargeTypeId(371);
|
||||
request.externalId(815);
|
||||
@@ -2313,19 +2313,19 @@ void ModuleTestExplosionCluster:: test_point_geometry_bldg_1104_single_effect_on
|
||||
|
||||
QVERIFY2(checkBldgStates({29}, QString::fromStdString(request.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_bldg_1104_effects_only()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
// QVERIFY2(checkParticipant_5(), "ERROR, checkParticipant_5 failed!!");
|
||||
setFilterForBldgState(bldgName);
|
||||
|
||||
@@ -2364,7 +2364,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_effects_only()
|
||||
QVERIFY2(m_counterDds.cntTrajectory == 0, "ERROR, cnt failed!!"); // 4 impacts -> 4 trajectory
|
||||
|
||||
std::vector<AreaEffectSimulation::SingleEffect>&singleEffects = m_effects.singleEffects();
|
||||
for (const AreaEffectSimulation::SingleEffect &se : std::as_const(singleEffects))
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffects))
|
||||
{
|
||||
// Since there is no trajectory, no intersection is calculated.
|
||||
// Therefore the impacts are on the ground.
|
||||
@@ -2376,7 +2376,7 @@ void ModuleTestExplosionCluster::test_bldg_1104_effects_only()
|
||||
|
||||
QVERIFY2(checkBldgStates({29, 59, 82, 94}, QString::fromStdString(eaData.name())), "ERROR, checkBldgStates failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -2385,12 +2385,12 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104_VULCANO"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
QVERIFY2(checkParticipant_99(), "ERROR, checkParticipant_99 failed!!");
|
||||
|
||||
@@ -2435,19 +2435,19 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104()
|
||||
QVERIFY2(m_counterDds.cntAtExplosionClusterGunToTargetLine == 1, "ERROR, cnt failed!!");
|
||||
QVERIFY2(m_counterDds.cntExplosionClusterEffects == 1, "ERROR, cnt failed!!");
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104_VULCANO"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
QVERIFY2(checkParticipant_99(), "ERROR, checkParticipant_99 failed!!");
|
||||
|
||||
@@ -2494,7 +2494,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify()
|
||||
const qint64 nowMsec = QDateTime::currentMSecsSinceEpoch();
|
||||
const qint64 distMsec = startTimeMsec - nowMsec;
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 1 "
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 1 "
|
||||
<< ", effectStart (impactTime) = " << startTimeMsec
|
||||
<< ", nowMsec = " << nowMsec
|
||||
<< ", distMsec = " << distMsec;
|
||||
@@ -2503,7 +2503,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify()
|
||||
|
||||
int delayMsec = 5000; // distMsec - 5000;
|
||||
QTimer::singleShot(distMsec - delayMsec, this, [this] () { // local static is captured implicit by gcc and for MSVS
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2 ";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2 ";
|
||||
|
||||
QPointF newTargetPosGeo = s_newTargetPosUtm_1.geographic();
|
||||
|
||||
@@ -2511,9 +2511,9 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify()
|
||||
request.aesItemId(m_data.id());
|
||||
request.positions().emplace_back(Core::GeoPosition(newTargetPosGeo.x(), newTargetPosGeo.y(), 123));
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ...";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ...";
|
||||
doExplosionClusterTargetPositionsModify(request);
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE";
|
||||
});
|
||||
|
||||
});
|
||||
@@ -2536,22 +2536,22 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify()
|
||||
const LtsCoordTrans::UtmCoordinate &seUtmPos = LtsCoordTrans::UtmCoordinate::fromGeographic(seGeoPos.lon(), seGeoPos.lat());
|
||||
|
||||
int dist = LtsCoordTrans::distance(s_newTargetPosUtm_1, seUtmPos);
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " dist = " << dist;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " dist = " << dist;
|
||||
}
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
const QString bldgName(QStringLiteral("bldg_1104_VULCANO"));
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
QVERIFY2(checkParticipant_99(), "ERROR, checkParticipant_99 failed!!");
|
||||
|
||||
@@ -2601,7 +2601,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
const qint64 nowMsec = QDateTime::currentMSecsSinceEpoch();
|
||||
const qint64 distMsec = startTimeMsec - nowMsec;
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 1 "
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 1 "
|
||||
<< ", effectStart (impactTime) = " << startTimeMsec
|
||||
<< ", nowMsec = " << nowMsec
|
||||
<< ", distMsec = " << distMsec;
|
||||
@@ -2612,7 +2612,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
// Timer _BEFORE_ EffectStart
|
||||
const int delayMsec_1 = distMsec - offset;
|
||||
QTimer::singleShot(delayMsec_1, this, [this] () { // local static is captured implicit by gcc and for MSVS
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2 ";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2 ";
|
||||
|
||||
QPointF newTargetPosGeo = s_newTargetPosUtm_1.geographic();
|
||||
// ^
|
||||
@@ -2621,15 +2621,15 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
request.aesItemId(m_data.id());
|
||||
request.positions().emplace_back(Core::GeoPosition(newTargetPosGeo.x(), newTargetPosGeo.y(), 123));
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ...";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ...";
|
||||
doExplosionClusterTargetPositionsModify(request);
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 2, doExplosionClusterTargetPositionsModify ... DONE";
|
||||
});
|
||||
|
||||
// Timer _AFTER_ EffectStart
|
||||
const int delayMsec_2 = distMsec + offset;
|
||||
QTimer::singleShot(delayMsec_2, this, [this] () { // local static is captured implicit by gcc and for MSVS
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 3 ";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 3 ";
|
||||
|
||||
QPointF newTargetPosGeo = s_newTargetPosUtm_2.geographic();
|
||||
// ^
|
||||
@@ -2638,9 +2638,9 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
request.aesItemId(m_data.id());
|
||||
request.positions().emplace_back(Core::GeoPosition(newTargetPosGeo.x(), newTargetPosGeo.y(), 124));
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 3, doExplosionClusterTargetPositionsModify ...";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 3, doExplosionClusterTargetPositionsModify ...";
|
||||
doExplosionClusterTargetPositionsModify(request);
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " TIMER 3, doExplosionClusterTargetPositionsModify ... DONE";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " TIMER 3, doExplosionClusterTargetPositionsModify ... DONE";
|
||||
});
|
||||
|
||||
});
|
||||
@@ -2670,7 +2670,7 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
|
||||
// compare with s_newTargetPosUtm_1, not s_newTargetPosUtm_2:
|
||||
int dist = LtsCoordTrans::distance(s_newTargetPosUtm_1, seUtmPos);
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " dist = " << dist;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " dist = " << dist;
|
||||
QVERIFY2(dist < 100, "ERROR, m_effects failed");
|
||||
}
|
||||
|
||||
@@ -2687,11 +2687,11 @@ void ModuleTestExplosionCluster::test_vulcano_bldg_1104_withTargetModify2()
|
||||
const LtsCoordTrans::UtmCoordinate &bottomLeftUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(bottomLeftGeo.lon(), bottomLeftGeo.lat());
|
||||
|
||||
const int distBL = LtsCoordTrans::distance(s_newTargetPosUtm_1, bottomLeftUtm);
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " itemViewBoundary.dist = " << distBL;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " itemViewBoundary.dist = " << distBL;
|
||||
QVERIFY2(distBL < 100, "ERROR, itemViewBoundary failed");
|
||||
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -2741,7 +2741,7 @@ int main(int argc, char *argv[])
|
||||
--argc;
|
||||
|
||||
const QStringList &slPositionalArgs = options.positionalArguments();
|
||||
for (const QString &item : std::as_const(slPositionalArgs))
|
||||
for (const QString &item : qAsConst(slPositionalArgs))
|
||||
std::cout << " item = " << item << std::endl;
|
||||
|
||||
// enable_create_bulk only if it´s explicitly called by user:
|
||||
|
||||
+4
-4
@@ -21,11 +21,11 @@
|
||||
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include <memory>
|
||||
@@ -59,8 +59,6 @@ public:
|
||||
ModuleTestExplosionCluster(int domainId, int exerciseId);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onSetSimulatedParticipantFormationReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onExplosionClusterModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
@@ -241,4 +239,6 @@ private:
|
||||
}
|
||||
}
|
||||
m_counterDds;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
-6
@@ -12,12 +12,6 @@ SET(UnitTestSources
|
||||
|
||||
NGL_ADD_EXECUTABLE(SV aesModuleTestLimits ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestLimits
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
NGL_TARGET_LINK_LIBRARIES(aesModuleTestLimits
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
|
||||
+29
-29
@@ -7,19 +7,18 @@
|
||||
*/
|
||||
|
||||
#include "limits_module_test.h"
|
||||
#include <utility>
|
||||
#include "qtestcase.h"
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
// AES
|
||||
#include <AreaEffectSimulation/Utils/polygons.h>
|
||||
#include <Core/core_types.h>
|
||||
#include <DDS/Core/function_reply_object.h>
|
||||
#include <Core/core.hpp>
|
||||
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -39,6 +38,7 @@ static const int s_pauseTimeInSec = 5;
|
||||
ModuleTestLimits::ModuleTestLimits(int domainId, int exerciseId)
|
||||
: m_domainId(domainId)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("ModuleTestLimits"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -71,7 +71,7 @@ void ModuleTestLimits::testExplosionClusterCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
++counter;
|
||||
@@ -104,7 +104,7 @@ void ModuleTestLimits::testExplosionClusterDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if ((item.effectStateId() == AesEffectState::EsPrepared) && (item.isCentral() == false))
|
||||
++counter;
|
||||
@@ -140,7 +140,7 @@ void ModuleTestLimits::testAirSupports()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass::AirSupport)
|
||||
++counter;
|
||||
@@ -173,7 +173,7 @@ void ModuleTestLimits::testMineAreaCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->mineAreas();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if ((item.effectStateId() == AesEffectState::EsPrepared) && (item.isCentral() == true))
|
||||
++counter;
|
||||
@@ -207,7 +207,7 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->mineAreas();
|
||||
for (const auto &curMineArea : std::as_const(items))
|
||||
for (const auto &curMineArea : qAsConst(items))
|
||||
{
|
||||
if ((curMineArea.effectStateId() == AesEffectState::EsPrepared) && (curMineArea.isCentral() == false))
|
||||
++counter;
|
||||
@@ -234,7 +234,7 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
int counter2 = 0;
|
||||
|
||||
const auto &mineAreas = m_aesDtc->mineAreas();
|
||||
for (const auto &item : std::as_const(mineAreas))
|
||||
for (const auto &item : qAsConst(mineAreas))
|
||||
{
|
||||
if ((item.effectStateId() == AesEffectState::EsPrepared) &&
|
||||
!item.isCentral() &&
|
||||
@@ -270,7 +270,7 @@ void ModuleTestLimits::testNBCCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->nContaminations();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
++counter;
|
||||
@@ -305,7 +305,7 @@ void ModuleTestLimits::testNBCDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->nContaminations();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false)
|
||||
++counter;
|
||||
@@ -337,7 +337,7 @@ void ModuleTestLimits::testOffRouteMines()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->offRouteMines();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
++counter;
|
||||
@@ -369,7 +369,7 @@ void ModuleTestLimits::testBoobyTraps()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->boobyTraps();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
++counter;
|
||||
@@ -404,7 +404,7 @@ void ModuleTestLimits::testBCCCentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->bCContaminations();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
++counter;
|
||||
@@ -439,7 +439,7 @@ void ModuleTestLimits::testBCCDecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->bCContaminations();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false)
|
||||
++counter;
|
||||
@@ -474,7 +474,7 @@ void ModuleTestLimits::testFADecentral()
|
||||
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->functionalAreas();
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false)
|
||||
++counter;
|
||||
@@ -511,7 +511,7 @@ void ModuleTestLimits::testFACentral()
|
||||
int counter = 0;
|
||||
const auto &items = m_aesDtc->functionalAreas();
|
||||
|
||||
for (const auto &item : std::as_const(items))
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
++counter;
|
||||
@@ -1192,7 +1192,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
const QVector<AesEffectState::type> sts = {AesEffectState::EsExpired, AesEffectState::EsRemoved, AesEffectState::EsActivated};
|
||||
|
||||
auto clusters = m_aesDtc->explosionClusters();
|
||||
for (auto cluster : std::as_const(clusters))
|
||||
for (auto cluster : qAsConst(clusters))
|
||||
{
|
||||
if (!sts.contains(cluster.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1202,7 +1202,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto nbcs = m_aesDtc->nContaminations();
|
||||
for (auto nbc : std::as_const(nbcs))
|
||||
for (auto nbc : qAsConst(nbcs))
|
||||
{
|
||||
if (!sts.contains(nbc.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1212,7 +1212,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto orms = m_aesDtc->offRouteMines();
|
||||
for (auto orm : std::as_const(orms))
|
||||
for (auto orm : qAsConst(orms))
|
||||
{
|
||||
if (!sts.contains(orm.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1222,7 +1222,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto bts = m_aesDtc->boobyTraps();
|
||||
for (auto bt : std::as_const(bts))
|
||||
for (auto bt : qAsConst(bts))
|
||||
{
|
||||
if (!sts.contains(bt.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1232,7 +1232,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto mas = m_aesDtc->mineAreas();
|
||||
for (auto ma : std::as_const(mas))
|
||||
for (auto ma : qAsConst(mas))
|
||||
{
|
||||
if (!sts.contains(ma.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1242,7 +1242,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto bccs = m_aesDtc->bCContaminations();
|
||||
for (auto bcc : std::as_const(bccs))
|
||||
for (auto bcc : qAsConst(bccs))
|
||||
{
|
||||
if (!sts.contains(bcc.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1252,7 +1252,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto fas = m_aesDtc->functionalAreas();
|
||||
for (auto fa : std::as_const(fas))
|
||||
for (auto fa : qAsConst(fas))
|
||||
{
|
||||
if (!sts.contains(fa.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1262,7 +1262,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
}
|
||||
auto tas = m_aesDtc->technicalAreas();
|
||||
for (auto ta : std::as_const(tas))
|
||||
for (auto ta : qAsConst(tas))
|
||||
{
|
||||
if (!sts.contains(ta.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1273,7 +1273,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
|
||||
auto eas = m_aesDtc->explosionAreas();
|
||||
for (auto ea : std::as_const(eas))
|
||||
for (auto ea : qAsConst(eas))
|
||||
{
|
||||
if (!sts.contains(ea.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1284,7 +1284,7 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
}
|
||||
|
||||
auto ess = m_aesDtc->explosionSingles();
|
||||
for (auto es : std::as_const(ess))
|
||||
for (auto es : qAsConst(ess))
|
||||
{
|
||||
if (!sts.contains(es.effectStateId().underlying()))
|
||||
{
|
||||
@@ -1360,7 +1360,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
|
||||
const QStringList &slPositionalArgs = options.positionalArguments();
|
||||
for (const QString &item : std::as_const(slPositionalArgs))
|
||||
for (const QString &item : qAsConst(slPositionalArgs))
|
||||
std::cout << " item = " << item << std::endl;
|
||||
|
||||
// enable_create_bulk only if it´s explicitly called by user:
|
||||
|
||||
+5
-2
@@ -19,12 +19,12 @@
|
||||
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include <memory>
|
||||
@@ -224,6 +224,9 @@ private:
|
||||
}
|
||||
}
|
||||
m_counterDds;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
public:
|
||||
void onMineAreaModifyReply(const Core::FunctionReplyObject &reply) override { Q_UNUSED(reply);}
|
||||
void onExplosionAreaModifyReply(const Core::FunctionReplyObject &reply) override { Q_UNUSED(reply);}
|
||||
|
||||
-6
@@ -13,12 +13,6 @@ SET(UnitTestSources
|
||||
IF(BUILD_TESTING)
|
||||
ADD_EXECUTABLE(aesModuleTestOthers ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesModuleTestOthers
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
)
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesModuleTestOthers
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
|
||||
+22
-22
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "aes_others_module_test.h"
|
||||
#include <utility>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
@@ -17,8 +16,8 @@
|
||||
#include <AreaEffectSimulation/Utils/polygons.h>
|
||||
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
@@ -73,6 +72,7 @@ double distanceMeter(const Core::GeoPosition2D &geoPos2D, const LtsCoordTrans::U
|
||||
ModuleTestAesOthers::ModuleTestAesOthers(int domainId, int exerciseId)
|
||||
: m_domainId(domainId)
|
||||
, m_exerciseId(exerciseId)
|
||||
, m_logger(getLogger("ModuleTestAesOthers"))
|
||||
{
|
||||
}
|
||||
|
||||
@@ -177,7 +177,7 @@ void ModuleTestAesOthers::onAesItemViewChanged(const AesItemView &aesItemView, D
|
||||
|
||||
void ModuleTestAesOthers::dumpCnt()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " Counter: "
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " Counter: "
|
||||
<< " cntBoobyTrap = " << m_counterDds.cntBoobyTrap
|
||||
<< " cntOffRouteMine = " << m_counterDds.cntOffRouteMine
|
||||
<< ", cntItemView = " << m_counterDds.cntItemView;
|
||||
@@ -214,7 +214,7 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared...";
|
||||
if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of m_dataBoobyTrap with id " << m_dataBoobyTrap.id()
|
||||
@@ -223,7 +223,7 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated...";
|
||||
if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of m_dataBoobyTrapr with id " << m_dataBoobyTrap.id()
|
||||
@@ -234,7 +234,7 @@ void ModuleTestAesOthers::waitForEffectStatesBT(int lineNumber, int durPrep, int
|
||||
|
||||
if (durExp > 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired...";
|
||||
if (!waitForData([this]() { return m_dataBoobyTrap.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of m_dataBoobyTrap with id " << m_dataBoobyTrap.id()
|
||||
@@ -254,7 +254,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsPrepared...";
|
||||
if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
|
||||
@@ -263,7 +263,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsActivated...";
|
||||
if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
|
||||
@@ -274,7 +274,7 @@ void ModuleTestAesOthers::waitForEffectStatesORM(int lineNumber, int durPrep, in
|
||||
|
||||
if (durExp > 0)
|
||||
{
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " waiting for EsExpired...";
|
||||
if (!waitForData([this]() { return m_dataOffRouteMine.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp))
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of m_dataOffRouteMine with id " << m_dataOffRouteMine.id()
|
||||
@@ -529,9 +529,9 @@ void ModuleTestAesOthers::init()
|
||||
|
||||
void ModuleTestAesOthers::test_justSetupParticipants()
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
setupParticipants();
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
//
|
||||
@@ -541,11 +541,11 @@ void ModuleTestAesOthers::test_boobyTrap_01()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
QVERIFY2(checkParticipant_18(), "ERROR, checkParticipant_5 failed!!");
|
||||
|
||||
AreaEffectSimulation::BoobyTrap bt;
|
||||
@@ -595,7 +595,7 @@ void ModuleTestAesOthers::test_boobyTrap_01()
|
||||
// wait to let it disappear:
|
||||
waitForData([]() { return false; }, 15);
|
||||
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
|
||||
@@ -606,11 +606,11 @@ void ModuleTestAesOthers::test_boobyTrap_02_IMPL(const QString &name,
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId
|
||||
<< ", name =" << name << "'"
|
||||
<< ", impactCoord= " << impactCoord.mgrs()
|
||||
<< ", rotationAngle = " << rotationAngle
|
||||
@@ -666,7 +666,7 @@ void ModuleTestAesOthers::test_boobyTrap_02_IMPL(const QString &name,
|
||||
|
||||
// wait to let it disappear:
|
||||
waitForData([]() { return false; }, 15);
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " END"
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " END"
|
||||
<< ", name =" << name << "'"
|
||||
<< ", impactCoord= " << impactCoord.mgrs()
|
||||
<< ", rotationAngle = " << rotationAngle
|
||||
@@ -709,11 +709,11 @@ void ModuleTestAesOthers::test_offRouteMine_02()
|
||||
{
|
||||
if (m_traingAreaId != s_TraingAreaId_Altmark)
|
||||
{
|
||||
NOTICE_LOG(m_logger) << Q_FUNC_INFO << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
NOTICE_LOG(m_logger) << LOGFUNCTION << " skip testcase due to m_traingAreaId = " << m_traingAreaId;
|
||||
return;
|
||||
}
|
||||
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " START, m_traingAreaId = " << m_traingAreaId;
|
||||
|
||||
QVERIFY2(checkParticipant_18(), "ERROR, checkParticipant_5 failed!!");
|
||||
|
||||
@@ -767,7 +767,7 @@ void ModuleTestAesOthers::test_offRouteMine_02()
|
||||
|
||||
// wait to let it disappear:
|
||||
waitForData([]() { return false; }, 15);
|
||||
INFO_LOG(m_logger) << Q_FUNC_INFO << " END" << ", name =" << orm.name() << "'";
|
||||
INFO_LOG(m_logger) << LOGFUNCTION << " END" << ", name =" << orm.name() << "'";
|
||||
}
|
||||
|
||||
void ModuleTestAesOthers::cleanupTestCase()
|
||||
@@ -812,7 +812,7 @@ int main(int argc, char *argv[])
|
||||
--argc;
|
||||
|
||||
const QStringList &slPositionalArgs = options.positionalArguments();
|
||||
for (const QString &item : std::as_const(slPositionalArgs))
|
||||
for (const QString &item : qAsConst(slPositionalArgs))
|
||||
std::cout << " item = " << item << std::endl;
|
||||
|
||||
// // enable_create_bulk only if it´s explicitly called by user:
|
||||
|
||||
+4
-4
@@ -19,11 +19,11 @@
|
||||
|
||||
#include <Plugins/ProjectDataManagement/pdm_data_plugin_interface.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include <memory>
|
||||
@@ -54,8 +54,6 @@ public:
|
||||
ModuleTestAesOthers(int domainId, int exerciseId);
|
||||
|
||||
protected:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
void onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
|
||||
void onBoobyTrapModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
@@ -171,4 +169,6 @@ private:
|
||||
}
|
||||
}
|
||||
m_counterDds;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
+3
-3
@@ -7,8 +7,8 @@
|
||||
|
||||
#include "aes_convert_mine_area.h"
|
||||
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QLineF>
|
||||
#include <QTimer>
|
||||
#include <QLineF>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include <ngldb/dbconnection.h>
|
||||
#include <ngldb/sql_query_janitor.h>
|
||||
#include <QtSql/QSqlError>
|
||||
#include <QtCore/QVariant>
|
||||
#include <QVariant>
|
||||
|
||||
|
||||
#include <AreaEffectSimulation/aes_db_structs.h>
|
||||
|
||||
+6
-4
@@ -9,8 +9,8 @@
|
||||
|
||||
#include "aes_test_base.h"
|
||||
|
||||
#include <QtSql/QSqlDriver>
|
||||
#include <QtSql/QSqlDatabase>
|
||||
#include <QSqlDriver>
|
||||
#include <QSqlDatabase>
|
||||
#include <QtSql/QSqlError>
|
||||
|
||||
#include <AreaEffectSimulation/aes_enums.hpp>
|
||||
@@ -47,8 +47,6 @@ public:
|
||||
QSqlError getLastError() const;
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
QSqlDatabase m_dbConnection;
|
||||
NSqlQuery *m_query;
|
||||
QSqlError m_lastError;
|
||||
@@ -56,6 +54,10 @@ NGL::INGLLogger &m_logger;
|
||||
bool m_bEmitMessageOnError;
|
||||
bool m_bCanHandleSchemas;
|
||||
bool m_ownDatabaseConnection;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
|
||||
|
||||
};
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_air_support_impact.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
#include "aes_test_base.h"
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCommandLineParser/LtsCommandLineParser.h>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QTimer>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
|
||||
+4
-2
@@ -10,11 +10,11 @@
|
||||
#include <AreaEffectSimulation/aes_ftc.h>
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include <AreaEffectSimulation/logger.h>
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <memory>
|
||||
|
||||
#include "aes_test_base_export.h"
|
||||
#include <AreaEffectSimulation/aes_test_base_export.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
@@ -73,6 +73,8 @@ protected:
|
||||
bool m_bTestsSuccessful;
|
||||
int m_testId;
|
||||
QString m_aesTypeName;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
int AES_TEST_BASE_EXPORT mainBase(int argc, char **argv,
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_bccontamination.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_booby_trap.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_charge_administration.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_danger_area.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_explosion_area.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtTest/QTest>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QTest>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_explosion_area_bulk.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtTest/QTest>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QTest>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -8,9 +8,9 @@
|
||||
|
||||
#include "aes_test_explosion_cluster.h"
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtTest/QTest>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QTest>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_explosion_single.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_gas_pipe.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
#include "aes_test_base.h"
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QPointF>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+4
-4
@@ -8,10 +8,10 @@
|
||||
#include "aes_test_mine_area.h"
|
||||
#include "Utils/polygons.h"
|
||||
#include "qjsonobject.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QJsonDocument>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_ncontamination.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_test_off_route_mine.h"
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QCoreApplication>
|
||||
#include <QTest>
|
||||
#include <QTimer>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
-1
@@ -20,7 +20,6 @@ NGL_ADD_LIBRARY2(WS SV HLA Trajectory SHARED
|
||||
)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(Trajectory
|
||||
INTERFACE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(Trajectory
|
||||
|
||||
+1
-11
@@ -15,22 +15,12 @@ SET(UnitTestSources
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestTrajectory ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTrajectory
|
||||
PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/AreaEffectSimulation
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
ADD_EXECUTABLE(aesUnitTestTrajectory ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestTrajectory
|
||||
NGLLogger
|
||||
nglcoreapplication
|
||||
svcAesCommon
|
||||
Trajectory
|
||||
Qt6::Core
|
||||
Qt6::Gui
|
||||
Qt6::Test)
|
||||
|
||||
+2
-3
@@ -7,7 +7,6 @@
|
||||
*/
|
||||
|
||||
#include "trajectory_unit_test.h"
|
||||
#include <utility>
|
||||
#include <Trajectory/trajectory_helper.h>
|
||||
#include <Trajectory/trajectory_generator.h>
|
||||
#include <Trajectory/trajectory_generator_vulcano.h>
|
||||
@@ -16,7 +15,7 @@
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QtTest/QTest>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <iostream>
|
||||
@@ -992,7 +991,7 @@ void UnitTestTrajectory::test_vulcano_trajectory()
|
||||
}
|
||||
|
||||
int i=0;
|
||||
for (auto &item : std::as_const(trajectoryOut))
|
||||
for (auto &item : qAsConst(trajectoryOut))
|
||||
INFO_LOG(m_logger) << "i = " << i++ << ", item " << item;
|
||||
}
|
||||
|
||||
|
||||
+3
-2
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
@@ -78,5 +78,6 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
+10
-11
@@ -8,14 +8,13 @@
|
||||
*/
|
||||
|
||||
#include "trajectory_generator.h"
|
||||
#include <utility>
|
||||
#include "trajectory_generator_vulcano.h"
|
||||
#include <Plugins/ExerciseManagement/exm_data_plugin_interface.h>
|
||||
#include <Plugins/AssetManagement/asm_data_plugin_interface.h>
|
||||
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
#ifdef NEVER // for csv file
|
||||
# include <QFile>
|
||||
@@ -61,7 +60,7 @@ TrajectoryGenerator *TrajectoryGenerator::getInstance(int exerciseId,
|
||||
if (ltsElevationManager)
|
||||
{
|
||||
ltsElevationManager->waitForInitialization();
|
||||
DEBUG_LOG(logger) << Q_FUNC_INFO << ", ltsElevationManager->waitForInitialization() ... DONE, isValid = " << ltsElevationManager->isValid();
|
||||
DEBUG_LOG(logger) << LOGFUNCTION << ", ltsElevationManager->waitForInitialization() ... DONE, isValid = " << ltsElevationManager->isValid();
|
||||
}
|
||||
s_trajectoryGenerator->initElevation(ltsElevationManager);
|
||||
}
|
||||
@@ -85,22 +84,22 @@ void TrajectoryGenerator::cleanup()
|
||||
|
||||
void TrajectoryGenerator::initElevation(LtsElevation::LtsElevationManager *ltsElevationManager)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
m_ltsElevationManager = ltsElevationManager;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
LtsElevation::LtsElevationManager *TrajectoryGenerator::getElevationManager()
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return m_ltsElevationManager;
|
||||
}
|
||||
|
||||
bool TrajectoryGenerator::hasElevationManager() const
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " START";
|
||||
TRACE_LOG(m_logger) << LOGFUNCTION << " END";
|
||||
return m_ltsElevationManager;
|
||||
}
|
||||
|
||||
@@ -200,7 +199,7 @@ bool TrajectoryGenerator::generateTrajectoryVulcano(const QPoint3D &originatorPo
|
||||
{
|
||||
QPoint4D startPoint = trajectoryMetricOut.first();
|
||||
|
||||
for (const QPoint4D &p4D : std::as_const(trajectoryMetricOut))
|
||||
for (const QPoint4D &p4D : qAsConst(trajectoryMetricOut))
|
||||
{
|
||||
output << p4D.x() - startPoint.x() << ";"
|
||||
<< p4D.y() - startPoint.y() << ";"
|
||||
@@ -232,7 +231,7 @@ bool TrajectoryGenerator::generateTrajectoryVulcano(const QPoint3D &originatorPo
|
||||
trajectoryTimeAwareOut.clear();
|
||||
trajectoryTimeAwareOut.reserve(trajectoryMetricOut.size());
|
||||
|
||||
for (const QPoint4D& pnt4d : std::as_const(trajectoryMetricOut))
|
||||
for (const QPoint4D& pnt4d : qAsConst(trajectoryMetricOut))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate pntUtm(idealHitUtm.zone, pnt4d.x(), pnt4d.y());
|
||||
const QPointF &pntGeo = pntUtm.geographic();
|
||||
|
||||
+5
-6
@@ -13,11 +13,11 @@
|
||||
#include "trajectory_generator_vulcano.h"
|
||||
#include <Core/core.hpp> // Lts/DDS/Core/core.hpp for Core::GeoPosition
|
||||
#include <LtsElevation/lts_elevation_manager.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include "trajectory_export.h"
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <Trajectory/trajectory_export.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPair>
|
||||
#include <QObject>
|
||||
#include <QPair>
|
||||
#include <QPolygonF>
|
||||
|
||||
#include <vector>
|
||||
@@ -89,7 +89,6 @@ class TRAJECTORY_EXPORT TrajectoryGenerator : public QObject
|
||||
QString *reasonOut);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
/*! \name Ideal trajectory */
|
||||
template <typename CONT_T>
|
||||
bool generateTrajectoryBiedziak(const LtsUtils::QPoint3D &originatorPosition_geo,
|
||||
@@ -98,7 +97,6 @@ class TRAJECTORY_EXPORT TrajectoryGenerator : public QObject
|
||||
CONT_T &trajectoryOut);
|
||||
|
||||
protected:
|
||||
NGL::INGLLogger &m_logger;
|
||||
explicit TrajectoryGenerator();
|
||||
|
||||
public:
|
||||
@@ -111,6 +109,7 @@ class TRAJECTORY_EXPORT TrajectoryGenerator : public QObject
|
||||
static const QString string4poly(const QPair<QPolygonF, QVector<double>> &pair);
|
||||
|
||||
LtsElevation::LtsElevationManager *m_ltsElevationManager{nullptr};
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
+3
-4
@@ -8,10 +8,9 @@
|
||||
*/
|
||||
|
||||
#include "trajectory_generator_vulcano.h"
|
||||
#include <utility>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QObject>
|
||||
#include <QPointF>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
@@ -172,7 +171,7 @@ bool TrajectoryGeneratorVulcano::trajectoryVulcano(const QPoint3D &origin, const
|
||||
trajectoryOut.reserve(phase1_bal.size()+5);
|
||||
|
||||
int cnt = 0;
|
||||
for (const QPointF &xyVertex : std::as_const(phase1_bal))
|
||||
for (const QPointF &xyVertex : qAsConst(phase1_bal))
|
||||
{
|
||||
// translate from XY to XYZ
|
||||
const QPoint3D p3d_offset(xyVertex.x() * factorX, // xyVertex.x()
|
||||
|
||||
+3
-3
@@ -11,11 +11,11 @@
|
||||
#pragma once
|
||||
|
||||
#include "../logger.h"
|
||||
#include "trajectory_export.h"
|
||||
#include <Trajectory/trajectory_export.h>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <QtCore/QVector>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <QVector>
|
||||
#include <QVector2D>
|
||||
|
||||
#include <cmath>
|
||||
|
||||
+4
-4
@@ -10,11 +10,11 @@
|
||||
#include "trajectory_helper.h"
|
||||
#include "../logger.h"
|
||||
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
#include <QDebug>
|
||||
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
|
||||
+2
-2
@@ -10,8 +10,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "trajectory_export.h"
|
||||
#include "trajectory_export.h"
|
||||
#include <AreaEffectSimulation/aes_export.h>
|
||||
#include <Trajectory/trajectory_export.h>
|
||||
|
||||
// Forward
|
||||
namespace LtsUtils {
|
||||
|
||||
+3
-3
@@ -7,9 +7,9 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include "trajectory_export.h"
|
||||
#include <QVector>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <Trajectory/trajectory_export.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+3
-3
@@ -1,10 +1,10 @@
|
||||
#pragma once
|
||||
|
||||
#include "trajectory_point.h"
|
||||
#include "trajectory_export.h"
|
||||
#include <Trajectory/trajectory_export.h>
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <QVector>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+1
-8
@@ -15,14 +15,7 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestTrajectorySplitter ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTrajectorySplitter
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
ADD_EXECUTABLE(aesUnitTestTrajectorySplitter ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestTrajectorySplitter
|
||||
NGLLogger
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
#include <Core/core.hpp>
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "trajectory_splitter.h"
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QVector>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
+2
-2
@@ -9,10 +9,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//#include "svcaescommon_export.h"
|
||||
//#include <LtsCoordinate/ltscoordinate_export.h>
|
||||
|
||||
#include <Core/core.hpp>
|
||||
#include <QtCore/QVector>
|
||||
#include <QVector>
|
||||
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
|
||||
+1
-8
@@ -11,14 +11,7 @@ SET(UnitTestSources
|
||||
)
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestFireAutomaton ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestFireAutomaton
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
ADD_EXECUTABLE(aesUnitTestFireAutomaton ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestFireAutomaton
|
||||
NGLLogger
|
||||
|
||||
+5
-5
@@ -6,11 +6,11 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QVector>
|
||||
#include <QCoreApplication>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QTest>
|
||||
#include <QVector>
|
||||
#include <QSignalSpy>
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
|
||||
#include <cstdint>
|
||||
#include <QtCore>
|
||||
#include <QtCore/QMetaType>
|
||||
#include <QMetaType>
|
||||
|
||||
#include <AreaEffectSimulation/Utils/fire_automaton.h>
|
||||
|
||||
|
||||
-3
@@ -19,9 +19,6 @@ NGL_ADD_EXECUTABLE(AAR SV NO_TRANSLATION aes_statemachine_test
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES( aes_statemachine_test
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}/..
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
|
||||
|
||||
|
||||
+1
-8
@@ -13,14 +13,7 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestBasics ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestBasics
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
ADD_EXECUTABLE(aesUnitTestBasics ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestBasics
|
||||
NGLLogger
|
||||
|
||||
+4
-5
@@ -7,13 +7,12 @@
|
||||
*/
|
||||
|
||||
#include "basics_unit_test.h"
|
||||
#include <utility>
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <AreaEffectSimulation/aes.hpp>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QTimer>
|
||||
#include <QDebug>
|
||||
#include <QtTest/QSignalSpy>
|
||||
|
||||
#include <iostream>
|
||||
@@ -247,7 +246,7 @@ void UnitTestBasics::test_fireTimer10()
|
||||
QStringList logSl1 = ft.getLogHistorie();
|
||||
QVERIFY2(logSl1.size() == 1, "getCommandHistorie failed");
|
||||
|
||||
for (const auto &log : std::as_const(logSl1))
|
||||
for (const auto &log : qAsConst(logSl1))
|
||||
NOTICE_LOG(m_logger) << "log ='" << log << "'";
|
||||
}
|
||||
|
||||
@@ -320,7 +319,7 @@ void UnitTestBasics::test_fireTimer20()
|
||||
|
||||
// QList<QVariant> arguments = spyStateChanged.takeFirst(); // take the first signal
|
||||
// NOTICE_LOG(m_logger) << " spyStateChanged.count() " << spyStateChanged.count();
|
||||
// for (const QList<QVariant> &argument : std::as_const(spyStateChanged))
|
||||
// for (const QList<QVariant> &argument : qAsConst(spyStateChanged))
|
||||
// NOTICE_LOG(m_logger) << " spyStateChanged . argument " << argument.first().toInt();
|
||||
|
||||
// check order of signal paramter:
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <../../logger.h>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
#include <AreaEffectSimulation/Utils/firing_timer.h>
|
||||
|
||||
|
||||
+1
-8
@@ -13,14 +13,7 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestPolygons ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestPolygons
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
ADD_EXECUTABLE(aesUnitTestPolygons ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestPolygons
|
||||
NGLLogger
|
||||
|
||||
+5
-6
@@ -7,15 +7,14 @@
|
||||
*/
|
||||
|
||||
#include "polygons_unit_test.h"
|
||||
#include <utility>
|
||||
#include <Services/AreaEffectSimulation/Utils/polygons.h>
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QTransform>
|
||||
#include <QtCore/QTextStream> //
|
||||
#include <QTextStream> //
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QDebug>
|
||||
|
||||
|
||||
#include <iostream>
|
||||
@@ -211,7 +210,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp()
|
||||
qCritical() << "rotation_deg = " << rotation_deg
|
||||
<< ", mtpRotationNorthDegree = " << mtpRotationNorthDegree
|
||||
<< ", explosionClusterDb = " << singleExplosions;
|
||||
for (const auto &singleExplosion : std::as_const(singleExplosions))
|
||||
for (const auto &singleExplosion : qAsConst(singleExplosions))
|
||||
qDebug() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs();
|
||||
|
||||
size_t i = 0;
|
||||
@@ -243,7 +242,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp()
|
||||
qCritical() << "rotation_deg = " << rotation_deg
|
||||
<< ", mtpRotationNorthDegree = " << mtpRotationNorthDegree
|
||||
<< " explosionClusterDb = " << singleExplosions;
|
||||
for (const auto &singleExplosion : std::as_const(singleExplosions))
|
||||
for (const auto &singleExplosion : qAsConst(singleExplosions))
|
||||
qCritical() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs();
|
||||
|
||||
size_t i = 0;
|
||||
@@ -280,7 +279,7 @@ void UnitTestPolygons::test_explosionClusterSingleExplosionsGAUSS_Mtp()
|
||||
<< ", zog = " << zog
|
||||
<< ", mtpRotationNorthDegree = " << mtpRotationNorthDegree
|
||||
<< " explosionClusterDb = " << singleExplosions;
|
||||
for (const auto &singleExplosion : std::as_const(singleExplosions))
|
||||
for (const auto &singleExplosion : qAsConst(singleExplosions))
|
||||
qCritical() << "singleExUtm: " << LtsCoordTrans::UtmCoordinate::fromGeographic(singleExplosion).mgrs();
|
||||
|
||||
size_t i = 0;
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
|
||||
|
||||
+1
-8
@@ -13,14 +13,7 @@ SET(UnitTestSources
|
||||
SOURCE_GROUP( UnitTestSources FILES ${UnitTestSources} )
|
||||
|
||||
IF(BUILD_TESTING)
|
||||
NGL_ADD_EXECUTABLE(SV aesUnitTestTneAlgorithmen ${UnitTestSources} )
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(aesUnitTestTneAlgorithmen
|
||||
PUBLIC
|
||||
${CMAKE_SOURCE_DIR}/Lts/
|
||||
${CMAKE_SOURCE_DIR}/Lts/Services/
|
||||
${CMAKE_BINARY_DIR}/Lts/
|
||||
)
|
||||
ADD_EXECUTABLE(aesUnitTestTneAlgorithmen ${LinkedSources} ${UnitTestSources} )
|
||||
|
||||
TARGET_LINK_LIBRARIES(aesUnitTestTneAlgorithmen
|
||||
NGLLogger
|
||||
|
||||
+2
-2
@@ -11,8 +11,8 @@
|
||||
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
#include <QtTest/QTest>
|
||||
#include <QtCore/QFile>
|
||||
#include <QtCore/QDir>
|
||||
#include <QFile>
|
||||
#include <QDir>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QCoreApplication>
|
||||
#include <QtTest/QTest>
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include "aes_statemachine_test.h"
|
||||
#include <QtCore/QDebug>
|
||||
#include <QDebug>
|
||||
#include <QSignalSpy>
|
||||
#include <QtTest/QTest>
|
||||
#include <QTest>
|
||||
#include <nglapplication/nglcoreapplication.h>
|
||||
|
||||
using namespace AreaEffectSimulation;
|
||||
|
||||
+2
-2
@@ -8,8 +8,8 @@
|
||||
|
||||
#include "aes_helper.h"
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QSet>
|
||||
#include <QHash>
|
||||
#include <QSet>
|
||||
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
|
||||
@@ -8,16 +8,16 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "svcaescommon_export.h"
|
||||
#include <AreaEffectSimulation/aes_export.h>
|
||||
#include <math.h>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QJsonDocument>
|
||||
#include <QtCore/QJsonObject>
|
||||
#include <QtCore/QJsonArray>
|
||||
#include <LtsUtils/dds_bitarray.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <QPointF>
|
||||
#include <QString>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QJsonArray>
|
||||
#include <LtsUtilsCore/dds_bitarray.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include "aes_db.h"
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
|
||||
+4
-3
@@ -6,9 +6,9 @@
|
||||
*/
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
#include <QTimer>
|
||||
#include <QStringList>
|
||||
#include <QVector>
|
||||
|
||||
#include <AreaEffectSimulation/logger.h>
|
||||
#include <AreaEffectSimulation/settings.h>
|
||||
@@ -26,6 +26,7 @@ FireAutomaton::FireAutomaton(QObject *parent)
|
||||
, m_intervalMSecs(0)
|
||||
, m_remainingTickMSecs(0)
|
||||
, m_state(State::Uninitialized)
|
||||
, m_logger(getLogger("Utils.FireAutomaton"))
|
||||
{
|
||||
m_timer.setSingleShot(true);
|
||||
connect(&m_timer, &QTimer::timeout, this, &FireAutomaton::nextTick, Qt::UniqueConnection);
|
||||
|
||||
+6
-6
@@ -6,10 +6,10 @@
|
||||
*/
|
||||
|
||||
#include <QtCore>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QVector>
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QString>
|
||||
#include <QVector>
|
||||
|
||||
#include "../logger.h"
|
||||
|
||||
@@ -72,7 +72,6 @@ private slots:
|
||||
void nextTick();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
enum class PatternElement {
|
||||
All,
|
||||
AllFill,
|
||||
@@ -90,7 +89,6 @@ private:
|
||||
QVector<int32_t> getEffectorIds(int32_t tick) const;
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
QVector<int32_t> m_effectorIds;
|
||||
QVector<FireAutomaton::PatternElement> m_pattern;
|
||||
QVector<QVector<int32_t>> m_schedule;
|
||||
@@ -101,6 +99,8 @@ private:
|
||||
int32_t m_intervalMSecs;
|
||||
int32_t m_remainingTickMSecs;
|
||||
State m_state;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
+40
-39
@@ -10,13 +10,13 @@
|
||||
#include "firing_timer.h"
|
||||
#include "../logger.h"
|
||||
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QString>
|
||||
#include <QTimer>
|
||||
#include <QElapsedTimer>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QDebug>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
|
||||
#include <iostream>
|
||||
#include <cmath>
|
||||
@@ -27,7 +27,7 @@ namespace AreaEffectSimulation
|
||||
|
||||
|
||||
// To be able to aesily differentiate between different instances:
|
||||
#define MY_Q_FUNC_INFO "debugInfo='" << d->m_debugInfo << "' " << Q_FUNC_INFO
|
||||
#define MY_LOGFUNCTION "debugInfo='" << d->m_debugInfo << "' " << Q_FUNC_INFO
|
||||
|
||||
|
||||
static long s_counter{0};
|
||||
@@ -129,21 +129,22 @@ public:
|
||||
FiringTimer::FiringTimer(const QString &debugInfo)
|
||||
: BaseClass(nullptr)
|
||||
, d(new Private)
|
||||
, m_logger(getLogger("Utils.FiringTimer"))
|
||||
{
|
||||
++s_counter;
|
||||
d->m_debugInfo = debugInfo;
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
|
||||
}
|
||||
|
||||
FiringTimer::~FiringTimer()
|
||||
{
|
||||
--s_counter;
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " START, s_counter=" << s_counter << " this=" << this;
|
||||
QString debugInfoSave = d->m_debugInfo;
|
||||
delete d;
|
||||
//DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
|
||||
DEBUG_LOG(m_logger) << "debugInfo='" << debugInfoSave << "'" << Q_FUNC_INFO << " END, s_counter=" << s_counter << " this=" << this;
|
||||
//DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
|
||||
DEBUG_LOG(m_logger) << "debugInfo='" << debugInfoSave << "'" << LOGFUNCTION << " END, s_counter=" << s_counter << " this=" << this;
|
||||
}
|
||||
|
||||
void FiringTimer::setDebugInfo(const QString &debugInfo)
|
||||
@@ -153,14 +154,14 @@ void FiringTimer::setDebugInfo(const QString &debugInfo)
|
||||
|
||||
void FiringTimer::reset()
|
||||
{
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
|
||||
d->reset();
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDurationMsec)
|
||||
{
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START,"
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START,"
|
||||
<< ", effectDurationMsec=" << effectDurationMsec
|
||||
<< ", ammoCount=" << ammoCount
|
||||
<< ", ammoFlightDurationMsec=" << ammoFlightDurationMsec;
|
||||
@@ -170,7 +171,7 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu
|
||||
d->m_ammoCount = ammoCount;
|
||||
d->m_ammoFlightDurationMsec = ammoFlightDurationMsec;
|
||||
d->m_intervallMsec = static_cast<double>(d->m_effectDurationMsec) / d->m_ammoCount; // ensure float calculation
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " m_intervallMsec " << d->m_intervallMsec;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " m_intervallMsec " << d->m_intervallMsec;
|
||||
|
||||
d->m_firingTimer->stop();
|
||||
d->m_firingTimer->setSingleShot(false);
|
||||
@@ -178,24 +179,24 @@ bool FiringTimer::init(long effectDurationMsec, int ammoCount, long ammoFlightDu
|
||||
connect(d->m_firingTimer, &QTimer::timeout,
|
||||
this, &FiringTimer::onFiringTimout, Qt::UniqueConnection);
|
||||
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
bool FiringTimer::startFiring()
|
||||
{
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
|
||||
|
||||
if ((d->m_currentFiringMode != FiringMode::FM_Undefined) &&
|
||||
(d->m_currentFiringMode != FiringMode::FM_Paused))
|
||||
{
|
||||
ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " wrong firingMode, cur = " << (int)d->m_currentFiringMode;
|
||||
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " wrong firingMode, cur = " << (int)d->m_currentFiringMode;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (remainingAmmoCount() <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " no ammo left"
|
||||
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left"
|
||||
<< " (total ammoCount was: " << d->m_ammoCount
|
||||
<< " cur firingMode = " << (int)d->m_currentFiringMode;
|
||||
return false;
|
||||
@@ -213,7 +214,7 @@ bool FiringTimer::startFiring()
|
||||
#endif // SUPPORT_STATE_CHANGE_DELAYED
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " start firing with m_firedAmmoCount = " << d->m_firedAmmoCount;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " start firing with m_firedAmmoCount = " << d->m_firedAmmoCount;
|
||||
|
||||
d->m_firingTimer->start();
|
||||
d->m_currentFiringMode = FiringMode::FM_Active;
|
||||
@@ -227,7 +228,7 @@ bool FiringTimer::startFiring()
|
||||
d->m_pausedMsec += pausedElapsedMsec;
|
||||
d->m_etPaused->invalidate();
|
||||
}
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " start firing after [ms]: " << pausedElapsedMsec
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " start firing after [ms]: " << pausedElapsedMsec
|
||||
<< ", m_activeMsec in total = " << d->m_activeMsec
|
||||
<< ", m_pausedMsec in total = " << d->m_pausedMsec;
|
||||
|
||||
@@ -256,7 +257,7 @@ bool FiringTimer::startFiring()
|
||||
// to fire at the beginning of the interval:
|
||||
onFiringTimout();
|
||||
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -270,17 +271,17 @@ bool FiringTimer::startFiringDelay(qint64 delayMsec)
|
||||
|
||||
bool FiringTimer::pauseFiring()
|
||||
{
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
|
||||
|
||||
if (d->m_currentFiringMode != FiringMode::FM_Active)
|
||||
{
|
||||
ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " wrong firingMode";
|
||||
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " wrong firingMode";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (remainingAmmoCount() <= 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << MY_Q_FUNC_INFO << " no ammo left"
|
||||
ERROR_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left"
|
||||
<< " (total ammoCount was: " << d->m_ammoCount;
|
||||
return false;
|
||||
}
|
||||
@@ -293,7 +294,7 @@ bool FiringTimer::pauseFiring()
|
||||
#endif // SUPPORT_STATE_CHANGE_DELAYED
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing at m_firedAmmoCount = " << d->m_firedAmmoCount;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing at m_firedAmmoCount = " << d->m_firedAmmoCount;
|
||||
d->m_firingTimer->stop();
|
||||
d->m_currentFiringMode = FiringMode::FM_Paused;
|
||||
d->m_etPaused->start();
|
||||
@@ -305,14 +306,14 @@ bool FiringTimer::pauseFiring()
|
||||
const qint64 activeElapsedMsec = d->m_etActive->elapsed();
|
||||
d->m_activeMsec += activeElapsedMsec;
|
||||
d->m_etActive->invalidate();
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing after [ms]: " << activeElapsedMsec
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing after [ms]: " << activeElapsedMsec
|
||||
<< ", m_activeMsec in total = " << d->m_activeMsec
|
||||
<< ", m_pausedMsec in total = " << d->m_pausedMsec;
|
||||
|
||||
QString log = QString(QStringLiteral("pauseFiring_at_%1")).arg(QDateTime::currentMSecsSinceEpoch()) ;
|
||||
d->m_logHistorie.append(log);
|
||||
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -346,7 +347,7 @@ long FiringTimer::intervallMsec() const
|
||||
#ifdef SUPPORT_STATE_CHANGE_DELAYED
|
||||
void FiringTimer::emitStateChangeDelayed(AreaEffectSimulation::FiringTimer::CMD cmd, int firedAmmoCount)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " SUPPORT_STATE_CHANGE_DELAYED: " << cmd
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " SUPPORT_STATE_CHANGE_DELAYED: " << cmd
|
||||
<< ", firedAmmoCount = " << firedAmmoCount;
|
||||
emit stateChangeDelayedAsInt(static_cast<int>(cmd), firedAmmoCount);
|
||||
}
|
||||
@@ -380,11 +381,11 @@ QString FiringTimer::toString(const CMD cmd)
|
||||
|
||||
void FiringTimer::onFiringTimout()
|
||||
{
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
|
||||
|
||||
++d->m_firedAmmoCount;
|
||||
|
||||
INFO_LOG(m_logger) << MY_Q_FUNC_INFO << " emit firing with: " << d->m_firedAmmoCount
|
||||
INFO_LOG(m_logger) << MY_LOGFUNCTION << " emit firing with: " << d->m_firedAmmoCount
|
||||
<< " of total ammoCount = " << d->m_ammoCount;
|
||||
emit firing(d->m_firedAmmoCount, d->m_ammoCount);
|
||||
|
||||
@@ -396,7 +397,7 @@ void FiringTimer::onFiringTimout()
|
||||
int currentFiringNumber = d->m_firedAmmoCount;
|
||||
int totalFiringNumber = d->m_ammoCount;
|
||||
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " XXXXXXXXX schedule 'emit impact' " << currentFiringNumber;
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " XXXXXXXXX schedule 'emit impact' " << currentFiringNumber;
|
||||
|
||||
QTimer::singleShot(d->m_ammoFlightDurationMsec, this, [this, currentFiringNumber, totalFiringNumber]()
|
||||
{
|
||||
@@ -408,7 +409,7 @@ void FiringTimer::onFiringTimout()
|
||||
}
|
||||
#endif // SUPPORT_STATE_CHANGE_DELAYED
|
||||
|
||||
INFO_LOG(m_logger) << MY_Q_FUNC_INFO << " emit impact " << currentFiringNumber
|
||||
INFO_LOG(m_logger) << MY_LOGFUNCTION << " emit impact " << currentFiringNumber
|
||||
<< " of total = " << totalFiringNumber;
|
||||
emit impact(currentFiringNumber, totalFiringNumber);
|
||||
|
||||
@@ -430,7 +431,7 @@ void FiringTimer::onFiringTimout()
|
||||
|
||||
if (d->m_firedAmmoCount >= d->m_ammoCount)
|
||||
{
|
||||
INFO_LOG(m_logger) << MY_Q_FUNC_INFO << " no ammo left, finishing firing"
|
||||
INFO_LOG(m_logger) << MY_LOGFUNCTION << " no ammo left, finishing firing"
|
||||
<< ", " << d->m_firedAmmoCount << " of total ammoCount = " << d->m_ammoCount << " are fired";
|
||||
d->m_firingTimer->stop();
|
||||
|
||||
@@ -440,7 +441,7 @@ void FiringTimer::onFiringTimout()
|
||||
|
||||
// !! Attention: do pauseFiring() WITHIN the intervall will reduce amount of time the firing is active !!
|
||||
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing after [ms]: " << activeElapsedMsec
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing after [ms]: " << activeElapsedMsec
|
||||
<< ", m_activeMsec in total = " << d->m_activeMsec
|
||||
<< ", m_pausedMsec in total = " << d->m_pausedMsec
|
||||
<< " now FiringTimoutExpiredPlus ...";
|
||||
@@ -465,12 +466,12 @@ void FiringTimer::onFiringTimout()
|
||||
d->m_firingTimer->start();
|
||||
}
|
||||
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END" << ", m_firedAmmoCount " << d->m_firedAmmoCount;
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END" << ", m_firedAmmoCount " << d->m_firedAmmoCount;
|
||||
}
|
||||
|
||||
void FiringTimer::onFiringTimoutExpiredPlus()
|
||||
{
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " START";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " START";
|
||||
|
||||
d->m_currentFiringMode = FiringMode::FM_ExpiredPlus;
|
||||
|
||||
@@ -480,7 +481,7 @@ void FiringTimer::onFiringTimoutExpiredPlus()
|
||||
|
||||
// !! Attention: do pauseFiring() WITHIN the intervall will reduce amount of time the firing is active !!
|
||||
|
||||
DEBUG_LOG(m_logger) << MY_Q_FUNC_INFO << " stop firing2 after [ms]: " << activeElapsedMsec
|
||||
DEBUG_LOG(m_logger) << MY_LOGFUNCTION << " stop firing2 after [ms]: " << activeElapsedMsec
|
||||
<< ", m_activeMsec in total = " << d->m_activeMsec
|
||||
<< ", m_pausedMsec in total = " << d->m_pausedMsec;
|
||||
|
||||
@@ -488,7 +489,7 @@ void FiringTimer::onFiringTimoutExpiredPlus()
|
||||
|
||||
emit firingFinishedPlus();
|
||||
|
||||
TRACE_LOG(m_logger) << MY_Q_FUNC_INFO << " END";
|
||||
TRACE_LOG(m_logger) << MY_LOGFUNCTION << " END";
|
||||
}
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -9,11 +9,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "svcaescommon_export.h"
|
||||
#include "aes_export.h"
|
||||
#include "../logger.h"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QObject>
|
||||
#include <QString>
|
||||
|
||||
#include <iosfwd>
|
||||
|
||||
|
||||
@@ -6,15 +6,14 @@
|
||||
*/
|
||||
|
||||
#include "icons.h"
|
||||
#include <utility>
|
||||
#include "polygons.h"
|
||||
|
||||
#include <AreaEffectSimulation/aes.hpp>
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QtGui/QPainter>
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QGuiApplication>
|
||||
#include <QIcon>
|
||||
#include <QPainter>
|
||||
#include <QPixmap>
|
||||
#include <QTransform>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
@@ -55,7 +54,7 @@ static QPixmap pixmapFromPolygons(const QVector<PolygonData> &datas,
|
||||
for (const PolygonData &data : datas)
|
||||
{
|
||||
polyUtm.clear();
|
||||
for (const QPointF &point : std::as_const(data.poly))
|
||||
for (const QPointF &point : qAsConst(data.poly))
|
||||
{
|
||||
LtsCoordTrans::UtmCoordinate pointUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(point, zone);
|
||||
polyUtm << QPointF(pointUtm.x, pointUtm.y);
|
||||
@@ -67,7 +66,7 @@ static QPixmap pixmapFromPolygons(const QVector<PolygonData> &datas,
|
||||
bounding.reserve(4 * datas.size());
|
||||
// Does not matter, how the total polygon looks as we just need the bounding rect.
|
||||
// << is cheaper than .united()
|
||||
for (const QPolygonF &polyUtmLocal : std::as_const(polysUtm))
|
||||
for (const QPolygonF &polyUtmLocal : qAsConst(polysUtm))
|
||||
bounding << polyUtmLocal;
|
||||
|
||||
// center to center / Todo:: Does it always work?
|
||||
@@ -90,7 +89,7 @@ static QPixmap pixmapFromPolygons(const QVector<PolygonData> &datas,
|
||||
|
||||
QPainter p(&pix);
|
||||
int i = 0;
|
||||
for (const PolygonData &d : std::as_const(datas))
|
||||
for (const PolygonData &d : qAsConst(datas))
|
||||
{
|
||||
QPolygonF mPoly = mTrans.map(polysUtm.at(i++));
|
||||
mPoly = mScale.map(mPoly);
|
||||
|
||||
+18
-19
@@ -6,7 +6,6 @@
|
||||
*/
|
||||
|
||||
#include "polygons.h"
|
||||
#include <utility>
|
||||
#include "tne_algorithmen.h"
|
||||
|
||||
#include <aes.hpp>
|
||||
@@ -15,8 +14,8 @@
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
#include <LtsCoordinate/lts_coord_vector.h>
|
||||
#include <LtsCoordinate/lts_coordinate.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <ProjectDataManagement/pdm_db_structs.h>
|
||||
#include <Trajectory/trajectory_helper.h>
|
||||
|
||||
@@ -113,7 +112,7 @@ static QPolygonF utmToGeogrphic(const QPolygonF &polyUtm, const LtsCoordTrans::U
|
||||
{
|
||||
QPolygonF poly;
|
||||
poly.reserve(polyUtm.size());
|
||||
for (const QPointF &point : std::as_const(polyUtm))
|
||||
for (const QPointF &point : qAsConst(polyUtm))
|
||||
poly << base.geographic(point);
|
||||
return poly;
|
||||
}
|
||||
@@ -477,7 +476,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS(const Database::AesEffectClu
|
||||
|
||||
vec.reserve(impactCount);
|
||||
const QTransform trans(fromRotation(-effectCluster.rotationAngle)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
QPointF p = impactPositionUtm.geographic(trans.map(point));
|
||||
DEBUG_LOG(logger) << "Point = " << p;
|
||||
@@ -553,7 +552,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> mtps_asRealUtm;
|
||||
mtps_asRealUtm.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
{
|
||||
// convert QPointF back to UtmCoordinate: pay attention to order!!!
|
||||
const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
@@ -592,7 +591,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
|
||||
int idx = 0;
|
||||
const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
// which mtp:
|
||||
int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo
|
||||
@@ -607,7 +606,7 @@ QVector<QPointF> effectClusterSingleExplosionsGAUSS_Mtp(const Database::AesEffec
|
||||
<< ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut
|
||||
<< " rot=" << explosionCluster.rotationAngle;
|
||||
|
||||
for (auto item : std::as_const(finalVec))
|
||||
for (auto item : qAsConst(finalVec))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item);
|
||||
qCritical() << " TNE VERIFICATION: CHECK:"
|
||||
@@ -901,7 +900,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS(const Database::AesExplos
|
||||
|
||||
vec.reserve(impactCount);
|
||||
const QTransform trans(fromRotation(-explosionCluster.rotationAngle)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
QPointF p = impactPositionUtm.geographic(trans.map(point));
|
||||
DEBUG_LOG(logger) << "Point = " << p;
|
||||
@@ -978,7 +977,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
|
||||
QVector<LtsCoordTrans::UtmCoordinate> mtps_asRealUtm;
|
||||
mtps_asRealUtm.reserve(mtps_asUtm.size());
|
||||
for (const QPointF &mtp_asUtm : std::as_const(mtps_asUtm))
|
||||
for (const QPointF &mtp_asUtm : qAsConst(mtps_asUtm))
|
||||
{
|
||||
// convert QPointF back to UtmCoordinate: pay attention to order!!!
|
||||
const LtsCoordTrans::UtmCoordinate mtpUtm(impactPositionUtm.zone, mtp_asUtm.x(), mtp_asUtm.y());
|
||||
@@ -1017,7 +1016,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
|
||||
int idx = 0;
|
||||
const QTransform transform(fromRotation(-mtpRotationNorthDegree)); // Compass, not mathematical!
|
||||
for (const QPointF &point : std::as_const(impactsGAUSS))
|
||||
for (const QPointF &point : qAsConst(impactsGAUSS))
|
||||
{
|
||||
// which mtp:
|
||||
int mtpIdx = (idx++ % mtps_asUtm.size()); // modulo
|
||||
@@ -1032,7 +1031,7 @@ QVector<QPointF> explosionClusterSingleExplosionsGAUSS_Mtp(const Database::AesEx
|
||||
<< ", randomNumber=" << randomNumber << " singleWidthOut=" << singleWidthOut << " singleHeightOut=" << singleHeightOut
|
||||
<< " rot=" << explosionCluster.rotationAngle;
|
||||
|
||||
for (auto item : std::as_const(finalVec))
|
||||
for (auto item : qAsConst(finalVec))
|
||||
{
|
||||
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(item);
|
||||
qCritical() << " TNE VERIFICATION: CHECK:"
|
||||
@@ -1649,7 +1648,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
std::vector<Core::GeoPosition> &singlePositionsOut,
|
||||
NGL::INGLLogger &logger)
|
||||
{
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " START, participantId=" << unitParticipantId;
|
||||
TRACE_LOG(logger) << LOGFUNCTION << " START, participantId=" << unitParticipantId;
|
||||
|
||||
static const LtsUtils::QPoint3D s_invalidPos(std::nan(""), std::nan(""), std::nan(""));
|
||||
|
||||
@@ -1657,7 +1656,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
// See also GUEZE-2309
|
||||
if (!ppmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, no ppmDtc";
|
||||
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, no ppmDtc";
|
||||
return s_invalidPos;
|
||||
}
|
||||
ppmDtc->waitForHistoricalDataParticipant(1000);
|
||||
@@ -1665,7 +1664,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
const ParticipantManagement::Participant &partData = ppmDtc->participant(unitParticipantId);
|
||||
if (partData.id() != unitParticipantId)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " ERROR, participant failed for id =" << unitParticipantId;
|
||||
ERROR_LOG(logger) << LOGFUNCTION << " ERROR, participant failed for id =" << unitParticipantId;
|
||||
return s_invalidPos;
|
||||
}
|
||||
ppmDtc->waitForHistoricalDataParticipantPosition(1000);
|
||||
@@ -1679,13 +1678,13 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
int childCount = 0;
|
||||
LtsUtils::QPoint3D pos;
|
||||
|
||||
for (int childId : std::as_const(childIds))
|
||||
for (int childId : qAsConst(childIds))
|
||||
{
|
||||
const ParticipantManagement::ParticipantPosition &childPos = ppmDtc->participantPosition(childId);
|
||||
if (childPos.participantId() != childId)
|
||||
{
|
||||
// may happen in real life: so ERROR_LOG to DEBUG_LOG
|
||||
DEBUG_LOG(logger) << Q_FUNC_INFO << " ERROR, participantPosition failed for id =" << childId;
|
||||
DEBUG_LOG(logger) << LOGFUNCTION << " ERROR, participantPosition failed for id =" << childId;
|
||||
return s_invalidPos;
|
||||
}
|
||||
const Core::GeoPosition &childGeoPos = childPos.pos();
|
||||
@@ -1710,7 +1709,7 @@ LtsUtils::QPoint3D calculateFiringUnitCenterNonRecursive(const std::shared_ptr<P
|
||||
}
|
||||
DEBUG_LOG(logger) << "Participant " << unitParticipantId << ": Mean position: " << centerPosToReturn << " #relevant children: " << childCount;
|
||||
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END, participantId=" << unitParticipantId;
|
||||
TRACE_LOG(logger) << LOGFUNCTION << " END, participantId=" << unitParticipantId;
|
||||
return centerPosToReturn;
|
||||
}
|
||||
|
||||
@@ -1732,7 +1731,7 @@ std::vector<Core::GeoPosition2D> dangerAreaDefaultSegments(const QPointF ¢er
|
||||
// polyUtm = QTransform().rotate(0).map(polyUtm);
|
||||
LtsCoordTrans::UtmCoordinate impactPositionUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(centerPos);
|
||||
const QPolygonF poly(utmToGeogrphic(polyUtm, impactPositionUtm));
|
||||
for (const auto &p : std::as_const(poly))
|
||||
for (const auto &p : qAsConst(poly))
|
||||
segments.push_back(Core::GeoPosition2D(p.x(), p.y()));
|
||||
|
||||
return segments;
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
#include <AreaEffectSimulation/aes_db_structs.h>
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
|
||||
#include <QtGui/QColor>
|
||||
#include <QColor>
|
||||
#include <QPolygonF>
|
||||
#include <QtCore/QRectF>
|
||||
#include <QRectF>
|
||||
|
||||
class QPointF;
|
||||
|
||||
|
||||
+3
-3
@@ -12,9 +12,9 @@
|
||||
#include "icons.h"
|
||||
#include "polygons.h"
|
||||
|
||||
#include <QtWidgets/QWidget>
|
||||
#include <QtWidgets/QLabel>
|
||||
#include <QtGui/QIcon>
|
||||
#include <QWidget>
|
||||
#include <QLabel>
|
||||
#include <QIcon>
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
|
||||
+3
-3
@@ -8,10 +8,10 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "svcaescommon_export.h"
|
||||
#include <AreaEffectSimulation/aes_export.h>
|
||||
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QPointF>
|
||||
#include <QVector>
|
||||
#include <QPointF>
|
||||
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
|
||||
+2
-3
@@ -6,14 +6,13 @@
|
||||
*/
|
||||
|
||||
#include "handler_explosion_single_central.h"
|
||||
#include <utility>
|
||||
#include "main_handler.h"
|
||||
|
||||
#include <LtsCoordTrans/lts_coord_trans.h>
|
||||
|
||||
#include <QPolygonF>
|
||||
#include <QTransform>
|
||||
#include <QtCore/QFileInfo>
|
||||
#include <QFileInfo>
|
||||
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
@@ -36,7 +35,7 @@ bool HandlerExplosionSingleCentral::init()
|
||||
return true;
|
||||
}
|
||||
// create indirect fire single objects
|
||||
for (const Database::AesExplosionSingleCentral &dbData : std::as_const(dataVec))
|
||||
for (const Database::AesExplosionSingleCentral &dbData : qAsConst(dataVec))
|
||||
{
|
||||
ObjectExplosionSingleCentral *ifs(new ObjectExplosionSingleCentral(m_mainHandler, this));
|
||||
connect(ifs, &ObjectExplosionSingleCentral::effectStateChanged, this, &HandlerExplosionSingleCentral::onEffectStateChanged);
|
||||
|
||||
+2
-2
@@ -12,8 +12,8 @@
|
||||
|
||||
#include <Viewer/SituationMap/ElevationMap/elevation_map.h>
|
||||
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QMap>
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
namespace SituationMap
|
||||
|
||||
+2
-2
@@ -10,9 +10,9 @@
|
||||
#include "object_base.h"
|
||||
|
||||
#include <CentralEffectSimulation/ces_ftc.h>
|
||||
#include <LtsUtils/LtsUtilsCore/qpoint3d.h>
|
||||
#include <LtsUtilsCore/qpoint3d.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QObject>
|
||||
|
||||
|
||||
using Trajectory = QPair<QPolygonF, QVector<double>>;
|
||||
|
||||
+8
-9
@@ -6,7 +6,6 @@
|
||||
* $Author$
|
||||
*/
|
||||
#include "aes_dtc_impl_custom.h"
|
||||
#include <utility>
|
||||
#include <DDS/DTC/generic_dtc.h>
|
||||
#include <DDS/Generic/generic_data_reader.h>
|
||||
#include <QElapsedTimer>
|
||||
@@ -121,7 +120,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::BCContamination> bcConts = bCContaminations();
|
||||
aesItemId = 0;
|
||||
for (const AreaEffectSimulation::BCContamination &bcCont : std::as_const(bcConts))
|
||||
for (const AreaEffectSimulation::BCContamination &bcCont : qAsConst(bcConts))
|
||||
{
|
||||
if (bcCont.externalId() == externalId)
|
||||
{
|
||||
@@ -133,7 +132,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtBCContamination;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::NContamination> nConts = nContaminations();
|
||||
for (const AreaEffectSimulation::NContamination &nCont: std::as_const(nConts))
|
||||
for (const AreaEffectSimulation::NContamination &nCont: qAsConst(nConts))
|
||||
{
|
||||
if (nCont.externalId() == externalId)
|
||||
{
|
||||
@@ -145,7 +144,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtNContamination;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::ExplosionArea> explAreas = explosionAreas();
|
||||
for (const AreaEffectSimulation::ExplosionArea &explArea : std::as_const(explAreas))
|
||||
for (const AreaEffectSimulation::ExplosionArea &explArea : qAsConst(explAreas))
|
||||
{
|
||||
if (explArea.externalId() == externalId)
|
||||
{
|
||||
@@ -157,7 +156,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtExplosionArea;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::ExplosionSingle> explSingles = explosionSingles();
|
||||
for (const AreaEffectSimulation::ExplosionSingle &explSingle : std::as_const(explSingles))
|
||||
for (const AreaEffectSimulation::ExplosionSingle &explSingle : qAsConst(explSingles))
|
||||
{
|
||||
if (explSingle.externalId() == externalId)
|
||||
{
|
||||
@@ -169,7 +168,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtExplosionSingle;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::MineArea> mAreas = mineAreas();
|
||||
for(const AreaEffectSimulation::MineArea &mArea : std::as_const(mAreas))
|
||||
for(const AreaEffectSimulation::MineArea &mArea : qAsConst(mAreas))
|
||||
{
|
||||
if (mArea.externalId() == externalId)
|
||||
{
|
||||
@@ -181,7 +180,7 @@ AreaEffectSimulation::AesType DtcImplCustom::aesItemIdFromExternalId(long long e
|
||||
return AreaEffectSimulation::AesType_def::AtMineArea;
|
||||
|
||||
QMap<qint32, AreaEffectSimulation::MineCorridor> mCorridors = mineCorridors();
|
||||
for (const AreaEffectSimulation::MineCorridor &mCorridor : std::as_const(mCorridors))
|
||||
for (const AreaEffectSimulation::MineCorridor &mCorridor : qAsConst(mCorridors))
|
||||
{
|
||||
if (mCorridor.externalId() == externalId)
|
||||
{
|
||||
@@ -353,7 +352,7 @@ QVector<TrajectoryTimeAware> DtcImplCustom::trajectoriesTimeAwareFromOriginatorI
|
||||
|
||||
const QMap<qint32, AreaEffectSimulation::TrajectoryTimeAware> &trajectoryTimeAwareMap = trajectoryTimeAwares();
|
||||
|
||||
for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : std::as_const(trajectoryTimeAwareMap))
|
||||
for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : qAsConst(trajectoryTimeAwareMap))
|
||||
{
|
||||
// be aware of: [E01562-259] use originatorId, originatorTypeId (instead of aesItemId, aesTypeId)
|
||||
if ((trajectoryTimeAware.originatorId() == originatorId) &&
|
||||
@@ -402,7 +401,7 @@ void DtcImplCustom::initDAO()
|
||||
// // We don´t realy know, how many to reserve:
|
||||
// trajectoriesFromAesIdVec.reserve(120); // 2024-09 N.Thoden: 120 ist maximum per area
|
||||
|
||||
// for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : std::as_const(trajectoryTimeAwareMap))
|
||||
// for (const AreaEffectSimulation::TrajectoryTimeAware &trajectoryTimeAware : qAsConst(trajectoryTimeAwareMap))
|
||||
// {
|
||||
// if (trajectoryTimeAware.aesItemId() == aesId)
|
||||
// trajectoriesFromAesIdVec.push_back(trajectoryTimeAware);
|
||||
|
||||
@@ -12,16 +12,18 @@
|
||||
#include <DDS/Core/pacemaker.h>
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
#include <TrainingAreaBase/tab_dtc.h>
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QThread>
|
||||
#include <QCoreApplication>
|
||||
#include <QThread>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId, QObject *parent) : QObject(parent)
|
||||
DdsHandler::DdsHandler(int domainId, int exerciseId, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_ddsConnector(std::make_shared<DDSConnector::DdsConnector>(domainId, IDL::PartitionType::Exercise, exerciseId))
|
||||
, m_currentTimeMSec(-1),
|
||||
m_logger(NGL::NGLLoggerBootstrap::getNGLRootLogger()) {
|
||||
, m_currentTimeMSec(-1)
|
||||
, m_logger(getLogger("DdsInterface"))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "DdsHandler(" << domainId << ") for partition: " << m_ddsConnector->getDefaultPartition();
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <DDS/Core/core_dtc.h>
|
||||
#include <DDS/Core/topic_lock_master.h>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_dtc.h>
|
||||
#include <TrainingAreaBase/tab_ftc.h>
|
||||
#include <CentralEffectSimulation/ces_ftc.h>
|
||||
#include <AssetManagement/asm_dtc.h> // For Elevation
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
|
||||
#include "logger.h"
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QDateTime>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
namespace Core
|
||||
@@ -78,7 +78,6 @@ private slots:
|
||||
void onPartitionTimeChanged(const Core::PartitionTime ¤tTime);
|
||||
|
||||
private:
|
||||
NGL::INGLLogger &m_logger;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<Core::Interface::Dtc> m_dtcCore;
|
||||
std::shared_ptr<Core::Pacemaker> m_pacemaker;
|
||||
@@ -96,6 +95,8 @@ private:
|
||||
|
||||
QElapsedTimer m_elapsedTimer;
|
||||
qint64 m_currentTimeMSec;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
}
|
||||
Loaded 100 of 1244 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user