Migrates AreaEffectSimulation to generated rtiddsgen API
Converts accessor calls to plain member access across aes service and plugin.
This commit is contained in:
102 files changed
+3307
-3313
No files matched your search
+196
-196
@@ -59,7 +59,7 @@ void ModuleTestLimits::testExplosionClusterCentral()
|
||||
for (int i = 0; i < m_maxExplosionsCentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_EC") + QStringLiteral("_CEN_") + QString::number(i);
|
||||
explosionCluster.name(name.toStdString());
|
||||
explosionCluster.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->explosionClusterModifyRequest(explosionCluster, this);
|
||||
if (i < m_maxExplosionsCentral)
|
||||
@@ -73,7 +73,7 @@ void ModuleTestLimits::testExplosionClusterCentral()
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ void ModuleTestLimits::testExplosionClusterDecentral()
|
||||
for (int i = 0; i < m_maxExplosionsDecentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_EC") + QStringLiteral("_DEC_") + QString::number(i);
|
||||
explosionCluster.name(name.toStdString());
|
||||
explosionCluster.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->explosionClusterModifyRequest(explosionCluster, this);
|
||||
if (i < m_maxExplosionsDecentral)
|
||||
@@ -106,7 +106,7 @@ void ModuleTestLimits::testExplosionClusterDecentral()
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if ((item.effectStateId() == AesEffectState::EsPrepared) && (item.isCentral() == false))
|
||||
if ((item.effectStateId == AesEffectState::EsPrepared) && (item.isCentral == false))
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ void ModuleTestLimits::testAirSupports()
|
||||
for (int i = 0; i < m_maxAirSupports + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_AS") + QStringLiteral("_CEN_") + QString::number(i);
|
||||
airSupport.name(name.toStdString());
|
||||
airSupport.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->explosionClusterModifyRequest(airSupport, this);
|
||||
if (i < m_maxAirSupports)
|
||||
@@ -142,7 +142,7 @@ void ModuleTestLimits::testAirSupports()
|
||||
const auto &items = m_aesDtc->explosionClusters();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass::AirSupport)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct.chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -158,11 +158,11 @@ void ModuleTestLimits::testMineAreaCentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto mineArea = getMa();
|
||||
mineArea.segments(m_segmentsCentral);
|
||||
mineArea.segments = m_segmentsCentral;
|
||||
for (int i = 0; i < m_maxMineAreasCentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_MA") + QStringLiteral("_CEN_") + QString::number(i);
|
||||
mineArea.name(name.toStdString());
|
||||
mineArea.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->mineAreaModifyRequest(mineArea, this);
|
||||
if (i < m_maxMineAreasCentral)
|
||||
@@ -175,7 +175,7 @@ void ModuleTestLimits::testMineAreaCentral()
|
||||
const auto &items = m_aesDtc->mineAreas();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if ((item.effectStateId() == AesEffectState::EsPrepared) && (item.isCentral() == true))
|
||||
if ((item.effectStateId == AesEffectState::EsPrepared) && (item.isCentral == true))
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -191,11 +191,11 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto mineArea = getMa();
|
||||
mineArea.segments(m_segmentsDecentral);
|
||||
mineArea.segments = m_segmentsDecentral;
|
||||
for (int i = 0; i < m_maxMineAreasDecentral - m_maxSafePzAbwSafe + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_MA") + QStringLiteral("_DEC_") + QString::number(i);
|
||||
mineArea.name(name.toStdString());
|
||||
mineArea.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->mineAreaModifyRequest(mineArea, this);
|
||||
if (i < (m_maxMineAreasDecentral - m_maxSafePzAbwSafe))
|
||||
@@ -209,7 +209,7 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
const auto &items = m_aesDtc->mineAreas();
|
||||
for (const auto &curMineArea : qAsConst(items))
|
||||
{
|
||||
if ((curMineArea.effectStateId() == AesEffectState::EsPrepared) && (curMineArea.isCentral() == false))
|
||||
if ((curMineArea.effectStateId == AesEffectState::EsPrepared) && (curMineArea.isCentral == false))
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -218,11 +218,11 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
// QVERIFY2(counter == m_maxMineAreasDecentral, "Too few mine areas");
|
||||
|
||||
|
||||
mineArea.layingProcedureType(AreaEffectSimulation::AesMaLayingProcedureType_def::LptArtillery);
|
||||
mineArea.layingProcedureType = AreaEffectSimulation::AesMaLayingProcedureType::LptArtillery;
|
||||
for (int i = 0; i < m_maxSafePzAbwSafe + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_MA_ART") + QStringLiteral("_DEC_") + QString::number(i);
|
||||
mineArea.name(name.toStdString());
|
||||
mineArea.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->mineAreaModifyRequest(mineArea, this);
|
||||
if (i < m_maxSafePzAbwSafe)
|
||||
@@ -236,9 +236,9 @@ void ModuleTestLimits::testMineAreaDecentral()
|
||||
const auto &mineAreas = m_aesDtc->mineAreas();
|
||||
for (const auto &item : qAsConst(mineAreas))
|
||||
{
|
||||
if ((item.effectStateId() == AesEffectState::EsPrepared) &&
|
||||
!item.isCentral() &&
|
||||
(item.layingProcedureType() == AreaEffectSimulation::AesMaLayingProcedureType_def::LptArtillery))
|
||||
if ((item.effectStateId == AesEffectState::EsPrepared) &&
|
||||
!item.isCentral &&
|
||||
(item.layingProcedureType == AreaEffectSimulation::AesMaLayingProcedureType::LptArtillery))
|
||||
++counter2;
|
||||
}
|
||||
|
||||
@@ -252,12 +252,12 @@ void ModuleTestLimits::testNBCCentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto nbContamination = getNBC();
|
||||
nbContamination.impactPosition(m_centralPoint);
|
||||
nbContamination.impactPosition = m_centralPoint;
|
||||
|
||||
for (int i = 0; i < m_maxNBCCentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_NBC") + QStringLiteral("_CEN_") + QString::number(i);
|
||||
nbContamination.name(name.toStdString());
|
||||
nbContamination.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->nContaminationModifyRequest(nbContamination, this);
|
||||
if (i < m_maxNBCCentral)
|
||||
@@ -272,7 +272,7 @@ void ModuleTestLimits::testNBCCentral()
|
||||
const auto &items = m_aesDtc->nContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -288,12 +288,12 @@ void ModuleTestLimits::testNBCDecentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto nbContamination = getNBC();
|
||||
nbContamination.impactPosition(m_decentralPoint);
|
||||
nbContamination.impactPosition = m_decentralPoint;
|
||||
|
||||
for (int i = 0; i < m_maxNBCDecentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_NBC") + QStringLiteral("_DEC_") + QString::number(i);
|
||||
nbContamination.name(name.toStdString());
|
||||
nbContamination.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->nContaminationModifyRequest(nbContamination, this);
|
||||
if (i < m_maxNBCDecentral)
|
||||
@@ -307,7 +307,7 @@ void ModuleTestLimits::testNBCDecentral()
|
||||
const auto &items = m_aesDtc->nContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == false)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@ void ModuleTestLimits::testOffRouteMines()
|
||||
for (int i = 0; i < m_maxOffRouteMines + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_ORM") + QStringLiteral("_") + QString::number(i);
|
||||
offRouteMine.name(name.toStdString());
|
||||
offRouteMine.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->offRouteMineModifyRequest(offRouteMine, this);
|
||||
if (i < m_maxOffRouteMines)
|
||||
@@ -339,7 +339,7 @@ void ModuleTestLimits::testOffRouteMines()
|
||||
const auto &items = m_aesDtc->offRouteMines();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -358,7 +358,7 @@ void ModuleTestLimits::testBoobyTraps()
|
||||
for (int i = 0; i < m_maxBoobyTraps + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_BT") + QStringLiteral("_") + QString::number(i);
|
||||
boobyTrap.name(name.toStdString());
|
||||
boobyTrap.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->boobyTrapModifyRequest(boobyTrap, this);
|
||||
if (i < m_maxBoobyTraps)
|
||||
@@ -371,7 +371,7 @@ void ModuleTestLimits::testBoobyTraps()
|
||||
const auto &items = m_aesDtc->boobyTraps();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -386,12 +386,12 @@ void ModuleTestLimits::testBCCCentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto bcContamination = getBCC();
|
||||
bcContamination.impactPosition(m_centralPoint);
|
||||
bcContamination.impactPosition = m_centralPoint;
|
||||
|
||||
for (int i = 0; i < m_maxNBCCentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_BCC") + QStringLiteral("_CEN_") + QString::number(i);
|
||||
bcContamination.name(name.toStdString());
|
||||
bcContamination.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->bCContaminationModifyRequest(bcContamination, this);
|
||||
if (i < m_maxNBCCentral)
|
||||
@@ -406,7 +406,7 @@ void ModuleTestLimits::testBCCCentral()
|
||||
const auto &items = m_aesDtc->bCContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -421,12 +421,12 @@ void ModuleTestLimits::testBCCDecentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto bcContamination = getBCC();
|
||||
bcContamination.impactPosition(m_decentralPoint);
|
||||
bcContamination.impactPosition = m_decentralPoint;
|
||||
|
||||
for (int i = 0; i < m_maxNBCDecentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_BCC") + QStringLiteral("_DEC_") + QString::number(i);
|
||||
bcContamination.name(name.toStdString());
|
||||
bcContamination.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->bCContaminationModifyRequest(bcContamination, this);
|
||||
if (i < m_maxNBCDecentral)
|
||||
@@ -441,7 +441,7 @@ void ModuleTestLimits::testBCCDecentral()
|
||||
const auto &items = m_aesDtc->bCContaminations();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == false)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -456,12 +456,12 @@ void ModuleTestLimits::testFADecentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto functionArea = getFA();
|
||||
functionArea.area().cornerBottomLeft(m_decentralPoint);
|
||||
functionArea.area.cornerBottomLeft = m_decentralPoint;
|
||||
|
||||
for (int i = 0; i < m_maxFunctionalAreaDec + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_FA") + QStringLiteral("_DEC_") + QString::number(i);
|
||||
functionArea.name(name.toStdString());
|
||||
functionArea.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->functionalAreaModifyRequest(functionArea, this);
|
||||
if (i < m_maxFunctionalAreaDec)
|
||||
@@ -476,7 +476,7 @@ void ModuleTestLimits::testFADecentral()
|
||||
const auto &items = m_aesDtc->functionalAreas();
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == false)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == false)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -492,12 +492,12 @@ void ModuleTestLimits::testFACentral()
|
||||
QVERIFY2(m_aesFtc, "ERROR, No Aes Ftc available!!");
|
||||
|
||||
auto functionArea = getFA();
|
||||
functionArea.area().cornerBottomLeft(m_centralPoint);
|
||||
functionArea.area.cornerBottomLeft = m_centralPoint;
|
||||
|
||||
for (int i = 0; i < m_maxFunctionalAreaCentral + s_offset; ++i)
|
||||
{
|
||||
QString name = QStringLiteral("TEST_FA") + QStringLiteral("_CEN_") + QString::number(i);
|
||||
functionArea.name(name.toStdString());
|
||||
functionArea.name = name.toStdString();
|
||||
QTest::qWait(50);
|
||||
int ret = m_aesFtc->functionalAreaModifyRequest(functionArea, this);
|
||||
if (i < m_maxFunctionalAreaCentral)
|
||||
@@ -513,7 +513,7 @@ void ModuleTestLimits::testFACentral()
|
||||
|
||||
for (const auto &item : qAsConst(items))
|
||||
{
|
||||
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() == true)
|
||||
if (item.effectStateId == AesEffectState::EsPrepared && item.isCentral == true)
|
||||
++counter;
|
||||
}
|
||||
|
||||
@@ -608,26 +608,26 @@ ExplosionClusterModifyRequest ModuleTestLimits::getEc(const Core::GeoPosition2D
|
||||
{
|
||||
|
||||
AreaEffectSimulation::ExplosionClusterModifyRequest eaReq;
|
||||
eaReq.id(0);
|
||||
eaReq.id = 0;
|
||||
|
||||
eaReq.effectStart((time(nullptr) + 30) * 1000); // msec
|
||||
eaReq.effectStart = (time(nullptr) + 30) * 1000; // msec
|
||||
|
||||
QString name(QStringLiteral("Test_EC"));
|
||||
eaReq.name(name.toStdString());
|
||||
eaReq.effectDuration(100000); // 10 seconds
|
||||
eaReq.effectStart(QDateTime::currentMSecsSinceEpoch() + 3000000000);
|
||||
eaReq.chargeStruct().chargeTypeId(s_ChargeTypeId1);
|
||||
eaReq.chargeStruct().igniterTypeId(s_IgniterTypeId);
|
||||
eaReq.name = name.toStdString();
|
||||
eaReq.effectDuration = 100000; // 10 seconds
|
||||
eaReq.effectStart = QDateTime::currentMSecsSinceEpoch() + 3000000000;
|
||||
eaReq.chargeStruct.chargeTypeId = s_ChargeTypeId1;
|
||||
eaReq.chargeStruct.igniterTypeId = s_IgniterTypeId;
|
||||
|
||||
eaReq.partyId(2);
|
||||
eaReq.participantId(6);
|
||||
eaReq.partyId = 2;
|
||||
eaReq.participantId = 6;
|
||||
|
||||
eaReq.mhpCount(4);
|
||||
eaReq.impactCount(4);
|
||||
eaReq.mhpCount = 4;
|
||||
eaReq.impactCount = 4;
|
||||
|
||||
eaReq.peakHeight(500);
|
||||
eaReq.peakHeight = 500;
|
||||
|
||||
eaReq.firePurposeId(1); // 1=Blenden, 2=Blenden mit IR,
|
||||
eaReq.firePurposeId = 1; // 1=Blenden, 2=Blenden mit IR,
|
||||
|
||||
const double height = 10;
|
||||
const double width = 20;
|
||||
@@ -635,15 +635,15 @@ ExplosionClusterModifyRequest ModuleTestLimits::getEc(const Core::GeoPosition2D
|
||||
|
||||
// NOTICE_LOG(m_logger) << "getEc: default SpecicalArea Bottom Left" << m_specialArea.boundingBoxBottomLeft();
|
||||
// eaReq.area().cornerBottomLeft(m_specialArea.boundingBoxBottomLeft());
|
||||
eaReq.area().cornerBottomLeft(cornerBottomLeft);
|
||||
eaReq.area().height(height);
|
||||
eaReq.area().width(width);
|
||||
eaReq.area().rotation(rot);
|
||||
eaReq.area.cornerBottomLeft = cornerBottomLeft;
|
||||
eaReq.area.height = height;
|
||||
eaReq.area.width = width;
|
||||
eaReq.area.rotation = rot;
|
||||
|
||||
eaReq.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry_def::EgArea);
|
||||
eaReq.tla(0); // aka zog / ZielOrtungsGenauigkeit
|
||||
eaReq.explosionGeometry = AreaEffectSimulation::AesExplosionGeometry::EgArea;
|
||||
eaReq.tla = 0; // aka zog / ZielOrtungsGenauigkeit
|
||||
|
||||
eaReq.externalId(0);
|
||||
eaReq.externalId = 0;
|
||||
|
||||
return eaReq;
|
||||
}
|
||||
@@ -651,26 +651,26 @@ ExplosionClusterModifyRequest ModuleTestLimits::getEc(const Core::GeoPosition2D
|
||||
ExplosionClusterModifyRequest ModuleTestLimits::getAs()
|
||||
{
|
||||
AreaEffectSimulation::ExplosionClusterModifyRequest eaReq;
|
||||
eaReq.id(0);
|
||||
eaReq.id = 0;
|
||||
|
||||
eaReq.effectStart((time(nullptr) + 30) * 1000); // msec
|
||||
eaReq.effectStart = (time(nullptr) + 30) * 1000; // msec
|
||||
|
||||
QString name(QStringLiteral("Test_EC"));
|
||||
eaReq.name(name.toStdString());
|
||||
eaReq.effectDuration(100000); // 10 seconds
|
||||
eaReq.effectStart(QDateTime::currentMSecsSinceEpoch() + 3000000000);
|
||||
eaReq.chargeStruct().chargeTypeId(450); //PGM GBU 31
|
||||
eaReq.chargeStruct().igniterTypeId(s_IgniterTypeId);
|
||||
eaReq.name = name.toStdString();
|
||||
eaReq.effectDuration = 100000; // 10 seconds
|
||||
eaReq.effectStart = QDateTime::currentMSecsSinceEpoch() + 3000000000;
|
||||
eaReq.chargeStruct.chargeTypeId = 450; //PGM GBU 31
|
||||
eaReq.chargeStruct.igniterTypeId = s_IgniterTypeId;
|
||||
|
||||
eaReq.partyId(2);
|
||||
eaReq.participantId(6);
|
||||
eaReq.partyId = 2;
|
||||
eaReq.participantId = 6;
|
||||
|
||||
eaReq.mhpCount(1);
|
||||
eaReq.impactCount(1);
|
||||
eaReq.mhpCount = 1;
|
||||
eaReq.impactCount = 1;
|
||||
|
||||
eaReq.peakHeight(500);
|
||||
eaReq.peakHeight = 500;
|
||||
|
||||
eaReq.firePurposeId(1); // 1=Blenden, 2=Blenden mit IR,
|
||||
eaReq.firePurposeId = 1; // 1=Blenden, 2=Blenden mit IR,
|
||||
|
||||
const double height = 10;
|
||||
const double width = 20;
|
||||
@@ -678,15 +678,15 @@ ExplosionClusterModifyRequest ModuleTestLimits::getAs()
|
||||
|
||||
// NOTICE_LOG(m_logger) << "getAs: Default is SpecialArea Bottom Left" << m_specialArea.boundingBoxBottomLeft();
|
||||
// eaReq.area().cornerBottomLeft(m_specialArea.boundingBoxBottomLeft());
|
||||
eaReq.area().cornerBottomLeft(m_centralPoint);
|
||||
eaReq.area().height(height);
|
||||
eaReq.area().width(width);
|
||||
eaReq.area().rotation(rot);
|
||||
eaReq.area.cornerBottomLeft = m_centralPoint;
|
||||
eaReq.area.height = height;
|
||||
eaReq.area.width = width;
|
||||
eaReq.area.rotation = rot;
|
||||
|
||||
eaReq.explosionGeometry(AreaEffectSimulation::AesExplosionGeometry_def::EgPoint); // AirSupport -> EgPoint
|
||||
eaReq.tla(0); // aka zog / ZielOrtungsGenauigkeit
|
||||
eaReq.explosionGeometry = AreaEffectSimulation::AesExplosionGeometry::EgPoint; // AirSupport -> EgPoint
|
||||
eaReq.tla = 0; // aka zog / ZielOrtungsGenauigkeit
|
||||
|
||||
eaReq.externalId(0);
|
||||
eaReq.externalId = 0;
|
||||
|
||||
return eaReq;
|
||||
}
|
||||
@@ -696,15 +696,15 @@ ExplosionAreaModifyRequest ModuleTestLimits::getEa()
|
||||
|
||||
auto ea = ExplosionAreaModifyRequest();
|
||||
ea.area(AreaEffectSimulation::Area(m_decentralPoint, 500, 600, 70));
|
||||
ea.name(QStringLiteral("Test_AE__").toStdString());
|
||||
ea.id(0);
|
||||
ea.cannonCount(10);
|
||||
ea.cannonRounds(10);
|
||||
ea.chargeTypeId(s_ChargeTypeId1);
|
||||
ea.effectDuration(400000);
|
||||
ea.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000);
|
||||
ea.partyId(2);
|
||||
ea.externalId(2);
|
||||
ea.name = QStringLiteral("Test_AE__").toStdString();
|
||||
ea.id = 0;
|
||||
ea.cannonCount = 10;
|
||||
ea.cannonRounds = 10;
|
||||
ea.chargeTypeId = s_ChargeTypeId1;
|
||||
ea.effectDuration = 400000;
|
||||
ea.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000;
|
||||
ea.partyId = 2;
|
||||
ea.externalId = 2;
|
||||
|
||||
return ea;
|
||||
}
|
||||
@@ -712,13 +712,13 @@ ExplosionAreaModifyRequest ModuleTestLimits::getEa()
|
||||
ExplosionSingleModifyRequest ModuleTestLimits::getEs()
|
||||
{
|
||||
auto es = ExplosionSingleModifyRequest();
|
||||
es.impactPosition(m_decentralPoint);
|
||||
es.name(QStringLiteral("Test_AE__").toStdString());
|
||||
es.id(0);
|
||||
es.chargeTypeId(s_ChargeTypeId1);
|
||||
es.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000);
|
||||
es.partyId(2);
|
||||
es.externalId(2);
|
||||
es.impactPosition = m_decentralPoint;
|
||||
es.name = QStringLiteral("Test_AE__").toStdString();
|
||||
es.id = 0;
|
||||
es.chargeTypeId = s_ChargeTypeId1;
|
||||
es.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000;
|
||||
es.partyId = 2;
|
||||
es.externalId = 2;
|
||||
|
||||
return es;
|
||||
}
|
||||
@@ -727,18 +727,18 @@ MineAreaModifyRequest ModuleTestLimits::getMa()
|
||||
{
|
||||
|
||||
auto ma = MineAreaModifyRequest();
|
||||
ma.id(0);
|
||||
ma.name(QStringLiteral("Test_MA_").toStdString());
|
||||
ma.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000);
|
||||
ma.effectDuration(400000);
|
||||
ma.density(0.5);
|
||||
ma.width(169.58);
|
||||
ma.partyId(2);
|
||||
ma.chargeStruct().chargeTypeId(216);
|
||||
ma.isCenterLine(false);
|
||||
ma.isLaidHidden(false);
|
||||
ma.distance(500.0);
|
||||
ma.layingProcedureType(AreaEffectSimulation::AesMaLayingProcedureType_def::LptPioneer);
|
||||
ma.id = 0;
|
||||
ma.name = QStringLiteral("Test_MA_").toStdString();
|
||||
ma.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000;
|
||||
ma.effectDuration = 400000;
|
||||
ma.density = 0.5;
|
||||
ma.width = 169.58;
|
||||
ma.partyId = 2;
|
||||
ma.chargeStruct.chargeTypeId = 216;
|
||||
ma.isCenterLine = false;
|
||||
ma.isLaidHidden = false;
|
||||
ma.distance = 500.0;
|
||||
ma.layingProcedureType = AreaEffectSimulation::AesMaLayingProcedureType::LptPioneer;
|
||||
return ma;
|
||||
|
||||
|
||||
@@ -747,20 +747,20 @@ MineAreaModifyRequest ModuleTestLimits::getMa()
|
||||
NContaminationModifyRequest ModuleTestLimits::getNBC()
|
||||
{
|
||||
auto nbc = NContaminationModifyRequest();
|
||||
nbc.id(0);
|
||||
nbc.name("Test_NBC_");
|
||||
nbc.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000); // msec
|
||||
nbc.effectDuration(10000); // 10 sec
|
||||
nbc.chargeTypeId(321);
|
||||
nbc.impactPosition(m_decentralPoint);
|
||||
nbc.borderLengthInner(1000); // 1km
|
||||
nbc.borderLengthOuter(2000); // 2km
|
||||
nbc.impactRadius(500); // 500m
|
||||
nbc.spanAngle(31);
|
||||
nbc.rotationAngle(57);
|
||||
nbc.detonationValue(1000); // kt, only cosmetical
|
||||
nbc.partyId(2);
|
||||
nbc.externalId(0);
|
||||
nbc.id = 0;
|
||||
nbc.name = "Test_NBC_";
|
||||
nbc.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000; // msec
|
||||
nbc.effectDuration = 10000; // 10 sec
|
||||
nbc.chargeTypeId = 321;
|
||||
nbc.impactPosition = m_decentralPoint;
|
||||
nbc.borderLengthInner = 1000; // 1km
|
||||
nbc.borderLengthOuter = 2000; // 2km
|
||||
nbc.impactRadius = 500; // 500m
|
||||
nbc.spanAngle = 31;
|
||||
nbc.rotationAngle = 57;
|
||||
nbc.detonationValue = 1000; // kt, only cosmetical
|
||||
nbc.partyId = 2;
|
||||
nbc.externalId = 0;
|
||||
return nbc;
|
||||
|
||||
}
|
||||
@@ -768,68 +768,68 @@ NContaminationModifyRequest ModuleTestLimits::getNBC()
|
||||
OffRouteMineModifyRequest ModuleTestLimits::getORM()
|
||||
{
|
||||
auto orm = OffRouteMineModifyRequest();
|
||||
orm.id(0);
|
||||
orm.effectStart(QDateTime::currentMSecsSinceEpoch() + 300000000); // msec
|
||||
orm.effectDuration(100000); // 10 sec
|
||||
orm.chargeTypeId(253);
|
||||
orm.name("Test_ORM_");
|
||||
orm.area().cornerBottomLeft(m_decentralPoint);
|
||||
orm.area().width(1000);//(20);
|
||||
orm.area().height(200);//(15);
|
||||
orm.area().rotation(0.0);//(20.5);
|
||||
orm.impactRadius(100); // 100m
|
||||
orm.partyId(2);
|
||||
orm.id = 0;
|
||||
orm.effectStart = QDateTime::currentMSecsSinceEpoch() + 300000000; // msec
|
||||
orm.effectDuration = 100000; // 10 sec
|
||||
orm.chargeTypeId = 253;
|
||||
orm.name = "Test_ORM_";
|
||||
orm.area.cornerBottomLeft = m_decentralPoint;
|
||||
orm.area.width = 1000;//(20);
|
||||
orm.area.height = 200;//(15);
|
||||
orm.area.rotation = 0.0;//(20.5);
|
||||
orm.impactRadius = 100; // 100m
|
||||
orm.partyId = 2;
|
||||
return orm;
|
||||
}
|
||||
|
||||
BoobyTrapModifyRequest ModuleTestLimits::getBT()
|
||||
{
|
||||
auto bt = BoobyTrapModifyRequest();
|
||||
bt.id(0);
|
||||
bt.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000); // msec
|
||||
bt.effectDuration(100000); // 10 sec
|
||||
bt.chargeTypeId(251);
|
||||
bt.name("Test_BT_");
|
||||
bt.impactPosition(m_decentralPoint);
|
||||
bt.centralAngle(90);
|
||||
bt.rotationAngle(120);
|
||||
bt.impactRadius(100); // 100m
|
||||
bt.triggerRadius(200);
|
||||
bt.partyId(2);
|
||||
bt.id = 0;
|
||||
bt.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000; // msec
|
||||
bt.effectDuration = 100000; // 10 sec
|
||||
bt.chargeTypeId = 251;
|
||||
bt.name = "Test_BT_";
|
||||
bt.impactPosition = m_decentralPoint;
|
||||
bt.centralAngle = 90;
|
||||
bt.rotationAngle = 120;
|
||||
bt.impactRadius = 100; // 100m
|
||||
bt.triggerRadius = 200;
|
||||
bt.partyId = 2;
|
||||
return bt;
|
||||
}
|
||||
|
||||
BCContaminationModifyRequest ModuleTestLimits::getBCC()
|
||||
{
|
||||
auto bcc = BCContaminationModifyRequest();
|
||||
bcc.id(0);
|
||||
bcc.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000); // msec
|
||||
bcc.effectDuration(100000); // 10 sec
|
||||
bcc.impactRadius(100); // 100m
|
||||
bcc.partyId(2);
|
||||
bcc.upperOffset(6.0);
|
||||
bcc.lowerOffset(-1000.0);
|
||||
bcc.impactPosition(m_decentralPoint);
|
||||
bcc.chargeTypeId(341);
|
||||
bcc.weatherSource(AesWeatherSource::AwsStatic);
|
||||
bcc.id = 0;
|
||||
bcc.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000; // msec
|
||||
bcc.effectDuration = 100000; // 10 sec
|
||||
bcc.impactRadius = 100; // 100m
|
||||
bcc.partyId = 2;
|
||||
bcc.upperOffset = 6.0;
|
||||
bcc.lowerOffset = -1000.0;
|
||||
bcc.impactPosition = m_decentralPoint;
|
||||
bcc.chargeTypeId = 341;
|
||||
bcc.weatherSource = AesWeatherSource::AwsStatic;
|
||||
return bcc;
|
||||
}
|
||||
|
||||
FunctionalAreaModifyRequest ModuleTestLimits::getFA()
|
||||
{
|
||||
auto fa = FunctionalAreaModifyRequest();
|
||||
fa.id(0);
|
||||
fa.effectStart(QDateTime::currentMSecsSinceEpoch() + 30000000);
|
||||
fa.effectDuration(100000);
|
||||
fa.id = 0;
|
||||
fa.effectStart = QDateTime::currentMSecsSinceEpoch() + 30000000;
|
||||
fa.effectDuration = 100000;
|
||||
fa.area(AreaEffectSimulation::Area(m_decentralPoint, 500, 600, 70));
|
||||
fa.chargeTypeId(311);
|
||||
fa.partyId(2);
|
||||
fa.deconMode(AreaEffectSimulation::AesOperatingMode::OmWaitingTime);
|
||||
fa.deconTime(200000);
|
||||
fa.maintMode(AreaEffectSimulation::AesOperatingMode::OmWaitingTime);
|
||||
fa.maintTime(200000);
|
||||
fa.medicMode(AreaEffectSimulation::AesOperatingMode::OmWaitingTime);
|
||||
fa.medicTime(200000);
|
||||
fa.chargeTypeId = 311;
|
||||
fa.partyId = 2;
|
||||
fa.deconMode = AreaEffectSimulation::AesOperatingMode::OmWaitingTime;
|
||||
fa.deconTime = 200000;
|
||||
fa.maintMode = AreaEffectSimulation::AesOperatingMode::OmWaitingTime;
|
||||
fa.maintTime = 200000;
|
||||
fa.medicMode = AreaEffectSimulation::AesOperatingMode::OmWaitingTime;
|
||||
fa.medicTime = 200000;
|
||||
return fa;
|
||||
|
||||
}
|
||||
@@ -837,9 +837,9 @@ FunctionalAreaModifyRequest ModuleTestLimits::getFA()
|
||||
TechnicalAreaModifyRequest ModuleTestLimits::getTA()
|
||||
{
|
||||
auto ta = TechnicalAreaModifyRequest();
|
||||
ta.id(0);
|
||||
ta.id = 0;
|
||||
ta.area(AreaEffectSimulation::Area(m_decentralPoint, 500, 600, 70));
|
||||
ta.type(AreaEffectSimulation::AesTechnicalAreaType::TatRestingAreaVehicle);
|
||||
ta.type = AreaEffectSimulation::AesTechnicalAreaType::TatRestingAreaVehicle;
|
||||
return ta;
|
||||
}
|
||||
|
||||
@@ -896,8 +896,8 @@ void ModuleTestLimits::initTestCase()
|
||||
std::cout << " waitForHistoricalDataExercise... Done" << std::endl;
|
||||
|
||||
const ExerciseManagement::Exercise &exercise = m_exmDtc->exercise(m_exerciseId);
|
||||
QVERIFY2(exercise.id() == m_exerciseId, "ERROR, exercise failed!!: ");
|
||||
m_traingAreaId = exercise.trainingAreaId();
|
||||
QVERIFY2(exercise.id == m_exerciseId, "ERROR, exercise failed!!: ");
|
||||
m_traingAreaId = exercise.trainingAreaId;
|
||||
|
||||
std::cout << " ExerciseManagement"
|
||||
<< ", m_traingAreaId = " << m_traingAreaId << std::endl;
|
||||
@@ -937,7 +937,7 @@ void ModuleTestLimits::initTestCase()
|
||||
m_ismDtc->waitForHistoricalDataSpecialArea(1000);
|
||||
|
||||
|
||||
if (m_exmDtc->exercise(m_exerciseId).trainingAreaId() == s_TraingAreaId_Altmark)
|
||||
if (m_exmDtc->exercise(m_exerciseId).trainingAreaId == s_TraingAreaId_Altmark)
|
||||
{
|
||||
m_centralPoint = m_centralAltmark;
|
||||
m_decentralPoint = m_decentralAltmark;
|
||||
@@ -1143,9 +1143,9 @@ void ModuleTestLimits::setupParticipant()
|
||||
|
||||
ParticipantManagement::SetSimulatedPosition req;
|
||||
|
||||
req.participantId(6); // according testDB
|
||||
req.onlyOutdatedParticipants(false);
|
||||
req.position(Core::GeoPosition(m_partPos.lon(), m_partPos.lat(), 0.0));
|
||||
req.participantId = 6; // according testDB
|
||||
req.onlyOutdatedParticipants = false;
|
||||
req.position(Core::GeoPosition(m_partPos.lon, m_partPos.lat, 0.0));
|
||||
|
||||
INFO_LOG(m_logger) << " setSimulatedPositionRequest ...";
|
||||
m_replyError = true;
|
||||
@@ -1169,10 +1169,10 @@ void ModuleTestLimits::setupCharges()
|
||||
{
|
||||
QVERIFY2(m_aesFtc, "ERROR, no m_aesFtc");
|
||||
ChargeAdministrationModifyRequest req;
|
||||
req.id(0);
|
||||
req.chargeTypeId(371);
|
||||
req.partyId(2);
|
||||
req.amount(9999999);
|
||||
req.id = 0;
|
||||
req.chargeTypeId = 371;
|
||||
req.partyId = 2;
|
||||
req.amount = 9999999;
|
||||
m_aesFtc->chargeAdministrationModifyRequest(req, this);
|
||||
|
||||
}
|
||||
@@ -1194,80 +1194,80 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
auto clusters = m_aesDtc->explosionClusters();
|
||||
for (auto cluster : qAsConst(clusters))
|
||||
{
|
||||
if (!sts.contains(cluster.effectStateId().underlying()))
|
||||
if (!sts.contains(cluster.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(cluster.id());
|
||||
removeReq.id = cluster.id;
|
||||
m_aesFtc->explosionClusterRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto nbcs = m_aesDtc->nContaminations();
|
||||
for (auto nbc : qAsConst(nbcs))
|
||||
{
|
||||
if (!sts.contains(nbc.effectStateId().underlying()))
|
||||
if (!sts.contains(nbc.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(nbc.id());
|
||||
removeReq.id = nbc.id;
|
||||
m_aesFtc->nContaminationRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto orms = m_aesDtc->offRouteMines();
|
||||
for (auto orm : qAsConst(orms))
|
||||
{
|
||||
if (!sts.contains(orm.effectStateId().underlying()))
|
||||
if (!sts.contains(orm.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(orm.id());
|
||||
removeReq.id = orm.id;
|
||||
m_aesFtc->offRouteMineRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto bts = m_aesDtc->boobyTraps();
|
||||
for (auto bt : qAsConst(bts))
|
||||
{
|
||||
if (!sts.contains(bt.effectStateId().underlying()))
|
||||
if (!sts.contains(bt.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(bt.id());
|
||||
removeReq.id = bt.id;
|
||||
m_aesFtc->boobyTrapRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto mas = m_aesDtc->mineAreas();
|
||||
for (auto ma : qAsConst(mas))
|
||||
{
|
||||
if (!sts.contains(ma.effectStateId().underlying()))
|
||||
if (!sts.contains(ma.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(ma.id());
|
||||
removeReq.id = ma.id;
|
||||
m_aesFtc->mineAreaRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto bccs = m_aesDtc->bCContaminations();
|
||||
for (auto bcc : qAsConst(bccs))
|
||||
{
|
||||
if (!sts.contains(bcc.effectStateId().underlying()))
|
||||
if (!sts.contains(bcc.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(bcc.id());
|
||||
removeReq.id = bcc.id;
|
||||
m_aesFtc->bCContaminationRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto fas = m_aesDtc->functionalAreas();
|
||||
for (auto fa : qAsConst(fas))
|
||||
{
|
||||
if (!sts.contains(fa.effectStateId().underlying()))
|
||||
if (!sts.contains(fa.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(fa.id());
|
||||
removeReq.id = fa.id;
|
||||
m_aesFtc->functionalAreaRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
auto tas = m_aesDtc->technicalAreas();
|
||||
for (auto ta : qAsConst(tas))
|
||||
{
|
||||
if (!sts.contains(ta.effectStateId().underlying()))
|
||||
if (!sts.contains(ta.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(ta.id());
|
||||
removeReq.id = ta.id;
|
||||
m_aesFtc->technicalAreaRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
@@ -1275,10 +1275,10 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
auto eas = m_aesDtc->explosionAreas();
|
||||
for (auto ea : qAsConst(eas))
|
||||
{
|
||||
if (!sts.contains(ea.effectStateId().underlying()))
|
||||
if (!sts.contains(ea.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(ea.id());
|
||||
removeReq.id = ea.id;
|
||||
m_aesFtc->explosionAreaRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
@@ -1286,10 +1286,10 @@ void ModuleTestLimits::deleteAesAreas()
|
||||
auto ess = m_aesDtc->explosionSingles();
|
||||
for (auto es : qAsConst(ess))
|
||||
{
|
||||
if (!sts.contains(es.effectStateId().underlying()))
|
||||
if (!sts.contains(es.effectStateId))
|
||||
{
|
||||
auto removeReq = Core::RemoveElementRequest();
|
||||
removeReq.id(es.id());
|
||||
removeReq.id = es.id;
|
||||
m_aesFtc->explosionSingleRemoveRequest(removeReq, this);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user