Adds immediate migration results in progress

This commit is contained in:
torsten committed 2026-08-19 11:18:24 +02:00
1 parent 8453e104c5
commit 3bb6e89496
2102 files changed
+17482 -15071

No files matched your search

@@ -9,10 +9,9 @@
namespace TrainingAreaBase
{
PdmHandler::PdmHandler(MainHandler *mainHandler)
: m_initialized(false)
, m_mainHandler(mainHandler)
{}
PdmHandler::PdmHandler(MainHandler *mainHandler) : m_initialized(false)
, m_mainHandler(mainHandler),
m_logger(NGL::NGLLoggerBootstrap::getLogger()) {}
bool PdmHandler::init()
{
@@ -56,7 +55,7 @@ bool PdmHandler::initializePdm()
!m_dtcPdm->waitForHistoricalDataBuildingChargeEffect(20000) ||
!m_dtcPdm->waitForHistoricalDataVulnerabilityKind(20000))
{
ERROR_LOG() << "Can not read charge/gear types from PDM";
ERROR_LOG(m_logger) << "Can not read charge/gear types from PDM";
return false;
}
m_chargeTypes = m_dtcPdm->chargeTypes();
@@ -71,7 +70,7 @@ bool PdmHandler::initializePdm()
const int realTypeId = (k.taVulnerabilityKind() & 0x00FF0000) >> 16;
const int fallbackTypeId = (k.taVulnerabilityKind() & 0xFF000000) >> 24;
m_vulnerabilityKinds[realTasKindId] = k;
TRACE_LOG() << "realTasKindId: " << realTasKindId << ", realTypeId: " << realTypeId << ", fallbackTypeId: " << fallbackTypeId;
TRACE_LOG(m_logger) << "realTasKindId: " << realTasKindId << ", realTypeId: " << realTypeId << ", fallbackTypeId: " << fallbackTypeId;
if (fallbackTypeId)
m_vulnerabilityKindFallback[realTypeId] = fallbackTypeId;
};
@@ -93,7 +92,7 @@ ProjectDataManagement::ChargeType PdmHandler::chargeTypeFromId(int chargeTypeId)
auto it = m_chargeTypes.constFind(ctId);
if (it == m_chargeTypes.cend())
{
WARNING_LOG() << "Could not find charge type with id " << chargeTypeId;
WARNING_LOG(m_logger) << "Could not find charge type with id " << chargeTypeId;
return ProjectDataManagement::ChargeType();
}
return it.value();
@@ -154,23 +153,23 @@ int PdmHandler::vulnerabilityKindId(int tasVulnerabilityKindId, int equipmentNum
const int index = (tasVulnerabilityKindId & 0x0000FFFF);
int fallBackTypeId = m_vulnerabilityKindFallback.value(typeId);
TRACE_LOG() << "Looking for fallback for typeId " << typeId << ": " << fallBackTypeId;
TRACE_LOG(m_logger) << "Looking for fallback for typeId " << typeId << ": " << fallBackTypeId;
if (!fallBackTypeId)
{
fallBackTypeId = m_vulnerabilityKindFallback.value(0);
TRACE_LOG() << "None found - using default: " << fallBackTypeId;
TRACE_LOG(m_logger) << "None found - using default: " << fallBackTypeId;
}
tasVulnerabilityKindId = (fallBackTypeId << 16) | index;
TRACE_LOG() << "Searching for " << tasVulnerabilityKindId;
TRACE_LOG(m_logger) << "Searching for " << tasVulnerabilityKindId;
it = m_vulnerabilityKinds.constFind(tasVulnerabilityKindId);
if (it == m_vulnerabilityKinds.constEnd())
{
WARNING_LOG() << "Could not find vulnerability type with id " << typeId
WARNING_LOG(m_logger) << "Could not find vulnerability type with id " << typeId
<< " and index " << index
<< " for equipment " << equipmentNumber;
return tasVulnerabilityKindId;
}
DEBUG_LOG() << "vulnerability type with id " << typeId
DEBUG_LOG(m_logger) << "vulnerability type with id " << typeId
<< " and index " << index << " is using fallback typeId " << fallBackTypeId;
}
return it.value().taVulnerabilityKind();
@@ -229,7 +228,7 @@ int PdmHandler::chargeTypeIdFromGearAndChargeTasCode(int gearTasCode, int charge
if (m_chargeTypes.contains(chargeTasCode))
return chargeTasCode;
WARNING_LOG() << "Got unmapped training area charge type id "
WARNING_LOG(m_logger) << "Got unmapped training area charge type id "
<< chargeTasCode << " for gear type "
<< gearTasCode;
return (s_unknownMarker | chargeTasCode);
@@ -251,7 +250,7 @@ int PdmHandler::gearTypeIdFromTasGearTasCode(int gearTasCode)
return gearType.id();
}
WARNING_LOG() << "Got unmapped training area gear type id "
WARNING_LOG(m_logger) << "Got unmapped training area gear type id "
<< gearTasCode;
return (s_unknownMarker | gearTasCode);
}