Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -102,65 +102,65 @@ ModuleTestExplosionCluster::ModuleTestExplosionCluster(int domainId, int exercis
void ModuleTestExplosionCluster::onSetSimulatedPositionReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onSetSimulatedPositionReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onSetSimulatedPositionReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onSetSimulatedParticipantFormationReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onSetSimulatedParticipantFormationReply : " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onSetSimulatedParticipantFormationReply : " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onSetSimulatedParticipantFormationReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onSetSimulatedParticipantFormationReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onExplosionClusterModifyReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onExplosionClusterModifyReply: " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onExplosionClusterModifyReply: " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onExplosionClusterSingleEffectOnlyModifyReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onExplosionClusterSingleEffectOnlyModifyReply: " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onExplosionClusterSingleEffectOnlyModifyReply: " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onExplosionClusterSingleEffectOnlyModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onExplosionClusterSingleEffectOnlyModifyReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onExplosionClusterOcModifyReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onExplosionClusterOcModifyReply: " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onExplosionClusterOcModifyReply: " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onExplosionClusterOcModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onExplosionClusterOcModifyReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onExplosionClusterPauseResumeReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onExplosionClusterPauseResumeReply: " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onExplosionClusterPauseResumeReply: " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onExplosionClusterModifyReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onTargetPositionsModifyReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onTargetPositionsModifyReply: " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onTargetPositionsModifyReply: " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onTargetPositionsModifyReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onTargetPositionsModifyReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onSetBuildingStatesReply(const Core::FunctionReplyObject &replyObject)
{
m_replyError = replyObject.error();
DEBUG_LOG() << " got reply - onSetBuildingStatesReply: " << m_replyError;
DEBUG_LOG(m_logger) << " got reply - onSetBuildingStatesReply: " << m_replyError;
if (!replyObject.str().empty())
ERROR_LOG() << " got reply - onSetBuildingStatesReply: " << replyObject.translated();
ERROR_LOG(m_logger) << " got reply - onSetBuildingStatesReply: " << replyObject.translated();
}
void ModuleTestExplosionCluster::onExplosionClusterChanged(const ExplosionCluster &data, DataModification modType)
@@ -177,7 +177,7 @@ void ModuleTestExplosionCluster::onExplosionClusterChanged(const ExplosionCluste
{
long now = time(nullptr) * 1000;
long diff = now - m_objectRequestedTimePointMsec;
DEBUG_LOG() << " got changed - m_data: " << m_data.id() << ", state=" << m_data.effectStateId()
DEBUG_LOG(m_logger) << " got changed - m_data: " << m_data.id() << ", state=" << m_data.effectStateId()
<< ", OBJECT IS NOT Modifiable ANYMORE"
<< " ((diff = " << diff << ")";
}
@@ -187,10 +187,10 @@ void ModuleTestExplosionCluster::onExplosionClusterChanged(const ExplosionCluste
if (m_data.effectStart().is_set())
startTimeMsec = m_data.effectStart().get();
DEBUG_LOG() << " got changed - m_data: " << m_data.id() << ", state=" << m_data.effectStateId()
DEBUG_LOG(m_logger) << " got changed - m_data: " << m_data.id() << ", state=" << m_data.effectStateId()
<< ", startTimeMsec=" << startTimeMsec
<< ", cntExplosionCluster=" << m_counterDds.cntExplosionCluster;
TRACE_LOG() << " got changed - m_data: " << m_data;
TRACE_LOG(m_logger) << " got changed - m_data: " << m_data;
}
void ModuleTestExplosionCluster::onBuildingStateChanged(const Buildings::BuildingState &bldgState, DataModification modType)
@@ -198,7 +198,7 @@ void ModuleTestExplosionCluster::onBuildingStateChanged(const Buildings::Buildin
if (modType == DataModification::eRemoved)
return;
// DEBUG_LOG() << " got changed - BuildingState.id: " << bldgState.id() << ", data.damagePerc " << bldgState.damagePercent() << "m_bldgIdToFilter " << m_bldgIdToFilter;
// DEBUG_LOG(m_logger) << " got changed - BuildingState.id: " << bldgState.id() << ", data.damagePerc " << bldgState.damagePercent() << "m_bldgIdToFilter " << m_bldgIdToFilter;
if (m_bldgIdToFilter == bldgState.id())
m_buildingStateVec.push_back(bldgState);
@@ -210,7 +210,7 @@ void ModuleTestExplosionCluster::onAesItemViewChanged(const AesItemView &aesItem
return;
AreaEffectSimulation::AesType_def::type aesType = aesItemView.aesTypeId().underlying();
DEBUG_LOG() << " got onAesItemViewChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
DEBUG_LOG(m_logger) << " got onAesItemViewChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
switch (aesType) {
case AreaEffectSimulation::AesType_def::AtExplosionCluster:
@@ -233,11 +233,11 @@ void ModuleTestExplosionCluster::onEffectsChanged(const Effects &effects, DataMo
if (modType == DataModification::eRemoved)
return;
AreaEffectSimulation::AesType_def::type aesType = effects.aesTypeId().underlying();
DEBUG_LOG() << " got onEffectsChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_data: " << m_data.id() << ", aesType=" << aesType;
++m_counterDds.cntExplosionClusterEffects;
m_effects = effects;
DEBUG_LOG() << " got onEffectsChanged - m_effects: " << m_effects;
DEBUG_LOG(m_logger) << " got onEffectsChanged - m_effects: " << m_effects;
}
void ModuleTestExplosionCluster::onTrajectoryTimeAwareChanged(const TrajectoryTimeAware &data, DataModification modType)
@@ -248,7 +248,7 @@ void ModuleTestExplosionCluster::onTrajectoryTimeAwareChanged(const TrajectoryTi
++m_counterDds.cntTrajectory;
DEBUG_LOG() << " got TrajectoryTimeAwareChanged - data: " << data.id() << ", cntTrajectory=" << m_counterDds.cntTrajectory;
DEBUG_LOG(m_logger) << " got TrajectoryTimeAwareChanged - data: " << data.id() << ", cntTrajectory=" << m_counterDds.cntTrajectory;
}
void ModuleTestExplosionCluster::dumpCnt()
@@ -278,11 +278,11 @@ bool ModuleTestExplosionCluster::setFilterForBldgState(const QString &bldgName)
const int bldgId = getBldgId(bldgName);
if (bldgId<=0)
{
ERROR_LOG() << " getBldgId failed for '" << bldgName << "'";
ERROR_LOG(m_logger) << " getBldgId failed for '" << bldgName << "'";
return false;
}
m_bldgIdToFilter = bldgId;
INFO_LOG() << " setFilterForBldgState for '" << bldgName << "' to " << m_bldgIdToFilter;
INFO_LOG(m_logger) << " setFilterForBldgState for '" << bldgName << "' to " << m_bldgIdToFilter;
return true;
}
@@ -307,13 +307,13 @@ bool ModuleTestExplosionCluster::checkSingleEffects(uint idx, const LtsCoordTran
if (se.singleEffectTime() < 1000)
{
ERROR_LOG() << " bldg: " << context << ", idx = " << idx << ": singleEffectTime failed, SingleEffect = " << se;
ERROR_LOG(m_logger) << " bldg: " << context << ", idx = " << idx << ": singleEffectTime failed, SingleEffect = " << se;
return false;
}
if (se.zPlacement() != zPlace)
{
ERROR_LOG() << " bldg: " << context << ", idx = " << idx << ": zPlacement failed, SingleEffect = " << se;
ERROR_LOG(m_logger) << " bldg: " << context << ", idx = " << idx << ": zPlacement failed, SingleEffect = " << se;
return false;
}
@@ -322,9 +322,9 @@ bool ModuleTestExplosionCluster::checkSingleEffects(uint idx, const LtsCoordTran
if (dist3D > maxDist3D)
{
ERROR_LOG() << " bldg: " << context << ", idx = " << idx << ": position failed, dist3D = " << dist3D;
ERROR_LOG() << " idx = " << idx << ", Impact IST = " << ltsPos;
ERROR_LOG() << " idx = " << idx << ", Impact SHD = " << coord;
ERROR_LOG(m_logger) << " bldg: " << context << ", idx = " << idx << ": position failed, dist3D = " << dist3D;
ERROR_LOG(m_logger) << " idx = " << idx << ", Impact IST = " << ltsPos;
ERROR_LOG(m_logger) << " idx = " << idx << ", Impact SHD = " << coord;
return false;
}
@@ -361,7 +361,7 @@ bool ModuleTestExplosionCluster::waitForData(const std::function<bool ()> &func,
for (int i = 0; i < retryCount; ++i)
{
TRACE_LOG() << " waitForData - i: " << i;
TRACE_LOG(m_logger) << " waitForData - i: " << i;
if (func())
return true;
QTest::qWait(100);
@@ -636,9 +636,9 @@ ExplosionCluster ModuleTestExplosionCluster::getEcFor3101(const QString &eaName)
int ModuleTestExplosionCluster::doExplosionClusterModifyRequest(const ExplosionCluster &eaData)
{
if (eaData.effectStart().is_set())
INFO_LOG() << " explosionClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(eaData.effectStart().get()).toString();
INFO_LOG(m_logger) << " explosionClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(eaData.effectStart().get()).toString();
else
INFO_LOG() << " explosionClusterModifyRequest with effectStart: not set ";
INFO_LOG(m_logger) << " explosionClusterModifyRequest with effectStart: not set ";
FlightCurve fc;
if (eaData.flightCurve().is_set())
@@ -686,9 +686,9 @@ int ModuleTestExplosionCluster::doExplosionClusterModifyRequest(const ExplosionC
int ModuleTestExplosionCluster::doExplosionClusterSingleEffectOnlyModifyRequest(const ExplosionClusterSingleEffectOnlyRequest &request)
{
if (request.effectStart().is_set())
INFO_LOG() << " explosionClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(request.effectStart().get()).toString();
INFO_LOG(m_logger) << " explosionClusterModifyRequest with effectStart: " << QDateTime::fromMSecsSinceEpoch(request.effectStart().get()).toString();
else
INFO_LOG() << " explosionClusterModifyRequest with effectStart: not set ";
INFO_LOG(m_logger) << " explosionClusterModifyRequest with effectStart: not set ";
int ret = m_aesFtc->explosionClusterSingleEffectOnlyModifyRequest(request, this);
return ret;
@@ -711,32 +711,32 @@ void ModuleTestExplosionCluster::waitForEffectStates(int lineNumber, int durPrep
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }, 1))
{
ERROR_LOG() << "Error on request" << ", lineNumber = " << lineNumber;
ERROR_LOG(m_logger) << "Error on request" << ", lineNumber = " << lineNumber;
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsPrepared...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, durPrep))
{
ERROR_LOG() << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsActivated...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsActivated...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, durAct))
{
ERROR_LOG() << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsActivated of explosion cluster with id " << m_data.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsExpired...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsExpired...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired;}, durExp))
{
ERROR_LOG() << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id()
ERROR_LOG(m_logger) << "Timeout waiting for EsExpired of explosion cluster with id " << m_data.id()
<< ", lineNumber = " << lineNumber;
QVERIFY2(false, "ERROR, exit");
return;
@@ -762,14 +762,14 @@ void ModuleTestExplosionCluster::setupParticipants()
QPointF pos = utmPos.geographic();
req.position(Core::GeoPosition(pos.x(), pos.y(), 0.0));
INFO_LOG() << " setSimulatedPositionRequest ...";
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...";
m_replyError = true;
m_ppmFtc->setSimulatedPositionRequest(req, this);
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
}
}
@@ -782,14 +782,14 @@ void ModuleTestExplosionCluster::setupParticipants()
QPointF pos = utmPos.geographic();
req.position(Core::GeoPosition(pos.x(), pos.y(), 0.0));
INFO_LOG() << " setSimulatedPositionRequest ...";
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...";
m_replyError = true;
m_ppmFtc->setSimulatedPositionRequest(req, this);
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
}
}
@@ -808,14 +808,14 @@ void ModuleTestExplosionCluster::setupParticipants()
QString prop = QString(QStringLiteral("{\"angle\":0,\"distance\":25,\"distanceSets\":{\"Aufgelockert\":50,\"Geschlossen\":25},\"geometry\":\"line\"}"));
req_SSPF.formation( prop.toStdString() );
INFO_LOG() << " SetSimulatedParticipantFormation ... req = " << req_SSPF ;
INFO_LOG(m_logger) << " SetSimulatedParticipantFormation ... req = " << req_SSPF ;
m_replyError = true;
m_ppmFtc->setSimulatedParticipantFormationRequest(req_SSPF, this);
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
}
}
@@ -832,18 +832,18 @@ void ModuleTestExplosionCluster::setupParticipants()
QString prop = QString(QStringLiteral("{\"angle\":0,\"distance\":25,\"distanceSets\":{\"Aufgelockert\":50,\"Geschlossen\":25},\"geometry\":\"line\"}"));
req_SSPF.formation( prop.toStdString() );
INFO_LOG() << " SetSimulatedParticipantFormation ... req = " << req_SSPF ;
INFO_LOG(m_logger) << " SetSimulatedParticipantFormation ... req = " << req_SSPF ;
m_replyError = true;
m_ppmFtc->setSimulatedParticipantFormationRequest(req_SSPF, this);
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
}
}
INFO_LOG() << " setSimulatedPositionRequest ...DONE";
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...DONE";
}
bool ModuleTestExplosionCluster::checkParticipant_5()
@@ -852,7 +852,7 @@ bool ModuleTestExplosionCluster::checkParticipant_5()
const int partId = 5;
const ParticipantManagement::ParticipantPosition &pos = m_ppmDtc->participantPosition(partId);
QString mgrsStr = LtsCoordTrans::mgrsFromGeographic(pos.pos().lon(), pos.pos().lat());
INFO_LOG() << " for partId = '" << partId << "', we got position: " << mgrsStr;
INFO_LOG(m_logger) << " for partId = '" << partId << "', we got position: " << mgrsStr;
return mgrsStr == QStringLiteral("32U PD 76900 18000");
}
@@ -863,7 +863,7 @@ bool ModuleTestExplosionCluster::checkParticipant_6()
const int partId = 6;
const ParticipantManagement::ParticipantPosition &pos = m_ppmDtc->participantPosition(partId);
QString mgrsStr = LtsCoordTrans::mgrsFromGeographic(pos.pos().lon(), pos.pos().lat());
INFO_LOG() << " for partId = '" << partId << "', we got position: " << mgrsStr;
INFO_LOG(m_logger) << " for partId = '" << partId << "', we got position: " << mgrsStr;
return mgrsStr == QStringLiteral("32U PD 76000 19000");
}
@@ -877,12 +877,12 @@ bool ModuleTestExplosionCluster::checkParticipant_89()
const LtsUtils::QPoint3D &centerCoordGeo = Polygons::calculateFiringUnitCenterNonRecursive(m_ppmDtc, partId, singlePositionsOut_unused, m_logger);
if (centerCoordGeo.isNull() || std::isnan(centerCoordGeo.x()))
{
WARNING_LOG() << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
WARNING_LOG(m_logger) << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
return false;
}
QString mgrsStr = LtsCoordTrans::mgrsFromGeographic(centerCoordGeo.x(), centerCoordGeo.y());
INFO_LOG() << " for unit with partId = '" << partId << "', we got position: " << mgrsStr;
INFO_LOG(m_logger) << " for unit with partId = '" << partId << "', we got position: " << mgrsStr;
return mgrsStr == QStringLiteral("32U PD 50000 18000");
}
@@ -896,12 +896,12 @@ bool ModuleTestExplosionCluster::checkParticipant_99()
const LtsUtils::QPoint3D &centerCoordGeo = Polygons::calculateFiringUnitCenterNonRecursive(m_ppmDtc, partId, singlePositionsOut_unused, m_logger);
if (centerCoordGeo.isNull() || std::isnan(centerCoordGeo.x()))
{
WARNING_LOG() << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
WARNING_LOG(m_logger) << Q_FUNC_INFO << " calculateFiringUnitCenterNonRecursive failed, partId = " << partId;
return false;
}
QString mgrsStr = LtsCoordTrans::mgrsFromGeographic(centerCoordGeo.x(), centerCoordGeo.y());
INFO_LOG() << " for unit with partId = '" << partId << "', we got position: " << mgrsStr;
INFO_LOG(m_logger) << " for unit with partId = '" << partId << "', we got position: " << mgrsStr;
return mgrsStr == QStringLiteral("32U PD 01000 18000");
}
@@ -954,7 +954,7 @@ void ModuleTestExplosionCluster::resetBldgs()
for (int bldgId : std::as_const(bldgIds))
{
const ProjectDataManagement::VulnerabilityState& bldgState = m_bldDtc->buildingState(bldgId).vulnerabilityState();
INFO_LOG() << "resetBldgs: bldgId " << bldgId
INFO_LOG(m_logger) << "resetBldgs: bldgId " << bldgId
<< ", state= " << bldgState
<< ", bldgName= " << m_bldgIdToName[bldgId];
QVERIFY2(bldgState.underlying()==ProjectDataManagement::VulnerabilityState_def::CombatReady, "ERROR, bldgState failed!!");
@@ -1016,14 +1016,14 @@ void ModuleTestExplosionCluster::initTestCase()
QVERIFY2(bInit, "ERROR, ddsConnector.init failed!!");
if (!bInit)
{
ERROR_LOG() << " ERROR, ddsConnector.init failed!!";
ERROR_LOG(m_logger) << " ERROR, ddsConnector.init failed!!";
return;
}
INFO_LOG() << " ddsConnector.init successfull";
INFO_LOG(m_logger) << " ddsConnector.init successfull";
// cmd
m_ddsConnector->initPublisherSubscriber();
INFO_LOG() << " ddsConnector.initPublisherSubscriber done";
INFO_LOG(m_logger) << " ddsConnector.initPublisherSubscriber done";
//
// Aes
@@ -1215,16 +1215,16 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_00()
double rot = 0;
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
rot = 1;
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
rot = 30;
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
rot = 60;
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
rot = -30;
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " rot " << rot << ", rotSfmOrg " << compassToMathAngleForSfm(rot) << ", rotSfmPlus90 " << compassToMathAngleForSfm(rot+90);
}
void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
@@ -1259,7 +1259,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
QVERIFY2(mhPointsRef.size() == 1, "ERROR, mhPoints().size() failed!!");
const LtsCoordTrans::UtmCoordinate &mhpUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(mhPointsRef.front().lon(), mhPointsRef.front().lat());
DEBUG_LOG() << " TNE VERIFICATION: mhpUtm = " << mhpUtm.mgrs();
DEBUG_LOG(m_logger) << " TNE VERIFICATION: mhpUtm = " << mhpUtm.mgrs();
QVERIFY2(distanceMeter(mhPointsRef.front(), LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32U MD 97000 78000"))) < 1, "ERROR, mhPointsRef failed!!");
//
@@ -1269,19 +1269,19 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
const int simId = m_data.id();
AreaEffectSimulation::AesItemView itemView;
DEBUG_LOG() << " TNE VERIFICATION: simId = " << simId;
DEBUG_LOG(m_logger) << " TNE VERIFICATION: simId = " << simId;
const bool bFound = m_aesDtc->aesItemViewFromEntityId(simId, AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions, itemView);
QVERIFY2(bFound, "ERROR,aesItemViewFromEntityId failed!!");
QVERIFY2(itemView.aesItemId() == simId, "ERROR,aesItemViewFromEntityId failed!!");
INFO_LOG() << " ddsConnector.initPublisherSubscriber done";
INFO_LOG(m_logger) << " ddsConnector.initPublisherSubscriber done";
const double rot = m_data.area().rotation();
const double rotSfmOrg = compassToMathAngleForSfm(rot);
const double rotSfmPlus90 = compassToMathAngleForSfm(rot+90);
INFO_LOG() << " TNE VERIFICATION: CHECK:"
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:"
<< " randomNumber = ????????"
<< ", width=" << m_data.area().width()
<< ", height=" << m_data.area().height()
@@ -1295,7 +1295,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_01()
for (const Core::GeoPosition &geoCoord : std::as_const(formRef))
{
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat());
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
}
size_t i = 0;
@@ -1358,7 +1358,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_02()
QVERIFY2(mhPointsRef.size() == 1, "ERROR, mhPoints().size() failed!!");
const LtsCoordTrans::UtmCoordinate &mhpUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(mhPointsRef.front().lon(), mhPointsRef.front().lat());
DEBUG_LOG() << " TNE VERIFICATION: mhpUtm = " << mhpUtm.mgrs();
DEBUG_LOG(m_logger) << " TNE VERIFICATION: mhpUtm = " << mhpUtm.mgrs();
QVERIFY2(distanceMeter(mhPointsRef.front(), LtsCoordTrans::UtmCoordinate::fromMgrs(QStringLiteral("32U MD 97000 78000"))) < 1, "ERROR, mhPointsRef failed!!");
//
@@ -1368,19 +1368,19 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_02()
const int simId = m_data.id();
AreaEffectSimulation::AesItemView itemView;
DEBUG_LOG() << " TNE VERIFICATION: simId = " << simId;
DEBUG_LOG(m_logger) << " TNE VERIFICATION: simId = " << simId;
const bool bFound = m_aesDtc->aesItemViewFromEntityId(simId, AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions, itemView);
QVERIFY2(bFound, "ERROR,aesItemViewFromEntityId failed!!");
QVERIFY2(itemView.aesItemId() == simId, "ERROR,aesItemViewFromEntityId failed!!");
INFO_LOG() << " ddsConnector.initPublisherSubscriber done";
INFO_LOG(m_logger) << " ddsConnector.initPublisherSubscriber done";
const double rot = m_data.area().rotation();
const double rotSfmOrg = compassToMathAngleForSfm(rot);
const double rotSfmPlus90 = compassToMathAngleForSfm(rot+90);
INFO_LOG() << " TNE VERIFICATION: CHECK:"
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:"
<< " randomNumber = ????????"
<< ", width=" << m_data.area().width()
<< ", height=" << m_data.area().height()
@@ -1394,7 +1394,7 @@ void ModuleTestExplosionCluster::test_TneVerificationBremen_02()
for (const Core::GeoPosition &geoCoord : std::as_const(formRef))
{
const LtsCoordTrans::UtmCoordinate &utm = LtsCoordTrans::UtmCoordinate::fromGeographic(geoCoord.lon(), geoCoord.lat());
INFO_LOG() << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
INFO_LOG(m_logger) << " TNE VERIFICATION: CHECK:" << " utm: " << utm.mgrs() << ", item=" << geoCoord;
}
size_t i = 0;
@@ -1960,14 +1960,14 @@ void ModuleTestExplosionCluster::test_remove_effect_start()
// expected condition:
if (!waitForData([this]() { return m_replyError == false; }, 1))
{
ERROR_LOG() << "Error on request";
ERROR_LOG(m_logger) << "Error on request";
return;
}
INFO_LOG() << Q_FUNC_INFO << " waiting for EsPrepared...";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting for EsPrepared...";
if (!waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsPrepared;}, 2))
{
ERROR_LOG() << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id();
ERROR_LOG(m_logger) << "Timeout waiting for EsPrepared of explosion cluster with id " << m_data.id();
return;
}
@@ -1991,15 +1991,15 @@ void ModuleTestExplosionCluster::test_remove_effect_start()
}
INFO_LOG() << Q_FUNC_INFO << " waiting to make sure, that next step is never reached:";
INFO_LOG(m_logger) << Q_FUNC_INFO << " waiting to make sure, that next step is never reached:";
if (waitForData([this]() { return m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated;}, 60))
{
ERROR_LOG() << "Next step is accidentically reached of explosion cluster with id " << m_data.id();
ERROR_LOG(m_logger) << "Next step is accidentically reached of explosion cluster with id " << m_data.id();
QVERIFY2(false, "ERROR, exit");
return;
}
INFO_LOG() << Q_FUNC_INFO << " object effectState: " << m_data.effectStateId();
INFO_LOG(m_logger) << Q_FUNC_INFO << " object effectState: " << m_data.effectStateId();
QVERIFY2(m_data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsCreated, "ERROR, ExplosionCluster in wrong state");
dumpCnt();
@@ -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() << Q_FUNC_INFO << " requested impact position = " << LtsCoordTrans::UtmCoordinate::fromGeographic(impactPointF).mgrs();
INFO_LOG(m_logger) << Q_FUNC_INFO << " requested impact position = " << LtsCoordTrans::UtmCoordinate::fromGeographic(impactPointF).mgrs();
request.chargeTypeId(371);
request.externalId(815);
@@ -2701,9 +2701,9 @@ void ModuleTestExplosionCluster::cleanupTestCase()
// finish last (dds) calls:
waitForData([]() { return false; }, 10);
INFO_LOG() << " ddsConnector destroy...";
INFO_LOG(m_logger) << " ddsConnector destroy...";
m_ddsConnector.reset();
INFO_LOG() << " ddsConnector destroy...DONE";
INFO_LOG(m_logger) << " ddsConnector destroy...DONE";
}
@@ -59,6 +59,8 @@ 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;