Removes .IDL warnings: multiple enum definitons and builtin-type collisions

This commit is contained in:
torsten committed 2026-09-14 15:45:58 +00:00
1 parent eb02c1f001
commit be912de9d6
135 files changed
+1122 -1122

No files matched your search

@@ -111,12 +111,12 @@ void AlmTests::tryConfigureAlarms()
alarms[0].setMarker(true);
alarms[0].messageWindow(true);
alarms[0].vulnerabilityState(-1);
alarms[0].eventTypeId(ProjectDataManagement::EventType_def::Hit);
alarms[0].eventTypeId(ProjectDataManagement::PdmEventType_def::Hit);
alarms[1].setMarker(true);
alarms[1].messageWindow(true);
alarms[1].vulnerabilityState(0);
alarms[1].eventTypeId(ProjectDataManagement::EventType_def::EnterNuclear);
alarms[1].eventTypeId(ProjectDataManagement::PdmEventType_def::EnterNuclear);
std::vector<int32_t> participantIds;
participantIds.push_back(0);
@@ -173,13 +173,13 @@ void AlmTests::tryConfigureAlarmsList()
alarms[0].setMarker(true);
alarms[0].messageWindow(true);
alarms[0].eventTypeId(ProjectDataManagement::EventType_def::Hit);
alarms[0].eventTypeId(ProjectDataManagement::PdmEventType_def::Hit);
alarms[0].vulnerabilityState(-1);
alarms[1].setMarker(true);
alarms[1].messageWindow(true);
alarms[1].vulnerabilityState(-1);
alarms[1].eventTypeId(ProjectDataManagement::EventType_def::WeaponAssignment);
alarms[1].eventTypeId(ProjectDataManagement::PdmEventType_def::WeaponAssignment);
std::vector<int32_t> participantIds;
participantIds.push_back(1);
@@ -204,7 +204,7 @@ void AlmTests::trySendEvent()
// publish new Event data here
pe.id(100);
//pe.aesItemId(5);
pe.eventTypeId(ProjectDataManagement::EventType_def::Hit); // same as eventTypeId in ConfigureAlarms
pe.eventTypeId(ProjectDataManagement::PdmEventType_def::Hit); // same as eventTypeId in ConfigureAlarms
pe.participantId(2);
pe.equipmentNumber(55);
pe.sampleTime(QDateTime::currentMSecsSinceEpoch());
@@ -103,7 +103,7 @@ void HandlerConfigureAlarms::removeAlarmConfig(int operatorId,
<< " eventTypeId=" << i.value().eventTypeId.underlying();
if ((operatorId == i.value().operatorId)
&& (participantId == i.value().participantId)
&& (eventTypeId == ProjectDataManagement::EventType_def::Unknown || eventTypeId == i.value().eventTypeId.underlying()))
&& (eventTypeId == ProjectDataManagement::PdmEventType_def::Unknown || eventTypeId == i.value().eventTypeId.underlying()))
{
const int key = i.key();
DEBUG_LOG(m_logger) << "found alarm to remove: " << key << ", eventTypeId: " << eventTypeId;
@@ -256,10 +256,10 @@ void HandlerConfigureAlarms::onEventChanged(const ExerciseEventManagement::Event
<< " friendyFire =" << friendlyFireBool;*/
if ((alarm.eventTypeId == eventDatalocal.eventTypeId().underlying()) ||
(alarm.eventTypeId == ProjectDataManagement::EventType_def::FriendlyFire && friendlyFireBool))
(alarm.eventTypeId == ProjectDataManagement::PdmEventType_def::FriendlyFire && friendlyFireBool))
{
if (friendlyFireBool && eventDatalocal.eventTypeId() == ProjectDataManagement::EventType_def::FireEvent)
eventDatalocal.eventTypeId(ProjectDataManagement::EventType_def::FriendlyFire);
if (friendlyFireBool && eventDatalocal.eventTypeId() == ProjectDataManagement::PdmEventType_def::FireEvent)
eventDatalocal.eventTypeId(ProjectDataManagement::PdmEventType_def::FriendlyFire);
participants.clear();
if (alarm.participantId.isValid())
@@ -316,8 +316,8 @@ void HandlerConfigureAlarms::sendWindow(const ExerciseEventManagement::Event &ev
wi.time(eventData.sampleTime());
wi.eventId(eventData.id());
if (eventData.eventTypeId() == ProjectDataManagement::EventType_def::CrossGlobalBorderline
|| eventData.eventTypeId() == ProjectDataManagement::EventType_def::CrossLocalBorderline)
if (eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::CrossGlobalBorderline
|| eventData.eventTypeId() == ProjectDataManagement::PdmEventType_def::CrossLocalBorderline)
{
if (eventObject.contains(QStringLiteral("Global")))
obj[QStringLiteral("Global")] = eventObject.value(QStringLiteral("Global"));
@@ -142,7 +142,7 @@ void ModuleTestLimits::testAirSupports()
const auto &items = m_aesDtc->explosionClusters();
for (const auto &item : qAsConst(items))
{
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass::AirSupport)
if (item.effectStateId() == AesEffectState::EsPrepared && item.isCentral() && m_pdmDtc->gearClassFromChargeTypeId(item.chargeStruct().chargeTypeId()) == ProjectDataManagement::GearClass::GearClass_AirSupport)
++counter;
}
@@ -90,7 +90,7 @@ bool HandlerEffectCluster::init()
}
// Context NASAT: check via chargeTypeId:
const bool bChargeIsAirSupport = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(ifs->data().chargeTypeId) == ProjectDataManagement::GearClass::AirSupport;
const bool bChargeIsAirSupport = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(ifs->data().chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport;
ifs->setAirSupportSource(bChargeIsAirSupport);
// Charge Effects are alwazs Central!
@@ -488,7 +488,7 @@ Core::FunctionReplyObject HandlerEffectCluster::effectClusterCreateRequest(const
// Context NASAT: check via chargeTypeId:
const bool bChargeIsAirSupport = gearClass == ProjectDataManagement::GearClass::AirSupport;
const bool bChargeIsAirSupport = gearClass == ProjectDataManagement::GearClass::GearClass_AirSupport;
ifs->setAirSupportSource(bChargeIsAirSupport);
// Now we always need to send fire ready, never without
newData.effectorState = AesEffectorState::EsNotReadyToFire;
@@ -503,7 +503,7 @@ Core::FunctionReplyObject HandlerEffectCluster::effectClusterCreateRequest(const
DEBUG_LOG(m_logger) << "New EffectCluster";
if (gearClass == ProjectDataManagement::GearClass::AirSupport)
if (gearClass == ProjectDataManagement::GearClass::GearClass_AirSupport)
{
if (s_currentAirSupportCount >= s_maxAirSupportCount)
{
@@ -571,7 +571,7 @@ Core::FunctionReplyObject HandlerEffectCluster::effectClusterModifyRequest(const
// Context NASAT: check via chargeTypeId:
const ProjectDataManagement::GearClass gc = m_mainHandler->gearClassOfChargeTypeId(request.effectors().at(0).chargeStruct().chargeTypeId());
const bool bChargeIsAirSupport = (gc == ProjectDataManagement::GearClass::AirSupport);
const bool bChargeIsAirSupport = (gc == ProjectDataManagement::GearClass::GearClass_AirSupport);
ifs->setAirSupportSource(bChargeIsAirSupport);
// For counting, only Elements being at least prepared are important:
if (request.effectStart().is_set() && ifs->isObjectModifiable()) // ToDo: check
@@ -636,7 +636,7 @@ void HandlerEffectCluster::recountActiveAreas()
{
if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused
{
if (m_mainHandler->gearClassOfChargeTypeId(area->data().chargeTypeId) == ProjectDataManagement::GearClass::AirSupport)
if (m_mainHandler->gearClassOfChargeTypeId(area->data().chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport)
++s_currentAirSupportCount;
}
}
@@ -698,7 +698,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
switch (categorie.underlying())
{
case ProjectDataManagement::L22_FireHaltCategory::A: // Feuer Halt Allgemein
case ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_A: // Feuer Halt Allgemein
{
// all control operations are halted
for (auto *ifs : qAsConst(effectClusterPartyMap))
@@ -714,7 +714,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
break;
}
case ProjectDataManagement::L22_FireHaltCategory::R: // Feuer Halt Referenziert
case ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_R: // Feuer Halt Referenziert
{
// Ongoing combat operations are halted after comparing the extent of
// the fire hold with the corresponding target coordinate and circular area.
@@ -740,7 +740,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
}
break;
}
case ProjectDataManagement::L22_FireHaltCategory::E: // Feuer Einstellen
case ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_E: // Feuer Einstellen
{
// Cease Fire (Category E) messages are issued when continuing an engagement is no longer viable.
// Unlike "Check Fire" (Feuer Halt), any rounds already loaded in a Panzerhaubitze (PzH) are still fired,
@@ -754,7 +754,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
}
break;
}
case ProjectDataManagement::L22_FireHaltCategory::C: // Aufheben Feuer Halt Allgemein
case ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_C: // Aufheben Feuer Halt Allgemein
for (auto *ifs : qAsConst(effectClusterPartyMap))
{
DEBUG_LOG(m_logger) << "[Aufheben Feuer Halt Allgemein] " << "effectClusterId: " << ifs->data().id;
@@ -766,7 +766,7 @@ void HandlerEffectCluster::onEffectClusterFireHaltRequest(const rti::core::Sampl
ifs->resumePause(req);
}
break;
case ProjectDataManagement::L22_FireHaltCategory::F: // Aufheben Feuer Halt Referenziert
case ProjectDataManagement::L22_FireHaltCategory::L22_FireHaltCategory_F: // Aufheben Feuer Halt Referenziert
{
for (auto *ifs : qAsConst(effectClusterPartyMap))
{
@@ -52,7 +52,7 @@ bool HandlerExplosionCluster::init()
}
// Context NASAT: check via chargeTypeId:
const bool bChargeIsAirSupport = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(ifs->data().chargeTypeId) == ProjectDataManagement::GearClass::AirSupport;
const bool bChargeIsAirSupport = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(ifs->data().chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport;
ifs->setAirSupportSource(bChargeIsAirSupport);
if(!ifs->data().isCentral)
@@ -369,7 +369,7 @@ Core::FunctionReplyObject HandlerExplosionCluster::explosionClusterCreateRequest
// Context NASAT: check via chargeTypeId:
const ProjectDataManagement::GearClass gc = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(request.chargeStruct().chargeTypeId());
const bool bChargeIsAirSupport = gc == ProjectDataManagement::GearClass::AirSupport;
const bool bChargeIsAirSupport = gc == ProjectDataManagement::GearClass::GearClass_AirSupport;
ifs->setAirSupportSource(bChargeIsAirSupport);
const Core::FunctionReplyObject ret = ifs->createObject(newData);
@@ -385,7 +385,7 @@ Core::FunctionReplyObject HandlerExplosionCluster::explosionClusterCreateRequest
if (ifs->data().isCentral)
{
DEBUG_LOG(m_logger) << "New cen ExplosionCluster";
if(gearClass == ProjectDataManagement::GearClass::AirSupport)
if(gearClass == ProjectDataManagement::GearClass::GearClass_AirSupport)
{
if (s_currentAirSupportCount >= s_maxAirSupportCount)
{
@@ -471,7 +471,7 @@ Core::FunctionReplyObject HandlerExplosionCluster::explosionClusterModifyRequest
// Context NASAT: check via chargeTypeId:
const ProjectDataManagement::GearClass gc = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(request.chargeStruct().chargeTypeId());
const bool bChargeIsAirSupport = (gc == ProjectDataManagement::GearClass::AirSupport);
const bool bChargeIsAirSupport = (gc == ProjectDataManagement::GearClass::GearClass_AirSupport);
ifs->setAirSupportSource(bChargeIsAirSupport);
// For counting, only Elements being at least prepared are important:
@@ -615,7 +615,7 @@ void HandlerExplosionCluster::recountActiveAreas()
{
if (area->isObjectInTrainingArea()) // meanwhile an ugly name, means EsPrepared, EsActivated, EsPaused
{
if (m_mainHandler->gearClassOfChargeTypeId(area->data().chargeTypeId) == ProjectDataManagement::GearClass::AirSupport)
if (m_mainHandler->gearClassOfChargeTypeId(area->data().chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport)
++s_currentAirSupportCount;
}
}
@@ -360,7 +360,7 @@ template <typename T> class ObjectBaseTmpl : public ObjectBase
if (static_cast<MineClass::type>(m_mainHandler->dds()->pdmDtc()->mineClass(m_data.chargeTypeId, m_data.igniterTypeId, m_data.igniterFunctionId)) == MineClass::VirtualSingle)
return true;
if (m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(m_data.chargeTypeId) == ProjectDataManagement::GearClass::AirSupport)
if (m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(m_data.chargeTypeId) == ProjectDataManagement::GearClass::GearClass_AirSupport)
return true;
// Laser-Guidable Weapons must always be calculated by CES
@@ -2769,13 +2769,13 @@ void ObjectEffectCluster::sendCalculateTrajectoryAdlerRequest(const QVector<Data
const ProjectDataManagement::GearClass &gc = m_mainHandler->dds()->pdmDtc()->gearClassFromChargeTypeId(m_data.chargeTypeId);
switch (gc.underlying())
{
case ProjectDataManagement::GearClass::Artillery:
case ProjectDataManagement::GearClass::GearClass_Artillery:
request.weaponSystemType(TrainingAreaBase::WeaponSystemType::PZH);
break;
case ProjectDataManagement::GearClass::Mortar:
case ProjectDataManagement::GearClass::GearClass_Mortar:
request.weaponSystemType(TrainingAreaBase::WeaponSystemType::MRS);
break;
case ProjectDataManagement::GearClass::Rocket:
case ProjectDataManagement::GearClass::GearClass_Rocket:
request.weaponSystemType(TrainingAreaBase::WeaponSystemType::MARS);
break;
default:
@@ -149,7 +149,7 @@ bool MainHandler::initAsmHandler()
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
return false;
}
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::PortType::WebSocketServer);
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::CorePortType::WebSocketServer);
DEBUG_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler succesful.";
return true;
@@ -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
@@ -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
@@ -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;
@@ -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;
@@ -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:
@@ -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();
}
@@ -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());
@@ -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
@@ -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 &centerUtm, 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)
@@ -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>>>
@@ -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 &centerUtm, 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());
@@ -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 &centerUtm, 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);
@@ -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);
@@ -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);
@@ -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());
@@ -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,
@@ -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
);
@@ -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
@@ -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)
{
@@ -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
@@ -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
@@ -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);
@@ -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 &centerUtm, 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)
@@ -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
@@ -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;
@@ -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
@@ -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;
@@ -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());
@@ -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;
@@ -108,7 +108,7 @@ void EemTests::startTest()
tryCreateDynamicParticipantData(1, ProjectDataManagement::VulnerabilityState::CatastrophicKill, time + 3000 * 60, 70, ProjectDataManagement::StateChangeOriginator::ImprovisedExplosiveDevice);
QTest::qWait(5000);
checkEvents(ProjectDataManagement::EventType::HitEffectSimulation, 3);
checkEvents(ProjectDataManagement::PdmEventType::HitEffectSimulation, 3);
}
if (m_testId == 3)
@@ -130,7 +130,7 @@ void EemTests::startTest()
tryCreateDynamicParticipantData(2, ProjectDataManagement::VulnerabilityState::LightDamage, time - 5000 * 30, 0, ProjectDataManagement::StateChangeOriginator::Sanitation);
QTest::qWait(500);
checkEvents(ProjectDataManagement::EventType::Sanitation, 3);
checkEvents(ProjectDataManagement::PdmEventType::Sanitation, 3);
}
if (m_testId <= 0 || m_testId > 6)
@@ -264,8 +264,8 @@ void EemTests::trySendFireEvent()
for(const ExerciseEventManagement::Event &e : events)
{
INFO_LOG(m_logger) << "eventId: " << e.id() << ", eventType: " << e.eventTypeId().underlying();
if (e.eventTypeId() == ProjectDataManagement::EventType_def::WeaponAssignment ||
e.eventTypeId() == ProjectDataManagement::EventType_def::FireEvent)
if (e.eventTypeId() == ProjectDataManagement::PdmEventType_def::WeaponAssignment ||
e.eventTypeId() == ProjectDataManagement::PdmEventType_def::FireEvent)
noEvents ++;
}
@@ -368,7 +368,7 @@ void EemTests::tryCreateIed(qint64 time)
}
//-----------------------------------------------------------------------------------------------------------------------
void EemTests::checkEvents(const ProjectDataManagement::EventType &et, int expected)
void EemTests::checkEvents(const ProjectDataManagement::PdmEventType &et, int expected)
{
const QMap<qint64, ExerciseEventManagement::Event> events = m_dtc->events();
@@ -383,9 +383,9 @@ void EemTests::checkEvents(const ProjectDataManagement::EventType &et, int expec
QJsonObject prop = LtsUtils::JsonObject::fromJson(e.properties());
int ot = prop[QStringLiteral("OriginatorType")].toInt();
if (et == ProjectDataManagement::EventType::HitEffectSimulation && ot == 20) //ImprovisedExplosiveDevice
if (et == ProjectDataManagement::PdmEventType::HitEffectSimulation && ot == 20) //ImprovisedExplosiveDevice
noEvents ++;
if (et == ProjectDataManagement::EventType::Sanitation && ot == 10) // Sanitation
if (et == ProjectDataManagement::PdmEventType::Sanitation && ot == 10) // Sanitation
noEvents ++;
}
}
@@ -42,7 +42,7 @@ protected Q_SLOTS:
void trySendBiteMessage();
void trySendBuildingState();
void tryCreateIed(qint64 time);
void checkEvents(const ProjectDataManagement::EventType &et, int expected);
void checkEvents(const ProjectDataManagement::PdmEventType &et, int expected);
void failExit();
void ExitSuccess();
@@ -62,7 +62,7 @@ void DdsHandler::setRunningState(Core::RunningState rs)
m_pacemaker->setNewState(rs);
}
void DdsHandler::addPortToPacemaker(quint16 port, Core::PortType type)
void DdsHandler::addPortToPacemaker(quint16 port, Core::CorePortType type)
{
if (!m_pacemaker)
return;
@@ -30,7 +30,7 @@ public:
bool init(const QStringList &qosFileList = QStringList());
void setRunningState(Core::RunningState rs);
void addPortToPacemaker(quint16 port, Core::PortType type);
void addPortToPacemaker(quint16 port, Core::CorePortType type);
std::shared_ptr<DDSConnector::DdsConnector> ddsConnector() const { return m_ddsConnector; }
std::shared_ptr<ExerciseEventManagement::Interface::Dts> dts() const { return m_ddsDts; }
@@ -160,15 +160,15 @@ void HandlerDynamicParticipantData::tryCreateHitEvent(Database::EemEvent eData,
case ProjectDataManagement::StateChangeOriginator::AreaEffectSimulation:
case ProjectDataManagement::StateChangeOriginator::ImprovisedExplosiveDevice:
case ProjectDataManagement::StateChangeOriginator::DusMine:
eData.eventTypeId = ProjectDataManagement::EventType::HitEffectSimulation;
eData.eventTypeId = ProjectDataManagement::PdmEventType::HitEffectSimulation;
break;
case ProjectDataManagement::StateChangeOriginator::Participant:
case ProjectDataManagement::StateChangeOriginator::ObserverController:
case ProjectDataManagement::StateChangeOriginator::ExerciseControl:
eData.eventTypeId = ProjectDataManagement::EventType::Hit;
eData.eventTypeId = ProjectDataManagement::PdmEventType::Hit;
break;
case ProjectDataManagement::StateChangeOriginator::Sanitation:
eData.eventTypeId = ProjectDataManagement::EventType::Sanitation;
eData.eventTypeId = ProjectDataManagement::PdmEventType::Sanitation;
break;
case ProjectDataManagement::StateChangeOriginator::Unknown:
case ProjectDataManagement::StateChangeOriginator::WoundTreatmentDevice:
@@ -196,7 +196,7 @@ void HandlerDynamicParticipantData::tryCreateHitEvent(Database::EemEvent eData,
else
obj[QStringLiteral("FriendlyFire")] = false;
}
if (eData.eventTypeId == ProjectDataManagement::EventType::HitEffectSimulation)
if (eData.eventTypeId == ProjectDataManagement::PdmEventType::HitEffectSimulation)
{
DEBUG_LOG(m_logger) << "Event HitEffectSimulation from originatorId = " << stateInfo.originatorId();
obj[QStringLiteral("AesId")] = stateInfo.originatorId();
@@ -205,7 +205,7 @@ void HandlerDynamicParticipantData::tryCreateHitEvent(Database::EemEvent eData,
if (m_aesDtc->aesItemFromId(stateInfo.originatorId(), aesItem))
obj[QStringLiteral("AesName")] = QJsonValue(QString::fromStdString(aesItem.name()));
}
if (eData.eventTypeId == ProjectDataManagement::EventType::Sanitation)
if (eData.eventTypeId == ProjectDataManagement::PdmEventType::Sanitation)
{
// ignore these events
if (stateInfo.sanitationProceduresTaken() == 0 && stateInfo.originatorChargeTypeId() == 0) //qualification
@@ -272,7 +272,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
eData.equipmentNumber = pData.equipmentNumber().is_set() ? pData.equipmentNumber().get() : -1;
eData.partyId = pData.partyId();
eData.sampleTime = data.sampleTime();
eData.eventTypeId = ProjectDataManagement::EventType_def::Unknown;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::Unknown;
eData.position = LtsUtils::QPoint3D(pPos.pos().lon(), pPos.pos().lat(), pPos.pos().z());
if (data.stateHistory() != lastDynData.stateHistory())
@@ -307,7 +307,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
obj[QStringLiteral("DryFire")] = QJsonValue(gi.chargeCounting());
eData.properties = QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact));
eData.sampleTime = gi.lastUpdate();
eData.eventTypeId = ProjectDataManagement::EventType_def::WeaponAssignment;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::WeaponAssignment;
eData.id = 0;
if (!m_dbHandler->db()->insert(eData))
ERROR_LOG(m_logger) << "Error while inserting event data for participant: " << data.participantId();
@@ -317,7 +317,7 @@ void HandlerDynamicParticipantData::onDynamicParticipantDataChanged(const Partic
if (data.manipulation() != lastDynData.manipulation())
{
eData.eventTypeId = ProjectDataManagement::EventType_def::Manipulation;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::Manipulation;
const auto isOldManipulation = [&lastDynData](const ParticipantManagement::ManipulationInformation & mani) -> bool
{
@@ -376,7 +376,7 @@ void HandlerDynamicParticipantData::onParticipantGearEventChanged(const Particip
eData.equipmentNumber = pData.equipmentNumber().is_set() ? pData.equipmentNumber().get() : -1;
eData.partyId = pData.partyId();
eData.sampleTime = data.sampleTime();
eData.eventTypeId = ProjectDataManagement::EventType_def::FireEvent;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::FireEvent;
eData.position = LtsUtils::QPoint3D(pPos.pos().lon(), pPos.pos().lat(), pPos.pos().z());
QJsonObject obj;
@@ -442,7 +442,7 @@ void HandlerDynamicParticipantData::onBiteChanged(const ParticipantManagement::B
Database::EemEvent eData;
eData.id = 0;
eData.eventTypeId = ProjectDataManagement::EventType_def::BiteMessage;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::BiteMessage;
eData.equipmentNumber = data.equipmentNumber();
eData.participantId = data.participantId();
eData.sampleTime = data.sampleTime();
@@ -495,7 +495,7 @@ void HandlerDynamicParticipantData::onBuildingStateChanged(const Buildings::Buil
Database::EemEvent eData;
eData.id = 0;
eData.eventTypeId = ProjectDataManagement::EventType_def::HitBuilding;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::HitBuilding;
eData.sampleTime = data.sampleTime();
QJsonObject obj;
@@ -577,7 +577,7 @@ ExerciseEventManagement::Event HandlerDynamicParticipantData::toDdsData(const Da
ddsData.properties(data.properties.toStdString());
ddsData.position(Core::GeoPosition(data.position.x(), data.position.y(), data.position.z()));
if (data.eventTypeId == ProjectDataManagement::EventType_def::HitBuilding)
if (data.eventTypeId == ProjectDataManagement::PdmEventType_def::HitBuilding)
{
int mainStructureElementId = LtsUtils::JsonObject::fromJson(ddsData.properties()).valueOr<int>(QStringLiteral("MainStructureElementId"), 0);
DEBUG_LOG(m_logger) << "MainStructureElementId=" << mainStructureElementId;
@@ -85,7 +85,7 @@ void HandlerEquipmentErrorRegistration::onEquipmentErrorRegistrationChanged(cons
Database::EemEvent eData;
eData.sampleTime = data.sampleTime();
eData.equipmentNumber = data.equipmentNumber();
eData.eventTypeId = ProjectDataManagement::EventType_def::EquipmentErrorReport;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::EquipmentErrorReport;
QJsonObject obj;
obj[QStringLiteral("text")] = QString::fromStdString(data.text());
@@ -111,7 +111,7 @@ void HandlerParticipantEvent::onAesItemViewChanged(const AreaEffectSimulation::A
obj[QStringLiteral("AesType")] = QJsonValue(data.aesTypeId().underlying());
eData.properties = QString::fromUtf8(QJsonDocument(obj).toJson(QJsonDocument::Compact));
eData.eventTypeId = ProjectDataManagement::EventType::Borderline;
eData.eventTypeId = ProjectDataManagement::PdmEventType::Borderline;
eData.position = LtsUtils::QPoint3D(data.boundingBoxBottomLeft().lon(),
data.boundingBoxBottomLeft().lat(), 0.0);
@@ -145,39 +145,39 @@ void HandlerParticipantEvent::onAesItemViewChanged(const AreaEffectSimulation::A
switch (data.aesTypeId().underlying())
{
case AreaEffectSimulation::AesType::AtMineArea:
eData.eventTypeId = ProjectDataManagement::EventType::MineArea;
eData.eventTypeId = ProjectDataManagement::PdmEventType::MineArea;
break;
case AreaEffectSimulation::AesType::AtExplosionArea:
eData.eventTypeId = ProjectDataManagement::EventType::HitEffectSimulation;
eData.eventTypeId = ProjectDataManagement::PdmEventType::HitEffectSimulation;
break;
case AreaEffectSimulation::AesType::AtExplosionCluster:
eData.eventTypeId = ProjectDataManagement::EventType::ExplosionCluster;
eData.eventTypeId = ProjectDataManagement::PdmEventType::ExplosionCluster;
break;
case AreaEffectSimulation::AesType::AtMineAreaSingleMines:
return;
case AreaEffectSimulation::AesType::AtNContamination:
eData.eventTypeId = ProjectDataManagement::EventType::NContamination;
eData.eventTypeId = ProjectDataManagement::PdmEventType::NContamination;
break;
case AreaEffectSimulation::AesType::AtBCContamination:
eData.eventTypeId = ProjectDataManagement::EventType::BCContamination;
eData.eventTypeId = ProjectDataManagement::PdmEventType::BCContamination;
break;
case AreaEffectSimulation::AesType::AtBorderline:
eData.eventTypeId = ProjectDataManagement::EventType::Borderline;
eData.eventTypeId = ProjectDataManagement::PdmEventType::Borderline;
break;
case AreaEffectSimulation::AesType::AtDangerArea:
eData.eventTypeId = ProjectDataManagement::EventType::DangerArea;
eData.eventTypeId = ProjectDataManagement::PdmEventType::DangerArea;
break;
case AreaEffectSimulation::AesType::AtFunctionalArea:
eData.eventTypeId = ProjectDataManagement::EventType::FunctionalArea;
eData.eventTypeId = ProjectDataManagement::PdmEventType::FunctionalArea;
break;
case AreaEffectSimulation::AesType::AtMineCorridor:
eData.eventTypeId = ProjectDataManagement::EventType::MineCorridor;
eData.eventTypeId = ProjectDataManagement::PdmEventType::MineCorridor;
break;
case AreaEffectSimulation::AesType::AtTechnicalArea:
eData.eventTypeId = ProjectDataManagement::EventType::TechnicalArea;
eData.eventTypeId = ProjectDataManagement::PdmEventType::TechnicalArea;
break;
case AreaEffectSimulation::AesType::AtGasPipe:
eData.eventTypeId = ProjectDataManagement::EventType::GasPipe;
eData.eventTypeId = ProjectDataManagement::PdmEventType::GasPipe;
break;
// No ExerciseEvent for AesType
default:
@@ -190,11 +190,11 @@ void HandlerParticipantEvent::onAesItemViewChanged(const AreaEffectSimulation::A
AreaEffectSimulation::AesItem aesItem;
m_aesDtc->aesItemFromId(data.aesItemId(), aesItem);
if (eData.eventTypeId == ProjectDataManagement::EventType::ExplosionCluster)
if (eData.eventTypeId == ProjectDataManagement::PdmEventType::ExplosionCluster)
{
ProjectDataManagement::GearClass gearClass = m_pdmDtc->gearClassFromChargeTypeId(aesItem.chargeStruct().chargeTypeId());
if (gearClass == ProjectDataManagement::GearClass_def::AirSupport)
eData.eventTypeId = ProjectDataManagement::EventType::AirSupport;
eData.eventTypeId = ProjectDataManagement::PdmEventType::AirSupport;
}
QJsonObject obj;
@@ -269,7 +269,7 @@ void HandlerParticipantEvent::onExplosionSingleChanged(const AreaEffectSimulatio
m_aesEffectState.insert(data.id(), data.effectStateId());
//m_itemViews.insert(data.id(), data.aesTypeId());
eData.eventTypeId = ProjectDataManagement::EventType::FireEvent;
eData.eventTypeId = ProjectDataManagement::PdmEventType::FireEvent;
AreaEffectSimulation::AesItem aesItem;
m_aesDtc->aesItemFromId(data.id(), aesItem);
@@ -328,7 +328,7 @@ void HandlerParticipantEvent::onParticipantEventChanged(const CentralEffectSimul
<< " position=" << data.position()
<< " eData.position=" << eData.position;
eData.eventTypeId = ProjectDataManagement::EventType_def::Unknown;
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::Unknown;
QJsonObject obj;
obj[QStringLiteral("AesId")] = QJsonValue(data.aesItemId());
@@ -338,58 +338,58 @@ void HandlerParticipantEvent::onParticipantEventChanged(const CentralEffectSimul
switch(data.eventTypeId().underlying())
{
case ProjectDataManagement::EventType_def::HitEffectSimulation:
eData.eventTypeId = ProjectDataManagement::EventType_def::HitEffectSimulation;
case ProjectDataManagement::PdmEventType_def::HitEffectSimulation:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::HitEffectSimulation;
break;
case ProjectDataManagement::EventType_def::HitMine:
eData.eventTypeId = ProjectDataManagement::EventType_def::HitMine;
case ProjectDataManagement::PdmEventType_def::HitMine:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::HitMine;
break;
case ProjectDataManagement::EventType_def::HitN:
eData.eventTypeId = ProjectDataManagement::EventType_def::HitN;
case ProjectDataManagement::PdmEventType_def::HitN:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::HitN;
break;
case ProjectDataManagement::EventType_def::HitC:
eData.eventTypeId = ProjectDataManagement::EventType_def::HitC;
case ProjectDataManagement::PdmEventType_def::HitC:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::HitC;
break;
case ProjectDataManagement::EventType_def::EnterDangerArea:
eData.eventTypeId = ProjectDataManagement::EventType_def::EnterDangerArea;
case ProjectDataManagement::PdmEventType_def::EnterDangerArea:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::EnterDangerArea;
break;
case ProjectDataManagement::EventType_def::LeaveDangerArea:
eData.eventTypeId = ProjectDataManagement::EventType_def::LeaveDangerArea;
case ProjectDataManagement::PdmEventType_def::LeaveDangerArea:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::LeaveDangerArea;
break;
case ProjectDataManagement::EventType_def::EnterMineArea:
eData.eventTypeId = ProjectDataManagement::EventType_def::EnterMineArea;
case ProjectDataManagement::PdmEventType_def::EnterMineArea:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::EnterMineArea;
break;
case ProjectDataManagement::EventType_def::LeaveMineArea:
eData.eventTypeId = ProjectDataManagement::EventType_def::LeaveMineArea;
case ProjectDataManagement::PdmEventType_def::LeaveMineArea:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
break;
case ProjectDataManagement::EventType_def::EnterNuclear:
eData.eventTypeId = ProjectDataManagement::EventType_def::EnterNuclear;
case ProjectDataManagement::PdmEventType_def::EnterNuclear:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::EnterNuclear;
break;
case ProjectDataManagement::EventType_def::LeaveNuclear:
eData.eventTypeId = ProjectDataManagement::EventType_def::LeaveNuclear;
case ProjectDataManagement::PdmEventType_def::LeaveNuclear:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::LeaveNuclear;
break;
case ProjectDataManagement::EventType_def::CrossLocalBorderline:
eData.eventTypeId = ProjectDataManagement::EventType_def::CrossLocalBorderline;
case ProjectDataManagement::PdmEventType_def::CrossLocalBorderline:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::CrossLocalBorderline;
obj[QStringLiteral("Global")] = QJsonValue(false);
break;
case ProjectDataManagement::EventType_def::CrossGlobalBorderline:
eData.eventTypeId = ProjectDataManagement::EventType_def::CrossGlobalBorderline;
case ProjectDataManagement::PdmEventType_def::CrossGlobalBorderline:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::CrossGlobalBorderline;
obj[QStringLiteral("Global")] = QJsonValue(true);
break;
case ProjectDataManagement::EventType_def::EnterFunctionalArea:
eData.eventTypeId = ProjectDataManagement::EventType_def::EnterFunctionalArea;
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::EnterFunctionalArea;
break;
case ProjectDataManagement::EventType_def::LeaveFunctionalArea:
eData.eventTypeId = ProjectDataManagement::EventType_def::LeaveFunctionalArea;
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea;
break;
case ProjectDataManagement::EventType_def::EnterHazardDistance:
eData.eventTypeId = ProjectDataManagement::EventType_def::EnterHazardDistance;
case ProjectDataManagement::PdmEventType_def::EnterHazardDistance:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::EnterHazardDistance;
break;
case ProjectDataManagement::EventType_def::LeaveHazardDistance:
eData.eventTypeId = ProjectDataManagement::EventType_def::LeaveHazardDistance;
case ProjectDataManagement::PdmEventType_def::LeaveHazardDistance:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::LeaveHazardDistance;
break;
case ProjectDataManagement::EventType_def::AirSupport:
eData.eventTypeId = ProjectDataManagement::EventType_def::AirSupport;
case ProjectDataManagement::PdmEventType_def::AirSupport:
eData.eventTypeId = ProjectDataManagement::PdmEventType_def::AirSupport;
break;
default:
return;
@@ -147,7 +147,7 @@ bool MainHandler::loadFromDatabase()
ERROR_LOG(m_logger) << "Can not initialize WebSocket Event server";
return false;
}
m_ddsHandler->addPortToPacemaker(m_webSocketEventServer->listenPort(), Core::PortType::WebSocketServer);
m_ddsHandler->addPortToPacemaker(m_webSocketEventServer->listenPort(), Core::CorePortType::WebSocketServer);
if (!m_handlerEerEvent || !m_handlerEerEvent->init())
{
@@ -21,24 +21,24 @@
#include <ngldb/nsqlquery.h>
ProjectDataManagement::EventType avsEventTypeToPdmEventType(int avsEventType)
ProjectDataManagement::PdmEventType avsEventTypeToPdmEventType(int avsEventType)
{
ProjectDataManagement::EventType eventType;
ProjectDataManagement::PdmEventType eventType;
switch(avsEventType)
{
case 305: //MVS
case 301: // CAMERA_AUDIO
case 302: // CAMERA_VIDEO
eventType = ProjectDataManagement::EventType::CameraVideo;
eventType = ProjectDataManagement::PdmEventType::CameraVideo;
break;
case 303: // RADIO_CNR
eventType = ProjectDataManagement::EventType::RadioCnr;
eventType = ProjectDataManagement::PdmEventType::RadioCnr;
break;
case 304: // RADIO_TVC
eventType = ProjectDataManagement::EventType::RadioTvc;
eventType = ProjectDataManagement::PdmEventType::RadioTvc;
break;
default:
eventType = ProjectDataManagement::EventType::Unknown;
eventType = ProjectDataManagement::PdmEventType::Unknown;
break;
}
return eventType;
@@ -113,21 +113,21 @@ AvsData WebSocketAvs::jsonObjectToAvsData(const QJsonObject &obj)
data.streamName = obj[QStringLiteral("streamName")].toString();
int avsEventType = obj[QStringLiteral("eventType")].toInt();
ProjectDataManagement::EventType eventType;
ProjectDataManagement::PdmEventType eventType;
switch(avsEventType)
{
case 301: // CAMERA_AUDIO
case 302: // CAMERA_VIDEO
eventType = ProjectDataManagement::EventType::CameraVideo;
eventType = ProjectDataManagement::PdmEventType::CameraVideo;
break;
case 303: // RADIO_CNR
eventType = ProjectDataManagement::EventType::RadioCnr;
eventType = ProjectDataManagement::PdmEventType::RadioCnr;
break;
case 304: // RADIO_TVC
eventType = ProjectDataManagement::EventType::RadioTvc;
eventType = ProjectDataManagement::PdmEventType::RadioTvc;
break;
default:
eventType = ProjectDataManagement::EventType::Unknown;
eventType = ProjectDataManagement::PdmEventType::Unknown;
ERROR_LOG(m_logger) << "Unknown avsEventType: " << avsEventType;
break;
}
@@ -216,7 +216,7 @@ void WebSocketAvs::handleAvsData(const AvsData &data, const bool &lastRangeClose
DEBUG_LOG(m_logger) << "kein Publish (avsData.endTime == -1) && (data.endTime == -1)";
return;
}
if ( (data.endTime == -1) && (data.eventType == ProjectDataManagement::EventType::RadioCnr))
if ( (data.endTime == -1) && (data.eventType == ProjectDataManagement::PdmEventType::RadioCnr))
{
DEBUG_LOG(m_logger) << "kein Publish (avsData.endTime == -1) && RadioCnr";
return;
@@ -501,7 +501,7 @@ void WebSocketAvs::onCleanUpDbInternal()
if (!collection.contains(eItem.eventTime))
{
AvsData add = eItem;
bool checkMsi = eItem.eventType == ProjectDataManagement::EventType::CameraVideo;
bool checkMsi = eItem.eventType == ProjectDataManagement::PdmEventType::CameraVideo;
int mountingPointId = 0;
if (checkMsi && m_avmDtc->mountingPointForStreamName(eItem.streamName, mountingPointId))
@@ -520,7 +520,7 @@ void WebSocketAvs::onCleanUpDbInternal()
}
for ( auto item : list)
{
bool checkMsi = eItem.eventType == ProjectDataManagement::EventType::CameraVideo;
bool checkMsi = eItem.eventType == ProjectDataManagement::PdmEventType::CameraVideo;
if (item.endTime == eItem.endTime )
{
@@ -672,9 +672,9 @@ QMap<QString, QVector<AvsData>> WebSocketAvs::getAllInternalDbData()
QVector<Database::EemEvent> dataVec;
//qCritical() << "START reading internal db ";
m_dbHandler->db()->selectByEventTypeId(dataVec, ProjectDataManagement::EventType::CameraVideo);
m_dbHandler->db()->selectByEventTypeId(dataVec, ProjectDataManagement::EventType::RadioCnr);
m_dbHandler->db()->selectByEventTypeId(dataVec, ProjectDataManagement::EventType::RadioTvc);
m_dbHandler->db()->selectByEventTypeId(dataVec, ProjectDataManagement::PdmEventType::CameraVideo);
m_dbHandler->db()->selectByEventTypeId(dataVec, ProjectDataManagement::PdmEventType::RadioCnr);
m_dbHandler->db()->selectByEventTypeId(dataVec, ProjectDataManagement::PdmEventType::RadioTvc);
// m_dbHandler->db()->select(dataVec);
//qCritical() << "END select reading internal db ";
@@ -36,7 +36,7 @@ struct AvsData
int id;
qint64 eventTime;
qint64 endTime;
ProjectDataManagement::EventType eventType;
ProjectDataManagement::PdmEventType eventType;
QString streamName;
int mainStructureElementId;
QSharedPointer<QTimer> timer; // no plain ptr here since AvsData is copied
@@ -44,7 +44,7 @@ struct AvsData
: id(0)
, eventTime(0)
, endTime(-1)
, eventType(ProjectDataManagement::EventType::Unknown)
, eventType(ProjectDataManagement::PdmEventType::Unknown)
, mainStructureElementId(0)
, timer(new QTimer)
{
@@ -232,7 +232,7 @@ void WebSocketEventServer::historyDataRequested(const QSqlDatabase &db, QWebSock
{
int i = 0;
data.id = q.value(i++).toInt();
data.eventTypeId = static_cast<ProjectDataManagement::EventType_def::type>(q.value(i++).toInt());
data.eventTypeId = static_cast<ProjectDataManagement::PdmEventType_def::type>(q.value(i++).toInt());
data.participantId = q.value(i++).toInt();
data.partyId = q.value(i++).toInt();
data.equipmentNumber = q.value(i++).toInt();
@@ -135,7 +135,7 @@ bool MainHandler::initWebSocketHandler()
return false;
}
m_ddsHandler->pacemaker()->addPort(m_websocketHandler->webSocketPort(), Core::PortType::WebSocketServer);
m_ddsHandler->pacemaker()->addPort(m_websocketHandler->webSocketPort(), Core::CorePortType::WebSocketServer);
return true;
}
@@ -131,7 +131,7 @@ bool MainHandler::initFlmHandler()
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
return false;
}
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::PortType::WebSocketServer);
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::CorePortType::WebSocketServer);
DEBUG_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler successful.";
@@ -65,7 +65,7 @@ void DdsHandler::setRunningState(Core::RunningState rs)
m_pacemaker->setNewState(rs);
}
void DdsHandler::addPortToPacemaker(quint16 port, Core::PortType type)
void DdsHandler::addPortToPacemaker(quint16 port, Core::CorePortType type)
{
if (!m_pacemaker)
return;
@@ -33,7 +33,7 @@ public:
bool init(const QStringList &qosFileList = QStringList());
void setRunningState(Core::RunningState rs);
void addPortToPacemaker(quint16 port, Core::PortType type);
void addPortToPacemaker(quint16 port, Core::CorePortType type);
std::shared_ptr<FilterManagement::Interface::Dts> dts() const { return m_ddsDts; }
std::shared_ptr<FilterManagement::Interface::Fts> fts() const { return m_ddsFts; }
@@ -148,7 +148,7 @@ bool MainHandler::init(int domainId)
INFO_LOG(m_logger) << "ISM MainHandler initialized.";
pm->setNewState(Core::RunningState::Running);
pm->addPort(m_handlerWebSocketInterface->webSocketPort(), Core::PortType::WebSocketServer);
pm->addPort(m_handlerWebSocketInterface->webSocketPort(), Core::CorePortType::WebSocketServer);
return true;
} // end of init()
@@ -72,7 +72,7 @@ void HandlerPdfDownload::handleServicePortsInformation(const QVector<WebSocketIn
{
for (const auto &port : service.ports)
{
if (port.type == Core::PortType::WebSocketServer)
if (port.type == Core::CorePortType::WebSocketServer)
{
flmPort = port.number;
break;
@@ -123,7 +123,7 @@ bool MainHandler::initWebSocketHandler()
ERROR_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler failed.";
return false;
}
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::PortType::WebSocketServer);
m_ddsHandler->pacemaker()->addPort(m_handlerWebSocket->serverWebSocketPort(), Core::CorePortType::WebSocketServer);
DEBUG_LOG(m_logger) << "Initialisation WebSocketInterfaceHandler succesful.";
return true;
@@ -186,7 +186,7 @@ bool MissionPlanHandler::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
@@ -153,7 +153,7 @@ Core::FunctionReplyObject UasHandler::createUas(const CreateModifyUasRequest &re
Database::PpmUas dbUas;
dbUas.deviceIdentifier = QString::fromStdString(request.deviceIdentifier());
dbUas.uasStateId = ProjectDataManagement::UasState::Undefined;
dbUas.uasStateId = ProjectDataManagement::UasState::UasState_Undefined;
dbUas.participantId = request.participantId();
dbUas.exerciseId = request.exerciseId();
dbUas.hostname = QString::fromStdString(request.hostname());
@@ -274,7 +274,7 @@ void UasHandler::onUASRadioLinkConnectionStatusChanged(const UASRadioLinkConnect
auto uas = m_uass.value(data.id());
if (mod == DataModification::eRemoved)
uas->setState(ProjectDataManagement::UasState::Undefined);
uas->setState(ProjectDataManagement::UasState::UasState_Undefined);
else
uas->setState(data.uasState());
m_mainHandler->exAnyDts()->publish(uas->toDdsUas());
@@ -115,7 +115,7 @@ bool MainHandler::init(int domainId, int exerciseId)
return false;
}
DEBUG_LOG(m_logger) << "ParticipantHandler initialized";
m_ddsHandler->pacemaker()->addPort(m_participantHandler->getWebSocketPort(), Core::PortType::WebSocketPositionServer);
m_ddsHandler->pacemaker()->addPort(m_participantHandler->getWebSocketPort(), Core::CorePortType::WebSocketPositionServer);
m_targetInformationHandler = std::make_shared<ParticipantManagement::HandlerTargetInformation>(this);
if (!m_targetInformationHandler->init())
@@ -168,7 +168,7 @@ bool MainHandler::init(int domainId, int exerciseId)
return false;
}
DEBUG_LOG(m_logger) << "WebSocketInterfaceHandler initialized";
m_ddsHandler->pacemaker()->addPort(m_websocketHandler->webSocketPort(), Core::PortType::WebSocketServer);
m_ddsHandler->pacemaker()->addPort(m_websocketHandler->webSocketPort(), Core::CorePortType::WebSocketServer);
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
// UasHandler
@@ -781,8 +781,8 @@ GearClass DtcImplCustom::gearClassFromChargeTypeId(int chargeTypeId)
if (chargeTypeId <= 0)
{
// update cache:
s_gearClassChargeTypeCache[requestedCTID] = ProjectDataManagement::GearClass::Unknown;
return ProjectDataManagement::GearClass::Unknown;
s_gearClassChargeTypeCache[requestedCTID] = ProjectDataManagement::GearClass::GearClass_Unknown;
return ProjectDataManagement::GearClass::GearClass_Unknown;
}
const auto &gear2ChargeMap = gearTypeChargeTypes();
@@ -802,9 +802,9 @@ GearClass DtcImplCustom::gearClassFromChargeTypeId(int chargeTypeId)
}
// update cache:
s_gearClassChargeTypeCache[requestedCTID] = ProjectDataManagement::GearClass::Unknown;
s_gearClassChargeTypeCache[requestedCTID] = ProjectDataManagement::GearClass::GearClass_Unknown;
return ProjectDataManagement::GearClass::Unknown;
return ProjectDataManagement::GearClass::GearClass_Unknown;
}
QVector<SanitationProcedure> DtcImplCustom::getSanitationProcedures(qint64 procedures)
@@ -991,7 +991,7 @@ bool DtcImplCustom::isRocket(int chargeTypeId)
{
const GearClass gearClass = gearClassFromChargeTypeId(chargeTypeId);
return gearClass.underlying() == GearClass::Rocket;
return gearClass.underlying() == GearClass::GearClass_Rocket;
}
ChargeTypeIgniterTypeIgniterFunction DtcImplCustom::getChargeTypeIgniterTypeIgniterFunction(int chargeTypeId, int igniterTypeId, int igniterFunctionId)
@@ -552,7 +552,7 @@
<column name="difcuePyro" idlType="boolean"/>
</topicType>
<topicType name="CanComponentString" isDataObject="1" autosubscribe="1" routeToClient="1" routeToServer="0" routeInReplay="0" baseValueType="PdmBaseName">
<column name="bitMask" idlType="long long"/>
<column name="pdm_bitMask" idlType="long long"/>
<column name="canDeviceId" idlType="long"/>
<column name="subDeviceId" idlType="long"/>
</topicType>
@@ -671,7 +671,7 @@
</topicType>
<topicType name="SanitationProcedure" isDataObject="1" autosubscribe="1" routeToClient="1" routeToServer="1" routeInReplay="1" baseValueType="PdmBaseName">
<column name="type" idlType="string"/>
<column name="typeId" idlType="long"/>
<column name="pdm_typeId" idlType="long"/>
<column name="minimumQualification" idlType="long"/>
<column name="longName" idlType="string" isTranslatable="1"/>
<column name="dataCode" idlType="long long"/>
@@ -1111,24 +1111,24 @@
</customDtcFunctions>
<enumerations>
<enumeration name="L19_Oi">
<attribute key="Empty" value="1"/>
<attribute key="F1" value="2"/>
<attribute key="F2" value="3"/>
<attribute key="F3" value="4"/>
<attribute key="F4" value="5"/>
<attribute key="F5" value="6"/>
<attribute key="F6" value="7"/>
<attribute key="F7" value="8"/>
<attribute key="F8" value="9"/>
<attribute key="F9" value="10"/>
<attribute key="L" value="11"/>
<attribute key="L19_Oi_Empty" value="1"/>
<attribute key="L19_Oi_F1" value="2"/>
<attribute key="L19_Oi_F2" value="3"/>
<attribute key="L19_Oi_F3" value="4"/>
<attribute key="L19_Oi_F4" value="5"/>
<attribute key="L19_Oi_F5" value="6"/>
<attribute key="L19_Oi_F6" value="7"/>
<attribute key="L19_Oi_F7" value="8"/>
<attribute key="L19_Oi_F8" value="9"/>
<attribute key="L19_Oi_F9" value="10"/>
<attribute key="L19_Oi_L" value="11"/>
</enumeration>
<enumeration name="L22_FireHaltCategory">
<attribute key="A" value="1"/>
<attribute key="R" value="2"/>
<attribute key="E" value="3"/>
<attribute key="C" value="4"/>
<attribute key="F" value="5"/>
<attribute key="L22_FireHaltCategory_A" value="1"/>
<attribute key="L22_FireHaltCategory_R" value="2"/>
<attribute key="L22_FireHaltCategory_E" value="3"/>
<attribute key="L22_FireHaltCategory_C" value="4"/>
<attribute key="L22_FireHaltCategory_F" value="5"/>
</enumeration>
<enumeration name="L25_KindGuidingLine">
<attribute key="FFA" value="1"/>
@@ -1300,28 +1300,28 @@
<attribute key="Vertical" value="2"/>
</enumeration>
<enumeration name="DataErrorReason" table="pdm_data_error_reason">
<attribute key="Unknown" value="0"/>
<attribute key="WrongParameter" value="1"/>
<attribute key="TelegramOutdated" value="2"/>
<attribute key="InvalidByteCount" value="3"/>
<attribute key="InvalidData" value="4"/>
<attribute key="FragmentationError" value="5"/>
<attribute key="UnknownError" value="6"/>
<attribute key="AdditionalDemandTimeout" value="7"/>
<attribute key="ErrorLoginEquipmentNumber" value="50"/>
<attribute key="ErrorLoginTetraId" value="51"/>
<attribute key="InfoLoginMasteringFlag" value="52"/>
<attribute key="ErrorSendingNamelist" value="53"/>
<attribute key="ErrorSendingToExerciseControl" value="54"/>
<attribute key="ErrorNotLoggedIn" value="55"/>
<attribute key="ErrorNotLicensed" value="56"/>
<attribute key="ErrorConfigSelfTest" value="57"/>
<attribute key="JsonDecodeFailure" value="101"/>
<attribute key="WrongCrc" value="105"/>
<attribute key="BroadcastCounterOverflow" value="106"/>
<attribute key="InvalidTime" value="256"/>
<attribute key="InvalidPosition" value="257"/>
<attribute key="InvalidTacticalState" value="258"/>
<attribute key="DataErrorReason_Unknown" value="0"/>
<attribute key="DataErrorReason_WrongParameter" value="1"/>
<attribute key="DataErrorReason_TelegramOutdated" value="2"/>
<attribute key="DataErrorReason_InvalidByteCount" value="3"/>
<attribute key="DataErrorReason_InvalidData" value="4"/>
<attribute key="DataErrorReason_FragmentationError" value="5"/>
<attribute key="DataErrorReason_UnknownError" value="6"/>
<attribute key="DataErrorReason_AdditionalDemandTimeout" value="7"/>
<attribute key="DataErrorReason_ErrorLoginEquipmentNumber" value="50"/>
<attribute key="DataErrorReason_ErrorLoginTetraId" value="51"/>
<attribute key="DataErrorReason_InfoLoginMasteringFlag" value="52"/>
<attribute key="DataErrorReason_ErrorSendingNamelist" value="53"/>
<attribute key="DataErrorReason_ErrorSendingToExerciseControl" value="54"/>
<attribute key="DataErrorReason_ErrorNotLoggedIn" value="55"/>
<attribute key="DataErrorReason_ErrorNotLicensed" value="56"/>
<attribute key="DataErrorReason_ErrorConfigSelfTest" value="57"/>
<attribute key="DataErrorReason_JsonDecodeFailure" value="101"/>
<attribute key="DataErrorReason_WrongCrc" value="105"/>
<attribute key="DataErrorReason_BroadcastCounterOverflow" value="106"/>
<attribute key="DataErrorReason_InvalidTime" value="256"/>
<attribute key="DataErrorReason_InvalidPosition" value="257"/>
<attribute key="DataErrorReason_InvalidTacticalState" value="258"/>
</enumeration>
<enumeration name="EffectSource" table="pdm_effect_source">
<attribute key="ES_Unknown" value="-1"/>
@@ -1330,180 +1330,180 @@
<attribute key="ES_HLA" value="2"/>
<attribute key="ES_ADLER_STANDALONE" value="3"/>
</enumeration>
<enumeration name="EventType" table="pdm_event_type">
<attribute key="Unknown" value="0"/>
<attribute key="Hit" value="1"/>
<attribute key="WeaponAssignment" value="2"/>
<attribute key="BiteMessage" value="3"/>
<attribute key="FireEvent" value="4"/>
<attribute key="HitBuilding" value="5"/>
<attribute key="Manipulation" value="6"/>
<attribute key="CameraVideo" value="8"/>
<attribute key="RadioCnr" value="9"/>
<attribute key="RadioTvc" value="10"/>
<attribute key="HitEffectSimulation" value="13"/>
<attribute key="HitMine" value="14"/>
<attribute key="HitN" value="15"/>
<attribute key="HitC" value="16"/>
<attribute key="EnterDangerArea" value="17"/>
<attribute key="LeaveDangerArea" value="18"/>
<attribute key="EnterMineArea" value="19"/>
<attribute key="LeaveMineArea" value="20"/>
<attribute key="CrossLocalBorderline" value="21"/>
<attribute key="EnterFunctionalArea" value="22"/>
<attribute key="LeaveFunctionalArea" value="23"/>
<attribute key="EnterNuclear" value="24"/>
<attribute key="LeaveNuclear" value="25"/>
<attribute key="CrossGlobalBorderline" value="26"/>
<attribute key="HitB" value="27"/>
<attribute key="FriendlyFire" value="28"/>
<attribute key="HitGasPipe" value="29"/>
<attribute key="MineArea" value="30"/>
<attribute key="NContamination" value="31"/>
<attribute key="BCContamination" value="32"/>
<attribute key="DangerArea" value="33"/>
<attribute key="FunctionalArea" value="34"/>
<attribute key="MineCorridor" value="35"/>
<attribute key="Borderline" value="36"/>
<attribute key="TechnicalArea" value="37"/>
<attribute key="GasPipe" value="38"/>
<attribute key="Sanitation" value="39"/>
<attribute key="EnterHazardDistance" value="42"/>
<attribute key="LeaveHazardDistance" value="43"/>
<attribute key="EquipmentErrorReport" value="100"/>
<attribute key="EmergencyCall" value="112"/>
<attribute key="AirSupport" value="44"/>
<attribute key="ExplosionCluster" value="45"/>
<attribute key="Jamming" value="46"/>
<enumeration name="PdmEventType" table="pdm_event_type">
<attribute key="EventType_Unknown" value="0"/>
<attribute key="EventType_Hit" value="1"/>
<attribute key="EventType_WeaponAssignment" value="2"/>
<attribute key="EventType_BiteMessage" value="3"/>
<attribute key="EventType_FireEvent" value="4"/>
<attribute key="EventType_HitBuilding" value="5"/>
<attribute key="EventType_Manipulation" value="6"/>
<attribute key="EventType_CameraVideo" value="8"/>
<attribute key="EventType_RadioCnr" value="9"/>
<attribute key="EventType_RadioTvc" value="10"/>
<attribute key="EventType_HitEffectSimulation" value="13"/>
<attribute key="EventType_HitMine" value="14"/>
<attribute key="EventType_HitN" value="15"/>
<attribute key="EventType_HitC" value="16"/>
<attribute key="EventType_EnterDangerArea" value="17"/>
<attribute key="EventType_LeaveDangerArea" value="18"/>
<attribute key="EventType_EnterMineArea" value="19"/>
<attribute key="EventType_LeaveMineArea" value="20"/>
<attribute key="EventType_CrossLocalBorderline" value="21"/>
<attribute key="EventType_EnterFunctionalArea" value="22"/>
<attribute key="EventType_LeaveFunctionalArea" value="23"/>
<attribute key="EventType_EnterNuclear" value="24"/>
<attribute key="EventType_LeaveNuclear" value="25"/>
<attribute key="EventType_CrossGlobalBorderline" value="26"/>
<attribute key="EventType_HitB" value="27"/>
<attribute key="EventType_FriendlyFire" value="28"/>
<attribute key="EventType_HitGasPipe" value="29"/>
<attribute key="EventType_MineArea" value="30"/>
<attribute key="EventType_NContamination" value="31"/>
<attribute key="EventType_BCContamination" value="32"/>
<attribute key="EventType_DangerArea" value="33"/>
<attribute key="EventType_FunctionalArea" value="34"/>
<attribute key="EventType_MineCorridor" value="35"/>
<attribute key="EventType_Borderline" value="36"/>
<attribute key="EventType_TechnicalArea" value="37"/>
<attribute key="EventType_GasPipe" value="38"/>
<attribute key="EventType_Sanitation" value="39"/>
<attribute key="EventType_EnterHazardDistance" value="42"/>
<attribute key="EventType_LeaveHazardDistance" value="43"/>
<attribute key="EventType_EquipmentErrorReport" value="100"/>
<attribute key="EventType_EmergencyCall" value="112"/>
<attribute key="EventType_AirSupport" value="44"/>
<attribute key="EventType_ExplosionCluster" value="45"/>
<attribute key="EventType_Jamming" value="46"/>
</enumeration>
<enumeration name="GearClass" table="pdm_gear_class">
<attribute key="Unknown" value="0"/>
<attribute key="Unspecified" value="1"/>
<attribute key="Nuclear" value="2"/>
<attribute key="Biological" value="3"/>
<attribute key="Chemical" value="4"/>
<attribute key="MineArea" value="5"/>
<attribute key="MineSingle" value="6"/>
<attribute key="Artillery" value="7"/>
<attribute key="Mortar" value="8"/>
<attribute key="Geopairing" value="9"/>
<attribute key="DuelSim" value="10"/>
<attribute key="FunctionalArea" value="11"/>
<attribute key="TechnicalArea" value="12"/>
<attribute key="GasPipe" value="16"/>
<attribute key="AirSupport" value="17"/>
<attribute key="BoobyTrap" value="18"/>
<attribute key="OffRouteMine" value="19"/>
<attribute key="Rocket" value="20"/>
<attribute key="GearClass_Unknown" value="0"/>
<attribute key="GearClass_Unspecified" value="1"/>
<attribute key="GearClass_Nuclear" value="2"/>
<attribute key="GearClass_Biological" value="3"/>
<attribute key="GearClass_Chemical" value="4"/>
<attribute key="GearClass_MineArea" value="5"/>
<attribute key="GearClass_MineSingle" value="6"/>
<attribute key="GearClass_Artillery" value="7"/>
<attribute key="GearClass_Mortar" value="8"/>
<attribute key="GearClass_Geopairing" value="9"/>
<attribute key="GearClass_DuelSim" value="10"/>
<attribute key="GearClass_FunctionalArea" value="11"/>
<attribute key="GearClass_TechnicalArea" value="12"/>
<attribute key="GearClass_GasPipe" value="16"/>
<attribute key="GearClass_AirSupport" value="17"/>
<attribute key="GearClass_BoobyTrap" value="18"/>
<attribute key="GearClass_OffRouteMine" value="19"/>
<attribute key="GearClass_Rocket" value="20"/>
</enumeration>
<enumeration name="HandgrenadeSearchMode">
<attribute key="NoChange" value="0"/>
<attribute key="Off" value="1"/>
<attribute key="On" value="2"/>
<attribute key="HandgrenadeSearchMode_NoChange" value="0"/>
<attribute key="HandgrenadeSearchMode_Off" value="1"/>
<attribute key="HandgrenadeSearchMode_On" value="2"/>
</enumeration>
<enumeration name="ABCProtectionMode">
<attribute key="NoChange" value="0"/>
<attribute key="Off" value="1"/>
<attribute key="On" value="2"/>
<attribute key="ABCProtectionMode_NoChange" value="0"/>
<attribute key="ABCProtectionMode_Off" value="1"/>
<attribute key="ABCProtectionMode_On" value="2"/>
</enumeration>
<enumeration name="HgrMineSearchFilterType" table="pdm_hgr_mine_search_filter_type">
<attribute key="Unknown" value="0"/>
<attribute key="HgrMineSearchFilterType_Unknown" value="0"/>
<attribute key="Handgrenade" value="1"/>
<attribute key="Mine" value="2"/>
<attribute key="Claymore" value="3"/>
<attribute key="Ied" value="4"/>
</enumeration>
<enumeration name="LanguageConfiguration">
<attribute key="NoChange" value="0"/>
<attribute key="German" value="1"/>
<attribute key="English" value="2"/>
<attribute key="French" value="3"/>
<attribute key="Arabic" value="4"/>
<attribute key="Spanish" value="5"/>
<attribute key="Russian" value="6"/>
<attribute key="LanguageConfiguration_NoChange" value="0"/>
<attribute key="LanguageConfiguration_German" value="1"/>
<attribute key="LanguageConfiguration_English" value="2"/>
<attribute key="LanguageConfiguration_French" value="3"/>
<attribute key="LanguageConfiguration_Arabic" value="4"/>
<attribute key="LanguageConfiguration_Spanish" value="5"/>
<attribute key="LanguageConfiguration_Russian" value="6"/>
</enumeration>
<enumeration name="OperationMode">
<attribute key="NoChange" value="0"/>
<attribute key="Normal" value="1"/>
<attribute key="BeStill" value="2"/>
<attribute key="OperationMode_NoChange" value="0"/>
<attribute key="OperationMode_Normal" value="1"/>
<attribute key="OperationMode_BeStill" value="2"/>
</enumeration>
<enumeration name="ParticipantType" table="pdm_participant_type">
<attribute key="Participant" value="0"/>
<attribute key="AggregateParticipant" value="1"/>
<attribute key="ExerciseParticipant" value="2"/>
<attribute key="SupportParticpant" value="3"/>
<attribute key="Human" value="5"/>
<attribute key="Vehicle" value="4"/>
<attribute key="Soldier" value="6"/>
<attribute key="Medical" value="7"/>
<attribute key="Technician" value="8"/>
<attribute key="Building" value="9"/>
<attribute key="ObserverController" value="10"/>
<attribute key="ParticipantType_Participant" value="0"/>
<attribute key="ParticipantType_AggregateParticipant" value="1"/>
<attribute key="ParticipantType_ExerciseParticipant" value="2"/>
<attribute key="ParticipantType_SupportParticpant" value="3"/>
<attribute key="ParticipantType_Human" value="5"/>
<attribute key="ParticipantType_Vehicle" value="4"/>
<attribute key="ParticipantType_Soldier" value="6"/>
<attribute key="ParticipantType_Medical" value="7"/>
<attribute key="ParticipantType_Technician" value="8"/>
<attribute key="ParticipantType_Building" value="9"/>
<attribute key="ParticipantType_ObserverController" value="10"/>
</enumeration>
<enumeration name="PersonalProtection">
<attribute key="NoChange" value="0"/>
<attribute key="Without" value="1"/>
<attribute key="Suit" value="2"/>
<attribute key="SuitAndGloves" value="3"/>
<attribute key="PersonalProtection_NoChange" value="0"/>
<attribute key="PersonalProtection_Without" value="1"/>
<attribute key="PersonalProtection_Suit" value="2"/>
<attribute key="PersonalProtection_SuitAndGloves" value="3"/>
</enumeration>
<enumeration name="ProtectionLevel">
<attribute key="NoChange" value="0"/>
<attribute key="IdzEs" value="1"/>
<attribute key="IdzBs" value="2"/>
<attribute key="Ksk" value="3"/>
<attribute key="SoldierWithBodyArmor" value="4"/>
<attribute key="SoldierActor" value="5"/>
<attribute key="ProtectionLevel_NoChange" value="0"/>
<attribute key="ProtectionLevel_IdzEs" value="1"/>
<attribute key="ProtectionLevel_IdzBs" value="2"/>
<attribute key="ProtectionLevel_Ksk" value="3"/>
<attribute key="ProtectionLevel_SoldierWithBodyArmor" value="4"/>
<attribute key="ProtectionLevel_SoldierActor" value="5"/>
</enumeration>
<enumeration name="StateChangeOriginator" table="pdm_state_change_originator">
<attribute key="Unknown" value="0"/>
<attribute key="Participant" value="1"/>
<attribute key="AreaEffectSimulation" value="2"/>
<attribute key="ObserverController" value="3"/>
<attribute key="ExerciseControl" value="4"/>
<attribute key="WoundTreatmentDevice" value="5"/>
<attribute key="MaintainanceDevice" value="6"/>
<attribute key="FunctionalArea" value="7"/>
<attribute key="Initialization" value="8"/>
<attribute key="MedicalTimeout" value="9"/>
<attribute key="Sanitation" value="10"/>
<attribute key="Party" value="11"/>
<attribute key="ChargeEffect" value="12"/>
<attribute key="ImprovisedExplosiveDevice" value="20"/>
<attribute key="DusMine" value="21"/>
<attribute key="StateChangeOriginator_Unknown" value="0"/>
<attribute key="StateChangeOriginator_Participant" value="1"/>
<attribute key="StateChangeOriginator_AreaEffectSimulation" value="2"/>
<attribute key="StateChangeOriginator_ObserverController" value="3"/>
<attribute key="StateChangeOriginator_ExerciseControl" value="4"/>
<attribute key="StateChangeOriginator_WoundTreatmentDevice" value="5"/>
<attribute key="StateChangeOriginator_MaintainanceDevice" value="6"/>
<attribute key="StateChangeOriginator_FunctionalArea" value="7"/>
<attribute key="StateChangeOriginator_Initialization" value="8"/>
<attribute key="StateChangeOriginator_MedicalTimeout" value="9"/>
<attribute key="StateChangeOriginator_Sanitation" value="10"/>
<attribute key="StateChangeOriginator_Party" value="11"/>
<attribute key="StateChangeOriginator_ChargeEffect" value="12"/>
<attribute key="StateChangeOriginator_ImprovisedExplosiveDevice" value="20"/>
<attribute key="StateChangeOriginator_DusMine" value="21"/>
</enumeration>
<enumeration name="VulnerabilityClass" table="pdm_vulnerability_class">
<attribute key="Unknown" value="0"/>
<attribute key="WtdDamages" value="1"/>
<attribute key="WtdInjuries" value="2"/>
<attribute key="BuildingDamages" value="3"/>
<attribute key="VehicleDamages" value="4"/>
<attribute key="SoldierInjuries" value="5"/>
<attribute key="VulnerabilityClass_Unknown" value="0"/>
<attribute key="VulnerabilityClass_WtdDamages" value="1"/>
<attribute key="VulnerabilityClass_WtdInjuries" value="2"/>
<attribute key="VulnerabilityClass_BuildingDamages" value="3"/>
<attribute key="VulnerabilityClass_VehicleDamages" value="4"/>
<attribute key="VulnerabilityClass_SoldierInjuries" value="5"/>
</enumeration>
<enumeration name="VulnerabilityState" table="pdm_vulnerability_state">
<attribute key="NoChange" value="-1"/>
<attribute key="CombatReady" value="0"/>
<attribute key="LightDamage" value="1"/>
<attribute key="MediumDamage" value="2"/>
<attribute key="HeavyDamage" value="3"/>
<attribute key="MobilityKill" value="4"/>
<attribute key="VisibleMobilityKill" value="5"/>
<attribute key="WeaponSystemDamage" value="6"/>
<attribute key="VisibleWeaponSystemDamage" value="7"/>
<attribute key="CatastrophicKill" value="8"/>
<attribute key="TemporarySeverance" value="9"/>
<attribute key="NearMiss" value="10"/>
<attribute key="HitWithNoEffect" value="11"/>
<attribute key="VulnerabilityBitsChanged" value="12"/>
<attribute key="Reserved" value="13"/>
<attribute key="NContamination" value="14"/>
<attribute key="BContamination" value="15"/>
<attribute key="CContamination" value="16"/>
<attribute key="NotReady" value="99"/>
<attribute key="VulnerabilityState_NoChange" value="-1"/>
<attribute key="VulnerabilityState_CombatReady" value="0"/>
<attribute key="VulnerabilityState_LightDamage" value="1"/>
<attribute key="VulnerabilityState_MediumDamage" value="2"/>
<attribute key="VulnerabilityState_HeavyDamage" value="3"/>
<attribute key="VulnerabilityState_MobilityKill" value="4"/>
<attribute key="VulnerabilityState_VisibleMobilityKill" value="5"/>
<attribute key="VulnerabilityState_WeaponSystemDamage" value="6"/>
<attribute key="VulnerabilityState_VisibleWeaponSystemDamage" value="7"/>
<attribute key="VulnerabilityState_CatastrophicKill" value="8"/>
<attribute key="VulnerabilityState_TemporarySeverance" value="9"/>
<attribute key="VulnerabilityState_NearMiss" value="10"/>
<attribute key="VulnerabilityState_HitWithNoEffect" value="11"/>
<attribute key="VulnerabilityState_VulnerabilityBitsChanged" value="12"/>
<attribute key="VulnerabilityState_Reserved" value="13"/>
<attribute key="VulnerabilityState_NContamination" value="14"/>
<attribute key="VulnerabilityState_BContamination" value="15"/>
<attribute key="VulnerabilityState_CContamination" value="16"/>
<attribute key="VulnerabilityState_NotReady" value="99"/>
</enumeration>
<enumeration name="WphMode">
<attribute key="NoChange" value="0"/>
<attribute key="Without" value="1"/>
<attribute key="With" value="2"/>
<attribute key="WphMode_NoChange" value="0"/>
<attribute key="WphMode_Without" value="1"/>
<attribute key="WphMode_With" value="2"/>
</enumeration>
<enumeration name="ChargeTypeProperty">
<attribute key="None" value="0"/>
@@ -1530,9 +1530,9 @@
<attribute key="Resident" value="2"/>
</enumeration>
<enumeration name="InternationalMode">
<attribute key="NoChange" value="0"/>
<attribute key="Off" value="1"/>
<attribute key="On" value="2"/>
<attribute key="InternationalMode_NoChange" value="0"/>
<attribute key="InternationalMode_Off" value="1"/>
<attribute key="InternationalMode_On" value="2"/>
</enumeration>
<enumeration name="AvmFrequencyPlanTransmissionReason">
<attribute key="NA" value="0"/>
@@ -1545,17 +1545,17 @@
<attribute key="OptimalTreatment" value="65"/>
</enumeration>
<enumeration name="UasState" table="pdm_uas_state">
<attribute key="Undefined" value="0"/>
<attribute key="Off" value="1"/>
<attribute key="On" value="2"/>
<attribute key="Standby" value="3"/>
<attribute key="Init" value="4"/>
<attribute key="Shutdown" value="5"/>
<attribute key="Normal" value="6"/>
<attribute key="Manual" value="7"/>
<attribute key="Auto" value="8"/>
<attribute key="Calibrating" value="9"/>
<attribute key="Maintenance" value="10"/>
<attribute key="UasState_Undefined" value="0"/>
<attribute key="UasState_Off" value="1"/>
<attribute key="UasState_On" value="2"/>
<attribute key="UasState_Standby" value="3"/>
<attribute key="UasState_Init" value="4"/>
<attribute key="UasState_Shutdown" value="5"/>
<attribute key="UasState_Normal" value="6"/>
<attribute key="UasState_Manual" value="7"/>
<attribute key="UasState_Auto" value="8"/>
<attribute key="UasState_Calibrating" value="9"/>
<attribute key="UasState_Maintenance" value="10"/>
</enumeration>
<enumeration name="UasActionTask" table="pdm_uas_action_task">
<attribute key="Undefined" value="0"/>
@@ -21,11 +21,11 @@ static QString toStringBuilding(VulnerabilityState vs)
switch (vs)
{
#ifdef ETS_MODE
case VulnerabilityState::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready", "VulnerabilityStateBuilding");
case VulnerabilityState::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Damaged", "VulnerabilityStateBuilding");
case VulnerabilityState::VulnerabilityState_CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready", "VulnerabilityStateBuilding");
case VulnerabilityState::VulnerabilityState_CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Damaged", "VulnerabilityStateBuilding");
#else
case VulnerabilityState::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Combat Ready", "VulnerabilityStateBuilding");
case VulnerabilityState::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "CatastrophicKill", "VulnerabilityStateBuilding");
case VulnerabilityState::VulnerabilityState_CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Combat Ready", "VulnerabilityStateBuilding");
case VulnerabilityState::VulnerabilityState_CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "CatastrophicKill", "VulnerabilityStateBuilding");
#endif
default: break;
}
@@ -37,33 +37,33 @@ static QString toStringVehicle(VulnerabilityState vs)
switch (vs)
{
#ifdef ETS_MODE
case VulnerabilityState::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle");
case VulnerabilityState::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Communication Damage", "VulnerabilityStateVehicle");
case VulnerabilityState::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Main Function Damage", "VulnerabilityStateVehicle");
case VulnerabilityState::MobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Mobility Lost", "VulnerabilityStateVehicle");
case VulnerabilityState::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Fully Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Communication Damage", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Main Function Damage", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_MobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Mobility Lost", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Fully Damaged", "VulnerabilityStateVehicle");
default:
break;
#else
case VulnerabilityState::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Comms Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "Veh Body Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Main Funct Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::MobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Mobility Kill", "VulnerabilityStateVehicle");
case VulnerabilityState::VisibleMobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Visible Mobility Kill", "VulnerabilityStateVehicle");
case VulnerabilityState::WeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Wpn / Turret Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VisibleWeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Visible Wpn / Turret Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill", "VulnerabilityStateVehicle");
case VulnerabilityState::CombatReady:
case VulnerabilityState::NoChange:
case VulnerabilityState::TemporarySeverance:
case VulnerabilityState::NearMiss:
case VulnerabilityState::HitWithNoEffect:
case VulnerabilityState::VulnerabilityBitsChanged:
case VulnerabilityState::NContamination:
case VulnerabilityState::BContamination:
case VulnerabilityState::CContamination:
case VulnerabilityState::NotReady: // Internal
case VulnerabilityState::Reserved: // Internal
case VulnerabilityState::VulnerabilityState_LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Comms Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "Veh Body Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Main Funct Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_MobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Mobility Kill", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_VisibleMobilityKill: return QCoreApplication::translate("ProjectDataManagement", "Visible Mobility Kill", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_WeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Wpn / Turret Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_VisibleWeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Visible Wpn / Turret Damaged", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_CombatReady:
case VulnerabilityState::VulnerabilityState_NoChange:
case VulnerabilityState::VulnerabilityState_TemporarySeverance:
case VulnerabilityState::VulnerabilityState_NearMiss:
case VulnerabilityState::VulnerabilityState_HitWithNoEffect:
case VulnerabilityState::VulnerabilityState_VulnerabilityBitsChanged:
case VulnerabilityState::VulnerabilityState_NContamination:
case VulnerabilityState::VulnerabilityState_BContamination:
case VulnerabilityState::VulnerabilityState_CContamination:
case VulnerabilityState::VulnerabilityState_NotReady: // Internal
case VulnerabilityState::VulnerabilityState_Reserved: // Internal
break; // use common translation from toString()
#endif
}
@@ -76,35 +76,35 @@ static QString toStringSoldier(VulnerabilityState vs)
switch (vs)
{
#ifdef ETS_MODE
case VulnerabilityState::CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle");
case VulnerabilityState::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "lightly injured", "VulnerabilityStateVehicle");
case VulnerabilityState::MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "moderatly injured", "VulnerabilityStateVehicle");
case VulnerabilityState::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "seriously injured", "VulnerabilityStateVehicle");
case VulnerabilityState::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "dead", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_CombatReady: return QCoreApplication::translate("ProjectDataManagement", "Ready / OK", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_LightDamage: return QCoreApplication::translate("ProjectDataManagement", "lightly injured", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "moderatly injured", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "seriously injured", "VulnerabilityStateVehicle");
case VulnerabilityState::VulnerabilityState_CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "dead", "VulnerabilityStateVehicle");
default:
break;
#else
case VulnerabilityState::LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Walking", "VulnerabilityStateSoldier");
case VulnerabilityState::MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Sitting", "VulnerabilityStateSoldier");
case VulnerabilityState::HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Laying", "VulnerabilityStateSoldier");
case VulnerabilityState::CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill / Killed", "VulnerabilityStateSoldier");
case VulnerabilityState::WeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Weapon Damage", "VulnerabilityStateSoldier");
case VulnerabilityState::VisibleWeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Visible Weapon Damage", "VulnerabilityStateSoldier");
case VulnerabilityState::CombatReady:
case VulnerabilityState::TemporarySeverance:
case VulnerabilityState::NearMiss:
case VulnerabilityState::HitWithNoEffect:
case VulnerabilityState::VulnerabilityBitsChanged:
case VulnerabilityState::NContamination:
case VulnerabilityState::BContamination:
case VulnerabilityState::CContamination:
case VulnerabilityState::NoChange:
case VulnerabilityState::VulnerabilityState_LightDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Walking", "VulnerabilityStateSoldier");
case VulnerabilityState::VulnerabilityState_MediumDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Sitting", "VulnerabilityStateSoldier");
case VulnerabilityState::VulnerabilityState_HeavyDamage: return QCoreApplication::translate("ProjectDataManagement", "Wounded Laying", "VulnerabilityStateSoldier");
case VulnerabilityState::VulnerabilityState_CatastrophicKill: return QCoreApplication::translate("ProjectDataManagement", "Catastrophic Kill / Killed", "VulnerabilityStateSoldier");
case VulnerabilityState::VulnerabilityState_WeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Weapon Damage", "VulnerabilityStateSoldier");
case VulnerabilityState::VulnerabilityState_VisibleWeaponSystemDamage: return QCoreApplication::translate("ProjectDataManagement", "Visible Weapon Damage", "VulnerabilityStateSoldier");
case VulnerabilityState::VulnerabilityState_CombatReady:
case VulnerabilityState::VulnerabilityState_TemporarySeverance:
case VulnerabilityState::VulnerabilityState_NearMiss:
case VulnerabilityState::VulnerabilityState_HitWithNoEffect:
case VulnerabilityState::VulnerabilityState_VulnerabilityBitsChanged:
case VulnerabilityState::VulnerabilityState_NContamination:
case VulnerabilityState::VulnerabilityState_BContamination:
case VulnerabilityState::VulnerabilityState_CContamination:
case VulnerabilityState::VulnerabilityState_NoChange:
break; // use common translation from toString()
// those should not happen ...
case VulnerabilityState::MobilityKill:
case VulnerabilityState::VisibleMobilityKill:
case VulnerabilityState::NotReady: // Internal
case VulnerabilityState::Reserved: // Internal
case VulnerabilityState::VulnerabilityState_MobilityKill:
case VulnerabilityState::VulnerabilityState_VisibleMobilityKill:
case VulnerabilityState::VulnerabilityState_NotReady: // Internal
case VulnerabilityState::VulnerabilityState_Reserved: // Internal
break;
#endif
}
@@ -115,15 +115,15 @@ QString toString(VulnerabilityState vs, VulnerabilityClass vc)
{
switch (vc)
{
case VulnerabilityClass::Unknown:
case VulnerabilityClass::WtdDamages:
case VulnerabilityClass::WtdInjuries:
case VulnerabilityClass::VulnerabilityClass_Unknown:
case VulnerabilityClass::VulnerabilityClass_WtdDamages:
case VulnerabilityClass::VulnerabilityClass_WtdInjuries:
return toString(vs);
case VulnerabilityClass::BuildingDamages:
case VulnerabilityClass::VulnerabilityClass_BuildingDamages:
return toStringBuilding(vs);
case VulnerabilityClass::VehicleDamages:
case VulnerabilityClass::VulnerabilityClass_VehicleDamages:
return toStringVehicle(vs);
case VulnerabilityClass::SoldierInjuries:
case VulnerabilityClass::VulnerabilityClass_SoldierInjuries:
return toStringSoldier(vs);
}
return QCoreApplication::translate("ProjectDataManagement", "Unknown (%1)", "VulnerabilityState").arg(static_cast<int>(vs));
@@ -107,7 +107,7 @@ void DataManager::onTextMessageFromScm(const QString &message)
{
const QJsonObject &port = valPort.toObject();
int typeId = port.value(TYPE_ID()).toInt();
if (typeId == Core::PortType::WebSocketServer)
if (typeId == Core::CorePortType::WebSocketServer)
{
int tabPort = port.value(NUMBER()).toInt();
DEBUG_LOG(m_logger) << "connect to TAB - port: " << tabPort;
@@ -94,7 +94,7 @@ bool MainHandler::init(int domainId)
}
m_ddsHandler->pacemaker()->setNewState(Core::RunningState::Running);
m_ddsHandler->pacemaker()->addPort(m_wsBaseDataHandler->webSocketPort(), Core::PortType::WebSocketServer);
m_ddsHandler->pacemaker()->addPort(m_wsBaseDataHandler->webSocketPort(), Core::CorePortType::WebSocketServer);
return true;
}