Migrates residual Lts sources to generated rtiddsgen API

Adds NmeaManagement tests, fixes codegen includes and Qt6 SerialPort CMake target.
This commit is contained in:
berrux-dev committed 2026-09-23 12:05:37 +02:00
1 parent 5485a90385
commit 881d44f4dd
512 files changed
+6887 -6426

No files matched your search

@@ -117,7 +117,7 @@ void HandlerAesData::onBoobyTrapChanged(const AreaEffectSimulation::BoobyTrap &d
return;
}
AreaEffectSimulation::AesItemView itemView;
AreaEffectSimulation::AesType aesType = AreaEffectSimulation::AesType_def::AtBoobyTrap;
AreaEffectSimulation::AesType aesType = AreaEffectSimulation::AesType::AtBoobyTrap;
m_ddsHandler->dtcAes()->aesItemViewFromEntityId(data.id(), aesType, itemView);
checkBuildingsHit(itemView);
@@ -139,18 +139,18 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
DEBUG_LOG(m_logger) << "Got AesItemView: " << data.effectStateId();
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsExpired)
{
INFO_LOG(m_logger) << "AesEffectState_def::EsExpired"
INFO_LOG(m_logger) << "AesEffectState::EsExpired"
<< " currentPartitionTime=" << m_ddsHandler->currentPartitionTime()
<< " effectStart=" << data.effectStart()
<< " diff = " << m_ddsHandler->currentPartitionTime() - data.effectStart() ;
if (m_ddsHandler->currentPartitionTime() == 0)
return;
if ((data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
|| (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary))
if ((data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
|| (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary))
{
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
{
DEBUG_LOG(m_logger) << "AtOffRouteMineSecondary id=" << data.id() / 1000;
auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int)(data.id() / 1000));
@@ -176,7 +176,7 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
return;
}
}
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
{
DEBUG_LOG(m_logger) << "AtBoobyTrapSecondary id=" << data.id() / 1000;
//auto offRouteMine = m_ddsHandler->dtcAes()->offRouteMine((int) (data.id() / 1000));
@@ -214,7 +214,7 @@ void HandlerAesData::onAesItemViewChanged(const AreaEffectSimulation::AesItemVie
void HandlerAesData::removeStates(const AreaEffectSimulation::AesItemView &data)
{
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtExplosionArea)
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtExplosionArea)
return;
DEBUG_LOG(m_logger) << "Remove aesItemId=" << data.aesItemId();
// remove State for each building
@@ -349,16 +349,16 @@ void HandlerAesData::onExplosionSingleChanged(const AreaEffectSimulation::Explos
return;
}
if (data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsRemoved)
if (data.effectStateId() == AreaEffectSimulation::AesEffectState::EsRemoved)
{
DEBUG_LOG(m_logger) << "Remove SingleExplosion";
m_explosionSingleState.remove(data.id());
return;
}
// Only handle transitions from prepared or fired to activated
if ((m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsPrepared ||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState_def::EsFired) &&
data.effectStateId() == AreaEffectSimulation::AesEffectState_def::EsActivated)
if ((m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsPrepared ||
m_explosionSingleState.value(data.id()) == AreaEffectSimulation::AesEffectState::EsFired) &&
data.effectStateId() == AreaEffectSimulation::AesEffectState::EsActivated)
{
DEBUG_LOG(m_logger) << "Handle SingleExplosion";
handleExplosion = true;
@@ -399,7 +399,7 @@ void HandlerAesData::onEffectsChanged(const AreaEffectSimulation::Effects &effec
if (modType == DataModification::eRemoved)
return;
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
return;
DEBUG_LOG(m_logger) << " Got typechecked effects " << effects;
@@ -548,14 +548,14 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
// check for correct AES type artillery only
static QVector<AreaEffectSimulation::AesType_def::type> s_relevantTypes =
static QVector<AreaEffectSimulation::AesType> s_relevantTypes =
{
AreaEffectSimulation::AesType_def::AtExplosionArea,
AreaEffectSimulation::AesType_def::AtExplosionSingle,
AreaEffectSimulation::AesType_def::AtExplosionAreaSingleExplosions,
AreaEffectSimulation::AesType::AtExplosionArea,
AreaEffectSimulation::AesType::AtExplosionSingle,
AreaEffectSimulation::AesType::AtExplosionAreaSingleExplosions,
};
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
if (data.aesTypeId().underlying() == AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
{
bIsExplosionCluster = true;
ignFuncBase = igniterFunctionBaseExplosionCluster(aesItemId); // assume that fuseType does not differ within a single ExplosionArea
@@ -691,7 +691,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::TriggeredImpac
void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effects, const CentralEffectSimulation::HandlerBuildingData::Footprint &footprint)
{
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType_def::AtExplosionClusterSingleExplosions)
if (effects.aesTypeId().underlying() != AreaEffectSimulation::AesType::AtExplosionClusterSingleExplosions)
return;
const int aesItemId = effects.aesItemId();
@@ -715,7 +715,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
++indexBitFieldIdx;
// just SesTriggered are relevant:
if (singleEffect.singleEffectState() != AreaEffectSimulation::AesSingleEffectState_def::SesTriggered)
if (singleEffect.singleEffectState() != AreaEffectSimulation::AesSingleEffectState::SesTriggered)
continue;
// already processed?
@@ -768,9 +768,9 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
properties += mseIdAsStr;
const AreaEffectSimulation::AesZPlacement_def::type zPlacement = singleEffect.zPlacement().underlying();
const AreaEffectSimulation::AesZPlacement zPlacement = static_cast<AreaEffectSimulation::AesZPlacement>(singleEffect.zPlacement());
if (zPlacement == AreaEffectSimulation::AesZPlacement_def::ZpDraped)
if (zPlacement == AreaEffectSimulation::AesZPlacement::ZpDraped)
{
// z-Value is 0 -> old:
Buildings::SendCesHitOnBuildingRequest requestBld(
@@ -793,7 +793,7 @@ void HandlerAesData::calculateImpacts(const AreaEffectSimulation::Effects &effec
bitfieldState.insert(indexBitFieldIdx);
}
else if (zPlacement == AreaEffectSimulation::AesZPlacement_def::ZpAbsolute)
else if (zPlacement == AreaEffectSimulation::AesZPlacement::ZpAbsolute)
{
// since HandlerBuildingModel::handleDetonationLocationRequest has already
// calculated to ignFuncBase, the impactPosition is the detonationLocation:
@@ -879,12 +879,12 @@ void HandlerAesData::checkBuildingsHit(const AreaEffectSimulation::AesItemView &
tmpBldg.buildingId(buildingId);
Core::GeoPosition impactPosition;
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBoobyTrapSecondary)
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBoobyTrapSecondary)
{
impactPosition.lat(m_ddsHandler->dtcAes()->boobyTrap(data.aesItemId()).impactPosition().lat());
impactPosition.lon(m_ddsHandler->dtcAes()->boobyTrap(data.aesItemId()).impactPosition().lon());
}
else if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtOffRouteMineSecondary)
else if (data.aesTypeId() == AreaEffectSimulation::AesType::AtOffRouteMineSecondary)
{
int zone = -1;
LtsCoordTrans::UtmCoordinate bottomLeft = LtsCoordTrans::UtmCoordinate::fromGeographic(data.boundingBoxBottomLeft().lon(), data.boundingBoxBottomLeft().lat(), zone);
@@ -151,7 +151,7 @@ void HandlerBuildingModel::onMainStructureElementChanged(const InfrastructureMan
}
// skip "Outdoor Cameras / Announcement Units"
if (data.structureElementTypeId() != InfrastructureManagement::StructureElementType_def::Building)
if (data.structureElementTypeId() != InfrastructureManagement::StructureElementType::Building)
return;
// Vor allem in der GUEZ-DB sind ca 23 Gebäude per Hand eingefügt. (Sakralbau, Bahnhof, Wasserwerk etc.)
@@ -583,12 +583,12 @@ CentralEffectSimulation::DetonationLocationReply HandlerBuildingModel::handleDet
{
DEBUG_LOG(m_logger) << "RESULT: integrate free area...";
// free area and FuseType_def::IfbDelay:
// free area and FuseType::IfbDelay:
// We can´t move the detonation point _below_ the surface.
// That would be identical to a neagative 'startHat'
// In other words: lineOfSightElevation would deliver LineOfSight::LOS_ERROR
// so:
if (detonationDistance > 0) // detonationDistance > 0 === FuseType_def::IfbDelay
if (detonationDistance > 0) // detonationDistance > 0 === FuseType::IfbDelay
detonationDistance = 0;
}
} // if (bHasBuildingIntersection)
@@ -114,7 +114,7 @@ void HandlerBuildingOwnership::onParticipantPositionChanged(const CentralEffectS
return;
int floorId = m_handlerBuildingData->getFloorIdFromRoomId(partPos.roomId());
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState_def::CatastrophicKill)
if (partPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
m_participantFloor.remove(participantId);
else
m_participantFloor.insert(participantId, floorId);
@@ -214,7 +214,7 @@ int HandlerBuildingOwnership::calculateOwnershipByFloorId(const int floorId)
if (floorId == iteratorFloor)
{
const CentralEffectSimulation::HandlerParticipant::CesParticipantData &localPartPos = m_handlerParticipant->position(iteratorParticipant);
if (localPartPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::CatastrophicKill)
if (localPartPos.vulnerabilityState == ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill)
continue; // Don't count participants with catastrophic Kill
const int partyId = localPartPos.partyId();
++partyCount[partyId];
@@ -106,12 +106,12 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
<< " data.aesTypeId()" << data.aesTypeId();
switch (data.effectStateId().underlying())
{
case AreaEffectSimulation::AesEffectState_def::EsActivated:
case AreaEffectSimulation::AesEffectState::EsActivated:
{
double chargeHeight; // Alle Stockwerke beruecksichtigen
double chargeDepression; // Alle Kellerraeume beruecksichtigen
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination)
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination)
{
chargeHeight = 500.0; // Alle Stockwerke beruecksichtigen
chargeDepression = -1000.0; // Alle Kellerraeume beruecksichtigen
@@ -126,8 +126,8 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
<< " chargeDepression=" << chargeDepression;
}
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBCContamination
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtBCContamination
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
{
DEBUG_LOG(m_logger) << "return1: AesItemView: " << data.effectStateId();
return;
@@ -135,8 +135,8 @@ void HandlerContamination::onAesItemViewChanged(const AreaEffectSimulation::AesI
// Gebaeude die von einem sesshaften Kampfstoff betroffen sind, müssen als kontaminiert gelten.
const ProjectDataManagement::VolatilityType volatilityType = m_ddsHandler->volatilityTypeId(data.chargeStruct());
if (volatilityType != ProjectDataManagement::VolatilityType_def::Resident
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
if (volatilityType != ProjectDataManagement::VolatilityType::Resident
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
{
DEBUG_LOG(m_logger) << "return2: AesItemView: " << data.effectStateId();
return;
@@ -177,16 +177,16 @@ void HandlerContamination::calculateBuilding(int buildingId,
QVector<int> effectedRooms;
QVector<int> effectedFloors;
if (data.aesTypeId() != AreaEffectSimulation::AesType_def::AtBCContamination
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
if (data.aesTypeId() != AreaEffectSimulation::AesType::AtBCContamination
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
{
DEBUG_LOG(m_logger) << "return: NO BC-Contamination AesItemView: " << data.effectStateId();
return;
}
const ProjectDataManagement::VolatilityType volatilityType = m_ddsHandler->volatilityTypeId(data.chargeStruct());
if ( volatilityType != ProjectDataManagement::VolatilityType_def::Resident
&& data.aesTypeId() != AreaEffectSimulation::AesType_def::AtNContamination)
if ( volatilityType != ProjectDataManagement::VolatilityType::Resident
&& data.aesTypeId() != AreaEffectSimulation::AesType::AtNContamination)
return;
DEBUG_LOG(m_logger) << "buildingId=" << buildingId;
@@ -197,22 +197,22 @@ void HandlerContamination::calculateBuilding(int buildingId,
if (!effectedRooms.empty())
{
DEBUG_LOG(m_logger) << "effectedRooms.size=" << effectedRooms.size();
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::CombatReady;
ProjectDataManagement::VulnerabilityState vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CombatReady;
// [GUEZE-2752] N-Contamination: Only Contamionation inside Range1
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination
&& !isInsideRange1(buildingId, data.aesItemId()))
{
DEBUG_LOG(m_logger) << "!isInsideRange1 buildingId=" << buildingId;
return;
}
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtBCContamination
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtBCContamination
&& !isInsideBCContamination(buildingId, data.aesItemId()))
{
DEBUG_LOG(m_logger) << "AtBCContamination !isInsideRange buildingId=" << buildingId << "return";
return;
}
if (data.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination
if (data.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination
&& isInsideInnerCircle(buildingId, data.aesItemId()))
{
constexpr int TIME_2_SECONDS = 2000;
@@ -220,7 +220,7 @@ void HandlerContamination::calculateBuilding(int buildingId,
if ( m_ddsHandler->dtcCore()->partitionTime().timeStamp() < (data.effectStart() + TIME_2_SECONDS))
{
DEBUG_LOG(m_logger) << "VulnerabilityState=CatastrophicKill";
vulnerabilityState = ProjectDataManagement::VulnerabilityState::CatastrophicKill;
vulnerabilityState = ProjectDataManagement::VulnerabilityState::VulnerabilityState_CatastrophicKill;
}
}
DEBUG_LOG(m_logger) << "setBuildingContaminationStateRequest buildingId=" << buildingId
@@ -266,7 +266,7 @@ void HandlerContamination::onBuildingStateChanged(const Buildings::BuildingState
double chargeHeight = 0.0;
double chargeDepression = 0.0;
if (aesItemView.aesTypeId() == AreaEffectSimulation::AesType_def::AtNContamination)
if (aesItemView.aesTypeId() == AreaEffectSimulation::AesType::AtNContamination)
{
chargeHeight = 500.0; // Alle Stockwerke beruecksichtigen
chargeDepression = -1000.0; // Alle Kellerraeume beruecksichtigen