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
@@ -6,6 +6,7 @@
|
||||
#include "main_handler.h"
|
||||
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
@@ -66,9 +67,9 @@ bool PdmHandler::initializePdm()
|
||||
|
||||
auto cbTasVulKind = [this](const ProjectDataManagement::VulnerabilityKind &k)
|
||||
{
|
||||
const int realTasKindId = k.taVulnerabilityKind() & 0x00FFFFFF;
|
||||
const int realTypeId = (k.taVulnerabilityKind() & 0x00FF0000) >> 16;
|
||||
const int fallbackTypeId = (k.taVulnerabilityKind() & 0xFF000000) >> 24;
|
||||
const int realTasKindId = k.taVulnerabilityKind & 0x00FFFFFF;
|
||||
const int realTypeId = (k.taVulnerabilityKind & 0x00FF0000) >> 16;
|
||||
const int fallbackTypeId = (k.taVulnerabilityKind & 0xFF000000) >> 24;
|
||||
m_vulnerabilityKinds[realTasKindId] = k;
|
||||
TRACE_LOG(m_logger) << "realTasKindId: " << realTasKindId << ", realTypeId: " << realTypeId << ", fallbackTypeId: " << fallbackTypeId;
|
||||
if (fallbackTypeId)
|
||||
@@ -107,10 +108,10 @@ ProjectDataManagement::GearClass PdmHandler::gearClassFromChargeTypeId(int charg
|
||||
|
||||
for (const auto &gearType2ChargeType : std::as_const(m_gearTypeChargeTypes))
|
||||
{
|
||||
if (gearType2ChargeType.chargeTypeId() == chargeTypeId)
|
||||
if (gearType2ChargeType.chargeTypeId == chargeTypeId)
|
||||
{
|
||||
const auto gearType = m_gearTypes.value(gearType2ChargeType.gearTypeId());
|
||||
return gearType.gearClassId();
|
||||
const auto gearType = m_gearTypes.value(gearType2ChargeType.gearTypeId);
|
||||
return gearType.gearClassId;
|
||||
}
|
||||
}
|
||||
return ProjectDataManagement::GearClass::GearClass_Unknown;
|
||||
@@ -134,7 +135,7 @@ ProjectDataManagement::BuildingChargeEffect PdmHandler::buildingChargeEffect(int
|
||||
|
||||
for (const auto &bce : std::as_const(m_buildingChargeEffects))
|
||||
{
|
||||
if (bce.chargeTypeId() == chargeTypeId)
|
||||
if (bce.chargeTypeId == chargeTypeId)
|
||||
return bce;
|
||||
}
|
||||
return {};
|
||||
@@ -172,7 +173,7 @@ int PdmHandler::vulnerabilityKindId(int tasVulnerabilityKindId, int equipmentNum
|
||||
DEBUG_LOG(m_logger) << "vulnerability type with id " << typeId
|
||||
<< " and index " << index << " is using fallback typeId " << fallBackTypeId;
|
||||
}
|
||||
return it.value().taVulnerabilityKind();
|
||||
return it.value().taVulnerabilityKind;
|
||||
}
|
||||
|
||||
|
||||
@@ -216,11 +217,11 @@ int PdmHandler::chargeTypeIdFromGearAndChargeTasCode(int gearTasCode, int charge
|
||||
{
|
||||
for (const auto &gearType2ChargeType : std::as_const(m_gearTypeChargeTypes))
|
||||
{
|
||||
if (gearType2ChargeType.gearTypeId() == gearTasCode)
|
||||
if (gearType2ChargeType.gearTypeId == gearTasCode)
|
||||
{
|
||||
const auto chargeType = m_chargeTypes.value(gearType2ChargeType.chargeTypeId());
|
||||
if (chargeType.id() == chargeTasCode)
|
||||
return chargeType.id();
|
||||
const auto chargeType = m_chargeTypes.value(gearType2ChargeType.chargeTypeId);
|
||||
if (chargeType.id == chargeTasCode)
|
||||
return chargeType.id;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -246,8 +247,8 @@ int PdmHandler::gearTypeIdFromTasGearTasCode(int gearTasCode)
|
||||
|
||||
for (const auto &gearType : std::as_const(m_gearTypes))
|
||||
{
|
||||
if (gearType.tasCode() == gearTasCode)
|
||||
return gearType.id();
|
||||
if (gearType.tasCode == gearTasCode)
|
||||
return gearType.id;
|
||||
}
|
||||
|
||||
WARNING_LOG(m_logger) << "Got unmapped training area gear type id "
|
||||
@@ -257,32 +258,32 @@ int PdmHandler::gearTypeIdFromTasGearTasCode(int gearTasCode)
|
||||
|
||||
int PdmHandler::legacyChargeTypeIgniterType(int chargeTypeId, int igniterTypeId, int igniterFunctionId)
|
||||
{
|
||||
return m_dtcPdm->getChargeTypeIgniterTypeIgniterFunction(chargeTypeId, igniterTypeId, igniterFunctionId).chargeLegacyId();
|
||||
return m_dtcPdm->getChargeTypeIgniterTypeIgniterFunction(chargeTypeId, igniterTypeId, igniterFunctionId).chargeLegacyId;
|
||||
}
|
||||
|
||||
double PdmHandler::impactRadius(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->impactRadius(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->impactRadius(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
double PdmHandler::impactEdgeLength(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->impactEdgeLength(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->impactEdgeLength(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
bool PdmHandler::isSmartChargeType(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->isSmart(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->isSmart(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
bool PdmHandler::isIedChargeType(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->isIed(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->isIed(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
bool PdmHandler::isReactivatableChargeType(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->isReactivatable(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->isReactivatable(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
bool PdmHandler::isIndirect(int chargeTypeId) const
|
||||
@@ -291,16 +292,16 @@ bool PdmHandler::isIndirect(int chargeTypeId) const
|
||||
}
|
||||
int PdmHandler::hazardDistance(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->hazardDistance(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->hazardDistance(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
bool PdmHandler::isLaserGuidable(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->isLaserGuidable(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->isLaserGuidable(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
|
||||
bool PdmHandler::isUasDroppable(const AreaEffectSimulation::ChargeStruct &chargeStruct) const
|
||||
{
|
||||
return m_dtcPdm->isUasDroppable(chargeStruct.chargeTypeId(), chargeStruct.igniterTypeId(), chargeStruct.igniterFunctionId());
|
||||
return m_dtcPdm->isUasDroppable(chargeStruct.chargeTypeId, chargeStruct.igniterTypeId, chargeStruct.igniterFunctionId);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user