Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+67
-67
@@ -112,10 +112,10 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
// NASAT, MIDAS, AirSupport
|
||||
// Der explizite HandlerAirSupport wird gestrichen.
|
||||
// Der HandlerExplosions übernimmt die Aufgaben mit, da quasi identisch!!
|
||||
// if (m_ddsHandler->dtcPdm()->gearClassFromChargeTypeId(data.chargeTypeId()) == ProjectDataManagement::GearClass_def::AirSupport)
|
||||
// if (m_ddsHandler->dtcPdm()->gearClassFromChargeTypeId(data.chargeTypeId()) == ProjectDataManagement::GearClass::AirSupport)
|
||||
// return;
|
||||
|
||||
static const QVector<AreaEffectSimulation::AesType> validAesTypes = {AesType_def::AtEffectCluster, AesType_def::AtExplosionAreaSingleExplosions, AesType_def::AtExplosionSingle, AesType_def::AtExplosionCluster};
|
||||
static const QVector<AreaEffectSimulation::AesType> validAesTypes = {AesType::AtEffectCluster, AesType::AtExplosionAreaSingleExplosions, AesType::AtExplosionSingle, AesType::AtExplosionCluster};
|
||||
if (!validAesTypes.contains(data.aesTypeId()))
|
||||
return;
|
||||
|
||||
@@ -137,7 +137,7 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
{
|
||||
const AreaEffectSimulation::ExplosionSingle &explosionSingle = m_ddsHandler->dtcAes()->explosionSingle(aesItemId);
|
||||
isCentral = explosionSingle.isCentral();
|
||||
@@ -206,17 +206,17 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsUnknown:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsError:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsUnknown:
|
||||
case AreaEffectSimulation::AesEffectState::EsError:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " remove aesItemId=" << data.aesItemId();
|
||||
// do some cleanup:
|
||||
m_handledImpactsStorage.removeAesItem(aesItemId);
|
||||
Q_FALLTHROUGH();
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPaused:
|
||||
case AreaEffectSimulation::AesEffectState::EsPaused:
|
||||
{
|
||||
// Man kann den m_enteredHazardDistanceStore nutzen.
|
||||
// Und allen darin für dieses area/aesItemView gespeicherten participants
|
||||
@@ -245,7 +245,7 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
|
||||
|
||||
// cleanup:
|
||||
if (data.effectStateId() != AreaEffectSimulation::AesEffectState_def::EsPaused)
|
||||
if (data.effectStateId() != AreaEffectSimulation::AesEffectState::EsPaused)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Expired, remove aesItemId=" << aesItemId
|
||||
<< ", m_aesItemViewsUtm.remove(" << aesItemId << ")";
|
||||
@@ -257,9 +257,9 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
}
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsFired:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsFired:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId()
|
||||
<< " aesItemId=" << aesItemId
|
||||
@@ -274,9 +274,9 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
// a) Aiv changes to EsActivated or
|
||||
// b) Effects ?
|
||||
// So be prepared and calculate hazardDistanceForm already at EsPrepared
|
||||
if (aesTypeId == AreaEffectSimulation::AesType_def::AtExplosionCluster || aesTypeId == AreaEffectSimulation::AesType_def::AtEffectCluster)
|
||||
if (aesTypeId == AreaEffectSimulation::AesType::AtExplosionCluster || aesTypeId == AreaEffectSimulation::AesType::AtEffectCluster)
|
||||
{
|
||||
// useHazardDistance = (aesTypeId == AreaEffectSimulation::AesType_def::AtExplosionCluster);
|
||||
// useHazardDistance = (aesTypeId == AreaEffectSimulation::AesType::AtExplosionCluster);
|
||||
|
||||
const double hazardDistance = m_ddsHandler->dtcPdm()->hazardDistance(data.chargeStruct().chargeTypeId(),
|
||||
data.chargeStruct().igniterTypeId(),
|
||||
@@ -288,8 +288,8 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
aesItemViewUtm.hazardDistanceForm = ExpandPolygon::bufferUtmPolygon(aesItemViewUtm.form, aesItemViewUtm.zone, hazardDistance);
|
||||
}
|
||||
|
||||
if ((aesTypeId == AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions) ||
|
||||
(aesTypeId == AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions))
|
||||
if ((aesTypeId == AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions) ||
|
||||
(aesTypeId == AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions))
|
||||
m_aesItemViewsImpactsUtm.insert(aesItemId, aesItemViewUtm);
|
||||
else
|
||||
{
|
||||
@@ -318,8 +318,8 @@ void HandlerExplosions::onAesItemViewChanged(const AreaEffectSimulation::AesItem
|
||||
} // if (aesItemViewUtm.effectStart == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState::EsReceived:
|
||||
break;
|
||||
} // switch
|
||||
} // END onAesItemViewChanged
|
||||
@@ -334,10 +334,10 @@ void HandlerExplosions::onTriggeredImpactsChanged(const AreaEffectSimulation::Tr
|
||||
<< " bitfield().size=" << data.bitfield().size();
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions:
|
||||
// explosion at the position of participant
|
||||
calculateImpacts(data);
|
||||
break;
|
||||
@@ -363,7 +363,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "pPos.participantId=" << pPos.participantId();
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "pPos.vulnerabilityState=" << pPos.vulnerabilityState;
|
||||
if (pPos.insideBuilding())
|
||||
@@ -392,7 +392,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
requestTab.chargeTypeId(data.chargeTypeId());
|
||||
//default
|
||||
requestTab.aesId(0);
|
||||
requestTab.eventType(ProjectDataManagement::EventType_def::FireEvent);
|
||||
requestTab.eventType(ProjectDataManagement::EventType::FireEvent);
|
||||
//
|
||||
if (data.originatorTypeId() == ProjectDataManagement::StateChangeOriginator::Participant)
|
||||
{
|
||||
@@ -414,7 +414,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
else if (data.originatorTypeId() == ProjectDataManagement::StateChangeOriginator::AreaEffectSimulation)
|
||||
{
|
||||
requestTab.aesId(data.originatorId());
|
||||
requestTab.eventType(ProjectDataManagement::EventType_def::ExplosionCluster);
|
||||
requestTab.eventType(ProjectDataManagement::EventType::ExplosionCluster);
|
||||
}
|
||||
requestTab.remainEffectPercent(remainEffectPercent);
|
||||
requestTab.position(tabPosition);
|
||||
@@ -514,7 +514,7 @@ void HandlerExplosions::onExplosionSingleChanged(const AreaEffectSimulation::Exp
|
||||
|
||||
DEBUG_LOG(m_logger) << "onExplosionSingleChanged 1";
|
||||
|
||||
if (data.effectStateId() != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (data.effectStateId() != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "onExplosionSingleChanged"
|
||||
@@ -560,7 +560,7 @@ void HandlerExplosions::onExplosionSingleChanged(const AreaEffectSimulation::Exp
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "pPos.participantId=" << pPos.participantId();
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "pPos.vulnerabilityState=" << pPos.vulnerabilityState;
|
||||
if (pPos.insideBuilding())
|
||||
@@ -592,7 +592,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
Q_UNUSED(modType);
|
||||
|
||||
// Until now (04/2024) AreaEffectSimulation::Effects is used at ExplosionCluster only:
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
|
||||
return;
|
||||
|
||||
// older then 10sec? ignore
|
||||
@@ -649,7 +649,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
for (const AreaEffectSimulation::SingleEffect &se : qAsConst(singleEffectsRef))
|
||||
{
|
||||
++curSeIndex;
|
||||
if (se.singleEffectState() != AreaEffectSimulation::AesSingleEffectState_def::SesTriggered)
|
||||
if (se.singleEffectState() != AreaEffectSimulation::AesSingleEffectState::SesTriggered)
|
||||
continue;
|
||||
|
||||
// compare current triggered idx with triggered idx of the past
|
||||
@@ -672,7 +672,7 @@ void HandlerExplosions::onEffectsChanged(const AreaEffectSimulation::Effects &ef
|
||||
const auto &participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : qAsConst(participantPositions))
|
||||
{
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
@@ -739,7 +739,7 @@ int HandlerExplosions::checkPartEnterLeaveArea(AES_ITEM_VIEW_UTM_CONST_ITER curr
|
||||
const CentralEffectSimulation::AesItemViewUtm &curAivUtmArea = *currentAreaIt;
|
||||
|
||||
// check aiv:
|
||||
if (curAivUtmArea.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (curAivUtmArea.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
continue;
|
||||
if (!curAivUtmArea.hasHazardDistance())
|
||||
continue;
|
||||
@@ -873,9 +873,9 @@ bool HandlerExplosions::inBoundingBoxCheck(const CentralEffectSimulation::AesIte
|
||||
DEBUG_LOG(m_logger) << "inBoundingBoxCheck 1"
|
||||
<< ", aesItemId=" << itemViewUtm.aesItemId
|
||||
<< ", effectStateId=" << itemViewUtm.effectStateId;
|
||||
if ((itemViewUtm.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated) &&
|
||||
(itemViewUtm.effectStateId != AreaEffectSimulation::AesEffectState_def::EsPrepared) &&
|
||||
(itemViewUtm.effectStateId != AreaEffectSimulation::AesEffectState_def::EsFired))
|
||||
if ((itemViewUtm.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated) &&
|
||||
(itemViewUtm.effectStateId != AreaEffectSimulation::AesEffectState::EsPrepared) &&
|
||||
(itemViewUtm.effectStateId != AreaEffectSimulation::AesEffectState::EsFired))
|
||||
return false;
|
||||
DEBUG_LOG(m_logger) << "inBoundingBoxCheck 2";
|
||||
|
||||
@@ -961,12 +961,12 @@ void HandlerExplosions::calculateSmartExplosion(const int32_t aesItemId,
|
||||
<< " typeClass=" << typeClass;
|
||||
|
||||
// Only send, if Any Participant is in Smart-Range (save Tetra load)
|
||||
if (!bHumanFound && typeClass == ParticipantManagement::TypeClass_def::Human)
|
||||
if (!bHumanFound && typeClass == ParticipantManagement::TypeClass::Human)
|
||||
bHumanFound = inCircle(impactPos, impactRadius, participantPosUtmPoint);
|
||||
|
||||
if (typeClass != ParticipantManagement::TypeClass_def::GroundVehicle &&
|
||||
typeClass != ParticipantManagement::TypeClass_def::VehicleWithGear &&
|
||||
typeClass != ParticipantManagement::TypeClass_def::WeaponSystem)
|
||||
if (typeClass != ParticipantManagement::TypeClass::GroundVehicle &&
|
||||
typeClass != ParticipantManagement::TypeClass::VehicleWithGear &&
|
||||
typeClass != ParticipantManagement::TypeClass::WeaponSystem)
|
||||
continue;
|
||||
|
||||
DEBUG_LOG(m_logger) << "participantPosition.timestamp =" << participantPosition.sampleTime()
|
||||
@@ -1007,10 +1007,10 @@ void HandlerExplosions::calculateSmartExplosion(const int32_t aesItemId,
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "size=1";
|
||||
// send two single fire to the same vehicle
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, impactTime , 100, ProjectDataManagement::EventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, impactTime + 1000, 100, ProjectDataManagement::EventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, impactTime , 100, ProjectDataManagement::EventType::HitEffectSimulation); // 100 Percent
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, impactTime + 1000, 100, ProjectDataManagement::EventType::HitEffectSimulation); // 100 Percent
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, ProjectDataManagement::EventType::HitEffectSimulation);
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, ProjectDataManagement::EventType::HitEffectSimulation);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1024,10 +1024,10 @@ void HandlerExplosions::calculateSmartExplosion(const int32_t aesItemId,
|
||||
};
|
||||
std::sort(vehiclesInSmartExplosion.begin(), vehiclesInSmartExplosion.end(), mapSortLessThan);
|
||||
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.at(0).participantPosition, impactTime, 100, ProjectDataManagement::EventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.at(1).participantPosition, impactTime, 100, ProjectDataManagement::EventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.at(0).participantPosition, ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.at(1).participantPosition, ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.at(0).participantPosition, impactTime, 100, ProjectDataManagement::EventType::HitEffectSimulation); // 100 Percent
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.at(1).participantPosition, impactTime, 100, ProjectDataManagement::EventType::HitEffectSimulation); // 100 Percent
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.at(0).participantPosition, ProjectDataManagement::EventType::HitEffectSimulation);
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.at(1).participantPosition, ProjectDataManagement::EventType::HitEffectSimulation);
|
||||
|
||||
}
|
||||
} // calculateSmartExplosion
|
||||
@@ -1050,8 +1050,8 @@ void HandlerExplosions::calculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
|
||||
//CentralEffectSimulation::AesItemViewUtm aesItemViewUtm = m_aesItemViewsImpactsUtm.value(static_cast<int>(data.aesItemId()));
|
||||
CentralEffectSimulation::AesItemViewUtm aesItemViewUtm;
|
||||
if ((data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
|
||||
|| (data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions))
|
||||
if ((data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
|
||||
|| (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions))
|
||||
aesItemViewUtm = m_aesItemViewsImpactsUtm.value(static_cast<int>(data.aesItemId()));
|
||||
else
|
||||
aesItemViewUtm = m_aesItemViewsUtm.value(static_cast<int>(data.aesItemId()));
|
||||
@@ -1095,7 +1095,7 @@ void HandlerExplosions::calculateImpacts(const AreaEffectSimulation::TriggeredIm
|
||||
if (m_handlerParticipant->isOutdated(pPos)) // Participant Position is not valid Todo Magic Number
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "pPos.participantId=" << pPos.participantId();
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
DEBUG_LOG(m_logger) << "pPos.vulnerabilityState=" << pPos.vulnerabilityState;
|
||||
if (pPos.insideBuilding())
|
||||
@@ -1158,7 +1158,7 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae
|
||||
|
||||
// get radius of munition
|
||||
const ProjectDataManagement::GearClass &gearClass = m_ddsHandler->dtcPdm()->gearClassFromChargeTypeId(itemView.chargeStruct.chargeTypeId());
|
||||
const bool bIsAirSupport = (gearClass.underlying() == ProjectDataManagement::GearClass_def::AirSupport);
|
||||
const bool bIsAirSupport = (gearClass.underlying() == ProjectDataManagement::GearClass::AirSupport);
|
||||
|
||||
const QVector<double> &rangesInMeter = chargeRanges(itemView.chargeStruct);
|
||||
DEBUG_LOG(m_logger) << "calculateImpactsEffect" << " chargeRanges:"
|
||||
@@ -1197,7 +1197,7 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae
|
||||
//
|
||||
// 1 range -> typical explosionCluster
|
||||
// == impactRadius
|
||||
// 3 ranges -> typical explosionCluster with chargeTypeId of GearClass_def::AirSupport
|
||||
// 3 ranges -> typical explosionCluster with chargeTypeId of GearClass::AirSupport
|
||||
// == lethalRadius, nonLethalRadius, hazardDistance
|
||||
//
|
||||
|
||||
@@ -1218,7 +1218,7 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae
|
||||
effect = 3; // hazardDistance
|
||||
DEBUG_LOG(m_logger) << "Sende CES Hit Request: participantId=" << participantId << ", RANGE=" << toString(mostInnerRange) << ", effect=" << effect;
|
||||
sendCesHitRequest(itemView, participantPosition, QDateTime::currentMSecsSinceEpoch(),
|
||||
effect, ProjectDataManagement::EventType_def::EnterHazardDistance);
|
||||
effect, ProjectDataManagement::EventType::EnterHazardDistance);
|
||||
}
|
||||
break;
|
||||
case RANGE::NON_LETHAL:
|
||||
@@ -1243,14 +1243,14 @@ void HandlerExplosions::calculateImpactsEffect(const CentralEffectSimulation::Ae
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Sende CES Hit Request: participantId=" << participantId << ", RANGE=" << toString(mostInnerRange) << ", effect=" << effect;
|
||||
sendCesHitRequest(itemView, participantPosition, QDateTime::currentMSecsSinceEpoch(),
|
||||
effect, ProjectDataManagement::EventType_def::AirSupport); // AirSupport for both: LETHAL_RADIUS, NONLETHAL_RADIUS
|
||||
effect, ProjectDataManagement::EventType::AirSupport); // AirSupport for both: LETHAL_RADIUS, NONLETHAL_RADIUS
|
||||
}
|
||||
#ifdef GUEZE_3136_IMPLEMENTED
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Sende CES Hit Request: participantId=" << participantId << ", RANGE=" << toString(mostInnerRange) << " (Verdeckung -> EnterHazardDistance)";
|
||||
sendCesHitRequest(itemView, participantPosition, QDateTime::currentMSecsSinceEpoch(),
|
||||
effect, ProjectDataManagement::EventType_def::EnterHazardDistance);
|
||||
effect, ProjectDataManagement::EventType::EnterHazardDistance);
|
||||
}
|
||||
#endif // GUEZE_3136_IMPLEMENTED
|
||||
} // case
|
||||
@@ -1410,7 +1410,7 @@ QVector<double> HandlerExplosions::chargeRanges(const AreaEffectSimulation::Char
|
||||
const ProjectDataManagement::GearClass &gearClass = m_ddsHandler->dtcPdm()->gearClassFromChargeTypeId(chargeStruct.chargeTypeId());
|
||||
DEBUG_LOG(m_logger) << "chargeTypeId = " << chargeStruct.chargeTypeId() << ", gearClass = " << gearClass;
|
||||
|
||||
if (gearClass.underlying() == ProjectDataManagement::GearClass_def::AirSupport)
|
||||
if (gearClass.underlying() == ProjectDataManagement::GearClass::AirSupport)
|
||||
{
|
||||
const double lethalRadius = m_ddsHandler->getLethalRadius(chargeStruct);
|
||||
const double nonLethalRadius = m_ddsHandler->getNonLethalRadius(chargeStruct);
|
||||
@@ -1523,7 +1523,7 @@ void HandlerExplosions::sendEffectTypeEvent(const CentralEffectSimulation::AesIt
|
||||
//effectTime >= 0 ? effectTime : participantPosition.sampleTime(),
|
||||
QDateTime::currentMSecsSinceEpoch(),
|
||||
ctasEffectType,
|
||||
ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
ProjectDataManagement::EventType::HitEffectSimulation);
|
||||
}
|
||||
|
||||
// Send via TAB-Proxy to battlefield
|
||||
@@ -1565,7 +1565,7 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
|
||||
return;
|
||||
}
|
||||
if (participantPosition.participantId() != 0 &&
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -1579,7 +1579,7 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
|
||||
#endif // ORIGINATOR_AT_SENDCESHITREQUEST
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantPosition.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantPosition.buildingId(),
|
||||
participantPosition.roomId());
|
||||
|
||||
@@ -1618,7 +1618,7 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
|
||||
DEBUG_LOG(m_logger) << "ftcTab->SendCesHitRequest: " << requestTab;
|
||||
m_ddsHandler->ftcTab()->sendCesHitRequest(requestTab, this);
|
||||
if (!m_ddsHandler->isSmartChargeType(itemView.chargeStruct))
|
||||
sendParticipantEvent(m_aesItemViewsUtm.value(itemView.aesItemId), participantPosition, ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
sendParticipantEvent(m_aesItemViewsUtm.value(itemView.aesItemId), participantPosition, ProjectDataManagement::EventType::HitEffectSimulation);
|
||||
}
|
||||
|
||||
double HandlerExplosions::getSquareDistance(const QPointF ¢erUtm, const QPointF &pointUtm)
|
||||
@@ -1645,13 +1645,13 @@ void HandlerExplosions::sendEnterHazardDistance(const int participantId, const i
|
||||
|
||||
m_enteredHazardDistanceStore.participantEnteringArea(participantId, aesItemId);
|
||||
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::EnterHazardDistance;
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType::EnterHazardDistance;
|
||||
sendCesHitRequest(m_aesItemViewsUtm.value(aesItemId),
|
||||
cesParticipantData,
|
||||
QDateTime::currentMSecsSinceEpoch(),
|
||||
ctasEffectType,
|
||||
eventType);
|
||||
sendParticipantEvent(m_aesItemViewsUtm.value(aesItemId), cesParticipantData, ProjectDataManagement::EventType_def::EnterHazardDistance);
|
||||
sendParticipantEvent(m_aesItemViewsUtm.value(aesItemId), cesParticipantData, ProjectDataManagement::EventType::EnterHazardDistance);
|
||||
}
|
||||
|
||||
void HandlerExplosions::sendLeaveHazardDistance(const int participantId, const int aesItemId, const int remaining)
|
||||
@@ -1671,8 +1671,8 @@ void HandlerExplosions::sendLeaveHazardDistance(const int participantId, const i
|
||||
cesParticipantData,
|
||||
QDateTime::currentMSecsSinceEpoch(),
|
||||
ctasEffectType,
|
||||
ProjectDataManagement::EventType_def::LeaveHazardDistance);
|
||||
sendParticipantEvent(itemView, cesParticipantData, ProjectDataManagement::EventType_def::LeaveHazardDistance);
|
||||
ProjectDataManagement::EventType::LeaveHazardDistance);
|
||||
sendParticipantEvent(itemView, cesParticipantData, ProjectDataManagement::EventType::LeaveHazardDistance);
|
||||
}
|
||||
|
||||
void HandlerExplosions::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &item,
|
||||
@@ -1682,10 +1682,10 @@ void HandlerExplosions::sendParticipantEvent(const CentralEffectSimulation::AesI
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId();
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << " sendParticipantEvent participantId=" << participantPosition.participantId();
|
||||
|
||||
|
||||
+3
-3
@@ -90,8 +90,8 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
{
|
||||
// order checks by effort:
|
||||
if ((modType == DataModification::eRemoved)
|
||||
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired)
|
||||
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated))
|
||||
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
|
||||
|| (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated))
|
||||
return;
|
||||
|
||||
if (!data.effectStart.is_set())
|
||||
@@ -101,7 +101,7 @@ void HandlerVulcano::onExplosionClusterChanged(const AreaEffectSimulation::Explo
|
||||
}
|
||||
|
||||
// Kriterium fuer NASAT/MIDAS
|
||||
if (m_ddsHandler->dtcPdm()->gearClassFromChargeTypeId(data.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass_def::AirSupport)
|
||||
if (m_ddsHandler->dtcPdm()->gearClassFromChargeTypeId(data.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass::AirSupport)
|
||||
return;
|
||||
|
||||
if (!m_ddsHandler->isLaserGuidable(data.chargeStruct()))
|
||||
|
||||
Reference in new issue
Block a user