Migrates residual Lts sources to generated rtiddsgen API
Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
1 parent
5485a90385
commit
881d44f4dd
512 files changed
+6887
-6426
No files matched your search
+46
-46
@@ -165,9 +165,9 @@ void HandlerMineAreas::onMineTriggeredReply(const Core::FunctionReplyObject &rep
|
||||
// ///////////////////////////////////
|
||||
void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemView &data, DataModification modType)
|
||||
{
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtMineAreaSingleMines
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtMineArea
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtMineCorridor)
|
||||
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtMineAreaSingleMines
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtMineArea
|
||||
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtMineCorridor)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AesItemView return";
|
||||
return;
|
||||
@@ -183,7 +183,7 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
return;
|
||||
|
||||
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsExpired)
|
||||
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "AesItemView expired return id=" << data.aesItemId();
|
||||
aesItemViewRemoved(data.aesItemId());
|
||||
@@ -212,7 +212,7 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
return;
|
||||
}
|
||||
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtMineAreaSingleMines)
|
||||
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtMineAreaSingleMines)
|
||||
{
|
||||
if (!m_aesItemViews.contains(aesItemId))
|
||||
{
|
||||
@@ -237,11 +237,11 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
DEBUG_LOG(m_logger) << "impactRadius=" << impactRadius;
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
{
|
||||
break;
|
||||
}
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
const auto aesItemViewUtm(CentralEffectSimulation::AesItemViewUtm::create(data, m_aesItemViews[data.aesItemId()], impactRadius));
|
||||
|
||||
@@ -255,8 +255,8 @@ void HandlerMineAreas::onAesItemViewChanged(const AreaEffectSimulation::AesItemV
|
||||
|
||||
|
||||
} // case EsActivated
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
{
|
||||
aesItemViewRemoved(aesItemId);
|
||||
break;
|
||||
@@ -284,12 +284,12 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantPosition.participantTypeId());
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "return New Position Participant with id " << participantPosition.participantId()
|
||||
<< " has invalid typeClass: " << typeClass;
|
||||
@@ -305,7 +305,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
return;
|
||||
}
|
||||
|
||||
if (participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "New Position CatastrophicKill return";
|
||||
return;
|
||||
@@ -346,7 +346,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
// DEBUG_LOG(m_logger) << "minePosGeo lat=" << minePosGeo.lat()
|
||||
// << " lon=" << minePosGeo.lon()
|
||||
// << " z=" << minePosGeo.z();
|
||||
sendParticipantEvent(m_aesItemViews[aesItemId], minePosition, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(m_aesItemViews[aesItemId], minePosition, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
|
||||
m_mineLists[participantPosition.participantId()].remove(index);
|
||||
|
||||
@@ -379,19 +379,19 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId
|
||||
<< " remainingTasCode=" << remaining;
|
||||
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
continue;
|
||||
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Human && remaining > 50)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Human && remaining > 50)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "ParticipantManagement::TypeClass_def::Human && remaining > 50 continue";
|
||||
DEBUG_LOG(m_logger) << "ParticipantManagement::TypeClass::Human && remaining > 50 continue";
|
||||
continue;
|
||||
}
|
||||
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Human && m_ddsHandler->isAtMine(itemView.chargeStruct))
|
||||
if (typeClass == ParticipantManagement::TypeClass::Human && m_ddsHandler->isAtMine(itemView.chargeStruct))
|
||||
continue;
|
||||
|
||||
if (itemView.aesTypeId.underlying() == AreaEffectSimulation::AesType_def::AtMineArea)
|
||||
if (itemView.aesTypeId.underlying() == AreaEffectSimulation::AesType::AtMineArea)
|
||||
{
|
||||
|
||||
// checks whether the participant has been positioned in the minefield or across it.
|
||||
@@ -435,7 +435,7 @@ void HandlerMineAreas::onNewOutdoorPosition(const CentralEffectSimulation::Handl
|
||||
void HandlerMineAreas::onNewParticipantState(const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantPos)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onNewParticipantState ";
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CombatReady)
|
||||
if (participantPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CombatReady)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_mineLists.contains(participantPos.participantId():" << m_mineLists.contains(participantPos.participantId());
|
||||
if (m_mineLists.contains(participantPos.participantId()))
|
||||
@@ -485,7 +485,7 @@ bool HandlerMineAreas::intersectMineRadiusCheck(const CentralEffectSimulation::A
|
||||
}
|
||||
}
|
||||
|
||||
const int mineIdx = (itemView.aesTypeId == AreaEffectSimulation::AesType_def::AtDusSingleMine)
|
||||
const int mineIdx = (itemView.aesTypeId == AreaEffectSimulation::AesType::AtDusSingleMine)
|
||||
? itemView.dusMineId : bitFieldIdx + 1; // mineIdx in minefield starts at 1
|
||||
|
||||
// Check, if participant is inside danger-radius of the mine
|
||||
@@ -542,7 +542,7 @@ bool HandlerMineAreas::intersectMineRadiusCheck(const CentralEffectSimulation::A
|
||||
// DEBUG_LOG(m_logger) << "minePosGeo lat=" << minePosGeo.lat()
|
||||
// << " lon=" << minePosGeo.lon()
|
||||
// << " z=" << minePosGeo.z();
|
||||
sendParticipantEvent(itemView, minePosition, ProjectDataManagement::PdmEventType_def::HitMine);
|
||||
sendParticipantEvent(itemView, minePosition, ProjectDataManagement::PdmEventType::EventType_HitMine);
|
||||
// aktuell verarbeitete Mine aus der Liste entfernen.
|
||||
m_mineLists[participantPosition.participantId()].remove(mineListItemIndex);
|
||||
}
|
||||
@@ -671,14 +671,14 @@ void HandlerMineAreas::onTriggeredImpactsChanged(const AreaEffectSimulation::Tri
|
||||
DEBUG_LOG(m_logger) << "Got TriggeredImpacts: ";
|
||||
switch (data.aesTypeId().underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType_def::AtExplosionSingle:
|
||||
//case AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions: Plugin Artillery
|
||||
case AreaEffectSimulation::AesType::AtExplosionArea:
|
||||
case AreaEffectSimulation::AesType::AtExplosionSingle:
|
||||
//case AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions: Plugin Artillery
|
||||
// explosion at the position of participant
|
||||
calculateImpacts(data);
|
||||
break;
|
||||
case AreaEffectSimulation::AesType_def::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType_def::AtMineArea:
|
||||
case AreaEffectSimulation::AesType::AtMineAreaSingleMines:
|
||||
case AreaEffectSimulation::AesType::AtMineArea:
|
||||
// participant run on mine
|
||||
// => store Mine-State and take into account when a participant runs to one of this mines
|
||||
m_triggeredImpacts.insert(data.aesItemId(), data);
|
||||
@@ -693,8 +693,8 @@ void HandlerMineAreas::onTriggeredImpactsChanged(const AreaEffectSimulation::Tri
|
||||
void HandlerMineAreas::calculateImpacts(const AreaEffectSimulation::TriggeredImpacts &data)
|
||||
{
|
||||
|
||||
if ((data.aesTypeId() == AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions)
|
||||
|| (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions))
|
||||
if ((data.aesTypeId() == AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions)
|
||||
|| (data.aesTypeId() == AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions))
|
||||
return;
|
||||
|
||||
|
||||
@@ -743,7 +743,7 @@ void HandlerMineAreas::calculateImpacts(const AreaEffectSimulation::TriggeredImp
|
||||
<< " buildingId=" << pPos.buildingId()
|
||||
<< " insideBuilding=" << pPos.insideBuilding()
|
||||
<< " positionValid=" << pPos.positionValid;
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
if (pPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
continue;
|
||||
if (pPos.insideBuilding())
|
||||
continue;
|
||||
@@ -801,7 +801,7 @@ void HandlerMineAreas::sendCesHitRequest(const CentralEffectSimulation::AesItemV
|
||||
return;
|
||||
}
|
||||
if (participantPosition.participantId() != 0 &&
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -810,12 +810,12 @@ void HandlerMineAreas::sendCesHitRequest(const CentralEffectSimulation::AesItemV
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId, 0);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantPosition.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantPosition.buildingId(),
|
||||
participantPosition.roomId());
|
||||
const int originatorEquipNo = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipNo, // equipmentNumber
|
||||
@@ -866,7 +866,7 @@ void HandlerMineAreas::sendCesHitRequest(const AreaEffectSimulation::AesItemView
|
||||
} // if
|
||||
|
||||
if (participantPosition.participantId() != 0 &&
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantPosition.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -875,10 +875,10 @@ void HandlerMineAreas::sendCesHitRequest(const AreaEffectSimulation::AesItemView
|
||||
int32_t originatorParticipantId = m_aesItemId2partIdMap.value(itemView.aesItemId(), 0);
|
||||
const int originatorEquipmentNumber = m_ddsHandler->participantId2EquipNo(originatorParticipantId);
|
||||
const TrainingAreaBase::TabPosition pos(
|
||||
participantPosition.pos(), Core::PositionReportingSource_def::Gps, participantPosition.buildingId(),
|
||||
participantPosition.pos(), Core::PositionReportingSource::Gps, participantPosition.buildingId(),
|
||||
participantPosition.roomId()
|
||||
);
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
const ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
|
||||
TrainingAreaBase::SendCesHitRequest requestTab(
|
||||
equipmentNumber, participantPosition.participantId(), legacyChargeTypeId, itemView.aesItemId(), originatorEquipmentNumber,
|
||||
@@ -903,27 +903,27 @@ void HandlerMineAreas::sendParticipantEventEnterLeave(const CentralEffectSimulat
|
||||
const ProjectDataManagement::PdmEventType &lastEvent = m_eventStates[itemView.aesItemId][participantPosition.participantId()];
|
||||
|
||||
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_EnterMineArea;
|
||||
|
||||
|
||||
if (inFormCheckResult)
|
||||
{
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType_def::EnterMineArea)
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType::EventType_EnterMineArea)
|
||||
return;
|
||||
else
|
||||
{
|
||||
eventType = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType_def::EnterMineArea;
|
||||
eventType = ProjectDataManagement::PdmEventType::EventType_EnterMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType::EventType_EnterMineArea;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType_def::LeaveMineArea)
|
||||
if (lastEvent == ProjectDataManagement::PdmEventType::EventType_LeaveMineArea)
|
||||
return;
|
||||
else
|
||||
{
|
||||
eventType = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType_def::LeaveMineArea;
|
||||
eventType = ProjectDataManagement::PdmEventType::EventType_LeaveMineArea;
|
||||
m_eventStates[itemView.aesItemId][participantPosition.participantId()] = ProjectDataManagement::PdmEventType::EventType_LeaveMineArea;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user