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

@@ -230,7 +230,7 @@ void SendToDds::rxData(const TetraIcd::StateChangeDirect &inData)
if (Settings::laserRangeCode() == inData.chargeTypeId)
{
DEBUG_LOG() << "laserRangeCode chargeTypeId=" << inData.chargeTypeId
DEBUG_LOG(m_logger) << "laserRangeCode chargeTypeId=" << inData.chargeTypeId
<< "vulnerabilityState=" << static_cast<int>(inData.vulnerabilityState);
return;
}
@@ -773,7 +773,7 @@ void SendToDds::rxData(const TetraIcd::SanitaryMaterialStockReport &inData)
sanReport.qualification(static_cast<TrainingAreaBase::Qualification::inner_enum>(inData.qualification));
publish(sanReport);
DEBUG_LOG() << "SendToDds::rxData(const TetraIcd::SanitaryMaterialStockReport for " << sanReport.equipmentNumber();
DEBUG_LOG(m_logger) << "SendToDds::rxData(const TetraIcd::SanitaryMaterialStockReport for " << sanReport.equipmentNumber();
if (sanReport.qualification() == TrainingAreaBase::Qualification::NotDefined)
{
@@ -812,7 +812,7 @@ void SendToDds::rxData(const TetraIcd::Sanitation &inData)
sanitation.sanitationResult(static_cast<TrainingAreaBase::SanitationResult::inner_enum>(inData.sanitationResult));
sanitation.sanitationEvaluation(static_cast<TrainingAreaBase::SanitationEvaluation::inner_enum>(inData.sanitationEvaluation));
publish(sanitation);
DEBUG_LOG() << "SendToDds::rxData(const TetraIcd::Sanitation for " << sanitation.equipmentNumber();
DEBUG_LOG(m_logger) << "SendToDds::rxData(const TetraIcd::Sanitation for " << sanitation.equipmentNumber();
if (sanitation.qualification() == TrainingAreaBase::Qualification::NotDefined)
{
@@ -1062,7 +1062,7 @@ bool SendToDds::setPosition(T &data,
else if (opsPos.opsId == 0)
{
bool changeReportSource = true;
DEBUG_LOG() << "ops == 0 so check for marked invalid to use last position!";
DEBUG_LOG(m_logger) << "ops == 0 so check for marked invalid to use last position!";
if (PositionHandler::isPositionMarkedInvalid(relPos))
{
@@ -1075,7 +1075,7 @@ bool SendToDds::setPosition(T &data,
DEBUG_LOG() << "ops == 0 got last Position its source is " << tabPos.reportingSource();
DEBUG_LOG(m_logger) << "ops == 0 got last Position its source is " << tabPos.reportingSource();
if (tabPos.reportingSource() != Core::PositionReportingSource::Wls
&& tabPos.reportingSource() != Core::PositionReportingSource::Ops
@@ -1084,14 +1084,14 @@ bool SendToDds::setPosition(T &data,
else if (tabPos.reportingSource() == Core::PositionReportingSource::Ops
|| tabPos.reportingSource() == Core::PositionReportingSource::OpsTunnel)
changeReportSource = false;
DEBUG_LOG() << "ops == 0 changeSource is " << changeReportSource ;
DEBUG_LOG(m_logger) << "ops == 0 changeSource is " << changeReportSource ;
}
else
{
if (!m_posHandler->isInTrainingArea(relPos))
{
DEBUG_LOG() << "bret = false";
DEBUG_LOG(m_logger) << "bret = false";
bRet = false;
}
tabPos.position(m_posHandler->relativeToGeographic(relPos));
@@ -1101,15 +1101,15 @@ bool SendToDds::setPosition(T &data,
TrainingAreaBase::TabPosition lastPosition = m_posHandler->lastPosition(data.equipmentNumber());
{
DEBUG_LOG() << "lastPosition.reportingSource=" << lastPosition.reportingSource();
DEBUG_LOG(m_logger) << "lastPosition.reportingSource=" << lastPosition.reportingSource();
}
if (lastPosition.reportingSource() == Core::PositionReportingSource::Ops &&
lastPosition.moutObjectId().is_set())
{
DEBUG_LOG() << "Check leave Building equipmentNumber=" << data.equipmentNumber();
DEBUG_LOG() << "relPos=" << relPos.offsetX << "/" << relPos.offsetY;
DEBUG_LOG() << "posInExtendedBuildingFootprint";
DEBUG_LOG(m_logger) << "Check leave Building equipmentNumber=" << data.equipmentNumber();
DEBUG_LOG(m_logger) << "relPos=" << relPos.offsetX << "/" << relPos.offsetY;
DEBUG_LOG(m_logger) << "posInExtendedBuildingFootprint";
const Core::GeoPosition &position = tabPos.position();
int moutObjectId = lastPosition.moutObjectId().get();
const int lastMountPointTypeId = m_posHandler->lastMountPointTypeId(data.equipmentNumber());
@@ -1120,7 +1120,7 @@ bool SendToDds::setPosition(T &data,
}
else
{
DEBUG_LOG() << "lastMountPointTypeId =" << m_posHandler->lastMountPointTypeId(data.equipmentNumber());
DEBUG_LOG(m_logger) << "lastMountPointTypeId =" << m_posHandler->lastMountPointTypeId(data.equipmentNumber());
if ( m_posHandler->lastMountPointTypeId(data.equipmentNumber()) == InfrastructureManagement::MountingPointType_def::IndoorIPS)
{
@@ -1129,19 +1129,19 @@ bool SendToDds::setPosition(T &data,
bool checkSpeed = !m_posHandler->isTimeToPerformSpeedCheckExceeded(data.equipmentNumber(),
timeStamp,
Settings::maxSpeedCheckTimeout());
DEBUG_LOG() << "Check Speed speed=" << speed
DEBUG_LOG(m_logger) << "Check Speed speed=" << speed
<< " MaxSoldierSpeed=" << Settings::maxSoldierSpeed()
<< " checkSpeed=" << checkSpeed;
if (checkSpeed && speed > Settings::maxSoldierSpeed())
{
DEBUG_LOG() << "Check Speed bRet = false";
DEBUG_LOG(m_logger) << "Check Speed bRet = false";
bRet = false;
moutCheck = false;
}
}
else
{
DEBUG_LOG() << "Kein Speed check!";
DEBUG_LOG(m_logger) << "Kein Speed check!";
}
}
}
@@ -1152,7 +1152,7 @@ bool SendToDds::setPosition(T &data,
}
else
{
INFO_LOG() << "Valid OpsData: " << opsPos.opsId;
INFO_LOG(m_logger) << "Valid OpsData: " << opsPos.opsId;
IsmHandler::OpsData opsData;
if (ism())
@@ -1160,7 +1160,7 @@ bool SendToDds::setPosition(T &data,
opsData = ism()->dataFromOpsCode(opsPos.opsId);
DEBUG_LOG() << "equipmentNumber=" << data.equipmentNumber()
DEBUG_LOG(m_logger) << "equipmentNumber=" << data.equipmentNumber()
<< " AssetId=" << opsData.assetId
<< " opsData.structureElementId=" << opsData.structureElementId
<< " opsData.mseId=" << opsData.mainStructureElementId
@@ -1171,17 +1171,17 @@ bool SendToDds::setPosition(T &data,
if (opsData.opsCode != opsPos.opsId)
{
WARNING_LOG() << "found no position data for ops id " << opsPos.opsId;
WARNING_LOG(m_logger) << "found no position data for ops id " << opsPos.opsId;
bRet = false;
}
else if (opsData.structureElementId == 0)
{
WARNING_LOG() << "ops id " << opsPos.opsId << " is not mounted";
WARNING_LOG(m_logger) << "ops id " << opsPos.opsId << " is not mounted";
bRet = false;
}
else
{
DEBUG_LOG() << "ops id " << opsPos.opsId;
DEBUG_LOG(m_logger) << "ops id " << opsPos.opsId;
tabPos.moutObjectId(opsData.mainStructureElementId);
tabPos.moutRoomId(opsData.roomId);
tabPos.position(opsData.position);
@@ -1198,13 +1198,13 @@ bool SendToDds::setPosition(T &data,
{
if ( moutCheck )
{
DEBUG_LOG() << "POS = ungueltig";
DEBUG_LOG(m_logger) << "POS = ungueltig";
tabPos.position().lon(nan(""));
tabPos.position().lat(nan(""));
}
else
{
DEBUG_LOG() << "POS = ungueltig => alte Pos mit aktueller Zeit verschicken";
DEBUG_LOG(m_logger) << "POS = ungueltig => alte Pos mit aktueller Zeit verschicken";
TrainingAreaBase::TabPosition lastPosition = m_posHandler->lastPosition(data.equipmentNumber());
tabPos.position().lon(lastPosition.position().lon());
tabPos.position().lat(lastPosition.position().lat());
@@ -1218,12 +1218,12 @@ bool SendToDds::setPosition(T &data,
else
{
DEBUG_LOG() << "set last Position";
DEBUG_LOG(m_logger) << "set last Position";
if (tabPos.reportingSource() == Core::PositionReportingSource::Ops)
DEBUG_LOG() << "ReportingSource=OPS";
DEBUG_LOG(m_logger) << "ReportingSource=OPS";
else if (tabPos.reportingSource() == Core::PositionReportingSource::Gps)
DEBUG_LOG() << "ReportingSource=GPS";
DEBUG_LOG() << "tabPos.reportingSource=" << tabPos.reportingSource()
DEBUG_LOG(m_logger) << "ReportingSource=GPS";
DEBUG_LOG(m_logger) << "tabPos.reportingSource=" << tabPos.reportingSource()
<< " timeStamp=" << timeStamp;
m_posHandler->setLastPosition(data.equipmentNumber(), tabPos);
m_posHandler->setLastTime(data.equipmentNumber(), timeStamp);
@@ -1248,7 +1248,7 @@ bool SendToDds::setPosition2d(T &data,
if (!m_posHandler->isInTrainingArea(relPos))
bRet = false;
DEBUG_LOG() << "tabPos.reportingSource=" << tabPos.reportingSource();
DEBUG_LOG(m_logger) << "tabPos.reportingSource=" << tabPos.reportingSource();
tabPos.position(m_posHandler->relativeToGeographic(relPos));
m_posHandler->setLastPosition(data.equipmentNumber(), tabPos);
}
@@ -1319,7 +1319,7 @@ void SendToDds::publish(const T &data)
}
catch (const std::exception &ex)
{
WARNING_LOG() << "Could not send telegram: " << ex.what();
WARNING_LOG(m_logger) << "Could not send telegram: " << ex.what();
}
}
@@ -1341,13 +1341,13 @@ void SendToDds::onEmergencyCallTimerTimeout(int issi)
TrainingAreaBase::EmergencyCall emergCallData;
emergCallData.equipmentNumber(issi);
if (!m_mainHandler->ddsHandler()->emergencyCall()->remove(emergCallData))
ERROR_LOG() << Q_FUNC_INFO << " removing of TrainingAreaBase::EmergencyCall failed, issi = " << issi;
ERROR_LOG(m_logger) << Q_FUNC_INFO << " removing of TrainingAreaBase::EmergencyCall failed, issi = " << issi;
}
}
void SendToDds::onPvSanUniqueIdMapping(int uniqueId, int equipNo, qint64 sampleTime)
{
DEBUG_LOG() << Q_FUNC_INFO << "start pvSan mapping " << equipNo << " uniqueId " << uniqueId;
DEBUG_LOG(m_logger) << Q_FUNC_INFO << "start pvSan mapping " << equipNo << " uniqueId " << uniqueId;
if (m_uniqueId2EquipmentNumber.value(uniqueId) == equipNo)