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

@@ -134,7 +134,7 @@ void ParticipantMoveDialog::onSimulatedMovementChanged(const CentralEffectSimula
{
if (modType == DataModification::eRemoved || m_participantData.id() != data.participantId())
return;
INFO_LOG() << "onSimulatedMovementChanged";
INFO_LOG(m_logger) << "onSimulatedMovementChanged";
clearContent();
@@ -189,7 +189,7 @@ void ParticipantMoveDialog::onSimulatedMovementModifyReply(const Core::FunctionR
void ParticipantMoveDialog::retranslate()
{
translate(m_ui, QString::fromStdString(m_participantData.tacticalIdentifier()), false, tr("Waypoints"));
DEBUG_LOG() << "retranslate";
DEBUG_LOG(m_logger) << "retranslate";
}
void ParticipantMoveDialog::initTableHeader()
@@ -261,7 +261,7 @@ void ParticipantMoveDialog::onFocus()
void ParticipantMoveDialog::onGetPolyline()
{
DEBUG_LOG() << Q_FUNC_INFO;
DEBUG_LOG(m_logger) << Q_FUNC_INFO;
if (!m_sitMapGuiIfc)
return;
@@ -298,7 +298,7 @@ void ParticipantMoveDialog::onGetPolyline()
void ParticipantMoveDialog::onPolylineData(const QPolygonF &polyline)
{
DEBUG_LOG() << Q_FUNC_INFO << " numberOfPoints: " << polyline.size();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " numberOfPoints: " << polyline.size();
if (polyline.size() < 2)
return;
@@ -381,7 +381,7 @@ bool ParticipantMoveDialog::apply()
{
const SimulatedMovement req = requestContent();
INFO_LOG() << "--- onApplyMessage() ";
INFO_LOG(m_logger) << "--- onApplyMessage() ";
m_requestHelper->addRequest([this, req]()
{
@@ -395,7 +395,7 @@ bool ParticipantMoveDialog::apply()
Core::RemoveElementRequest req(m_id);
m_id = 0;
INFO_LOG() << "--- onApplyMessage() ";
INFO_LOG(m_logger) << "--- onApplyMessage() ";
m_requestHelper->addRequest([req, this]()
{
@@ -484,14 +484,14 @@ void ParticipantMoveDialog::onExportButtonClicked()
int fileId = m_flmGui->saveFileContent(this, FileManagement::FileType::Xml, m_session->exerciseId(), byteArray);
if (fileId > 0)
DEBUG_LOG() << "Saved file with id = " << fileId;
DEBUG_LOG(m_logger) << "Saved file with id = " << fileId;
else
ERROR_LOG() << "Could not save file in library ";
ERROR_LOG(m_logger) << "Could not save file in library ";
}
void ParticipantMoveDialog::onImportButtonClicked()
{
DEBUG_LOG() << " onImportButtonClicked() ";
DEBUG_LOG(m_logger) << " onImportButtonClicked() ";
QByteArray content;
int fileId = m_flmGui->loadFileContent(this, content, {FileManagement::FileType::Xml}, m_session->exerciseId(), FileManagement::toString(FileManagement::XmlType::CESParticipantMove));
@@ -511,7 +511,7 @@ void ParticipantMoveDialog::onImportButtonClicked()
{
SimulatedMovement req = jsonToSimulatedMovement(content);
INFO_LOG() << "--- onImportButtonClicked() ";
INFO_LOG(m_logger) << "--- onImportButtonClicked() ";
m_requestHelper->addRequest([this, req]()
{
@@ -112,14 +112,14 @@ bool ParticipantsMoveDialog::init(LtsSession::LtsSession *session,
std::shared_ptr<ExerciseManagement::Interface::Dtc> exmDtc;
if (!m_session->getDtc<ExerciseManagement::DataInterface>(exmDtc))
{
ERROR_LOG() << "failed to get exmDtc ";
ERROR_LOG(m_logger) << "failed to get exmDtc ";
return false;
}
std::shared_ptr<AssetManagement::Interface::Dtc> asmDtc;
if (!m_session->getDtc<AssetManagement::DataInterface>(asmDtc))
{
ERROR_LOG() << "failed to get asmDtc ";
ERROR_LOG(m_logger) << "failed to get asmDtc ";
return false;
}
@@ -130,13 +130,13 @@ bool ParticipantsMoveDialog::init(LtsSession::LtsSession *session,
AssetManagement::TrainingArea ta = asmDtc->trainingArea(exc.trainingAreaId());
if (ta.id() != exc.trainingAreaId())
{
ERROR_LOG()<<" couldn't get Training Area with id: "<<exc.trainingAreaId();
ERROR_LOG(m_logger)<<" couldn't get Training Area with id: "<<exc.trainingAreaId();
return false;
}
if (!m_session ->getDtc<AreaEffectSimulation::DataInterface>(m_aesDtc))
{
ERROR_LOG()<<"failed to get aesDtc";
ERROR_LOG(m_logger)<<"failed to get aesDtc";
return false;
}
@@ -211,7 +211,7 @@ void ParticipantsMoveDialog::onSelectionChanged()
return;
const ParticipantManagement::ParticipantData data(participantFromIndex(indexList.first()));
DEBUG_LOG() << "ParticipantId: " << data.id();
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id();
m_buttonBox->setButtonEnabled(LtsWidgets::DialogButton::Remove, data.isSimulated());
if (data.isSimulated() && m_participantDialogMap.contains(data.id()))
@@ -257,7 +257,7 @@ void ParticipantsMoveDialog::onSelectionChanged()
void ParticipantsMoveDialog::onModelChanged()
{
m_ui->dvParticipants->expandAll();
DEBUG_LOG() << "onModelChanged";
DEBUG_LOG(m_logger) << "onModelChanged";
}
void ParticipantsMoveDialog::onDoubleClicked()
@@ -282,7 +282,7 @@ void ParticipantsMoveDialog::onDoubleClicked()
return;
const ParticipantManagement::ParticipantData data(participantFromIndex(indexList.first()));
DEBUG_LOG() << "ParticipantId: " << data.id();
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id();
if (!m_participantDialogMap.contains(data.id()))
{
@@ -335,7 +335,7 @@ void ParticipantsMoveDialog::onRemove()
return;
const ParticipantManagement::ParticipantData data(participantFromIndex(indexList.first()));
INFO_LOG() << "onRemove ParticipantId: " << data.id();
INFO_LOG(m_logger) << "onRemove ParticipantId: " << data.id();
delete m_participantDialogMap.value(data.id());
@@ -430,7 +430,7 @@ void ParticipantsMoveDialog::onGetCoordinate(QPointF coordinate)
const ParticipantManagement::ParticipantData participantData(participantFromIndex(indexList.first()));
INFO_LOG() << Q_FUNC_INFO << "ParticipantId=" << participantData.id()
INFO_LOG(m_logger) << Q_FUNC_INFO << "ParticipantId=" << participantData.id()
<< " EquipmentNr=" << participantData.equipmentNumber()
<< " onGetCoordinate x=" << coordinate.x() << " y=" << coordinate.y();
if (participantData.id() <= 0)
@@ -500,7 +500,7 @@ bool ParticipantsMoveDialog::isParticipantInUseForExplosionCluster(int id)
{
if (!m_aesDtc)
{
ERROR_LOG()<<" m_aesDTC is not setted";
ERROR_LOG(m_logger)<<" m_aesDTC is not setted";
return true;
}
@@ -658,7 +658,7 @@ void ParticipantsMoveDialog::setFormationAndPositioningUi(const ParticipantManag
m_formationProps.angle = std::fmod((mil2Deg(angleMil) + 90), 360);
DEBUG_LOG()<<" angle in deg mil: "<<angleMil
DEBUG_LOG(m_logger)<<" angle in deg mil: "<<angleMil
<<" -> degree: "<< mil2Deg(angleMil)<<" final position(°): "<<m_formationProps.angle;
}
@@ -673,7 +673,7 @@ void ParticipantsMoveDialog::setFormationAndPositioningUi(const ParticipantManag
const QPointF mgrsCoordinate = posEdit->coordinate();
if (mgrsCoordinate.isNull())
{
WARNING_LOG()<<"MGRS Coordinates invalid!";
WARNING_LOG(m_logger)<<"MGRS Coordinates invalid!";
LtsWidgets::LtsMessageDialog::showMessage(this, tr("Coordinates invalid!\nPlease check them and try again."));
return;
}
@@ -732,7 +732,7 @@ bool ParticipantsMoveDialog::getUnitPosition(int32_t participantId, Core::GeoPos
ParticipantManagement::UnitPosition up = m_ppmDtc->unitPosition(participantId);
if (up.participantId() != participantId)
{
ERROR_LOG() << Q_FUNC_INFO << ", unitPosition failed for participantId=" << participantId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", unitPosition failed for participantId=" << participantId;
return false;
}
@@ -767,7 +767,7 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRequest(const ParticipantMana
{
const ParticipantManagement::TypeClass tc = m_ppmDtc->type(participantData.typeId()).typeClass();
DEBUG_LOG() << "ParticipantId=" << participantData.id()
DEBUG_LOG(m_logger) << "ParticipantId=" << participantData.id()
<< " EquipmentNr=" << participantData.equipmentNumber()
<< " onGetCoordinate x=" << coordinate.x() << " y=" << coordinate.y()
<< ", tc=" << tc;
@@ -816,11 +816,11 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRelativeRequest(const Partici
Core::GeoPosition unitPositionOut;
if (!getUnitPosition(participantId, unitPositionOut))
{
ERROR_LOG() << Q_FUNC_INFO << ", getUnitPosition failed for participantId=" << participantId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", getUnitPosition failed for participantId=" << participantId;
return;
}
INFO_LOG() << Q_FUNC_INFO << ", getUnitPosition for participantId=" << participantId
INFO_LOG(m_logger) << Q_FUNC_INFO << ", getUnitPosition for participantId=" << participantId
<< ", unitPositionOut: lon=" << unitPositionOut.lon() << " - lat=" << unitPositionOut.lat();
LtsCoordTrans::UtmCoordinate curUnitPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(unitPositionOut.lon(), unitPositionOut.lat());
@@ -829,7 +829,7 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRelativeRequest(const Partici
if (offset.isNull())
{
ERROR_LOG() << Q_FUNC_INFO << ", required offset is zero. not expected... return";
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", required offset is zero. not expected... return";
return;
}
@@ -838,7 +838,7 @@ void ParticipantsMoveDialog::doSetSimulatedPositionRelativeRequest(const Partici
req.positionOffsetX(offset.x());
req.positionOffsetY(offset.y());
DEBUG_LOG() << "SetSimulatedPositionRelative = " << req;
DEBUG_LOG(m_logger) << "SetSimulatedPositionRelative = " << req;
m_requestHelper->startSingleRequest([req, this]()
{
@@ -856,11 +856,11 @@ void ParticipantsMoveDialog::doSetSimulatedParticipantFormationRequest(const Par
Core::GeoPosition unitPositionOut;
if (!getUnitPosition(participantId, unitPositionOut))
{
ERROR_LOG() << Q_FUNC_INFO << ", getUnitPosition failed for participantId=" << participantId;
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", getUnitPosition failed for participantId=" << participantId;
return;
}
INFO_LOG() << Q_FUNC_INFO << ", getUnitPosition for participantId=" << participantId
INFO_LOG(m_logger) << Q_FUNC_INFO << ", getUnitPosition for participantId=" << participantId
<< ", unitPositionOut: lon=" << unitPositionOut.lon() << " - lat=" << unitPositionOut.lat();
LtsCoordTrans::UtmCoordinate curUnitPosUtm = LtsCoordTrans::UtmCoordinate::fromGeographic(unitPositionOut.lon(), unitPositionOut.lat());
@@ -869,7 +869,7 @@ void ParticipantsMoveDialog::doSetSimulatedParticipantFormationRequest(const Par
if (offset.isNull())
{
ERROR_LOG() << Q_FUNC_INFO << ", required offset is zero. not expected... return";
ERROR_LOG(m_logger) << Q_FUNC_INFO << ", required offset is zero. not expected... return";
return;
}
@@ -19,7 +19,7 @@ ParticipantMoveModel::ParticipantMoveModel(QObject *parent,
connect(m_dtc.get(), &ParticipantManagement::Interface::Dtc::participantChanged,
this, &ParticipantMoveModel::onParticipantChanged);
DEBUG_LOG() << "ParticipantMoveModel::ParticipantMoveModel";
DEBUG_LOG(m_logger) << "ParticipantMoveModel::ParticipantMoveModel";
}
@@ -42,7 +42,7 @@ void ParticipantMoveModel::onParticipantChanged(const ParticipantManagement::Par
Q_UNUSED(modType)
if (data.partyId() != m_partyId)
return;
INFO_LOG() << "onParticipantChanged isSimulated=" << data.isSimulated();
INFO_LOG(m_logger) << "onParticipantChanged isSimulated=" << data.isSimulated();
onReinitModel(partyId());
emit newData();
}
@@ -56,7 +56,7 @@ bool ParticipantMoveModel::isSelectableBySimulation(const QModelIndex &index, bo
m_dtc->type(data.typeId()).typeClass() == ParticipantManagement::TypeClass_def::Unit)
isSimulatable = false;
DEBUG_LOG() << "ParticipantId: " << data.id()
DEBUG_LOG(m_logger) << "ParticipantId: " << data.id()
<< " isSimulated:" << data.isSimulated()
<< " equipmentNo:" << data.equipmentNumber()
<< " typeId=" << data.typeId()
@@ -28,6 +28,8 @@ signals:
void newData();
private:
NGL::INGLLogger &m_logger;
void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType);
bool isSelectableBySimulation(const QModelIndex &index, bool *bIsSimulated = nullptr) const;
};
@@ -41,12 +41,12 @@ bool MissionPlanDialog::init(LtsSession::LtsSession *session)
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG() << " failed to get ppmDtc";
ERROR_LOG(m_logger) << " failed to get ppmDtc";
return false;
}
if (!m_session->getFtc<ParticipantManagement::DataInterface>(m_ppmFtc))
{
ERROR_LOG() << " failed to get ppmFtc";
ERROR_LOG(m_logger) << " failed to get ppmFtc";
return false;
}
@@ -143,7 +143,7 @@ MissionPlanDialog::WayPointsStatus MissionPlanDialog::wayPointCurrentStatus(cons
return WayPointsStatus::Expired;
WARNING_LOG()<<" -- Status Wegpunktkette Abgebrochen muss definiert werden";
WARNING_LOG(m_logger)<<" -- Status Wegpunktkette Abgebrochen muss definiert werden";
return state;
}
@@ -74,22 +74,22 @@ bool MissionPlanEdit::init(const int missionPlanId, LtsSession::LtsSessionDataDd
if (!m_session->getDtc<ProjectDataManagement::DataInterface>(m_pdmDtc))
{
ERROR_LOG() << " failed to get pdmDtc";
ERROR_LOG(m_logger) << " failed to get pdmDtc";
return false;
}
if (!m_session->getDtc<ParticipantManagement::DataInterface>(m_ppmDtc))
{
ERROR_LOG() << " failed to get ppmDtc";
ERROR_LOG(m_logger) << " failed to get ppmDtc";
return false;
}
if (!m_session->getFtc<ParticipantManagement::DataInterface>(m_ppmFtc))
{
ERROR_LOG() << " failed to get ppmFtc";
ERROR_LOG(m_logger) << " failed to get ppmFtc";
return false;
}
if (!m_session->getForeignGuiInterface<ParticipantManagement::ForeignGuiComboboxInterface>(m_ppmCbxGui))
{
ERROR_LOG() << " failed to get ppmCbxGui";
ERROR_LOG(m_logger) << " failed to get ppmCbxGui";
return false;
}
@@ -130,16 +130,16 @@ bool MissionPlanEdit::init(const int missionPlanId, LtsSession::LtsSessionDataDd
const auto pId = m_ui->participantCBox->currentData().toInt();
m_participant = m_ppmDtc->participant(pId);
const auto dpd = m_ppmDtc->dynamicParticipantData(m_participant.id());
DEBUG_LOG() << "idx changed! pId: " << pId << ", m_participant.id(): " << m_participant.id() << ", dpd.participantId(): " << dpd.participantId();
DEBUG_LOG(m_logger) << "idx changed! pId: " << pId << ", m_participant.id(): " << m_participant.id() << ", dpd.participantId(): " << dpd.participantId();
if (dpd.participantId() < 1)
{
ERROR_LOG() << "no dynamic pdata yet for pId " << pId;
ERROR_LOG(m_logger) << "no dynamic pdata yet for pId " << pId;
setReady(false);
return;
}
DEBUG_LOG() << "calling onDynamicParticipantDataChanged !";
DEBUG_LOG(m_logger) << "calling onDynamicParticipantDataChanged !";
onDynamicParticipantDataChanged(dpd, DataModification::eAdded);
});
connect(m_ppmDtc.get(), &ParticipantManagement::Interface::Dtc::dynamicParticipantDataChanged,
@@ -217,11 +217,11 @@ void MissionPlanEdit::onDynamicParticipantDataChanged(const ParticipantManagemen
{
if (data.participantId() != m_participant.id() && data.participantId() != 0)
{
ERROR_LOG() << "### " << data.participantId() << " != " << m_participant.id() << " (" << (int)modType << ")";
ERROR_LOG(m_logger) << "### " << data.participantId() << " != " << m_participant.id() << " (" << (int)modType << ")";
return;
}
DEBUG_LOG() << "### " << data.participantId() << " == " << m_participant.id() << " (" << (int)modType << ") !!!";
DEBUG_LOG(m_logger) << "### " << data.participantId() << " == " << m_participant.id() << " (" << (int)modType << ") !!!";
@@ -246,7 +246,7 @@ void MissionPlanEdit::onDynamicParticipantDataChanged(const ParticipantManagemen
youngestState.stateTime(0);
for (const auto &si : history)
{
DEBUG_LOG() << "StateInformation "
DEBUG_LOG(m_logger) << "StateInformation "
<< " time=" << si.stateTime()
<< " vulnerabilityBits=" << si.vulnerabilityBits()
<< " vulnerabilityKindId=" << si.vulnerabilityKindId();
@@ -299,7 +299,7 @@ void MissionPlanEdit::onModifyMissionPlanReply(const Core::FunctionReplyObject &
void MissionPlanEdit::onSetMissionActionFulfilledReply(const Core::FunctionReplyObject &replyObject)
{
DEBUG_LOG()<<" -- MissionPlanEdit - onSetMissionActionFulfilledReply: "<<replyObject.error();
DEBUG_LOG(m_logger)<<" -- MissionPlanEdit - onSetMissionActionFulfilledReply: "<<replyObject.error();
}
QStringList MissionPlanEdit::tableColLabelList() const
@@ -586,7 +586,7 @@ void MissionPlanEdit::setUASCharges()
if (!m_pdmDtc->isUasDroppable(chargeType.id(),0,0))
continue;
DEBUG_LOG() << " fillCharges"
DEBUG_LOG(m_logger) << " fillCharges"
<< ", id=" << chargeType.id()
<< ", name= " << chargeType.name();
@@ -754,7 +754,7 @@ void MissionPlanEdit::onGetPolyline()
void MissionPlanEdit::onPolylineData(const QPolygonF &polyline)
{
DEBUG_LOG() << Q_FUNC_INFO << " numberOfPoints: " << polyline.size();
DEBUG_LOG(m_logger) << Q_FUNC_INFO << " numberOfPoints: " << polyline.size();
if (polyline.size() < 2)
return;
@@ -141,7 +141,7 @@ void MissionPlanModel::onMissionPlanChanged(const ParticipantManagement::Mission
{
const int id = data.id();
int row = findRowForId(id);
DEBUG_LOG()<<"MISSION PLAN CHANGED id ( "<<data.id()<<" ) "<< modType;
DEBUG_LOG(m_logger)<<"MISSION PLAN CHANGED id ( "<<data.id()<<" ) "<< modType;
switch (modType)
{
case DataModification::eModified: