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
+25
-25
@@ -166,7 +166,7 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
{
|
||||
const int aesItemId = data.aesItemId();
|
||||
const AreaEffectSimulation::AesEffectState &effectState = data.effectStateId();
|
||||
if (data.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtFunctionalArea)
|
||||
if (data.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtFunctionalArea)
|
||||
return;
|
||||
|
||||
const AreaEffectSimulation::FunctionalArea &fa = m_ddsHandler->dtcAes()->functionalArea(data.aesItemId());
|
||||
@@ -192,12 +192,12 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
|
||||
switch (effectState.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesEffectState_def::EsPrepared:
|
||||
case AreaEffectSimulation::AesEffectState::EsPrepared:
|
||||
break;
|
||||
case AreaEffectSimulation::AesEffectState_def::EsActivated:
|
||||
case AreaEffectSimulation::AesEffectState::EsActivated:
|
||||
{
|
||||
bool isSupplyTruck = false;
|
||||
if (fa.supplyMode() == AreaEffectSimulation::AesOperatingMode_def::OmWaitingTime)
|
||||
if (fa.supplyMode() == AreaEffectSimulation::AesOperatingMode::OmWaitingTime)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "isSupplyTruck = true";
|
||||
isSupplyTruck = true;
|
||||
@@ -231,8 +231,8 @@ void HandlerFunctionalAreas::onAesItemViewChanged(const AreaEffectSimulation::Ae
|
||||
<< ", type: " << data.aesTypeId();
|
||||
break;
|
||||
} // case EsActivated
|
||||
case AreaEffectSimulation::AesEffectState_def::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState_def::EsExpired:
|
||||
case AreaEffectSimulation::AesEffectState::EsRemoved:
|
||||
case AreaEffectSimulation::AesEffectState::EsExpired:
|
||||
{
|
||||
aesItemViewRemoved(aesItemId);
|
||||
m_aesPolygonEncloseBuilding.remove(aesItemId);
|
||||
@@ -307,7 +307,7 @@ void HandlerFunctionalAreas::onNewParticipantPosition(const CentralEffectSimulat
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
{
|
||||
///////////////////
|
||||
/// \brief [GUEZE-2256] 3D Wirksim - Funktionsraum Nicht Kampffähig
|
||||
@@ -350,7 +350,7 @@ void HandlerFunctionalAreas::onNewIndoorParticipantPosition(const CentralEffectS
|
||||
DEBUG_LOG(m_logger) << " itemView: " << itemView.aesItemId << ", " << itemView.aesTypeId;
|
||||
switch (itemView.aesTypeId.underlying())
|
||||
{
|
||||
case AreaEffectSimulation::AesType_def::AtFunctionalArea:
|
||||
case AreaEffectSimulation::AesType::AtFunctionalArea:
|
||||
{
|
||||
///////////////////
|
||||
/// \brief [GUEZE-2256] 3D Wirksim - Funktionsraum Nicht Kampffähig
|
||||
@@ -405,7 +405,7 @@ void HandlerFunctionalAreas::onRestoreRadioReadinessChanged(const int participan
|
||||
bool HandlerFunctionalAreas::inBoundingBoxCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
// QRectF(topLeft, bottomRight) -> no need to mormalize, QRectF:contains() handles it correct
|
||||
@@ -429,7 +429,7 @@ bool HandlerFunctionalAreas::inBoundingBoxCheck(const CentralEffectSimulation::A
|
||||
bool HandlerFunctionalAreas::inFormCheck(const CentralEffectSimulation::AesItemViewUtm &itemView,
|
||||
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &participantData)
|
||||
{
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState_def::EsActivated)
|
||||
if (itemView.effectStateId != AreaEffectSimulation::AesEffectState::EsActivated)
|
||||
return false;
|
||||
|
||||
const QRectF boundingBox(itemView.boundingBoxBottomLeft,
|
||||
@@ -476,11 +476,11 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
|
||||
switch (eventType.underlying())
|
||||
{
|
||||
case ProjectDataManagement::PdmEventType_def::EnterFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea:
|
||||
DEBUG_LOG(m_logger) << "-------------- EnterFunctionalArea itemView =" << itemView.aesItemId;
|
||||
remaining = 1;
|
||||
break;
|
||||
case ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea:
|
||||
case ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea:
|
||||
remaining = 0;
|
||||
DEBUG_LOG(m_logger) << "-------------- LeaveFunctionalArea itemView =" << itemView.aesItemId;
|
||||
break;
|
||||
@@ -508,7 +508,7 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
return;
|
||||
}
|
||||
if (participantData.participantId() != 0 &&
|
||||
participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
|
||||
participantData.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "participantPosition.participantId != 0 CatastrophicKill)";
|
||||
return;
|
||||
@@ -517,7 +517,7 @@ void HandlerFunctionalAreas::sendCesHitRequest(const CentralEffectSimulation::Ae
|
||||
const AreaEffectSimulation::FunctionalArea &fa = m_ddsHandler->dtcAes()->functionalArea(itemView.aesItemId);
|
||||
|
||||
const TrainingAreaBase::TabPosition pos(participantData.pos(),
|
||||
Core::PositionReportingSource_def::Gps, // irrelevant
|
||||
Core::PositionReportingSource::Gps, // irrelevant
|
||||
participantData.buildingId(),
|
||||
participantData.roomId());
|
||||
const int medicTime = fa.medicTime() / 600000; //reserve 2 = medical treatment
|
||||
@@ -568,12 +568,12 @@ void HandlerFunctionalAreas::sendParticipantEvent(const CentralEffectSimulation:
|
||||
{
|
||||
ParticipantManagement::TypeClass typeClass = m_handlerParticipant->typeClassFromTypeId(participantData.participantTypeId());
|
||||
// can happen since the positions are collected for all participants (no check if it is a SupportEntity or similar)
|
||||
if (typeClass == ParticipantManagement::TypeClass_def::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass_def::Unknown)
|
||||
if (typeClass == ParticipantManagement::TypeClass::Unit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportUnit ||
|
||||
typeClass == ParticipantManagement::TypeClass::SupportEntity ||
|
||||
typeClass == ParticipantManagement::TypeClass::Aircraft ||
|
||||
typeClass == ParticipantManagement::TypeClass::Vessel ||
|
||||
typeClass == ParticipantManagement::TypeClass::Unknown)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Participant with id " << participantData.participantId()
|
||||
<< " has invalid typeClass: " << typeClass
|
||||
@@ -676,7 +676,7 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
|
||||
if (inForm)
|
||||
{
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType_def::EnterFunctionalArea;
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea;
|
||||
if (itemView.isSupplyTruck)
|
||||
{
|
||||
enterLeaveType.isAlreadySupplied = true;
|
||||
@@ -695,8 +695,8 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
}
|
||||
else
|
||||
{
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType_def::LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType_def::EnterFunctionalArea)
|
||||
enterLeaveType.eventType = ProjectDataManagement::PdmEventType::EventType_LeaveFunctionalArea;
|
||||
if (itemView.isSupplyTruck && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "sendEnterLeave.stopSupplyTimer";
|
||||
enterLeaveType.isAlreadySupplied = false;
|
||||
@@ -710,8 +710,8 @@ void HandlerFunctionalAreas::sendEnterLeave(const CentralEffectSimulation::AesIt
|
||||
}
|
||||
}
|
||||
|
||||
if ((inForm && lastEnterLeaveType.eventType != ProjectDataManagement::PdmEventType_def::EnterFunctionalArea)
|
||||
|| (!inForm && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType_def::EnterFunctionalArea))
|
||||
if ((inForm && lastEnterLeaveType.eventType != ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea)
|
||||
|| (!inForm && lastEnterLeaveType.eventType == ProjectDataManagement::PdmEventType::EventType_EnterFunctionalArea))
|
||||
{
|
||||
CentralEffectSimulation::HandlerParticipant::CesParticipantData cesParticipantData = m_handlerParticipant.get()->getParticipantPosition(participantId);
|
||||
sendParticipantEvent(itemView, cesParticipantData, enterLeaveType.eventType);
|
||||
|
||||
+1
-1
@@ -54,7 +54,7 @@ struct ParticipantDistance
|
||||
|
||||
struct EnterLeaveType
|
||||
{
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType_def::Unknown;
|
||||
ProjectDataManagement::PdmEventType eventType = ProjectDataManagement::PdmEventType::EventType_Unknown;
|
||||
bool isAlreadySupplied = false;
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user