Removes .IDL warnings: multiple enum definitons and builtin-type collisions
This commit is contained in:
135 files changed
+1122
-1122
No files matched your search
+6
-6
@@ -944,24 +944,24 @@ void CesTests::onSendCesHitRequest(const rti::core::SampleIdentity &cookie,
|
||||
|
||||
void CesTests::checkParticipantEvent()
|
||||
{
|
||||
ProjectDataManagement::EventType expectedType = ProjectDataManagement::EventType::Unknown;
|
||||
ProjectDataManagement::PdmEventType expectedType = ProjectDataManagement::PdmEventType::Unknown;
|
||||
switch (m_testId)
|
||||
{
|
||||
case 8:
|
||||
expectedType = ProjectDataManagement::EventType::EnterMineArea;
|
||||
expectedType = ProjectDataManagement::PdmEventType::EnterMineArea;
|
||||
break;
|
||||
case 10:
|
||||
expectedType = ProjectDataManagement::EventType::EnterFunctionalArea;
|
||||
expectedType = ProjectDataManagement::PdmEventType::EnterFunctionalArea;
|
||||
break;
|
||||
case 11:
|
||||
case 12:
|
||||
expectedType = ProjectDataManagement::EventType::LeaveFunctionalArea;
|
||||
expectedType = ProjectDataManagement::PdmEventType::LeaveFunctionalArea;
|
||||
break;
|
||||
case 13:
|
||||
expectedType = ProjectDataManagement::EventType::CrossLocalBorderline;
|
||||
expectedType = ProjectDataManagement::PdmEventType::CrossLocalBorderline;
|
||||
break;
|
||||
case 14:
|
||||
expectedType = ProjectDataManagement::EventType::EnterDangerArea;
|
||||
expectedType = ProjectDataManagement::PdmEventType::EnterDangerArea;
|
||||
break;
|
||||
default:
|
||||
// nothing
|
||||
|
||||
+1
-1
@@ -303,7 +303,7 @@ void CesTestsBoobyTrap::onEventChanged(const CentralEffectSimulation::Participan
|
||||
if (modType == DataModification::eRemoved ||
|
||||
modType == DataModification::eModified)
|
||||
return;
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::HitMine)
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::HitMine)
|
||||
{
|
||||
m_countEventBoobyTrap ++;
|
||||
DEBUG_LOG(m_logger) << "m_countEventBoobyTrap=" << m_countEventBoobyTrap
|
||||
|
||||
+1
-1
@@ -360,7 +360,7 @@ void CesTestsGasPipe::onEventChanged(const CentralEffectSimulation::ParticipantE
|
||||
if (modType == DataModification::eRemoved ||
|
||||
modType == DataModification::eModified)
|
||||
return;
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::HitGasPipe)
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::HitGasPipe)
|
||||
{
|
||||
m_countEventGasPipe ++;
|
||||
DEBUG_LOG(m_logger) << "m_countEventGasPipe=" << m_countEventGasPipe;
|
||||
|
||||
+1
-1
@@ -399,7 +399,7 @@ void CesTestsMineAreas::onEventChanged(const CentralEffectSimulation::Participan
|
||||
if (modType == DataModification::eRemoved ||
|
||||
modType == DataModification::eModified)
|
||||
return;
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::HitGasPipe)
|
||||
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::HitGasPipe)
|
||||
{
|
||||
m_countEventMineAreas ++;
|
||||
DEBUG_LOG(m_logger) << "m_countEventMineAreas=" << m_countEventMineAreas;
|
||||
|
||||
+2
-2
@@ -110,8 +110,8 @@ void cesTestsSimulatedMovement::checkParticipantEvent()
|
||||
{
|
||||
case 1:
|
||||
case 2:
|
||||
if (participantEvent0.eventTypeId() == ProjectDataManagement::EventType::HitEffectSimulation
|
||||
&& participantEvent1.eventTypeId() == ProjectDataManagement::EventType::HitEffectSimulation)
|
||||
if (participantEvent0.eventTypeId() == ProjectDataManagement::PdmEventType::HitEffectSimulation
|
||||
&& participantEvent1.eventTypeId() == ProjectDataManagement::PdmEventType::HitEffectSimulation)
|
||||
ExitSuccess();
|
||||
break;
|
||||
default:
|
||||
|
||||
+2
-2
@@ -255,8 +255,8 @@ void CesTestsSmart::checkParticipantEvent()
|
||||
switch (m_testId)
|
||||
{
|
||||
case 1:
|
||||
if ( participantEvent0.eventTypeId()==ProjectDataManagement::EventType::HitEffectSimulation
|
||||
&& participantEvent1.eventTypeId()==ProjectDataManagement::EventType::HitEffectSimulation)
|
||||
if ( participantEvent0.eventTypeId()==ProjectDataManagement::PdmEventType::HitEffectSimulation
|
||||
&& participantEvent1.eventTypeId()==ProjectDataManagement::PdmEventType::HitEffectSimulation)
|
||||
{
|
||||
ExitSuccess();
|
||||
}
|
||||
|
||||
+3
-3
@@ -142,9 +142,9 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff
|
||||
if (result)
|
||||
{
|
||||
if (borderline.operatorId <= 0)
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::EventType_def::CrossGlobalBorderline);
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::PdmEventType_def::CrossGlobalBorderline);
|
||||
else
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::EventType_def::CrossLocalBorderline);
|
||||
sendParticipantEvent(borderline, partPos, ProjectDataManagement::PdmEventType_def::CrossLocalBorderline);
|
||||
}
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
@@ -159,7 +159,7 @@ void HandlerParticipantBorderline::onParticipantPositionChanged(const CentralEff
|
||||
|
||||
void HandlerParticipantBorderline::sendParticipantEvent(const BorderlineUtm &borderline,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
|
||||
|
||||
+1
-1
@@ -69,7 +69,7 @@ private Q_SLOTS:
|
||||
private: // methoden
|
||||
void sendParticipantEvent(const BorderlineUtm &borderline,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
bool intersect(const QPolygonF &polygonf, const QLineF &linef) const;
|
||||
|
||||
private: // attributes
|
||||
|
||||
+52
-52
@@ -23,7 +23,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -483,11 +483,11 @@ void HandlerParticipantArea::deleteFunctionalArea(const int aesItemId)
|
||||
// Same as leave FunctionArea
|
||||
if (itemView.aesTypeId == AreaEffectSimulation::AesType_def::AtFunctionalArea)
|
||||
{
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::EventType_def::LeaveFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPos, EffectType::FunctionalAreaLeave, -1, -1);
|
||||
}
|
||||
else
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(itemView, participantPos, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
|
||||
} // for all Participants
|
||||
} // deleteFunctionalArea
|
||||
@@ -630,19 +630,19 @@ bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
sendEffectTypeEvent(itemView, participantPosition, effectTypeForBCContaminationArea(itemView, participantPosUtmPoint), -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterDangerArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::FunctionalAreaEnter, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterMineArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::EnterNuclear);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
sendEffectTypeEvent(itemView, participantPosition, effectTypeForNContaminationArea(itemView, participantPosUtmPoint, participantPosition.sampleTime()), -1, -1);
|
||||
break;
|
||||
default:
|
||||
@@ -659,19 +659,19 @@ bool HandlerParticipantArea::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::BCContaminationLeave, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveFunctionalArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::FunctionalAreaLeave, -1, -1);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveMineArea);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::EventType_def::LeaveNuclear);
|
||||
sendParticipantEvent(itemView, participantPosition, ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
sendEffectTypeEvent(itemView, participantPosition, EffectType::NContaminationLeave, -1, -1);
|
||||
break;
|
||||
default:
|
||||
@@ -1087,7 +1087,7 @@ void HandlerParticipantArea::sendCesHitRequest(const AreaEffectSimulation::AesIt
|
||||
|
||||
void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
bool calculateAes = false;
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
@@ -1131,12 +1131,12 @@ void HandlerParticipantArea::sendParticipantEvent(const CentralEffectSimulation:
|
||||
}
|
||||
// send hit events only with central AES Simulation
|
||||
if (calculateAes
|
||||
&& (eventType == ProjectDataManagement::EventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::EventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitN))
|
||||
&& (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))
|
||||
{
|
||||
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::EventType_def::EnterMineArea
|
||||
|| eventType == ProjectDataManagement::EventType_def::EnterNuclear
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::EventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitN)
|
||||
&& ((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)
|
||||
&& itemView.partyId == participantPosition.partyId()))
|
||||
pe.friendlyFire(true);
|
||||
else
|
||||
@@ -1252,10 +1252,10 @@ void HandlerParticipantArea::sendEffectTypeEvent(const CentralEffectSimulation::
|
||||
|
||||
bool HandlerParticipantArea::eventMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
// end enter-leave only once
|
||||
QSet<ProjectDataManagement::EventType> &activeEvents = m_eventStates[aesItemId][participantId]; // reference!
|
||||
QSet<ProjectDataManagement::PdmEventType> &activeEvents = m_eventStates[aesItemId][participantId]; // reference!
|
||||
// - only send event if it was not already sent
|
||||
if (activeEvents.contains(eventType))
|
||||
{
|
||||
@@ -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::EventType_def::EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterDangerArea);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveMineArea);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterMineArea);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::EnterFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveFunctionalArea);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterFunctionalArea);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterFunctionalArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveNuclear);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterNuclear);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
@@ -1420,22 +1420,22 @@ bool HandlerParticipantArea::inCircle(const QPointF ¢erUtm, const double rad
|
||||
return (squareDist < squareRadius);
|
||||
} // inCircle
|
||||
|
||||
ProjectDataManagement::EventType HandlerParticipantArea::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
ProjectDataManagement::PdmEventType HandlerParticipantArea::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
return ProjectDataManagement::EventType::LeaveDangerArea;
|
||||
return ProjectDataManagement::PdmEventType::LeaveDangerArea;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
return ProjectDataManagement::EventType::LeaveMineArea;
|
||||
return ProjectDataManagement::PdmEventType::LeaveMineArea;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
return ProjectDataManagement::EventType::LeaveNuclear;
|
||||
return ProjectDataManagement::PdmEventType::LeaveNuclear;
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
return ProjectDataManagement::EventType::LeaveFunctionalArea;
|
||||
return ProjectDataManagement::PdmEventType::LeaveFunctionalArea;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ProjectDataManagement::EventType::Unknown;
|
||||
return ProjectDataManagement::PdmEventType::Unknown;
|
||||
}
|
||||
|
||||
EffectType HandlerParticipantArea::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
@@ -1511,13 +1511,13 @@ void HandlerParticipantArea::aesItemViewRemoved(int aesItemId)
|
||||
}
|
||||
}
|
||||
const auto eventTypeLeave = leaveEventTypeForAesType(aiv.aesTypeId);
|
||||
if (eventTypeLeave != ProjectDataManagement::EventType::Unknown)
|
||||
if (eventTypeLeave != ProjectDataManagement::PdmEventType::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
|
||||
auto it = m_eventStates.find(aesItemId);
|
||||
if (it != m_eventStates.end())
|
||||
{
|
||||
const QHash<int, QSet<ProjectDataManagement::EventType>> &participants = it.value();
|
||||
const QHash<int, QSet<ProjectDataManagement::PdmEventType>> &participants = it.value();
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, sending leave events to " << participants.size()
|
||||
<< " participants";
|
||||
for (auto itP = participants.begin(); itP != participants.end(); ++ itP)
|
||||
|
||||
+4
-4
@@ -114,7 +114,7 @@ private: // methoden
|
||||
int mineFieldBitIndex = 0);
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendEffectTypeEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
EffectType effectType,
|
||||
@@ -123,7 +123,7 @@ private: // methoden
|
||||
|
||||
bool eventMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
bool effectTypeMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
@@ -131,7 +131,7 @@ private: // methoden
|
||||
int mineFieldBitIndex,
|
||||
bool insideBuilding);
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType effectTypeForNContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint, qint64 partPosSampleTime);
|
||||
EffectType effectTypeForBCContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint);
|
||||
@@ -153,7 +153,7 @@ private: // attributes
|
||||
QQueue<TrainingAreaBase::SendCesHitRequest> m_sendCesHitRequestQueue;
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleStates; // key = id value = state
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleCentralStates;
|
||||
QHash<int, QHash<int, QSet<ProjectDataManagement::EventType>>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<ProjectDataManagement::PdmEventType>>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<EffectType>>> m_effectTypeStates; // QHash<aesItemId, QHash<participantId, QSet<effectStates>>>
|
||||
QHash<int, QHash<int, QSet<int>>> m_effectTypeBitFieldIndexes; // QHash<aesItemId, QHash<participantId, QSet<mineFieldBitIdx>>>
|
||||
|
||||
|
||||
+21
-21
@@ -405,7 +405,7 @@ void HandlerExplosions::calculateImpact(const AreaEffectSimulation::ChargeEffect
|
||||
requestTab.remainEffectPercent(remainEffectPercent);
|
||||
requestTab.position(tabPosition);
|
||||
requestTab.effectTime(data.effectStart() / 1000);
|
||||
requestTab.eventType(ProjectDataManagement::EventType_def::FireEvent);
|
||||
requestTab.eventType(ProjectDataManagement::PdmEventType_def::FireEvent);
|
||||
ParticipantManagement::Participant originator = m_ddsHandler->dtcPpm()->participant(data.originatorId());
|
||||
requestTab.partyId(originator.partyId());
|
||||
requestTab.mineId(0);
|
||||
@@ -994,10 +994,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::PdmEventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, impactTime + 1000, 100, ProjectDataManagement::PdmEventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, ProjectDataManagement::PdmEventType_def::HitEffectSimulation);
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.first().participantPosition, ProjectDataManagement::PdmEventType_def::HitEffectSimulation);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1011,10 +1011,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::PdmEventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendCesHitRequest( itemViewUtm, vehiclesInSmartExplosion.at(1).participantPosition, impactTime, 100, ProjectDataManagement::PdmEventType_def::HitEffectSimulation); // 100 Percent
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.at(0).participantPosition, ProjectDataManagement::PdmEventType_def::HitEffectSimulation);
|
||||
sendParticipantEvent(itemViewUtm, vehiclesInSmartExplosion.at(1).participantPosition, ProjectDataManagement::PdmEventType_def::HitEffectSimulation);
|
||||
|
||||
}
|
||||
} // calculateSmartExplosion
|
||||
@@ -1205,7 +1205,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::PdmEventType_def::EnterHazardDistance);
|
||||
}
|
||||
break;
|
||||
case RANGE::NON_LETHAL:
|
||||
@@ -1230,14 +1230,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::PdmEventType_def::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::PdmEventType_def::EnterHazardDistance);
|
||||
}
|
||||
#endif // GUEZE_3136_IMPLEMENTED
|
||||
} // case
|
||||
@@ -1510,7 +1510,7 @@ void HandlerExplosions::sendEffectTypeEvent(const CentralEffectSimulation::AesIt
|
||||
//effectTime >= 0 ? effectTime : participantPosition.sampleTime(),
|
||||
QDateTime::currentMSecsSinceEpoch(),
|
||||
ctasEffectType,
|
||||
ProjectDataManagement::EventType_def::HitEffectSimulation);
|
||||
ProjectDataManagement::PdmEventType_def::HitEffectSimulation);
|
||||
}
|
||||
|
||||
// Send via TAB-Proxy to battlefield
|
||||
@@ -1518,7 +1518,7 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const qint64 effectTime,
|
||||
const int remaining,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
int32_t legacyChargeTypeId = 0;
|
||||
legacyChargeTypeId = m_ddsHandler->getLegacyIdFromChargeTypeId(itemView.chargeStruct);
|
||||
@@ -1575,7 +1575,7 @@ void HandlerExplosions::sendCesHitRequest(const CentralEffectSimulation::AesItem
|
||||
|
||||
// mineFieldBitIndex wird als reserve2 uebertragen und hier wird die Wirkbeginn uebertragen.
|
||||
int effectTime2 = 0;
|
||||
if (eventType == ProjectDataManagement::EventType::EnterHazardDistance)
|
||||
if (eventType == ProjectDataManagement::PdmEventType::EnterHazardDistance)
|
||||
{
|
||||
const auto &ec = m_ddsHandler->dtcAes().get()->explosionCluster(itemView.aesItemId);
|
||||
if (ec.effectStart().is_set())
|
||||
@@ -1605,7 +1605,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::PdmEventType_def::HitEffectSimulation);
|
||||
}
|
||||
|
||||
double HandlerExplosions::getSquareDistance(const QPointF ¢erUtm, const QPointF &pointUtm)
|
||||
@@ -1632,13 +1632,13 @@ void HandlerExplosions::sendEnterHazardDistance(const int participantId, const i
|
||||
|
||||
m_enteredHazardDistanceStore.participantEnteringArea(participantId, aesItemId);
|
||||
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::EnterHazardDistance;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::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::PdmEventType_def::EnterHazardDistance);
|
||||
}
|
||||
|
||||
void HandlerExplosions::sendLeaveHazardDistance(const int participantId, const int aesItemId, const int remaining)
|
||||
@@ -1658,13 +1658,13 @@ void HandlerExplosions::sendLeaveHazardDistance(const int participantId, const i
|
||||
cesParticipantData,
|
||||
QDateTime::currentMSecsSinceEpoch(),
|
||||
ctasEffectType,
|
||||
ProjectDataManagement::EventType_def::LeaveHazardDistance);
|
||||
sendParticipantEvent(itemView, cesParticipantData, ProjectDataManagement::EventType_def::LeaveHazardDistance);
|
||||
ProjectDataManagement::PdmEventType_def::LeaveHazardDistance);
|
||||
sendParticipantEvent(itemView, cesParticipantData, ProjectDataManagement::PdmEventType_def::LeaveHazardDistance);
|
||||
}
|
||||
|
||||
void HandlerExplosions::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &item,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent participantId=" << participantPosition.participantId();
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
|
||||
+2
-2
@@ -185,7 +185,7 @@ private: // methoden
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const qint64 effectTime,
|
||||
const int remaining,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
double getSquareDistance(const QPointF ¢erUtm, const QPointF &pointUtm);
|
||||
void sendEnterHazardDistance(const int participantId, const int aesItemId);
|
||||
@@ -195,7 +195,7 @@ private: // methoden
|
||||
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &item,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
void startTimer(int id, int msec);
|
||||
|
||||
|
||||
+10
-10
@@ -19,7 +19,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -467,7 +467,7 @@ bool HandlerFunctionalAreas::inFormCheck(const CentralEffectSimulation::AesItemV
|
||||
// Send via TAB-Proxy to battlefield
|
||||
void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
ProjectDataManagement::EventType eventType)
|
||||
ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
qint64 effectTime = QDateTime::currentMSecsSinceEpoch();
|
||||
|
||||
@@ -476,11 +476,11 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
|
||||
switch (eventType.underlying())
|
||||
{
|
||||
case ProjectDataManagement::EventType_def::EnterFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
DEBUG_LOG(m_logger) << "-------------- EnterFunctionalArea itemView =" << itemView.aesItemId;
|
||||
remaining = 1;
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
remaining = 0;
|
||||
DEBUG_LOG(m_logger) << "-------------- LeaveFunctionalArea itemView =" << itemView.aesItemId;
|
||||
break;
|
||||
@@ -564,7 +564,7 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
|
||||
void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
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)
|
||||
@@ -676,7 +676,7 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
|
||||
if (inForm)
|
||||
{
|
||||
enterLeaveType.eventType = ProjectDataManagement::EventType_def::EnterFunctionalArea;
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType_def::EnterFunctionalArea;
|
||||
if (itemView.isSupplyTruck)
|
||||
{
|
||||
enterLeaveType.isAlreadySupplied = true;
|
||||
@@ -695,8 +695,8 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
}
|
||||
else
|
||||
{
|
||||
enterLeaveType.eventType = ProjectDataManagement::EventType_def::LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::EventType_def::EnterFunctionalArea)
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType_def::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::EventType_def::EnterFunctionalArea)
|
||||
|| (!inForm && lastEnterLeaveType.eventType == ProjectDataManagement::EventType_def::EnterFunctionalArea))
|
||||
if ((inForm && lastEnterLeaveType.eventType != ProjectDataManagement::PdmEventType_def::EnterFunctionalArea)
|
||||
|| (!inForm && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType_def::EnterFunctionalArea))
|
||||
{
|
||||
CentralEffectSimulation::HandlerParticipant::CesParticipantData cesParticipantData = m_handlerParticipant.get()->getParticipantPosition(participantId);
|
||||
sendParticipantEvent(itemView, cesParticipantData, enterLeaveType.eventType);
|
||||
|
||||
+4
-4
@@ -54,7 +54,7 @@ struct ParticipantDistance
|
||||
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
@@ -100,13 +100,13 @@ private: // methoden
|
||||
bool inFormCheck(const CentralEffectSimulation::AesItemViewUtm &itemView, const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData);
|
||||
void sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
ProjectDataManagement::EventType eventType);
|
||||
ProjectDataManagement::PdmEventType eventType);
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType effectTypeForNContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint, qint64 partPosSampleTime);
|
||||
EffectType effectTypeForBCContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint);
|
||||
|
||||
+5
-5
@@ -184,9 +184,9 @@ void HandlerParticipantGasPipe::calculateGasPipeParticipant(const CentralEffectS
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(gasPipe, participantPosition, ProjectDataManagement::EventType_def::HitGasPipe);
|
||||
sendParticipantEvent(gasPipe, participantPosition, ProjectDataManagement::PdmEventType_def::HitGasPipe);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(gasPipe, participantPosition, ProjectDataManagement::EventType_def::HitGasPipe);
|
||||
sendParticipantHit(gasPipe, participantPosition, ProjectDataManagement::PdmEventType_def::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::EventType_def::HitGasPipe);
|
||||
sendParticipantEvent(gasPipe, partPos, ProjectDataManagement::PdmEventType_def::HitGasPipe);
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -231,7 +231,7 @@ void HandlerParticipantGasPipe::onParticipantPositionChanged(const CentralEffect
|
||||
|
||||
void HandlerParticipantGasPipe::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &gasPipe,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
|
||||
@@ -270,7 +270,7 @@ void HandlerParticipantGasPipe::sendParticipantEvent(const CentralEffectSimulati
|
||||
|
||||
void HandlerParticipantGasPipe::sendParticipantHit(const CentralEffectSimulation::AesItemViewUtm &gasPipe,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
|
||||
const int equipNo = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
|
||||
|
||||
+2
-2
@@ -67,10 +67,10 @@ private Q_SLOTS:
|
||||
private: // methoden
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &gasPipe,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendParticipantHit(const CentralEffectSimulation::AesItemViewUtm &gasPipe,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
bool insideGasPipeArea(const QPolygonF &polygonf, const QPointF &participantPos) const;
|
||||
void calculateGasPipeParticipant(const CentralEffectSimulation::AesItemViewUtm &gasPipe,
|
||||
|
||||
+2
-2
@@ -22,7 +22,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -216,7 +216,7 @@ void HandlerJamming::sendCesHitRequest(const int chargeTypeId,
|
||||
remaining, // remainEffectPercent ( no protection outside Building )
|
||||
pos,
|
||||
effectTime, // effectTime
|
||||
ProjectDataManagement::EventType::Jamming, // EventType
|
||||
ProjectDataManagement::PdmEventType::Jamming, // EventType
|
||||
originatorPartyId, // originPartyId
|
||||
mineId
|
||||
);
|
||||
|
||||
+2
-2
@@ -34,7 +34,7 @@ struct ParticipantDistance
|
||||
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
@@ -73,7 +73,7 @@ private: // methoden
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData);
|
||||
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
|
||||
private: // attributes
|
||||
|
||||
|
||||
+14
-14
@@ -22,7 +22,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -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::EventType_def::HitMine);
|
||||
sendParticipantEvent(m_aesItemViews[aesItemId], minePosition, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
|
||||
m_mineLists[participantPosition.participantId()].remove(index);
|
||||
|
||||
@@ -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::EventType_def::HitMine);
|
||||
sendParticipantEvent(itemView, minePosition, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
// aktuell verarbeitete Mine aus der Liste entfernen.
|
||||
m_mineLists[participantPosition.participantId()].remove(mineListItemIndex);
|
||||
}
|
||||
@@ -815,7 +815,7 @@ void HandlerMineAreas::sendCesHitRequest(const CentralEffectSimulation::AesItemV
|
||||
participantPosition.roomId());
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
|
||||
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipNo, // equipmentNumber
|
||||
@@ -878,7 +878,7 @@ void HandlerMineAreas::sendCesHitRequest(const AreaEffectSimulation::AesItemView
|
||||
participantPosition.pos(), Core::PositionReportingSource_def::Gps, participantPosition.buildingId(),
|
||||
participantPosition.roomId()
|
||||
);
|
||||
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber,
|
||||
@@ -900,30 +900,30 @@ void HandlerMineAreas::sendParticipantEventEnterLeave(const CentralEffectSimulat
|
||||
const bool inFormCheckResult)
|
||||
{
|
||||
|
||||
const ProjectDataManagement::EventType &lastEvent = m_eventStates[itemView.aesItemId][participantPosition.participantId()];
|
||||
const ProjectDataManagement::PdmEventType &lastEvent = m_eventStates[itemView.aesItemId][participantPosition.participantId()];
|
||||
|
||||
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::EnterMineArea;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
|
||||
|
||||
if (inFormCheckResult)
|
||||
{
|
||||
if (lastEvent == ProjectDataManagement::EventType_def::EnterMineArea)
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType_def::EnterMineArea)
|
||||
return;
|
||||
else
|
||||
{
|
||||
eventType = ProjectDataManagement::EventType_def::EnterMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::EventType_def::EnterMineArea;
|
||||
eventType = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastEvent == ProjectDataManagement::EventType_def::LeaveMineArea)
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType_def::LeaveMineArea)
|
||||
return;
|
||||
else
|
||||
{
|
||||
eventType = ProjectDataManagement::EventType_def::LeaveMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::EventType_def::LeaveMineArea;
|
||||
eventType = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -933,7 +933,7 @@ void HandlerMineAreas::sendParticipantEventEnterLeave(const CentralEffectSimulat
|
||||
|
||||
void HandlerMineAreas::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
|
||||
|
||||
|
||||
+3
-3
@@ -118,14 +118,14 @@ private: // methoden
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const bool inFormCheckResult);
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition, const ProjectDataManagement::EventType eventType);
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition, const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendEffectTypeEvent(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
EffectType effectType,
|
||||
int mineFieldBitIndex,
|
||||
qint64 effectTime);
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
|
||||
void aesItemViewRemoved(int aesItemId);
|
||||
@@ -143,7 +143,7 @@ private: // attributes
|
||||
// AES-Values
|
||||
QHash<int, CentralEffectSimulation::AesItemViewUtm> m_aesItemViews; // key = aesItemId
|
||||
QQueue<TrainingAreaBase::SendCesHitRequest> m_sendCesHitRequestQueue;
|
||||
QHash<int, QHash<int, ProjectDataManagement::EventType>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, ProjectDataManagement::PdmEventType>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<EffectType>>> m_effectTypeStates; // QHash<aesItemId, QHash<participantId, QSet<effectStates>>>
|
||||
QHash<int, QHash<int, QSet<int>>> m_effectTypeBitFieldIndexes; // QHash<aesItemId, QHash<participantId, QSet<mineFieldBitIdx>>>
|
||||
QHash<int, QVector<MineListItem>> m_mineLists; // Key = ParticipantId
|
||||
|
||||
+2
-2
@@ -20,7 +20,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -165,7 +165,7 @@ bool CesMissionPlanHandler::isUasInAutoMode(int participantId)
|
||||
|
||||
DEBUG_LOG(m_logger) << "uas with pid " << participantId << " is in mode: " << (int)uas.uasState().underlying();
|
||||
|
||||
return (uas.uasState() == ProjectDataManagement::UasState::Auto);
|
||||
return (uas.uasState() == ProjectDataManagement::UasState::UasState_Auto);
|
||||
}
|
||||
|
||||
// stolen from Lts/Plugins/ParticipantManagement/Gui/ParticipantInfo/participant_info_dialog.cpp
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ namespace CES_MISSIONPLAN
|
||||
{
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@ private Q_SLOTS:
|
||||
private: // methoden
|
||||
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
bool isUasInAutoMode(int participantId);
|
||||
bool isUasCombatReady(int participantId);
|
||||
|
||||
|
||||
+50
-50
@@ -20,7 +20,7 @@ namespace dds
|
||||
{
|
||||
namespace core
|
||||
{
|
||||
inline uint qHash(ProjectDataManagement::EventType et)
|
||||
inline uint qHash(ProjectDataManagement::PdmEventType et)
|
||||
{
|
||||
return ::qHash(et.underlying());
|
||||
}
|
||||
@@ -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::EventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(aesItemId, participantPos, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
DEBUG_LOG(m_logger) << "Participant inside id=" << participantPos.participantId();
|
||||
}// for all Participants
|
||||
} // deleteDangerArea
|
||||
@@ -627,10 +627,10 @@ void HandlerNBC::sendEnterEvent(const int aesItemId, const AreaEffectSimulation:
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::EnterDangerArea);
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::EnterNuclear);
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
sendEffectTypeEvent(aesItemId, participantData, effectTypeForNContaminationArea(m_aesItemViews.value(aesItemId), participantPosUtmPoint, participantData.sampleTime(), participantData.insideBuilding()));
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
@@ -660,13 +660,13 @@ void HandlerNBC::sendLeaveEvent(const int aesItemId, const CentralEffectSimulati
|
||||
sendEffectTypeEvent(aesItemId, participantData, EffectType::BCContaminationLeave);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::LeaveMineArea);
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::EventType_def::LeaveNuclear);
|
||||
sendParticipantEvent(aesItemId, participantData, ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
sendEffectTypeEvent(aesItemId, participantData, EffectType::NContaminationLeave);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
@@ -784,7 +784,7 @@ void HandlerNBC::sendCesHitRequest(const CentralEffectSimulation::AesItemViewUtm
|
||||
participantData.roomId());
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
|
||||
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipNo, // equipmentNumber
|
||||
participantData.participantId(), // participantId
|
||||
@@ -881,7 +881,7 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
participantData.pos(), Core::PositionReportingSource_def::Gps, participantData.buildingId(),
|
||||
participantData.roomId()
|
||||
);
|
||||
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipmentNumber, participantData.participantId(), legacyChargeTypeId, aesItemId, originatorEquipmentNumber,
|
||||
remaining, pos, effectTime, eventType, partyId, mineFieldBitIndex
|
||||
@@ -899,7 +899,7 @@ void HandlerNBC::sendCesHitRequest(const int aesItemId,
|
||||
|
||||
void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
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)
|
||||
@@ -931,12 +931,12 @@ void HandlerNBC::sendParticipantEvent(const int aesItemId,
|
||||
}
|
||||
|
||||
// send hit events only with central AES Simulation
|
||||
if (eventType == ProjectDataManagement::EventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::EventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitN)
|
||||
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)
|
||||
{
|
||||
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::EventType_def::BCContamination)
|
||||
if (eventType == ProjectDataManagement::PdmEventType_def::BCContamination)
|
||||
{
|
||||
const AreaEffectSimulation::BCContamination &bc = m_ddsHandler->dtcAes()->bCContamination(aesItemId);
|
||||
pe.aesName(bc.name());
|
||||
}
|
||||
else if (eventType == ProjectDataManagement::EventType_def::DangerArea)
|
||||
else if (eventType == ProjectDataManagement::PdmEventType_def::DangerArea)
|
||||
{
|
||||
const AreaEffectSimulation::DangerArea &da = m_ddsHandler->dtcAes()->dangerArea(aesItemId);
|
||||
pe.aesName(da.name());
|
||||
}
|
||||
else if (eventType == ProjectDataManagement::EventType_def::NContamination)
|
||||
else if (eventType == ProjectDataManagement::PdmEventType_def::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::EventType_def::EnterMineArea
|
||||
|| eventType == ProjectDataManagement::EventType_def::EnterNuclear
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitB
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitC
|
||||
|| eventType == ProjectDataManagement::EventType_def::Hit
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitEffectSimulation
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitMine
|
||||
|| eventType == ProjectDataManagement::EventType_def::HitN)
|
||||
&& ((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)
|
||||
&& aesItem.partyId() == participantData.partyId()))
|
||||
pe.friendlyFire(true);
|
||||
else
|
||||
@@ -1043,10 +1043,10 @@ void HandlerNBC::sendEffectTypeEvent(const int aesItemId,
|
||||
|
||||
bool HandlerNBC::eventMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
// end enter-leave only once
|
||||
QSet<ProjectDataManagement::EventType> &activeEvents = m_eventStates[aesItemId][participantId]; // reference!
|
||||
QSet<ProjectDataManagement::PdmEventType> &activeEvents = m_eventStates[aesItemId][participantId]; // reference!
|
||||
// - only send event if it was not already sent
|
||||
if (activeEvents.contains(eventType))
|
||||
{
|
||||
@@ -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::EventType_def::EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveDangerArea);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterDangerArea);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveDangerArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterDangerArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveMineArea);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterMineArea);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveMineArea:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterMineArea);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::LeaveNuclear);
|
||||
case ProjectDataManagement::PdmEventType_def::EnterNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::LeaveNuclear);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::EventType_def::EnterNuclear);
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveNuclear:
|
||||
activeEvents.remove(ProjectDataManagement::PdmEventType_def::EnterNuclear);
|
||||
break;
|
||||
case ProjectDataManagement::EventType_def::EnterFunctionalArea:
|
||||
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -1196,20 +1196,20 @@ bool HandlerNBC::inCircle(const QPointF ¢erUtm, const double radius, const Q
|
||||
} // inCircle
|
||||
|
||||
|
||||
ProjectDataManagement::EventType HandlerNBC::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
ProjectDataManagement::PdmEventType HandlerNBC::leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
{
|
||||
switch (aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtDangerArea:
|
||||
return ProjectDataManagement::EventType::LeaveDangerArea;
|
||||
return ProjectDataManagement::PdmEventType::LeaveDangerArea;
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
return ProjectDataManagement::EventType::LeaveMineArea;
|
||||
return ProjectDataManagement::PdmEventType::LeaveMineArea;
|
||||
case AreaEffectSimulation::AesType_def::AtNContamination:
|
||||
return ProjectDataManagement::EventType::LeaveNuclear;
|
||||
return ProjectDataManagement::PdmEventType::LeaveNuclear;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return ProjectDataManagement::EventType::Unknown;
|
||||
return ProjectDataManagement::PdmEventType::Unknown;
|
||||
}
|
||||
|
||||
EffectType HandlerNBC::leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId)
|
||||
@@ -1329,13 +1329,13 @@ void HandlerNBC::aesItemViewRemoved(int aesItemId)
|
||||
}
|
||||
}
|
||||
const auto eventTypeLeave = leaveEventTypeForAesType(aiv.aesTypeId);
|
||||
if (eventTypeLeave != ProjectDataManagement::EventType::Unknown)
|
||||
if (eventTypeLeave != ProjectDataManagement::PdmEventType::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, leaveEventType: " << eventTypeLeave;
|
||||
auto it = m_eventStates.find(aesItemId);
|
||||
if (it != m_eventStates.end())
|
||||
{
|
||||
const QHash<int, QSet<ProjectDataManagement::EventType>> &participants = it.value();
|
||||
const QHash<int, QSet<ProjectDataManagement::PdmEventType>> &participants = it.value();
|
||||
DEBUG_LOG(m_logger) << "aesItemViewRemoved, sending leave events to " << participants.size()
|
||||
<< " participants";
|
||||
for (auto itP = participants.begin(); itP != participants.end(); ++ itP)
|
||||
|
||||
+4
-4
@@ -108,20 +108,20 @@ private: // methoden
|
||||
EffectType effectType = CES_NBC::EffectType::Unknown);
|
||||
void sendParticipantEvent(const int aesItemId,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendEffectTypeEvent(const int aesItemId,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData,
|
||||
EffectType effectType);
|
||||
|
||||
bool eventMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
bool effectTypeMustBeSend(int aesItemId,
|
||||
int participantId,
|
||||
EffectType effectType);
|
||||
|
||||
ProjectDataManagement::EventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
ProjectDataManagement::PdmEventType leaveEventTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType leaveEffectTypeForAesType(AreaEffectSimulation::AesType aesTypeId);
|
||||
EffectType effectTypeForNContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint, qint64 partPosSampleTime, const bool isIndoor);
|
||||
EffectType effectTypeForBCContaminationArea(const CentralEffectSimulation::AesItemViewUtm &itemView, const QPointF &participantPosUtmPoint);
|
||||
@@ -141,7 +141,7 @@ private: // attributes
|
||||
QHash<int, CentralEffectSimulation::AesItemViewUtm> m_aesItemViews; // key = aesItemId
|
||||
QQueue<TrainingAreaBase::SendCesHitRequest> m_sendCesHitRequestQueue;
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_explosionSingleStates; // key = id value = state
|
||||
QHash<int, QHash<int, QSet<ProjectDataManagement::EventType>>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<ProjectDataManagement::PdmEventType>>> m_eventStates; // QHash<aesItemId, QHash<participantId, QSet<EventType>>>
|
||||
QHash<int, QHash<int, QSet<EffectType>>> m_effectTypeStates; // QHash<aesItemId, QHash<participantId, QSet<effectStates>>>
|
||||
QHash<int, QHash<int, bool>> m_participantAes; // key = ParticipantId key in value = aesId
|
||||
QHash<int, int> m_isInContaminatedRoom; // key = ParticipantId value = aesId
|
||||
|
||||
+1
-1
@@ -219,7 +219,7 @@ void HandlerParticipantBuilding::sendCesHitToParticipant(const Buildings::Buildi
|
||||
|
||||
|
||||
CentralEffectSimulation::HandlerParticipant::CesParticipantData participantPos = participantsMap.value(participantId);
|
||||
const ProjectDataManagement::EventType eventType = ProjectDataManagement::EventType_def::HitBuilding;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::HitBuilding;
|
||||
|
||||
AreaEffectSimulation::AesItem aesItem;
|
||||
|
||||
|
||||
+7
-7
@@ -373,9 +373,9 @@ void HandlerParticipantBoobyTrap::calculateBoobyTrapParticipantSecondary(const C
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::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::EventType_def::HitMine);
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
//calculateBoobyTrapParticipantsSecondary(aesItemView.aesItemId, participantPos.participantId() );
|
||||
}
|
||||
return true;
|
||||
@@ -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::EventType_def::HitMine);
|
||||
sendParticipantEvent(boobyTrap, partPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -533,7 +533,7 @@ void HandlerParticipantBoobyTrap::onParticipantPositionChanged(const CentralEffe
|
||||
|
||||
void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &boobyTrapItem,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent aesItemId=" << boobyTrapItem.aesItemId
|
||||
<< " participantId=" << participantPosition.participantId();
|
||||
@@ -599,7 +599,7 @@ void HandlerParticipantBoobyTrap::sendParticipantEvent(const CentralEffectSimula
|
||||
|
||||
void HandlerParticipantBoobyTrap::sendParticipantHit(const CentralEffectSimulation::AesItemViewUtm &boobyTrap,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
// Q_UNUSED(eventType); // not used - no alarm for this
|
||||
|
||||
|
||||
+2
-2
@@ -69,10 +69,10 @@ private Q_SLOTS:
|
||||
private: // methoden
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &boobyTrapItem,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendParticipantHit(const CentralEffectSimulation::AesItemViewUtm &boobyTrap,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
bool insideSecondaryArea(const QPolygonF &polygonf, const QPointF &participantPos) const;
|
||||
bool enteredOrCrossedArea(const QPolygonF &polygonf, const QPolygonF &participantStep) const;
|
||||
|
||||
+7
-7
@@ -271,9 +271,9 @@ void HandlerParticipantOffRouteMine::calculateOffRouteMineParticipantSecondary(c
|
||||
if (result)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendParticipantEvent";
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine); //69
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine); //69
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine); // 49
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::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::EventType_def::HitMine);
|
||||
sendParticipantEvent(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
DEBUG_LOG(m_logger) << "sendParticipantHit";
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::EventType_def::HitMine);
|
||||
sendParticipantHit(aesItemView, participantPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
calculateOffRouteMineParticipantsSecondary(aesItemView.aesItemId);
|
||||
}
|
||||
} // calculateOffRouteMineParticipant
|
||||
@@ -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::EventType_def::HitMine);
|
||||
sendParticipantEvent(offRouteMine, partPos, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
}
|
||||
} // end of onParticipantPositionChanged()
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -391,7 +391,7 @@ void HandlerParticipantOffRouteMine::onParticipantPositionChanged(const CentralE
|
||||
|
||||
void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &offRouteItem,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
|
||||
@@ -445,7 +445,7 @@ void HandlerParticipantOffRouteMine::sendParticipantEvent(const CentralEffectSim
|
||||
|
||||
void HandlerParticipantOffRouteMine::sendParticipantHit(const CentralEffectSimulation::AesItemViewUtm &offRouteMine,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType)
|
||||
const ProjectDataManagement::PdmEventType eventType)
|
||||
{
|
||||
|
||||
const int equipNo = m_ddsHandler->participantId2EquipNo(participantPosition.participantId());
|
||||
|
||||
+2
-2
@@ -67,10 +67,10 @@ private Q_SLOTS:
|
||||
private: // methoden
|
||||
void sendParticipantEvent(const CentralEffectSimulation::AesItemViewUtm &offRouteItem,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
void sendParticipantHit(const CentralEffectSimulation::AesItemViewUtm &offRouteMine,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPosition,
|
||||
const ProjectDataManagement::EventType eventType);
|
||||
const ProjectDataManagement::PdmEventType eventType);
|
||||
|
||||
bool insideSecondaryArea(const QPolygonF &polygonf, const QPointF &participantPos) const;
|
||||
bool enteredOrCrossedArea(const QPolygonF &polygonf, const QPolygonF &participantStep) const;
|
||||
|
||||
Reference in new issue
Block a user