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
+6
-6
@@ -66,16 +66,16 @@ void HandlerArtillerieSound::onExplosionSingleChanged(const AreaEffectSimulation
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleState.remove(data.id());
|
||||
return;
|
||||
}
|
||||
// Only handle transitions from prepared or fired to activated
|
||||
if ((m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsPrepared ||
|
||||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if ((m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsPrepared ||
|
||||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
@@ -197,13 +197,13 @@ void HandlerArtillerieSound::onTechnicalAreaChanged(const AreaEffectSimulation::
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove TechnicalArea";
|
||||
m_technicalAreas.remove(data.id());
|
||||
return;
|
||||
}
|
||||
if (data.type() == AreaEffectSimulation::AesTechnicalAreaType_def::TatSoundZone)
|
||||
if (data.type() == AreaEffectSimulation::AesTechnicalAreaType::TatSoundZone)
|
||||
{
|
||||
int zone = -1;
|
||||
m_technicalAreas.insert(data.id(), data);
|
||||
|
||||
+16
-16
@@ -77,24 +77,24 @@ void HandlerParticipantBorderline::onBorderlineChanged(const AreaEffectSimulatio
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsFired:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState::EsFired:
|
||||
case AreaEffectSimulation::AesEffectState::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
BorderlineUtm borderline(data);
|
||||
DEBUG_LOG(m_logger) << "m_borderlines.insert id=" << data.id();
|
||||
m_borderlines.insert(data.id(), borderline);
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPaused:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsPaused:
|
||||
m_borderlines.remove(data.id());
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsUnknown:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsError:
|
||||
case AreaEffectSimulation::AesEffectState::EsUnknown:
|
||||
case AreaEffectSimulation::AesEffectState::EsError:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
@@ -142,9 +142,9 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff
|
||||
if (result)
|
||||
{
|
||||
if (borderline.operatorId <= 0)
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::PdmEventType_def::CrossGlobalBorderline);
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::PdmEventType::EventType_CrossGlobalBorderline);
|
||||
else
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::PdmEventType_def::CrossLocalBorderline);
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::PdmEventType::EventType_CrossLocalBorderline);
|
||||
}
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
@@ -163,10 +163,10 @@ void HandlerParticipantBorderline::sendParticipantEvent(const BorderlineUtm &bor
|
||||
{
|
||||
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;
|
||||
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
|
||||
|
||||
+24
-24
@@ -117,7 +117,7 @@ void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &d
|
||||
return;
|
||||
}
|
||||
AreaEffectSimulation::AesItemView itemView;
|
||||
AreaEffectSimulation::AesType aesType = AreaEffectSimulation::AesType_def::AtBoobyTrap;
|
||||
AreaEffectSimulation::AesType aesType = AreaEffectSimulation::AesType::AtBoobyTrap;
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(data.id(), aesType, itemView);
|
||||
|
||||
checkBuildingsHit(itemView);
|
||||
@@ -139,18 +139,18 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId();
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
|
||||
{
|
||||
INFO_LOG(m_logger) << "AesEffectState_def::EsExpired"
|
||||
INFO_LOG(m_logger) << "AesEffectState::EsExpired"
|
||||
<< " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
|
||||
<< " effectStart=" << data.effectStart()
|
||||
<< " diff = " << m_ddsHandler->currentPartitionTime() - data.effectStart() ;
|
||||
if (m_ddsHandler->currentPartitionTime() == 0)
|
||||
return;
|
||||
|
||||
if ((data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
|| (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary))
|
||||
if ((data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|
||||
|| (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary))
|
||||
{
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AtOffRouteMineSecondary id=" << data.id() / 1000;
|
||||
auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int)(data.id() / 1000));
|
||||
@@ -176,7 +176,7 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary id=" << data.id() / 1000;
|
||||
//auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int) (data.id() / 1000));
|
||||
@@ -214,7 +214,7 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
|
||||
|
||||
void HandlerAesData::removeStates(const AreaEffectSimulation::AesItemView &data)
|
||||
{
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtExplosionArea)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtExplosionArea)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "Remove aesItemId=" << data.aesItemId();
|
||||
// remove State for each building
|
||||
@@ -349,16 +349,16 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleState.remove(data.id());
|
||||
return;
|
||||
}
|
||||
// Only handle transitions from prepared or fired to activated
|
||||
if ((m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsPrepared ||
|
||||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if ((m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsPrepared ||
|
||||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
@@ -399,7 +399,7 @@ void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effec
|
||||
if (modType == DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << " Got typechecked effects " << effects;
|
||||
@@ -548,14 +548,14 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
// check for correct AES type artillery only
|
||||
|
||||
static QVector<AreaEffectSimulation::AesType_def::type> s_relevantTypes =
|
||||
static QVector<AreaEffectSimulation::AesType> s_relevantTypes =
|
||||
{
|
||||
AreaEffectSimulation::AesType_def::AtExplosionArea,
|
||||
AreaEffectSimulation::AesType_def::AtExplosionSingle,
|
||||
AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions,
|
||||
AreaEffectSimulation::AesType::AtExplosionArea,
|
||||
AreaEffectSimulation::AesType::AtExplosionSingle,
|
||||
AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions,
|
||||
};
|
||||
|
||||
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
|
||||
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
|
||||
{
|
||||
bIsExplosionCluster = true;
|
||||
ignFuncBase = igniterFunctionBaseExplosionCluster(aesItemId); // assume that fuseType does not differ within a single ExplosionArea
|
||||
@@ -691,7 +691,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
|
||||
void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effects, const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint)
|
||||
{
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
|
||||
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
|
||||
return;
|
||||
|
||||
const int aesItemId = effects.aesItemId();
|
||||
@@ -715,7 +715,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
++indexBitFieldIdx;
|
||||
|
||||
// just SesTriggered are relevant:
|
||||
if (singleEffect.singleEffectState() != AreaEffectSimulation::AesSingleEffectState_def::SesTriggered)
|
||||
if (singleEffect.singleEffectState() != AreaEffectSimulation::AesSingleEffectState::SesTriggered)
|
||||
continue;
|
||||
|
||||
// already processed?
|
||||
@@ -768,9 +768,9 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
properties += mseIdAsStr;
|
||||
|
||||
|
||||
const AreaEffectSimulation::AesZPlacement_def::type zPlacement = singleEffect.zPlacement().underlying();
|
||||
const AreaEffectSimulation::AesZPlacement zPlacement = static_cast<AreaEffectSimulation::AesZPlacement>(singleEffect.zPlacement());
|
||||
|
||||
if (zPlacement == AreaEffectSimulation::AesZPlacement_def::ZpDraped)
|
||||
if (zPlacement == AreaEffectSimulation::AesZPlacement::ZpDraped)
|
||||
{
|
||||
// z-Value is 0 -> old:
|
||||
Buildings::SendCesHitOnBuildingRequest requestBld(
|
||||
@@ -793,7 +793,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
|
||||
bitfieldState.insert(indexBitFieldIdx);
|
||||
|
||||
}
|
||||
else if (zPlacement == AreaEffectSimulation::AesZPlacement_def::ZpAbsolute)
|
||||
else if (zPlacement == AreaEffectSimulation::AesZPlacement::ZpAbsolute)
|
||||
{
|
||||
// since HandlerBuildingModel::handleDetonationLocationRequest has already
|
||||
// calculated to ignFuncBase, the impactPosition is the detonationLocation:
|
||||
@@ -879,12 +879,12 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
|
||||
tmpBldg.buildingId(buildingId);
|
||||
|
||||
Core::GeoPosition impactPosition;
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
|
||||
{
|
||||
impactPosition.lat(m_ddsHandler->dtcAes()->boobyTrap(data.aesItemId()).impactPosition().lat());
|
||||
impactPosition.lon(m_ddsHandler->dtcAes()->boobyTrap(data.aesItemId()).impactPosition().lon());
|
||||
}
|
||||
else if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
else if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|
||||
{
|
||||
int zone = -1;
|
||||
LtsCoordTrans::UtmCoordinate bottomLeft = LtsCoordTrans::UtmCoordinate::fromGeographic(data.boundingBoxBottomLeft().lon(), data.boundingBoxBottomLeft().lat(), zone);
|
||||
|
||||
+3
-3
@@ -151,7 +151,7 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
|
||||
}
|
||||
|
||||
// skip "Outdoor Cameras / Announcement Units"
|
||||
if (data.structureElementTypeId() != InfrastructureManagement::StructureElementType_def::Building)
|
||||
if (data.structureElementTypeId() != InfrastructureManagement::StructureElementType::Building)
|
||||
return;
|
||||
|
||||
// Vor allem in der GUEZ-DB sind ca 23 Gebäude per Hand eingefügt. (Sakralbau, Bahnhof, Wasserwerk etc.)
|
||||
@@ -583,12 +583,12 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "RESULT: integrate free area...";
|
||||
|
||||
// free area and FuseType_def::IfbDelay:
|
||||
// free area and FuseType::IfbDelay:
|
||||
// We can´t move the detonation point _below_ the surface.
|
||||
// That would be identical to a neagative 'startHat'
|
||||
// In other words: lineOfSightElevation would deliver LineOfSight::LOS_ERROR
|
||||
// so:
|
||||
if (detonationDistance > 0) // detonationDistance > 0 === FuseType_def::IfbDelay
|
||||
if (detonationDistance > 0) // detonationDistance > 0 === FuseType::IfbDelay
|
||||
detonationDistance = 0;
|
||||
}
|
||||
} // if (bHasBuildingIntersection)
|
||||
|
||||
+2
-2
@@ -114,7 +114,7 @@ void HandlerBuildingOwnership::onParticipantPositionChanged(const CentralEffectS
|
||||
return;
|
||||
|
||||
int floorId = m_handlerBuildingData->getFloorIdFromRoomId(partPos.roomId());
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
m_participantFloor.remove(participantId);
|
||||
else
|
||||
m_participantFloor.insert(participantId, floorId);
|
||||
@@ -214,7 +214,7 @@ int HandlerBuildingOwnership::calculateOwnershipByFloorId(const int floorId)
|
||||
if (floorId == iteratorFloor)
|
||||
{
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &localPartPos = m_handlerParticipant->position(iteratorParticipant);
|
||||
if (localPartPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
if (localPartPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
continue; // Don't count participants with catastrophic Kill
|
||||
const int partyId = localPartPos.partyId();
|
||||
++partyCount[partyId];
|
||||
|
||||
+16
-16
@@ -106,12 +106,12 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
<< " data.aesTypeId()" << data.aesTypeId();
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
double chargeHeight; // Alle Stockwerke beruecksichtigen
|
||||
double chargeDepression; // Alle Kellerraeume beruecksichtigen
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
chargeHeight = 500.0; // Alle Stockwerke beruecksichtigen
|
||||
chargeDepression = -1000.0; // Alle Kellerraeume beruecksichtigen
|
||||
@@ -126,8 +126,8 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
<< " chargeDepression=" << chargeDepression;
|
||||
}
|
||||
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBCContamination
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtBCContamination
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "return1: AesItemView: " << data.effectStateId();
|
||||
return;
|
||||
@@ -135,8 +135,8 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
|
||||
|
||||
// Gebaeude die von einem sesshaften Kampfstoff betroffen sind, müssen als kontaminiert gelten.
|
||||
const ProjectDataManagement::VolatilityType volatilityType = m_ddsHandler->volatilityTypeId(data.chargeStruct());
|
||||
if (volatilityType != ProjectDataManagement::VolatilityType_def::Resident
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if (volatilityType != ProjectDataManagement::VolatilityType::Resident
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "return2: AesItemView: " << data.effectStateId();
|
||||
return;
|
||||
@@ -177,16 +177,16 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
QVector<int> effectedRooms;
|
||||
QVector<int> effectedFloors;
|
||||
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBCContamination
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtBCContamination
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "return: NO BC-Contamination AesItemView: " << data.effectStateId();
|
||||
return;
|
||||
}
|
||||
|
||||
const ProjectDataManagement::VolatilityType volatilityType = m_ddsHandler->volatilityTypeId(data.chargeStruct());
|
||||
if ( volatilityType != ProjectDataManagement::VolatilityType_def::Resident
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if ( volatilityType != ProjectDataManagement::VolatilityType::Resident
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
|
||||
return;
|
||||
|
||||
DEBUG_LOG(m_logger) << "buildingId=" << buildingId;
|
||||
@@ -197,22 +197,22 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
if (!effectedRooms.empty())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "effectedRooms.size=" << effectedRooms.size();
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::CombatReady;
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady;
|
||||
|
||||
// [GUEZE-2752] N-Contamination: Only Contamionation inside Range1
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination
|
||||
&& !isInsideRange1(buildingId, data.aesItemId()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "!isInsideRange1 buildingId=" << buildingId;
|
||||
return;
|
||||
}
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBCContamination
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBCContamination
|
||||
&& !isInsideBCContamination(buildingId, data.aesItemId()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AtBCContamination !isInsideRange buildingId=" << buildingId << "return";
|
||||
return;
|
||||
}
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination
|
||||
&& isInsideInnerCircle(buildingId, data.aesItemId()))
|
||||
{
|
||||
constexpr int TIME_2_SECONDS = 2000;
|
||||
@@ -220,7 +220,7 @@ void HandlerContamination::calculateBuilding(int buildingId,
|
||||
if ( m_ddsHandler->dtcCore()->partitionTime().timeStamp() < (data.effectStart() + TIME_2_SECONDS))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "VulnerabilityState=CatastrophicKill";
|
||||
vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
|
||||
vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
|
||||
}
|
||||
}
|
||||
DEBUG_LOG(m_logger) << "setBuildingContaminationStateRequest buildingId=" << buildingId
|
||||
@@ -266,7 +266,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
|
||||
double chargeHeight = 0.0;
|
||||
double chargeDepression = 0.0;
|
||||
|
||||
if (aesItemView.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if (aesItemView.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
chargeHeight = 500.0; // Alle Stockwerke beruecksichtigen
|
||||
chargeDepression = -1000.0; // Alle Kellerraeume beruecksichtigen
|
||||
|
||||
+17
-17
@@ -118,28 +118,28 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId();
|
||||
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:
|
||||
removeStates(data);
|
||||
m_aesItemViews.remove(data.aesItemId());
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPaused:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsFired:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPaused:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsFired:
|
||||
m_aesItemViews.insert(data.aesItemId(), data);
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState::EsReceived:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void HandlerAesData::removeStates(const AreaEffectSimulation::AesItemView &data)
|
||||
{
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtExplosionArea)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtExplosionArea)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "Remove aesItemId=" << data.aesItemId();
|
||||
// remove State for each building
|
||||
@@ -157,15 +157,15 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleState.remove(data.id());
|
||||
return;
|
||||
}
|
||||
// Only handle transitions from prepared to activated
|
||||
if (m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsPrepared
|
||||
&& data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsPrepared
|
||||
&& data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
@@ -382,9 +382,9 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
// check for correct AES type artillery only
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions:
|
||||
DEBUG_LOG(m_logger) << "Calculate";
|
||||
break;
|
||||
default:
|
||||
|
||||
+149
-149
@@ -225,25 +225,25 @@ void HandlerParticipantArea::onSendCesHitReply(const Core::FunctionReplyObject &
|
||||
void HandlerParticipantArea::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
|
||||
{
|
||||
// not needed, handled through HandlerParticipantGasPipe
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtGasPipe)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtGasPipe)
|
||||
return;
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtUnknown)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtUnknown)
|
||||
return;
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrap)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrap)
|
||||
return;
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMine)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMine)
|
||||
return;
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|
||||
return;
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtMineArea)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtMineArea)
|
||||
return;
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtMineCorridor)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtMineCorridor)
|
||||
return;
|
||||
|
||||
if (m_ddsHandler->isSmartChargeType(data.chargeTypeId()))
|
||||
@@ -264,7 +264,7 @@ void HandlerParticipantArea::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtMineAreaSingleMines)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtMineAreaSingleMines)
|
||||
{
|
||||
// build Polygon Mines:
|
||||
auto &formMines = m_aesItemViews[data.aesItemId()].formMines;
|
||||
@@ -281,26 +281,26 @@ void HandlerParticipantArea::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
DEBUG_LOG(m_logger) << "impactRadius=" << impactRadius;
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
{
|
||||
m_aesItemViews.insert(data.aesItemId(), CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], impactRadius));
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
const auto aesItemViewUtm(CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], impactRadius));
|
||||
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
case AreaEffectSimulation::AesType_def::AtAirSupportImpact:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
case AreaEffectSimulation::AesType::AtAirSupportImpact:
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
// for each participant:
|
||||
// Bounding-Box Check,
|
||||
// form-Check
|
||||
@@ -308,31 +308,31 @@ void HandlerParticipantArea::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
calculateBcContamination(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
calculateFunctionArea(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtUnknown:
|
||||
case AreaEffectSimulation::AesType_def::AtMineCorridor:
|
||||
case AreaEffectSimulation::AesType_def::AtBorderline:
|
||||
case AreaEffectSimulation::AesType_def::AtReconArea:
|
||||
case AreaEffectSimulation::AesType_def::AtTechnicalArea:
|
||||
case AreaEffectSimulation::AesType_def::AtDusSingleMine:
|
||||
case AreaEffectSimulation::AesType_def::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType_def::AtGasPipe:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingleCentral:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingleCentralTrajectory:
|
||||
case AreaEffectSimulation::AesType_def::AtBoobyTrap:
|
||||
case AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary:
|
||||
case AreaEffectSimulation::AesType_def::AtOffRouteMine:
|
||||
case AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary:
|
||||
case AreaEffectSimulation::AesType::AtUnknown:
|
||||
case AreaEffectSimulation::AesType::AtMineCorridor:
|
||||
case AreaEffectSimulation::AesType::AtBorderline:
|
||||
case AreaEffectSimulation::AesType::AtReconArea:
|
||||
case AreaEffectSimulation::AesType::AtTechnicalArea:
|
||||
case AreaEffectSimulation::AesType::AtDusSingleMine:
|
||||
case AreaEffectSimulation::AesType::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType::AtGasPipe:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingleCentral:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingleCentralTrajectory:
|
||||
case AreaEffectSimulation::AesType::AtBoobyTrap:
|
||||
case AreaEffectSimulation::AesType::AtBoobyTrapSecondary:
|
||||
case AreaEffectSimulation::AesType::AtOffRouteMine:
|
||||
case AreaEffectSimulation::AesType::AtOffRouteMineSecondary:
|
||||
break;
|
||||
} // switch aesTypeId
|
||||
break;
|
||||
} // case EsActivated
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
{
|
||||
aesItemViewRemoved(aesItemId);
|
||||
break;
|
||||
@@ -354,14 +354,14 @@ void HandlerParticipantArea::onDusSingleMineChanged(const AreaEffectSimulation::
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
//DEBUG_LOG(m_logger) << "Got onDusSingleMineChanged data.id()=" << data.id();
|
||||
CentralEffectSimulation::AesItemViewUtm itemView;
|
||||
itemView.aesItemId = data.id();
|
||||
itemView.chargeTypeId = data.chargeTypeId();
|
||||
itemView.partyId = data.partyId.is_set() ? data.partyId.get() : -1;
|
||||
itemView.aesTypeId = AreaEffectSimulation::AesType_def::AtDusSingleMine;
|
||||
itemView.aesTypeId = AreaEffectSimulation::AesType::AtDusSingleMine;
|
||||
itemView.effectStart = QDateTime::currentDateTimeUtc().toMSecsSinceEpoch();
|
||||
itemView.formMines.push_back(CentralEffectSimulation::geographic2Utm(data.position(), &itemView.zone));
|
||||
itemView.dusMineId = data.mineId();
|
||||
@@ -372,9 +372,9 @@ void HandlerParticipantArea::onDusSingleMineChanged(const AreaEffectSimulation::
|
||||
m_triggeredImpacts[itemView.aesItemId] = ti;
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
m_aesItemViews.remove(data.id());
|
||||
break;
|
||||
default:
|
||||
@@ -395,14 +395,14 @@ void HandlerParticipantArea::onBCContaminationChanged(const AreaEffectSimulation
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id()];
|
||||
const auto dtcPdm = m_ddsHandler->dtcPdm();
|
||||
if (dtcPdm->volatilityTypeId(data.chargeTypeId()) == ProjectDataManagement::VolatilityType_def::Resident)
|
||||
if (dtcPdm->volatilityTypeId(data.chargeTypeId()) == ProjectDataManagement::VolatilityType::Resident)
|
||||
{
|
||||
ref.radials = {data.impactRadius()};
|
||||
ref.center = CentralEffectSimulation::geographic2Utm(data.impactPosition(), &ref.zone);
|
||||
@@ -427,10 +427,10 @@ void HandlerParticipantArea::onNContaminationChanged(const AreaEffectSimulation:
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id()];
|
||||
ref.radials = {data.impactRadius(),
|
||||
@@ -481,13 +481,13 @@ void HandlerParticipantArea::deleteFunctionalArea(const int aesItemId)
|
||||
if (m_handlerParticipant->isOutdated(participantPos))
|
||||
continue;
|
||||
// Same as leave FunctionArea
|
||||
if (itemView.aesTypeId == AreaEffectSimulation::AesType_def::AtFunctionalArea)
|
||||
if (itemView.aesTypeId == AreaEffectSimulation::AesType::AtFunctionalArea)
|
||||
{
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPos, EffectType::FunctionalAreaLeave, -1, -1);
|
||||
}
|
||||
else
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
|
||||
} // for all Participants
|
||||
} // deleteFunctionalArea
|
||||
@@ -503,7 +503,7 @@ void HandlerParticipantArea::calculateAesParticipant(const CentralEffectSimulati
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
if (inFormCheck(itemView, participantPos))
|
||||
// Check, if Participant is in a circle of mine
|
||||
inMineRadiusCheck(itemView, participantPos);
|
||||
@@ -511,15 +511,15 @@ void HandlerParticipantArea::calculateAesParticipant(const CentralEffectSimulati
|
||||
// no longer in mine area - reset all EffectiveMineRangeEnter mineIndexes
|
||||
m_effectTypeBitFieldIndexes[itemView.aesItemId][participantPos.participantId()].clear();
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType::AtMineAreaSingleMines:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDusSingleMine:
|
||||
case AreaEffectSimulation::AesType::AtDusSingleMine:
|
||||
inMineRadiusCheck(itemView, participantPos);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
inFormCheck(itemView, participantPos);
|
||||
break;
|
||||
default:
|
||||
@@ -552,7 +552,7 @@ bool HandlerParticipantArea::inMineRadiusCheck(const CentralEffectSimulation::Ae
|
||||
continue;
|
||||
}
|
||||
|
||||
const int mineIdx = (itemView.aesTypeId == AreaEffectSimulation::AesType_def::AtDusSingleMine)
|
||||
const int mineIdx = (itemView.aesTypeId == AreaEffectSimulation::AesType::AtDusSingleMine)
|
||||
? itemView.dusMineId : bitFieldIdx + 1; // mineIdx in minefield starts at 1
|
||||
|
||||
// Check, if participant is inside danger-radius of the mine
|
||||
@@ -576,7 +576,7 @@ bool HandlerParticipantArea::inMineRadiusCheck(const CentralEffectSimulation::Ae
|
||||
bool HandlerParticipantArea::inBoundingBoxCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
if (m_handlerParticipant->isOutdated(participantPosition)) // Participant Position is not valid Todo Magic Number
|
||||
@@ -603,7 +603,7 @@ bool HandlerParticipantArea::inBoundingBoxCheck(const CentralEffectSimulation::A
|
||||
bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
if (m_handlerParticipant->isOutdated(participantPosition)) // Participant Position is not valid
|
||||
@@ -626,23 +626,23 @@ bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
<< ", aesItemId: " << itemView.aesItemId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
sendEffectTypeEvent(itemView, participantPosition, effectTypeForBCContaminationArea(itemView, participantPosUtmPoint), -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_EnterDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterFunctionalArea);
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::FunctionalAreaEnter, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_EnterMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_EnterNuclear);
|
||||
sendEffectTypeEvent(itemView, participantPosition, effectTypeForNContaminationArea(itemView, participantPosUtmPoint, participantPosition.sampleTime()), -1, -1);
|
||||
break;
|
||||
default:
|
||||
@@ -655,23 +655,23 @@ bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
// outside
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::BCContaminationLeave, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::FunctionalAreaLeave, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_LeaveMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType::EventType_LeaveNuclear);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::NContaminationLeave, -1, -1);
|
||||
break;
|
||||
default:
|
||||
@@ -699,14 +699,14 @@ void HandlerParticipantArea::onTriggeredImpactsChanged(const AreaEffectSimulatio
|
||||
DEBUG_LOG(m_logger) << "Got TriggeredImpacts: " << data;
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions:
|
||||
// explosion at the position of participant
|
||||
calculateImpacts(data);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
case AreaEffectSimulation::AesType::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
// participant run on mine
|
||||
// => store Mine-State and take into account when a participant runs to one of this mines
|
||||
m_triggeredImpacts.insert(data.aesItemId(), data);
|
||||
@@ -746,16 +746,16 @@ void HandlerParticipantArea::onExplosionSingleChanged(const AreaEffectSimulation
|
||||
modType != DataModification::eModified)
|
||||
return;
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleStates.remove(data.id());
|
||||
return;
|
||||
}
|
||||
// Only handle transitions from prepared or fired to activated
|
||||
if ((m_explosionSingleStates.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsPrepared ||
|
||||
m_explosionSingleStates.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if ((m_explosionSingleStates.value(data.id()) == AreaEffectSimulation::AesEffectState::EsPrepared ||
|
||||
m_explosionSingleStates.value(data.id()) == AreaEffectSimulation::AesEffectState::EsFired) &&
|
||||
data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
@@ -806,16 +806,16 @@ void HandlerParticipantArea::onExplosionSingleCentralChanged(const AreaEffectSim
|
||||
if (modType != DataModification::eAdded && modType != DataModification::eModified)
|
||||
return;
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved) // EsExpired? EsError? EsUnknown?
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved) // EsExpired? EsError? EsUnknown?
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove ExplosionSingleCentral with aesId = " << data.id();
|
||||
m_explosionSingleCentralStates.remove(data.id());
|
||||
return;
|
||||
} // if
|
||||
|
||||
if ((m_explosionSingleCentralStates.value(data.id()) != AreaEffectSimulation::AesEffectState_def::EsPrepared &&
|
||||
m_explosionSingleCentralStates.value(data.id()) != AreaEffectSimulation::AesEffectState_def::EsFired) ||
|
||||
data.effectStateId() != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if ((m_explosionSingleCentralStates.value(data.id()) != AreaEffectSimulation::AesEffectState::EsPrepared &&
|
||||
m_explosionSingleCentralStates.value(data.id()) != AreaEffectSimulation::AesEffectState::EsFired) ||
|
||||
data.effectStateId() != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
m_explosionSingleCentralStates.insert(data.id(), data.effectStateId());
|
||||
return;
|
||||
@@ -915,7 +915,7 @@ void HandlerParticipantArea::calculateImpacts(const AreaEffectSimulation::Trigge
|
||||
const auto participantPositions = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &pPos : participantPositions)
|
||||
{
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
if (pPos.insideBuilding())
|
||||
continue;
|
||||
@@ -991,7 +991,7 @@ void HandlerParticipantArea::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
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;
|
||||
@@ -1000,7 +1000,7 @@ void HandlerParticipantArea::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId, 0);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantPosition.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantPosition.buildingId(),
|
||||
participantPosition.roomId());
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
@@ -1058,7 +1058,7 @@ void HandlerParticipantArea::sendCesHitRequest(const AreaEffectSimulation::AesIt
|
||||
} // if
|
||||
|
||||
if (participantPosition.participantId() != 0 &&
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -1067,7 +1067,7 @@ void HandlerParticipantArea::sendCesHitRequest(const AreaEffectSimulation::AesIt
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId(), 0);
|
||||
const int originatorEquipmentNumber = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
const TrainingAreaBase::TabPosition pos(
|
||||
participantPosition.pos(), Core::PositionReportingSource_def::Gps, participantPosition.buildingId(),
|
||||
participantPosition.pos(), Core::PositionReportingSource::Gps, participantPosition.buildingId(),
|
||||
participantPosition.roomId()
|
||||
);
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
@@ -1092,12 +1092,12 @@ void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation:
|
||||
bool calculateAes = false;
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantPosition.participantId()
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
@@ -1131,12 +1131,12 @@ void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation:
|
||||
}
|
||||
// send hit events only with central AES Simulation
|
||||
if (calculateAes
|
||||
&& (eventType == ProjectDataManagement::PdmEventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitN))
|
||||
&& (eventType == ProjectDataManagement::PdmEventType::EventType_HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitN))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "send hit events only with central AES Simulation participant=" << participantPosition.participantId();
|
||||
return;
|
||||
@@ -1169,14 +1169,14 @@ void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation:
|
||||
|
||||
// Criterion for friendly Fire:
|
||||
if (itemView.partyId != -1
|
||||
&& ((eventType == ProjectDataManagement::PdmEventType_def::EnterMineArea
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::EnterNuclear
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitN)
|
||||
&& ((eventType == ProjectDataManagement::PdmEventType::EventType_EnterMineArea
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_EnterNuclear
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitN)
|
||||
&& itemView.partyId == participantPosition.partyId()))
|
||||
pe.friendlyFire(true);
|
||||
else
|
||||
@@ -1268,29 +1268,29 @@ bool HandlerParticipantArea::eventMustBeSend(int aesItemId,
|
||||
// - remove opposite events (e.g remove Enter event when we leave the area)
|
||||
switch (eventType.underlying())
|
||||
{
|
||||
case ProjectDataManagement::PdmEventType_def::EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterFunctionalArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveNuclear);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterNuclear);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1424,29 +1424,29 @@ ProjectDataManagement::PdmEventType HandlerParticipantArea::leaveEventTypeForAes
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
return ProjectDataManagement::PdmEventType::LeaveDangerArea;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
return ProjectDataManagement::PdmEventType::LeaveMineArea;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
return ProjectDataManagement::PdmEventType::LeaveNuclear;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
return ProjectDataManagement::PdmEventType::LeaveFunctionalArea;
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea;
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveMineArea;
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveNuclear;
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ProjectDataManagement::PdmEventType::Unknown;
|
||||
return ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
}
|
||||
|
||||
EffectType HandlerParticipantArea::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
return EffectType::BCContaminationLeave;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
return EffectType::NContaminationLeave;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
return EffectType::FunctionalAreaLeave;
|
||||
default:
|
||||
break;
|
||||
@@ -1511,7 +1511,7 @@ void HandlerParticipantArea::aesItemViewRemoved(int aesItemId)
|
||||
}
|
||||
}
|
||||
const auto eventTypeLeave = leaveEventTypeForAesType(aiv.aesTypeId);
|
||||
if (eventTypeLeave != ProjectDataManagement::PdmEventType::Unknown)
|
||||
if (eventTypeLeave != ProjectDataManagement::PdmEventType::EventType_Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
|
||||
auto it = m_eventStates.find(aesItemId);
|
||||
|
||||
+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()))
|
||||
|
||||
+25
-25
@@ -166,7 +166,7 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
{
|
||||
const int aesItemId = data.aesItemId();
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
if (data.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtFunctionalArea)
|
||||
if (data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtFunctionalArea)
|
||||
return;
|
||||
|
||||
const AreaEffectSimulation::FunctionalArea &fa = m_ddsHandler->dtcAes()->functionalArea(data.aesItemId());
|
||||
@@ -192,12 +192,12 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
bool isSupplyTruck = false;
|
||||
if (fa.supplyMode() == AreaEffectSimulation::AesOperatingMode_def::OmWaitingTime)
|
||||
if (fa.supplyMode() == AreaEffectSimulation::AesOperatingMode::OmWaitingTime)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "isSupplyTruck = true";
|
||||
isSupplyTruck = true;
|
||||
@@ -231,8 +231,8 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
<< ", type: " << data.aesTypeId();
|
||||
break;
|
||||
} // case EsActivated
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
{
|
||||
aesItemViewRemoved(aesItemId);
|
||||
m_aesPolygonEncloseBuilding.remove(aesItemId);
|
||||
@@ -307,7 +307,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
{
|
||||
///////////////////
|
||||
/// \brief [GUEZE-2256] 3D Wirksim - Funktionsraum Nicht Kampffähig
|
||||
@@ -350,7 +350,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
{
|
||||
///////////////////
|
||||
/// \brief [GUEZE-2256] 3D Wirksim - Funktionsraum Nicht Kampffähig
|
||||
@@ -405,7 +405,7 @@ void HandlerFunctionalAreas::onRestoreRadioReadinessChanged(const int participan
|
||||
bool HandlerFunctionalAreas::inBoundingBoxCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
// QRectF(topLeft, bottomRight) -> no need to mormalize, QRectF:contains() handles it correct
|
||||
@@ -429,7 +429,7 @@ bool HandlerFunctionalAreas::inBoundingBoxCheck(const CentralEffectSimulation::A
|
||||
bool HandlerFunctionalAreas::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
const QRectF boundingBox(itemView.boundingBoxBottomLeft,
|
||||
@@ -476,11 +476,11 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
|
||||
switch (eventType.underlying())
|
||||
{
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea:
|
||||
DEBUG_LOG(m_logger) << "-------------- EnterFunctionalArea itemView =" << itemView.aesItemId;
|
||||
remaining = 1;
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea:
|
||||
remaining = 0;
|
||||
DEBUG_LOG(m_logger) << "-------------- LeaveFunctionalArea itemView =" << itemView.aesItemId;
|
||||
break;
|
||||
@@ -508,7 +508,7 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
return;
|
||||
}
|
||||
if (participantData.participantId() != 0 &&
|
||||
participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -517,7 +517,7 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
const AreaEffectSimulation::FunctionalArea &fa = m_ddsHandler->dtcAes()->functionalArea(itemView.aesItemId);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantData.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantData.buildingId(),
|
||||
participantData.roomId());
|
||||
const int medicTime = fa.medicTime() / 600000; //reserve 2 = medical treatment
|
||||
@@ -568,12 +568,12 @@ void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation:
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantData.participantTypeId());
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId()
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
@@ -676,7 +676,7 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
|
||||
if (inForm)
|
||||
{
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType_def::EnterFunctionalArea;
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea;
|
||||
if (itemView.isSupplyTruck)
|
||||
{
|
||||
enterLeaveType.isAlreadySupplied = true;
|
||||
@@ -695,8 +695,8 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
}
|
||||
else
|
||||
{
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType_def::EnterFunctionalArea)
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendEnterLeave.stopSupplyTimer";
|
||||
enterLeaveType.isAlreadySupplied = false;
|
||||
@@ -710,8 +710,8 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
}
|
||||
}
|
||||
|
||||
if ((inForm && lastEnterLeaveType.eventType != ProjectDataManagement::PdmEventType_def::EnterFunctionalArea)
|
||||
|| (!inForm && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType_def::EnterFunctionalArea))
|
||||
if ((inForm && lastEnterLeaveType.eventType != ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea)
|
||||
|| (!inForm && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea))
|
||||
{
|
||||
CentralEffectSimulation::HandlerParticipant::CesParticipantData cesParticipantData = m_handlerParticipant.get()->getParticipantPosition(participantId);
|
||||
sendParticipantEvent(itemView, cesParticipantData, enterLeaveType.eventType);
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ struct ParticipantDistance
|
||||
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
|
||||
+16
-16
@@ -76,27 +76,27 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
|
||||
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId();
|
||||
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:
|
||||
removeStates(data);
|
||||
m_aesItemViews.remove(data.aesItemId());
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPaused:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPaused:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
m_aesItemViews.insert(data.aesItemId(), data);
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsReceived:
|
||||
case AreaEffectSimulation::AesEffectState::EsCreated:
|
||||
case AreaEffectSimulation::AesEffectState::EsReceived:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
void HandlerAesData::removeStates(const AreaEffectSimulation::AesItemView &data)
|
||||
{
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtExplosionArea)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtExplosionArea)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "Remove aesItemId=" << data.aesItemId();
|
||||
} // end removeStates
|
||||
@@ -111,15 +111,15 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
|
||||
m_explosionSingleState.remove(data.id());
|
||||
return;
|
||||
}
|
||||
// Only handle transitions from prepared to activated
|
||||
if (m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsPrepared
|
||||
&& data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsPrepared
|
||||
&& data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
|
||||
handleExplosion = true;
|
||||
@@ -336,9 +336,9 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
|
||||
// check for correct AES type artillery only
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions:
|
||||
DEBUG_LOG(m_logger) << "Calculate";
|
||||
break;
|
||||
default:
|
||||
|
||||
+9
-9
@@ -79,7 +79,7 @@ void HandlerParticipantGasPipe::onAesItemViewChanged(const AreaEffectSimulation:
|
||||
{
|
||||
INFO_LOG(m_logger) << "HandlerParticipantGasPipe::onAesItemViewChanged";
|
||||
//
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtGasPipe)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtGasPipe)
|
||||
return;
|
||||
|
||||
|
||||
@@ -101,7 +101,7 @@ void HandlerParticipantGasPipe::onAesItemViewChanged(const AreaEffectSimulation:
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm prevData;
|
||||
const double impactRadius = 0;
|
||||
@@ -184,9 +184,9 @@ void HandlerParticipantGasPipe::calculateGasPipeParticipant(const CentralEffectS
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(gasPipe, participantPosition, ProjectDataManagement::PdmEventType_def::HitGasPipe);
|
||||
sendParticipantEvent(gasPipe, participantPosition, ProjectDataManagement::PdmEventType::EventType_HitGasPipe);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(gasPipe, participantPosition, ProjectDataManagement::PdmEventType_def::HitGasPipe);
|
||||
sendParticipantHit(gasPipe, participantPosition, ProjectDataManagement::PdmEventType::EventType_HitGasPipe);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ void HandlerParticipantGasPipe::onParticipantPositionChanged(const CentralEffect
|
||||
result = insideGasPipeArea(gasPipe.form, partPosGeo);
|
||||
DEBUG_LOG(m_logger) << "result gasPipe Explosion = " << result<< gasPipe.aesItemId;
|
||||
if (result)
|
||||
sendParticipantEvent(gasPipe, partPos, ProjectDataManagement::PdmEventType_def::HitGasPipe);
|
||||
sendParticipantEvent(gasPipe, partPos, ProjectDataManagement::PdmEventType::EventType_HitGasPipe);
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -235,10 +235,10 @@ void HandlerParticipantGasPipe::sendParticipantEvent(const CentralEffectSimulati
|
||||
{
|
||||
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;
|
||||
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
|
||||
|
||||
+4
-4
@@ -117,7 +117,7 @@ void HandlerJamming::onParticipantGearEventChanged(const ParticipantManagement::
|
||||
{
|
||||
DEBUG_LOG(m_logger) << " Send Jamming to TAB and destroy uasId";
|
||||
//sendCesHitRequest(data.charge().chargeTypeId(), data.participantId(),cesParticipantData);
|
||||
if (cesParticipantData.vulnerabilityState != ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (cesParticipantData.vulnerabilityState != ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
jammedUasIds.append(uasId);
|
||||
}
|
||||
else
|
||||
@@ -193,14 +193,14 @@ void HandlerJamming::sendCesHitRequest(const int chargeTypeId,
|
||||
<< " equipNo = " << equipNo
|
||||
<< " chargeTypeId =" << chargeTypeId;
|
||||
|
||||
if (participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId == 0 CatastrophicKill)";
|
||||
return;
|
||||
}
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantData.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantData.buildingId(),
|
||||
participantData.roomId());
|
||||
|
||||
@@ -216,7 +216,7 @@ void HandlerJamming::sendCesHitRequest(const int chargeTypeId,
|
||||
remaining, // remainEffectPercent ( no protection outside Building )
|
||||
pos,
|
||||
effectTime, // effectTime
|
||||
ProjectDataManagement::PdmEventType::Jamming, // EventType
|
||||
ProjectDataManagement::PdmEventType::EventType_Jamming, // EventType
|
||||
originatorPartyId, // originPartyId
|
||||
mineId
|
||||
);
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ struct ParticipantDistance
|
||||
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
|
||||
+46
-46
@@ -165,9 +165,9 @@ void HandlerMineAreas::onMineTriggeredReply(const Core::FunctionReplyObject &rep
|
||||
// ///////////////////////////////////
|
||||
void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
|
||||
{
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtMineAreaSingleMines
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtMineArea
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtMineCorridor)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtMineAreaSingleMines
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtMineArea
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtMineCorridor)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AesItemView return";
|
||||
return;
|
||||
@@ -183,7 +183,7 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
return;
|
||||
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AesItemView expired return id=" << data.aesItemId();
|
||||
aesItemViewRemoved(data.aesItemId());
|
||||
@@ -212,7 +212,7 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtMineAreaSingleMines)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtMineAreaSingleMines)
|
||||
{
|
||||
if (!m_aesItemViews.contains(aesItemId))
|
||||
{
|
||||
@@ -237,11 +237,11 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
DEBUG_LOG(m_logger) << "impactRadius=" << impactRadius;
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
const auto aesItemViewUtm(CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], impactRadius));
|
||||
|
||||
@@ -255,8 +255,8 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
|
||||
|
||||
} // case EsActivated
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
{
|
||||
aesItemViewRemoved(aesItemId);
|
||||
break;
|
||||
@@ -284,12 +284,12 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "return New Position Participant with id " << participantPosition.participantId()
|
||||
<< " has invalid typeClass: " << typeClass;
|
||||
@@ -305,7 +305,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
return;
|
||||
}
|
||||
|
||||
if (participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "New Position CatastrophicKill return";
|
||||
return;
|
||||
@@ -346,7 +346,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
// DEBUG_LOG(m_logger) << "minePosGeo lat=" << minePosGeo.lat()
|
||||
// << " lon=" << minePosGeo.lon()
|
||||
// << " z=" << minePosGeo.z();
|
||||
sendParticipantEvent(m_aesItemViews[aesItemId], minePosition, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(m_aesItemViews[aesItemId], minePosition, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
|
||||
m_mineLists[participantPosition.participantId()].remove(index);
|
||||
|
||||
@@ -379,19 +379,19 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId
|
||||
<< " remainingTasCode=" << remaining;
|
||||
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
continue;
|
||||
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Human && remaining > 50)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Human && remaining > 50)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ParticipantManagement::TypeClass_def::Human && remaining > 50 continue";
|
||||
DEBUG_LOG(m_logger) << "ParticipantManagement::TypeClass::Human && remaining > 50 continue";
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Human && m_ddsHandler->isAtMine(itemView.chargeStruct))
|
||||
if (typeClass == ParticipantManagement::TypeClass::Human && m_ddsHandler->isAtMine(itemView.chargeStruct))
|
||||
continue;
|
||||
|
||||
if (itemView.aesTypeId.underlying() == AreaEffectSimulation::AesType_def::AtMineArea)
|
||||
if (itemView.aesTypeId.underlying() == AreaEffectSimulation::AesType::AtMineArea)
|
||||
{
|
||||
|
||||
// checks whether the participant has been positioned in the minefield or across it.
|
||||
@@ -435,7 +435,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
void HandlerMineAreas::onNewParticipantState(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onNewParticipantState ";
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CombatReady)
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CombatReady)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_mineLists.contains(participantPos.participantId():" << m_mineLists.contains(participantPos.participantId());
|
||||
if (m_mineLists.contains(participantPos.participantId()))
|
||||
@@ -485,7 +485,7 @@ bool HandlerMineAreas::intersectMineRadiusCheck(const CentralEffectSimulation::A
|
||||
}
|
||||
}
|
||||
|
||||
const int mineIdx = (itemView.aesTypeId == AreaEffectSimulation::AesType_def::AtDusSingleMine)
|
||||
const int mineIdx = (itemView.aesTypeId == AreaEffectSimulation::AesType::AtDusSingleMine)
|
||||
? itemView.dusMineId : bitFieldIdx + 1; // mineIdx in minefield starts at 1
|
||||
|
||||
// Check, if participant is inside danger-radius of the mine
|
||||
@@ -542,7 +542,7 @@ bool HandlerMineAreas::intersectMineRadiusCheck(const CentralEffectSimulation::A
|
||||
// DEBUG_LOG(m_logger) << "minePosGeo lat=" << minePosGeo.lat()
|
||||
// << " lon=" << minePosGeo.lon()
|
||||
// << " z=" << minePosGeo.z();
|
||||
sendParticipantEvent(itemView, minePosition, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(itemView, minePosition, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
// aktuell verarbeitete Mine aus der Liste entfernen.
|
||||
m_mineLists[participantPosition.participantId()].remove(mineListItemIndex);
|
||||
}
|
||||
@@ -671,14 +671,14 @@ void HandlerMineAreas::onTriggeredImpactsChanged(const AreaEffectSimulation::Tri
|
||||
DEBUG_LOG(m_logger) << "Got TriggeredImpacts: ";
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
//case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions: Plugin Artillery
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
//case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions: Plugin Artillery
|
||||
// explosion at the position of participant
|
||||
calculateImpacts(data);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
case AreaEffectSimulation::AesType::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
// participant run on mine
|
||||
// => store Mine-State and take into account when a participant runs to one of this mines
|
||||
m_triggeredImpacts.insert(data.aesItemId(), data);
|
||||
@@ -693,8 +693,8 @@ void HandlerMineAreas::onTriggeredImpactsChanged(const AreaEffectSimulation::Tri
|
||||
void HandlerMineAreas::calculateImpacts(const AreaEffectSimulation::TriggeredImpacts &data)
|
||||
{
|
||||
|
||||
if ((data.aesTypeId() == AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions)
|
||||
|| (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions))
|
||||
if ((data.aesTypeId() == AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions)
|
||||
|| (data.aesTypeId() == AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions))
|
||||
return;
|
||||
|
||||
|
||||
@@ -743,7 +743,7 @@ void HandlerMineAreas::calculateImpacts(const AreaEffectSimulation::TriggeredImp
|
||||
<< " buildingId=" << pPos.buildingId()
|
||||
<< " insideBuilding=" << pPos.insideBuilding()
|
||||
<< " positionValid=" << pPos.positionValid;
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
if (pPos.insideBuilding())
|
||||
continue;
|
||||
@@ -801,7 +801,7 @@ void HandlerMineAreas::sendCesHitRequest(const CentralEffectSimulation::AesItemV
|
||||
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;
|
||||
@@ -810,12 +810,12 @@ void HandlerMineAreas::sendCesHitRequest(const CentralEffectSimulation::AesItemV
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId, 0);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantPosition.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantPosition.buildingId(),
|
||||
participantPosition.roomId());
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipNo, // equipmentNumber
|
||||
@@ -866,7 +866,7 @@ void HandlerMineAreas::sendCesHitRequest(const AreaEffectSimulation::AesItemView
|
||||
} // if
|
||||
|
||||
if (participantPosition.participantId() != 0 &&
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -875,10 +875,10 @@ void HandlerMineAreas::sendCesHitRequest(const AreaEffectSimulation::AesItemView
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId(), 0);
|
||||
const int originatorEquipmentNumber = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
const TrainingAreaBase::TabPosition pos(
|
||||
participantPosition.pos(), Core::PositionReportingSource_def::Gps, participantPosition.buildingId(),
|
||||
participantPosition.pos(), Core::PositionReportingSource::Gps, participantPosition.buildingId(),
|
||||
participantPosition.roomId()
|
||||
);
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber,
|
||||
@@ -903,27 +903,27 @@ void HandlerMineAreas::sendParticipantEventEnterLeave(const CentralEffectSimulat
|
||||
const ProjectDataManagement::PdmEventType &lastEvent = m_eventStates[itemView.aesItemId][participantPosition.participantId()];
|
||||
|
||||
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_EnterMineArea;
|
||||
|
||||
|
||||
if (inFormCheckResult)
|
||||
{
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType_def::EnterMineArea)
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType::EventType_EnterMineArea)
|
||||
return;
|
||||
else
|
||||
{
|
||||
eventType = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
eventType = ProjectDataManagement::PdmEventType::EventType_EnterMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType::EventType_EnterMineArea;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType_def::LeaveMineArea)
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType::EventType_LeaveMineArea)
|
||||
return;
|
||||
else
|
||||
{
|
||||
eventType = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
|
||||
eventType = ProjectDataManagement::PdmEventType::EventType_LeaveMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType::EventType_LeaveMineArea;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -110,7 +110,7 @@ void CesMissionPlanHandler::onUasChanged(const ParticipantManagement::UAS &data,
|
||||
DEBUG_LOG(m_logger)<<" -- onUasChanged : uas.id = "<<data.id() <<" participantId = "<<data.participantId();
|
||||
// get mission object of corresponding uas participant
|
||||
// if drone status is manual mode then cancel mission.
|
||||
if (data.uasState() != ProjectDataManagement::UasState_def::Manual && modType != DataModification::eRemoved)
|
||||
if (data.uasState() != ProjectDataManagement::UasState::Manual && modType != DataModification::eRemoved)
|
||||
return;
|
||||
|
||||
for (auto planObj : m_missionPlanObjects)
|
||||
@@ -204,7 +204,7 @@ bool CesMissionPlanHandler::isUasCombatReady(int participantId)
|
||||
youngestState = si;
|
||||
}
|
||||
|
||||
return (youngestState.vulnerabilityState() == ProjectDataManagement::VulnerabilityState::CombatReady);
|
||||
return (youngestState.vulnerabilityState() == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady);
|
||||
}
|
||||
|
||||
void CesMissionPlanHandler::onSendNextMissionAction(const ParticipantManagement::MissionAction &msa)
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ namespace CES_MISSIONPLAN
|
||||
{
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
|
||||
+93
-93
@@ -179,12 +179,12 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
if ((data.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtDangerArea)
|
||||
&& (data.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtBCContamination)
|
||||
&& (data.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtNContamination))
|
||||
if ((data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtDangerArea)
|
||||
&& (data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtBCContamination)
|
||||
&& (data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtNContamination))
|
||||
return;
|
||||
|
||||
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtBCContamination)
|
||||
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtBCContamination)
|
||||
{
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(data.aesItemId());
|
||||
if (!bc.isCentral())
|
||||
@@ -196,7 +196,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
upperOffset = bCContamination.upperOffset();
|
||||
lowerOffset = bCContamination.lowerOffset();
|
||||
}
|
||||
else if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtDangerArea)
|
||||
else if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtDangerArea)
|
||||
{
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(data.aesItemId());
|
||||
if (!da.isCentral())
|
||||
@@ -205,7 +205,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
else if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtNContamination)
|
||||
{
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(data.aesItemId());
|
||||
if (!nc.isCentral())
|
||||
@@ -226,7 +226,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
DEBUG_LOG(m_logger) << "impactRadius=" << impactRadius;
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
{
|
||||
const auto &aesItemViewUtm = CentralEffectSimulation::AesItemViewUtm::create(data,
|
||||
m_aesItemViews[data.aesItemId()],
|
||||
@@ -239,7 +239,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
}
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
|
||||
CentralEffectSimulation::AesItemViewUtm aesItemViewUtm =
|
||||
@@ -262,8 +262,8 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
// for each participant:
|
||||
// Bounding-Box Check,
|
||||
// form-Check
|
||||
@@ -273,7 +273,7 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
// DEBUG_LOG(m_logger) << "insert AtBCContamination oder AtNContamination AesItemView id: " << aesItemId
|
||||
// << ", type: " << data.aesTypeId();
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
calculateDangerArea(aesItemViewUtm);
|
||||
m_aesItemViews.insert(data.aesItemId(), aesItemViewUtm);
|
||||
DEBUG_LOG(m_logger) << "insert AtDangerArea AesItemView id: " << aesItemId
|
||||
@@ -284,8 +284,8 @@ void HandlerNBC::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &d
|
||||
} // switch aesTypeId
|
||||
break;
|
||||
} // case EsActivated
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
{
|
||||
aesItemViewRemoved(aesItemId);
|
||||
break;
|
||||
@@ -314,10 +314,10 @@ void HandlerNBC::onBCContaminationChanged(const AreaEffectSimulation::BCContamin
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id()];
|
||||
if (m_ddsHandler->volatilityTypeId(data.chargeStruct()) == ProjectDataManagement::VolatilityType_def::Resident)
|
||||
if (m_ddsHandler->volatilityTypeId(data.chargeStruct()) == ProjectDataManagement::VolatilityType::Resident)
|
||||
{
|
||||
ref.radials = {data.impactRadius()};
|
||||
ref.center = CentralEffectSimulation::geographic2Utm(data.impactPosition(), &ref.zone);
|
||||
@@ -345,7 +345,7 @@ void HandlerNBC::onNContaminationChanged(const AreaEffectSimulation::NContaminat
|
||||
case DataModification::eModified:
|
||||
switch (data.effectStateId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm &ref = m_aesItemViews[data.id()];
|
||||
ref.radials = {data.impactRadius(),
|
||||
@@ -440,7 +440,7 @@ void HandlerNBC::deleteDangerArea(const int aesItemId)
|
||||
const auto partPosMap = m_handlerParticipant->positions();
|
||||
for (const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos : partPosMap)
|
||||
{
|
||||
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
|
||||
}// for all Participants
|
||||
} // deleteDangerArea
|
||||
@@ -473,7 +473,7 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
bool aesIsAvailable = m_ddsHandler->dtcAes()->aesItemViewFromEntityId(m_isInContaminatedRoom.value(participantData.participantId()),AreaEffectSimulation::AesType::AtUnknown, aesItemView );
|
||||
|
||||
if (aesIsAvailable
|
||||
&& (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated))
|
||||
&& (aesItemView.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Feld ist nicht mehr da. id=" << aesItemView.aesItemId();
|
||||
m_isInContaminatedRoom.remove(participantData.participantId());
|
||||
@@ -512,9 +512,9 @@ void HandlerNBC::onNewOutdoorParticipantPosition(const CentralEffectSimulation::
|
||||
}
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
inFormCheck(itemView, participantData);
|
||||
break;
|
||||
default:
|
||||
@@ -569,7 +569,7 @@ void HandlerNBC::onRestoreRadioReadinessChanged(const int participantId)
|
||||
bool HandlerNBC::inBoundingBoxCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
// QRectF(topLeft, bottomRight) -> no need to mormalize, QRectF:contains() handles it correct
|
||||
@@ -616,7 +616,7 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
const QPointF participantPosUtmPoint = CentralEffectSimulation::geographic2Utm(participantData.pos(), zone);
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
{
|
||||
// since buildings can only be contaminated by resident bccontaminations
|
||||
// effectType is EffectType::BCContaminationEnterResident if isIndoor
|
||||
@@ -626,16 +626,16 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
sendEffectTypeEvent(aesItemId, participantData, effectType);
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType::EventType_EnterDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType::EventType_EnterNuclear);
|
||||
sendEffectTypeEvent(aesItemId, participantData, effectTypeForNContaminationArea(m_aesItemViews.value(aesItemId), participantPosUtmPoint, participantData.sampleTime(), participantData.insideBuilding()));
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
default:
|
||||
INFO_LOG(m_logger) << "sendEvent Unhandled AES-Type" << aesTypeId;
|
||||
break;
|
||||
@@ -646,7 +646,7 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
|
||||
{
|
||||
|
||||
AreaEffectSimulation::AesItemView aesItemView;
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(aesItemId, AreaEffectSimulation::AesType_def::AtUnknown, aesItemView);
|
||||
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(aesItemId, AreaEffectSimulation::AesType::AtUnknown, aesItemView);
|
||||
|
||||
DEBUG_LOG(m_logger) << "sendLeaveEvent"
|
||||
<< " aesId=" << aesItemId
|
||||
@@ -656,21 +656,21 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
|
||||
|
||||
switch (aesItemView.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
sendEffectTypeEvent(aesItemId, participantData, EffectType::BCContaminationLeave);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType::EventType_LeaveMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType::EventType_LeaveNuclear);
|
||||
sendEffectTypeEvent(aesItemId, participantData, EffectType::NContaminationLeave);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
default:
|
||||
break;
|
||||
} // end switch
|
||||
@@ -681,7 +681,7 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
|
||||
bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
const QRectF boundingBoxImpact(itemView.boundingBoxBottomLeft,
|
||||
@@ -715,7 +715,7 @@ bool HandlerNBC::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &item
|
||||
<< " roomFound=" << roomFound
|
||||
<< " offsetZ=" << structureElement.relPosition().offsetZ();
|
||||
|
||||
if ( (itemView.aesTypeId.underlying() != AreaEffectSimulation::AesType_def::AtNContamination)
|
||||
if ( (itemView.aesTypeId.underlying() != AreaEffectSimulation::AesType::AtNContamination)
|
||||
&& itemView.offsetIsSet
|
||||
&& ( ( structureElement.relPosition().offsetZ() + 1.5 > itemView.upperOffset )
|
||||
|| ( structureElement.relPosition().offsetZ() + 1.5 < itemView.lowerOffset)))
|
||||
@@ -779,12 +779,12 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId, 0);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantData.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantData.buildingId(),
|
||||
participantData.roomId());
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipNo, // equipmentNumber
|
||||
participantData.participantId(), // participantId
|
||||
@@ -878,10 +878,10 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(aesItemId, 0);
|
||||
const int originatorEquipmentNumber = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
const TrainingAreaBase::TabPosition pos(
|
||||
participantData.pos(), Core::PositionReportingSource_def::Gps, participantData.buildingId(),
|
||||
participantData.pos(), Core::PositionReportingSource::Gps, participantData.buildingId(),
|
||||
participantData.roomId()
|
||||
);
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipmentNumber, participantData.participantId(), legacyChargeTypeId, aesItemId, originatorEquipmentNumber,
|
||||
remaining, pos, effectTime, eventType, partyId, mineFieldBitIndex
|
||||
@@ -903,12 +903,12 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantData.participantTypeId());
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId()
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
@@ -931,12 +931,12 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
}
|
||||
|
||||
// send hit events only with central AES Simulation
|
||||
if (eventType == ProjectDataManagement::PdmEventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitN)
|
||||
if (eventType == ProjectDataManagement::PdmEventType::EventType_HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitN)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "send hit events only with central AES Simulation participant=" << participantData.participantId();
|
||||
return;
|
||||
@@ -963,17 +963,17 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
pe.aesItemId(aesItemId);
|
||||
pe.partyId(participantData.partyId());
|
||||
|
||||
if (eventType == ProjectDataManagement::PdmEventType_def::BCContamination)
|
||||
if (eventType == ProjectDataManagement::PdmEventType::EventType_BCContamination)
|
||||
{
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(aesItemId);
|
||||
pe.aesName(bc.name());
|
||||
}
|
||||
else if (eventType == ProjectDataManagement::PdmEventType_def::DangerArea)
|
||||
else if (eventType == ProjectDataManagement::PdmEventType::EventType_DangerArea)
|
||||
{
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(aesItemId);
|
||||
pe.aesName(da.name());
|
||||
}
|
||||
else if (eventType == ProjectDataManagement::PdmEventType_def::NContamination)
|
||||
else if (eventType == ProjectDataManagement::PdmEventType::EventType_NContamination)
|
||||
{
|
||||
const AreaEffectSimulation::NContamination &nc = m_ddsHandler->dtcAes()->nContamination(aesItemId);
|
||||
pe.aesName(nc.name());
|
||||
@@ -988,14 +988,14 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
|
||||
// Criterion for friendly Fire:
|
||||
if (aesItem.partyId() != -1
|
||||
&& ((eventType == ProjectDataManagement::PdmEventType_def::EnterMineArea
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::EnterNuclear
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType_def::HitN)
|
||||
&& ((eventType == ProjectDataManagement::PdmEventType::EventType_EnterMineArea
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_EnterNuclear
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitB
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitC
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_Hit
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitMine
|
||||
|| eventType == ProjectDataManagement::PdmEventType::EventType_HitN)
|
||||
&& aesItem.partyId() == participantData.partyId()))
|
||||
pe.friendlyFire(true);
|
||||
else
|
||||
@@ -1060,26 +1060,26 @@ bool HandlerNBC::eventMustBeSend(int aesItemId,
|
||||
// - remove opposite events (e.g remove Enter event when we leave the area)
|
||||
switch (eventType.underlying())
|
||||
{
|
||||
case ProjectDataManagement::PdmEventType_def::EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_LeaveNuclear);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType::EventType_EnterNuclear);
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1200,25 +1200,25 @@ ProjectDataManagement::PdmEventType HandlerNBC::leaveEventTypeForAesType(AreaEff
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
return ProjectDataManagement::PdmEventType::LeaveDangerArea;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
return ProjectDataManagement::PdmEventType::LeaveMineArea;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
return ProjectDataManagement::PdmEventType::LeaveNuclear;
|
||||
case AreaEffectSimulation::AesType::AtDangerArea:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveDangerArea;
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveMineArea;
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
return ProjectDataManagement::PdmEventType::EventType_LeaveNuclear;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ProjectDataManagement::PdmEventType::Unknown;
|
||||
return ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
}
|
||||
|
||||
EffectType HandlerNBC::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtBCContamination:
|
||||
case AreaEffectSimulation::AesType::AtBCContamination:
|
||||
return EffectType::BCContaminationLeave;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
case AreaEffectSimulation::AesType::AtNContamination:
|
||||
return EffectType::NContaminationLeave;
|
||||
default:
|
||||
break;
|
||||
@@ -1329,7 +1329,7 @@ void HandlerNBC::aesItemViewRemoved(int aesItemId)
|
||||
}
|
||||
}
|
||||
const auto eventTypeLeave = leaveEventTypeForAesType(aiv.aesTypeId);
|
||||
if (eventTypeLeave != ProjectDataManagement::PdmEventType::Unknown)
|
||||
if (eventTypeLeave != ProjectDataManagement::PdmEventType::EventType_Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
|
||||
auto it = m_eventStates.find(aesItemId);
|
||||
|
||||
+5
-5
@@ -62,7 +62,7 @@ void HandlerBlockedAreas::onParticipantPositionChanged(const CentralEffectSimula
|
||||
TrainingAreaBase::SendParticipantBlockedAreaRequest pba;
|
||||
pba.equipmentNumber(m_ddsHandler->participantId2EquipNo(partPos.participantId()));
|
||||
pba.participantId(partPos.participantId());
|
||||
// if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CombatReady)
|
||||
// if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CombatReady)
|
||||
// m_blockedAreas.remove(participantId);
|
||||
|
||||
if (!partPos.insideBuilding())
|
||||
@@ -71,7 +71,7 @@ void HandlerBlockedAreas::onParticipantPositionChanged(const CentralEffectSimula
|
||||
if (it != m_blockedAreas.end())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Blocked Area Leave equipment-No. =" << pba.equipmentNumber();
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode_def::Leave);
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode::Leave);
|
||||
m_ddsHandler->ftcTab()->sendParticipantBlockedAreaRequest(pba, this);
|
||||
m_blockedAreas.erase(it);
|
||||
}
|
||||
@@ -84,7 +84,7 @@ void HandlerBlockedAreas::onParticipantPositionChanged(const CentralEffectSimula
|
||||
(m_handlerParticipantBuilding->getDamagePercentFromRoom(partPos.roomId()) < damagePercentBlockedAreas))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Blocked Area Leave equipment-No. =" << pba.equipmentNumber();
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode_def::Leave);
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode::Leave);
|
||||
m_ddsHandler->ftcTab()->sendParticipantBlockedAreaRequest(pba, this);
|
||||
m_blockedAreas.remove(participantId);
|
||||
return;
|
||||
@@ -106,7 +106,7 @@ void HandlerBlockedAreas::onParticipantPositionChanged(const CentralEffectSimula
|
||||
&& !m_blockedAreas.contains(participantId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Send Enter Blocked Area to Participant:" << participantId;
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode_def::Enter);
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode::Enter);
|
||||
m_ddsHandler->ftcTab()->sendParticipantBlockedAreaRequest(pba, this);
|
||||
m_blockedAreas.insert(participantId, partPos.roomId());
|
||||
}
|
||||
@@ -128,7 +128,7 @@ void HandlerBlockedAreas::onBuildingStateChanged(const int32_t buildingId)
|
||||
TrainingAreaBase::SendParticipantBlockedAreaRequest pba;
|
||||
pba.equipmentNumber(m_ddsHandler->participantId2EquipNo(participantId));
|
||||
pba.participantId(participantId);
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode_def::Leave);
|
||||
pba.blockedAreaMode(TrainingAreaBase::BlockedAreaMode::Leave);
|
||||
m_ddsHandler->ftcTab()->sendParticipantBlockedAreaRequest(pba, this);
|
||||
m_blockedAreas.remove(participantId);
|
||||
}
|
||||
|
||||
+2
-2
@@ -181,7 +181,7 @@ void HandlerParticipantBuilding::onBuildingStateChanged(const Buildings::Buildin
|
||||
const int participantId = participantPos.participantId();
|
||||
if (participantPos.roomId() != roomState.id())
|
||||
continue;
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
const int equipNo = m_ddsHandler->participantId2EquipNo(participantId);
|
||||
if (equipNo <= 0)
|
||||
@@ -219,7 +219,7 @@ void HandlerParticipantBuilding::sendCesHitToParticipant(const Buildings::Buildi
|
||||
|
||||
|
||||
CentralEffectSimulation::HandlerParticipant::CesParticipantData participantPos = participantsMap.value(participantId);
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::HitBuilding;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_HitBuilding;
|
||||
|
||||
AreaEffectSimulation::AesItem aesItem;
|
||||
|
||||
|
||||
+11
-11
@@ -139,9 +139,9 @@ void HandlerTargetAreas::onParticipantChanged(const ParticipantManagement::Parti
|
||||
|
||||
// No OC in CES
|
||||
ParticipantManagement::TypeClass typeClass = typeClassFromTypeId(data.typeId());
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::SupportEntity
|
||||
|| typeClass == ParticipantManagement::TypeClass_def::SupportUnit
|
||||
|| typeClass == ParticipantManagement::TypeClass_def::Unit)
|
||||
if (typeClass == ParticipantManagement::TypeClass::SupportEntity
|
||||
|| typeClass == ParticipantManagement::TypeClass::SupportUnit
|
||||
|| typeClass == ParticipantManagement::TypeClass::Unit)
|
||||
return;
|
||||
m_participantData[data.id()] = data;
|
||||
|
||||
@@ -153,7 +153,7 @@ void HandlerTargetAreas::onParticipantChanged(const ParticipantManagement::Parti
|
||||
<< " id=" << data.id()
|
||||
<< " typeId=" << data.typeId()
|
||||
<< " designator=" << data.designator();
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Target)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Target)
|
||||
DEBUG_LOG(m_logger) << "Typeclass = Target";
|
||||
}
|
||||
|
||||
@@ -423,7 +423,7 @@ void HandlerTargetAreas::sendRequestsToTab(int participantId,
|
||||
int32_t effectPercentFt = effectPercent;
|
||||
rti::core::int64 effectTimeFt = m_ddsHandler->currentPartitionTime();
|
||||
|
||||
TrainingAreaBase::ControlDataCode controlCodeFt = TrainingAreaBase::ControlDataCode_def::Flashing;
|
||||
TrainingAreaBase::ControlDataCode controlCodeFt = TrainingAreaBase::ControlDataCode::Flashing;
|
||||
std::vector< uint8_t > controlDataFt;
|
||||
|
||||
|
||||
@@ -471,19 +471,19 @@ void HandlerTargetAreas::on_preWarningIntervalFinished(int participantId, int ta
|
||||
|
||||
switch (shootbackTarget.targetInformation.prewarningEffect().underlying())
|
||||
{
|
||||
case ProjectDataManagement::VulnerabilityState_def::NoChange:
|
||||
case ProjectDataManagement::VulnerabilityState::NoChange:
|
||||
countBlink = 1;
|
||||
effectPercent = 0;
|
||||
break;
|
||||
case ProjectDataManagement::VulnerabilityState_def::MobilityKill:
|
||||
case ProjectDataManagement::VulnerabilityState::MobilityKill:
|
||||
effectPercent = 30;
|
||||
countBlink = 2;
|
||||
break;
|
||||
case ProjectDataManagement::VulnerabilityState_def::NearMiss:
|
||||
case ProjectDataManagement::VulnerabilityState::NearMiss:
|
||||
countBlink = 3;
|
||||
effectPercent = 60;
|
||||
break;
|
||||
case ProjectDataManagement::VulnerabilityState_def::CatastrophicKill:
|
||||
case ProjectDataManagement::VulnerabilityState::CatastrophicKill:
|
||||
countBlink = 4;
|
||||
effectPercent = 100;
|
||||
break;
|
||||
@@ -520,11 +520,11 @@ void HandlerTargetAreas::on_TimeToEffectFinished(int participantId, int targetPa
|
||||
|
||||
switch (shootbackTarget.targetInformation.takedownEffect().underlying())
|
||||
{
|
||||
case ProjectDataManagement::VulnerabilityState_def::MobilityKill:
|
||||
case ProjectDataManagement::VulnerabilityState::MobilityKill:
|
||||
effectPercent = 50;
|
||||
countBlink = 5;
|
||||
break;
|
||||
case ProjectDataManagement::VulnerabilityState_def::CatastrophicKill:
|
||||
case ProjectDataManagement::VulnerabilityState::CatastrophicKill:
|
||||
countBlink = 6;
|
||||
effectPercent = 100;
|
||||
break;
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ public:
|
||||
|
||||
struct ParticipantPosition : public ParticipantManagement::ParticipantPosition
|
||||
{
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState_def::CombatReady;
|
||||
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::CombatReady;
|
||||
Core::GeoPosition lastGeoPosition;
|
||||
bool positionValid = false;
|
||||
|
||||
|
||||
+22
-22
@@ -115,9 +115,9 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
|
||||
// prevData.aesItemId = 0;
|
||||
|
||||
// const CentralEffectSimulation::AesItemViewUtm boobyTrapUtm = CentralEffectSimulation::AesItemViewUtm::create(data, prevData, impactRadius);
|
||||
// if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrap)
|
||||
// if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrap)
|
||||
// m_boobyTrapItems.insert(data.aesItemId(), boobyTrapUtm);
|
||||
// if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
// if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
|
||||
// m_boobyTrapItemsSecondary.insert(data.aesItemId(), boobyTrapUtm);
|
||||
// DEBUG_LOG(m_logger) << "Check each participant"
|
||||
// << " aesTypeId=" << data.aesTypeId();
|
||||
@@ -137,7 +137,7 @@ void HandlerParticipantBoobyTrap::onBoobyTrapChanged(const AreaEffectSimulation:
|
||||
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
@@ -165,7 +165,7 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
|| data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved
|
||||
|| modType == DataModification::eRemoved)
|
||||
{
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
|
||||
{
|
||||
m_boobyTraps.remove(data.id());
|
||||
m_boobyTrapItems.remove(data.id());
|
||||
@@ -179,8 +179,8 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
}
|
||||
|
||||
//
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBoobyTrap
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtBoobyTrap
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
|
||||
return;
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
@@ -196,16 +196,16 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm prevData;
|
||||
const double impactRadius = 0;
|
||||
prevData.aesItemId = 0;
|
||||
|
||||
const CentralEffectSimulation::AesItemViewUtm boobyTrapUtm = CentralEffectSimulation::AesItemViewUtm::create(data, prevData, impactRadius);
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrap)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrap)
|
||||
m_boobyTrapItems.insert(data.aesItemId(), boobyTrapUtm);
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
|
||||
m_boobyTrapItemsSecondary.insert(data.aesItemId(), boobyTrapUtm);
|
||||
DEBUG_LOG(m_logger) << "Check each participant"
|
||||
<< " aesTypeId=" << data.aesTypeId();
|
||||
@@ -224,14 +224,14 @@ void HandlerParticipantBoobyTrap::onAesItemViewChanged(const AreaEffectSimulatio
|
||||
// DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
// if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
// {
|
||||
// DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// // Nur Positionsmeldungen, die neuer sind als die Mine koennen sie ausloesen!
|
||||
// if ((participantPos.sampleTime() < data.sampleTime())
|
||||
// && (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrap))
|
||||
// && (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrap))
|
||||
// {
|
||||
// DEBUG_LOG(m_logger) << " the time of the participant is older than the BoobyTrap participantId=" << participantPos.participantId()
|
||||
// << " participantPos.sampleTime()=" << participantPos.sampleTime()
|
||||
@@ -282,7 +282,7 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantsSecondary(int ae
|
||||
DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
}
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
continue;
|
||||
@@ -373,9 +373,9 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantSecondary(const C
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
}
|
||||
} // calculateBoobyTrapParticipantSecondary
|
||||
|
||||
@@ -472,9 +472,9 @@ bool HandlerParticipantBoobyTrap::calculateBoobyTrapParticipant(const CentralEff
|
||||
DEBUG_LOG(m_logger) << "sendFtcBoobyTrapTrigger id=" << aesItemView.aesItemId;
|
||||
sendFtcBoobyTrapTrigger(aesItemView.aesItemId);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
//calculateBoobyTrapParticipantsSecondary(aesItemView.aesItemId, participantPos.participantId() );
|
||||
}
|
||||
return true;
|
||||
@@ -490,7 +490,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
<< " lon=" << partPos.pos().lon()
|
||||
<< " Anzahl BoobyTraps=" << m_boobyTrapItems.size();
|
||||
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has vulnerability state CatastrophicKill";
|
||||
return;
|
||||
@@ -519,7 +519,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
const bool result = enteredOrCrossedArea(boobyTrap.form, posStepPoly);
|
||||
DEBUG_LOG(m_logger) << "result BoobyTrap Explosion = " << result;
|
||||
if (result)
|
||||
sendParticipantEvent(boobyTrap, partPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(boobyTrap, partPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -549,10 +549,10 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
|
||||
m_triggeredMineParticipant.insert(boobyTrapItem.aesItemId, 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;
|
||||
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
|
||||
|
||||
+19
-19
@@ -108,8 +108,8 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
}
|
||||
|
||||
//
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtOffRouteMine
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtOffRouteMine
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|
||||
return;
|
||||
|
||||
const int aesItemId = data.aesItemId();
|
||||
@@ -125,16 +125,16 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
CentralEffectSimulation::AesItemViewUtm prevData;
|
||||
const double impactRadius = 0;
|
||||
prevData.aesItemId = 0;
|
||||
|
||||
const CentralEffectSimulation::AesItemViewUtm aesItemViewUtm = CentralEffectSimulation::AesItemViewUtm::create(data, prevData, impactRadius);
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMine)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMine)
|
||||
m_offRouteMineItems.insert(data.aesItemId(), aesItemViewUtm);
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|
||||
m_offRouteMineItemsSecondary.insert(data.aesItemId(), aesItemViewUtm);
|
||||
// DEBUG_LOG(m_logger) << "Check each participant";
|
||||
// // Check each participant
|
||||
@@ -151,7 +151,7 @@ void HandlerParticipantOffRouteMine::onAesItemViewChanged(const AreaEffectSimula
|
||||
// DEBUG_LOG(m_logger) << "inside Building participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
// }
|
||||
// if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
// if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
// {
|
||||
// DEBUG_LOG(m_logger) << "CatastrophicKill participantId=" << participantPos.participantId() << " continue";
|
||||
// continue;
|
||||
@@ -271,9 +271,9 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantSecondary(c
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine); //69
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine); //69
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine); // 49
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine); // 49
|
||||
}
|
||||
} // calculateOffRouteMineParticipantSecondary
|
||||
|
||||
@@ -306,9 +306,9 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipant(const Cent
|
||||
DEBUG_LOG(m_logger) << "sendFtcOffRouteMineTrigger id=" << aesItemView.aesItemId;
|
||||
sendFtcOffRouteMineTrigger(aesItemView.aesItemId);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
calculateOffRouteMineParticipantsSecondary(aesItemView.aesItemId);
|
||||
}
|
||||
} // calculateOffRouteMineParticipant
|
||||
@@ -326,15 +326,15 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
<< " lon=" << partPos.pos().lon()
|
||||
<< " Anzahl OffRouteMines=" << m_offRouteMineItems.size();
|
||||
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::inner_enum::CatastrophicKill)
|
||||
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not handle position: participant has vulnerability state CatastrophicKill";
|
||||
return;
|
||||
}
|
||||
|
||||
if (typeClass != ParticipantManagement::TypeClass_def::GroundVehicle
|
||||
&& typeClass != ParticipantManagement::TypeClass_def::WeaponSystem
|
||||
&& typeClass != ParticipantManagement::TypeClass_def::VehicleWithGear)
|
||||
if (typeClass != ParticipantManagement::TypeClass::GroundVehicle
|
||||
&& typeClass != ParticipantManagement::TypeClass::WeaponSystem
|
||||
&& typeClass != ParticipantManagement::TypeClass::VehicleWithGear)
|
||||
{
|
||||
INFO_LOG(m_logger) << "Not handle position: No type vehicle ";
|
||||
return;
|
||||
@@ -377,7 +377,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
const bool result = enteredOrCrossedArea(offRouteMine.form, posStepPoly);
|
||||
DEBUG_LOG(m_logger) << "result offRouteMine Explosion = " << result;
|
||||
if (result)
|
||||
sendParticipantEvent(offRouteMine, partPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(offRouteMine, partPos, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -395,10 +395,10 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
|
||||
{
|
||||
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;
|
||||
|
||||
int equipmentNumber = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
|
||||
|
||||
Reference in new issue
Block a user