Qt6 Migration: DDS-Stubs, Logger-Fixes, Export-Header Korrekturen
- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2785 files changed
+18754
-18316
No files matched your search
+91
-92
@@ -38,7 +38,6 @@ static inline QString gStrSymbolFolderPath()
|
||||
BuildingViewerDdsController::BuildingViewerDdsController(CommunicationInterfaceInternal *connection, VCtrl::ViewerInterface* viewerInterface)
|
||||
: m_connection(connection)
|
||||
, m_viewerInterface(viewerInterface)
|
||||
, m_logger(getLogger("BuildingViewerDdsController"))
|
||||
{}
|
||||
|
||||
|
||||
@@ -53,7 +52,7 @@ BuildingViewerDdsController::~BuildingViewerDdsController()
|
||||
|
||||
bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QString &modelPath, PluginProvider *session)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "BDV:: init";
|
||||
DEBUG_LOG() << "BDV:: init";
|
||||
m_session = session;
|
||||
m_irreplacableWidget = irreplacableWidget;
|
||||
|
||||
@@ -62,7 +61,7 @@ bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QStrin
|
||||
|
||||
if (!m_session)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "No m_session for BuildingViewerController!";
|
||||
ERROR_LOG() << "No m_session for BuildingViewerController!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -72,7 +71,7 @@ bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QStrin
|
||||
{
|
||||
|
||||
m_session = nullptr;
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "BDV:: BuildingViewerDdsController: m_session has been destroyed!";
|
||||
DEBUG_LOG() << getSessionInfo() << "BDV:: BuildingViewerDdsController: m_session has been destroyed!";
|
||||
stopAndClearTimer();
|
||||
uninitialize();
|
||||
}
|
||||
@@ -81,35 +80,35 @@ bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QStrin
|
||||
m_asbIfc = session->asbIfc();
|
||||
if (!m_asbIfc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Fetching 'm_asbIfc' failed!";
|
||||
ERROR_LOG() << "Fetching 'm_asbIfc' failed!";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_bldDtc = session->bldDtc();
|
||||
if (!m_bldDtc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Fetching 'm_bldDtc' failed!";
|
||||
ERROR_LOG() << "Fetching 'm_bldDtc' failed!";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_ismDtc = session->ismDtc();
|
||||
if (!m_ismDtc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Fetching 'm_ismDtc' failed!";
|
||||
ERROR_LOG() << "Fetching 'm_ismDtc' failed!";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_pdmDtc = session->pdmDtc();
|
||||
if (!m_pdmDtc)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Fetching 'm_pdmDtc' failed!";
|
||||
ERROR_LOG() << "Fetching 'm_pdmDtc' failed!";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_ismIfc = session->ismDataIfc();
|
||||
if (!m_ismIfc)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Fetching 'm_ismIfc' failed!";
|
||||
WARNING_LOG() << "Fetching 'm_ismIfc' failed!";
|
||||
return false;
|
||||
}
|
||||
connect(m_ismIfc.get(), &InfrastructureManagement::ForeignDataInterface::mountingPointChanged,
|
||||
@@ -133,7 +132,7 @@ bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QStrin
|
||||
|
||||
if (!dir.mkpath(QStringLiteral(".")))
|
||||
{
|
||||
ERROR_LOG(m_logger) << getSessionInfo() << "Could not create path \"" << gStrSymbolFolderPath() << "\" which is required to store BgViewer symbol files!";
|
||||
ERROR_LOG() << getSessionInfo() << "Could not create path \"" << gStrSymbolFolderPath() << "\" which is required to store BgViewer symbol files!";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,7 +140,7 @@ bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QStrin
|
||||
connect(m_connection, &CommunicationInterfaceInternal::signalAssetPicked, this, &BuildingViewerDdsController::onAssetPicked, Qt::UniqueConnection);
|
||||
connect(m_connection, &CommunicationInterfaceInternal::signalBgViewerInitFinished, this, &BuildingViewerDdsController::onBgViewerInitFinished, Qt::UniqueConnection);
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "BuildingViewerDdsController::init: The order of the following output must be [1],[2],[3],[4],[5],[6]";
|
||||
INFO_LOG() << getSessionInfo() << "BuildingViewerDdsController::init: The order of the following output must be [1],[2],[3],[4],[5],[6]";
|
||||
|
||||
|
||||
|
||||
@@ -170,10 +169,10 @@ bool BuildingViewerDdsController::init(QWidget *irreplacableWidget, const QStrin
|
||||
|
||||
void BuildingViewerDdsController::onBgViewerInitFinished()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onBgViewerInitFinished";
|
||||
DEBUG_LOG() << "onBgViewerInitFinished";
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[2] Training area initialization acknowledged by BgViewer";
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[3] Sending mounting points, teams, ..., to BgViewer";
|
||||
INFO_LOG() << getSessionInfo() << "[2] Training area initialization acknowledged by BgViewer";
|
||||
INFO_LOG() << getSessionInfo() << "[3] Sending mounting points, teams, ..., to BgViewer";
|
||||
|
||||
if (!m_pSimTimeSyncTimer)
|
||||
{
|
||||
@@ -193,7 +192,7 @@ void BuildingViewerDdsController::onBgViewerInitFinished()
|
||||
const bool useExactPositioning = ps->value(QStringLiteral("bld"), QStringLiteral("useExactPositioning")).toBool();
|
||||
m_connection->excUseExactPositioning(useExactPositioning);
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[4] Getting building DDS data ('mainStructureElements')";
|
||||
INFO_LOG() << getSessionInfo() << "[4] Getting building DDS data ('mainStructureElements')";
|
||||
connect(m_ismDtc.get(), &InfrastructureManagement::Interface::Dtc::mainStructureElementChanged,
|
||||
this, &BuildingViewerDdsController::onMainStructureElementChanged);
|
||||
|
||||
@@ -201,17 +200,17 @@ void BuildingViewerDdsController::onBgViewerInitFinished()
|
||||
{
|
||||
onMainStructureElementChanged(data, DataModification::eAdded);
|
||||
});
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "\t[4.1] Done";
|
||||
INFO_LOG() << getSessionInfo() << "\t[4.1] Done";
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[5] Creating participants";
|
||||
INFO_LOG() << getSessionInfo() << "[5] Creating participants";
|
||||
|
||||
createParticipants();
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "\t[5.1] Done";
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[5] Creating Booby Trap";
|
||||
INFO_LOG() << getSessionInfo() << "\t[5.1] Done";
|
||||
INFO_LOG() << getSessionInfo() << "[5] Creating Booby Trap";
|
||||
createBoobyTraps();
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "\t[5.2] Done";
|
||||
INFO_LOG() << getSessionInfo() << "\t[5.2] Done";
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[6] Getting building DDS data ('buildingStates')";
|
||||
INFO_LOG() << getSessionInfo() << "[6] Getting building DDS data ('buildingStates')";
|
||||
connect(m_bldDtc.get(), &Buildings::Interface::Dtc::buildingStateChanged,
|
||||
this, &BuildingViewerDdsController::onBuildingStateChanged, Qt::UniqueConnection);
|
||||
m_bldDtc->buildingStates([this](const Buildings::BuildingState & data)
|
||||
@@ -220,7 +219,7 @@ void BuildingViewerDdsController::onBgViewerInitFinished()
|
||||
});
|
||||
connect(m_bldDtc.get(), &Buildings::Interface::Dtc::buildingHitLineInfoChanged,
|
||||
this, &BuildingViewerDdsController::onBuildingHitLineInfoChanged, Qt::UniqueConnection);
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "\t[6.1] Done";
|
||||
INFO_LOG() << getSessionInfo() << "\t[6.1] Done";
|
||||
|
||||
|
||||
m_connection->excSetGlobalTransparency(LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("BgViewer"), QStringLiteral("GlobalTransparency"), 75).toInt() );
|
||||
@@ -260,7 +259,7 @@ void BuildingViewerDdsController::onBgViewerInitFinished()
|
||||
}
|
||||
m_pBuildingHitlineCleanupTimer->start();
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[7] Emitting 'signalDdsInitFinished'";
|
||||
INFO_LOG() << getSessionInfo() << "[7] Emitting 'signalDdsInitFinished'";
|
||||
m_ddsInitFinished = true;
|
||||
emit signalDdsInitFinished();
|
||||
onSynchronizeSimulationTime();
|
||||
@@ -270,7 +269,7 @@ void BuildingViewerDdsController::onBgViewerInitFinished()
|
||||
|
||||
void BuildingViewerDdsController::stopAndClearTimer()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "stopAndClearTimer";
|
||||
DEBUG_LOG() << "stopAndClearTimer";
|
||||
|
||||
if (m_pFireEventFlashTimer)
|
||||
m_pFireEventFlashTimer->stop();
|
||||
@@ -285,15 +284,15 @@ void BuildingViewerDdsController::stopAndClearTimer()
|
||||
|
||||
void BuildingViewerDdsController::uninitialize()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "uninitialize";
|
||||
DEBUG_LOG() << "uninitialize";
|
||||
if (!m_bldDtc)
|
||||
return;
|
||||
|
||||
|
||||
if (m_ddsInitFinished)
|
||||
DEBUG_LOG(m_logger) << "Flag 'm_ddsInitFinished' set which means that initialization had been finished completely";
|
||||
DEBUG_LOG() << "Flag 'm_ddsInitFinished' set which means that initialization had been finished completely";
|
||||
else
|
||||
WARNING_LOG(m_logger) << "Flag 'm_ddsInitFinished' has not been set within timeout value, forcing quit!";
|
||||
WARNING_LOG() << "Flag 'm_ddsInitFinished' has not been set within timeout value, forcing quit!";
|
||||
|
||||
stopAndClearTimer();
|
||||
|
||||
@@ -322,7 +321,7 @@ void BuildingViewerDdsController::uninitialize()
|
||||
m_ddsInitFinished = false;
|
||||
m_buildingHeight.clear();
|
||||
|
||||
DEBUG_LOG(m_logger) << "BuildingViewerDdsController::uninitialize() finished";
|
||||
DEBUG_LOG() << "BuildingViewerDdsController::uninitialize() finished";
|
||||
}
|
||||
|
||||
QPointF BuildingViewerDdsController::toRelativePosition(const Core::GeoPosition &geoPos) const
|
||||
@@ -345,7 +344,7 @@ LtsUtils::QPoint3D BuildingViewerDdsController::toRelative3D(const Core::GeoPosi
|
||||
|
||||
bool BuildingViewerDdsController::clear()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "clear m_connection->playerClear();";
|
||||
DEBUG_LOG() << "clear m_connection->playerClear();";
|
||||
m_connection->playerClear();
|
||||
return true;
|
||||
}
|
||||
@@ -355,7 +354,7 @@ bool BuildingViewerDdsController::syncTeams()
|
||||
{
|
||||
if (!m_ppmDtc)
|
||||
return false;
|
||||
INFO_LOG(m_logger) << "BuildingViewerDdsController::syncTeams";
|
||||
INFO_LOG() << "BuildingViewerDdsController::syncTeams";
|
||||
|
||||
m_connection->setTeamConfiguration(m_ppmDtc->partys());
|
||||
return true;
|
||||
@@ -387,7 +386,7 @@ bool BuildingViewerDdsController::calcBaseCoordinate(const QMap<qint32, Infrastr
|
||||
}
|
||||
if (!bAtLeasOneFound)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "No building available in exercise " << m_exerciseId;
|
||||
WARNING_LOG() << "No building available in exercise " << m_exerciseId;
|
||||
return false;
|
||||
}
|
||||
m_baseCoordinate = LtsCoordTrans::UtmCoordinate::fromGeographic(geoPosition.lon(), geoPosition.lat());
|
||||
@@ -406,7 +405,7 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString &modelPat
|
||||
QFile f(getBuildingConfigurationXml());
|
||||
if (!f.open(QIODevice::WriteOnly))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not open file " << f.fileName() << " for writing: " << f.errorString();
|
||||
WARNING_LOG() << "Can not open file " << f.fileName() << " for writing: " << f.errorString();
|
||||
return false;
|
||||
}
|
||||
m_knownBuildings.clear();
|
||||
@@ -417,7 +416,7 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString &modelPat
|
||||
if (!jsonConfig.exists())
|
||||
jsonConfig.setFileName(modelPath + QStringLiteral("/../buildings.json"));
|
||||
|
||||
DEBUG_LOG(m_logger) << "jsonConfig:" << jsonConfig.fileName();
|
||||
DEBUG_LOG() << "jsonConfig:" << jsonConfig.fileName();
|
||||
if (jsonConfig.exists() && jsonConfig.open(QIODevice::ReadOnly))
|
||||
{
|
||||
m_ismDtc->disconnect(this);
|
||||
@@ -445,17 +444,17 @@ bool BuildingViewerDdsController::writeBuildingDataToXML(const QString &modelPat
|
||||
continue;
|
||||
if (!m_ismDtc->isElementAssignedToExercise(mse, m_exerciseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Not writing mse with id " << mse.id() << " to building xml file since it is not assigned to the current exercise which has id " << m_exerciseId;
|
||||
DEBUG_LOG() << "Not writing mse with id " << mse.id() << " to building xml file since it is not assigned to the current exercise which has id " << m_exerciseId;
|
||||
continue;
|
||||
}
|
||||
mseMap.insert(mse.id(), mse);
|
||||
}
|
||||
}
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "writeBuildingDataToXML(): Identified Main Structure Elements: " << mseMap.size();
|
||||
INFO_LOG() << getSessionInfo() << "writeBuildingDataToXML(): Identified Main Structure Elements: " << mseMap.size();
|
||||
|
||||
if (!calcBaseCoordinate(mseMap))
|
||||
{
|
||||
WARNING_LOG(m_logger) << "failed to calc base coordinate";
|
||||
WARNING_LOG() << "failed to calc base coordinate";
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -531,7 +530,7 @@ QString BuildingViewerDdsController::getBuildingConfigurationXml() const
|
||||
|
||||
void BuildingViewerDdsController::clearAssets()
|
||||
{
|
||||
INFO_LOG(m_logger) << "clearAssets: Removing " << m_knownAssetsInBgViewer.size() << " assets";
|
||||
INFO_LOG() << "clearAssets: Removing " << m_knownAssetsInBgViewer.size() << " assets";
|
||||
|
||||
for (const auto &strUniqueAsset : std::as_const(m_knownAssetsInBgViewer))
|
||||
m_connection->extHideMountingPointAsset(strUniqueAsset);
|
||||
@@ -636,13 +635,13 @@ void BuildingViewerDdsController::handleMountingPoint(const InfrastructureManage
|
||||
QString strfeatureID = BuildingViewer::databaseId2FeatureId(mp.buildingId());
|
||||
QString strMountingPointID = strfeatureID + QStringLiteral("_MountingPoint_") + QString::number(mountingPointId);
|
||||
|
||||
DEBUG_LOG(m_logger) << "Sending asset for building id " << mp.buildingId() << " ("<<strfeatureID<<")"
|
||||
DEBUG_LOG() << "Sending asset for building id " << mp.buildingId() << " ("<<strfeatureID<<")"
|
||||
<< " with asset_id " << mp.associatedAssetId()
|
||||
<< " matched to structure_element_id " << mp.id() << " as \"" << strMountingPointID <<" \""
|
||||
<< " with asset type \"" << strAssetType << "\"";
|
||||
|
||||
if (m_mountingPointId2AssetType.contains(mountingPointId))
|
||||
WARNING_LOG(m_logger) << "Mounting point id " << mountingPointId << " already used for other asset?! Overriding...";
|
||||
WARNING_LOG() << "Mounting point id " << mountingPointId << " already used for other asset?! Overriding...";
|
||||
|
||||
m_mountingPointId2AssetType[mountingPointId] = assetType;
|
||||
m_knownAssetsInBgViewer[mountingPointId] = strMountingPointID;
|
||||
@@ -654,24 +653,24 @@ void BuildingViewerDdsController::setCurrentTrainingAreaMap(const QString &model
|
||||
{
|
||||
if (!m_connection)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "BuildingViewerDdsController::setCurrentTrainingAreaMap: (!m_connection)";
|
||||
WARNING_LOG() << "BuildingViewerDdsController::setCurrentTrainingAreaMap: (!m_connection)";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
m_connection->excDeleteBuildingList();
|
||||
|
||||
INFO_LOG(m_logger) << getSessionInfo() << "[1] Initializing BgViewer with training area...";
|
||||
INFO_LOG() << getSessionInfo() << "[1] Initializing BgViewer with training area...";
|
||||
|
||||
if (modelPath.isEmpty())
|
||||
{
|
||||
QString strErr = tr("Error initializing Building Viewer - can not find map directory.");
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "setCurrentTrainingAreaMap: " << strErr;
|
||||
DEBUG_LOG() << getSessionInfo() << "setCurrentTrainingAreaMap: " << strErr;
|
||||
QWidget *parentWidgetx = (m_viewerInterface ? m_viewerInterface->getMainWindow() : nullptr);
|
||||
LtsWidgets::LtsMessageDialog::showMessage(parentWidgetx, strErr, tr("Error"));
|
||||
return;
|
||||
}
|
||||
INFO_LOG(m_logger) << "Map path for building viewer: " << modelPath;
|
||||
INFO_LOG() << "Map path for building viewer: " << modelPath;
|
||||
|
||||
writeBuildingDataToXML(modelPath);
|
||||
|
||||
@@ -716,14 +715,14 @@ bool BuildingViewerDdsController::isValidParticipant(const ParticipantManagement
|
||||
if (participant.id() == 0)
|
||||
{
|
||||
if (m_logger.isDebugEnabled())
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling invalid participant with invalid id (0)";
|
||||
DEBUG_LOG() << getSessionInfo() << "isValidParticipant: Not handling invalid participant with invalid id (0)";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (participant.isDeleted())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||
DEBUG_LOG() << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||
<< participant.id() << " since it is marked as 'deleted'";
|
||||
return false;
|
||||
}
|
||||
@@ -734,7 +733,7 @@ bool BuildingViewerDdsController::isValidParticipant(const ParticipantManagement
|
||||
|
||||
if (!m_session->isVisibleParty(participant.partyId()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||
DEBUG_LOG() << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||
<< participant.id() << " since it is not visible for party with id " << participant.partyId();
|
||||
return false;
|
||||
}
|
||||
@@ -747,7 +746,7 @@ bool BuildingViewerDdsController::isValidParticipant(const ParticipantManagement
|
||||
if(tc == ParticipantManagement::TypeClass_def::SupportUnit ||
|
||||
tc == ParticipantManagement::TypeClass_def::Unit)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||
DEBUG_LOG() << getSessionInfo() << "isValidParticipant: Not handling participant with id "
|
||||
<< participant.id() << " since its type is 'SupportUnit', 'Unit' or 'Structure'";
|
||||
return false;
|
||||
}
|
||||
@@ -759,7 +758,7 @@ void BuildingViewerDdsController::createBoobyTraps()
|
||||
{
|
||||
if (!m_aesDtc)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "BDV:: create Booby Traps: "<< m_session->exerciseId() << " is replay: " << m_session->isReplayPartition();
|
||||
DEBUG_LOG() << "BDV:: create Booby Traps: "<< m_session->exerciseId() << " is replay: " << m_session->isReplayPartition();
|
||||
|
||||
m_aesDtc->enableBoobyTrap();
|
||||
|
||||
@@ -788,7 +787,7 @@ void BuildingViewerDdsController::createParticipants()
|
||||
{
|
||||
if (!m_ppmDtc)
|
||||
return;
|
||||
DEBUG_LOG(m_logger) << "BDV:: create participants: "<< m_session->exerciseId() << " is replay: " << m_session->isReplayPartition();
|
||||
DEBUG_LOG() << "BDV:: create participants: "<< m_session->exerciseId() << " is replay: " << m_session->isReplayPartition();
|
||||
|
||||
const int sizeL = LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("BgViewer"), QStringLiteral("PlayerSymbolSize"), 20).toInt();
|
||||
|
||||
@@ -907,11 +906,11 @@ void BuildingViewerDdsController::onDynParticipantChanged(const ParticipantManag
|
||||
|
||||
void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManagement::HitLineInfo &hli, DataModification modType)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "X 0000 onHitLineInfoChanged id=" << hli.id();
|
||||
DEBUG_LOG() << "X 0000 onHitLineInfoChanged id=" << hli.id();
|
||||
|
||||
if (modType == DataModification::eRemoved)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged removeHit id=" << hli.id();
|
||||
DEBUG_LOG() << "onHitLineInfoChanged removeHit id=" << hli.id();
|
||||
m_connection->removeRoomHit(hli.id());
|
||||
return;
|
||||
}
|
||||
@@ -924,14 +923,14 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
const ParticipantManagement::Participant &partDst = m_ppmDtc->participant(hli.injuryParticipantId());
|
||||
if (partSrc.id() == 0 || partDst.id() == 0)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "no knownn part: " << partSrc.id() << " dst: " << partDst.id();
|
||||
ERROR_LOG() << "no knownn part: " << partSrc.id() << " dst: " << partDst.id();
|
||||
return;
|
||||
}
|
||||
|
||||
const QString &strFeatureID = BuildingViewer::databaseId2FeatureId(hli.injuryBuildingId());
|
||||
if (!m_viewerInterface->isViewOpen(strFeatureID.toStdString()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "building not opened: hli.buildingId()=" << hli;
|
||||
DEBUG_LOG() << "building not opened: hli.buildingId()=" << hli;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -947,14 +946,14 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
{
|
||||
const QVector<BuildingHit> &bHits = itBuildingHit.value();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Got Hit lines to add? " << bHits.size();
|
||||
DEBUG_LOG() << "Got Hit lines to add? " << bHits.size();
|
||||
for (const BuildingHit &bh : bHits)
|
||||
{
|
||||
|
||||
const bool testFlag = (bh.chargeTypeId == hli.chargeTypeId() &&
|
||||
bh.originatorParticipantId == hli.originatorParticipantId() &&
|
||||
hli.sampleTime() - m_hitlineDuration_ms < bh.sampleTime);
|
||||
DEBUG_LOG(m_logger) << "testFlag " << testFlag;
|
||||
DEBUG_LOG() << "testFlag " << testFlag;
|
||||
|
||||
|
||||
if (bh.chargeTypeId == hli.chargeTypeId() &&
|
||||
@@ -965,10 +964,10 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged: " << hli;
|
||||
DEBUG_LOG() << "onHitLineInfoChanged: " << hli;
|
||||
|
||||
int sizeL = LtsUtils::OperatorSettings::getInstance()->value(QStringLiteral("BgViewer"), QStringLiteral("PlayerSymbolSize"), 20).toInt();
|
||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged createPlayerSymbols";
|
||||
DEBUG_LOG() << "onHitLineInfoChanged createPlayerSymbols";
|
||||
createPlayerSymbols(partDst, sizeL);
|
||||
|
||||
|
||||
@@ -976,7 +975,7 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
LtsUtils::QPoint3D originatorSrc = toRelative3D(hli.originatorPos());
|
||||
LtsUtils::QPoint3D injuryDest = toRelative3D(hli.injuryPos());
|
||||
|
||||
DEBUG_LOG(m_logger) << "onHitLineInfoChanged playerHit"
|
||||
DEBUG_LOG() << "onHitLineInfoChanged playerHit"
|
||||
<< " hli.originatorPos() z=" << hli.originatorPos().z()
|
||||
<< " hli.injuryPos() z=" <<hli.injuryPos().z()
|
||||
<< " Src=" << originatorSrc.x() << "/" << originatorSrc.y() << "/" << originatorSrc.z()
|
||||
@@ -987,7 +986,7 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
<< " hli.injuryRoomId=" << hli.injuryRoomId();
|
||||
|
||||
|
||||
DEBUG_LOG(m_logger) << "Before z-correction:"
|
||||
DEBUG_LOG() << "Before z-correction:"
|
||||
<< " Src=" << originatorSrc.x() << "/" << originatorSrc.y() << "/" << originatorSrc.z()
|
||||
<< " Dest= " << injuryDest.x() << "/" << injuryDest.y() << "/" << injuryDest.z();
|
||||
|
||||
@@ -1000,8 +999,8 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
|
||||
double zAddOriginator = m_buildingHeight.value(hli.originatorBuildingId(), 0);
|
||||
double zAddInjury = m_buildingHeight.value(hli.injuryBuildingId(), 0);
|
||||
DEBUG_LOG(m_logger) << "z-correction: zAddOriginator=" << zAddOriginator;
|
||||
DEBUG_LOG(m_logger) << "z-correction: zAddInjury=" << zAddInjury;
|
||||
DEBUG_LOG() << "z-correction: zAddOriginator=" << zAddOriginator;
|
||||
DEBUG_LOG() << "z-correction: zAddInjury=" << zAddInjury;
|
||||
|
||||
if (hli.originatorBuildingId() <= 0)
|
||||
zAddOriginator = zAddInjury;
|
||||
@@ -1012,7 +1011,7 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
originatorSrc.setZ(originatorSrc.z() + zAddInjury);
|
||||
injuryDest.setZ(injuryDest.z() + zAddInjury);
|
||||
|
||||
DEBUG_LOG(m_logger) << "After z-correction:"
|
||||
DEBUG_LOG() << "After z-correction:"
|
||||
<< " Src=" << originatorSrc.x() << "/" << originatorSrc.y() << "/" << originatorSrc.z()
|
||||
<< " Dest= " << injuryDest.x() << "/" << injuryDest.y() << "/" << injuryDest.z();
|
||||
|
||||
@@ -1034,7 +1033,7 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
roomNumberSrc = itRoom.value();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "onHitLineInfoChanged: Room id can not be mapped! Building id: " << hli.injuryBuildingId()<<", originatorRoomId: "<< hli.originatorRoomId();
|
||||
WARNING_LOG() << "onHitLineInfoChanged: Room id can not be mapped! Building id: " << hli.injuryBuildingId()<<", originatorRoomId: "<< hli.originatorRoomId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1052,11 +1051,11 @@ void BuildingViewerDdsController::onHitLineInfoChanged(const ParticipantManageme
|
||||
roomNumberDst = itRoom.value();
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << "onHitLineInfoChanged: Room id can not be mapped! Building id: " << hli.injuryBuildingId()<<", room id: "<< hli.injuryRoomId();
|
||||
WARNING_LOG() << "onHitLineInfoChanged: Room id can not be mapped! Building id: " << hli.injuryBuildingId()<<", room id: "<< hli.injuryRoomId();
|
||||
}
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "After translate buildingId, roomId:"
|
||||
DEBUG_LOG() << "After translate buildingId, roomId:"
|
||||
<< " hli.originatorBuildingId=" << hli.originatorBuildingId() << " -> " << buildingIdSrc
|
||||
<< " hli.originatorRoomId=" << hli.originatorRoomId() << " -> " << roomNumberSrc
|
||||
<< " hli.injuryBuildingId=" << hli.injuryBuildingId() << " -> " << buildingIdDst
|
||||
@@ -1098,7 +1097,7 @@ void BuildingViewerDdsController::onPositionChanged(const ParticipantManagement:
|
||||
return;
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "onPositionChanged: " << position;
|
||||
DEBUG_LOG() << "onPositionChanged: " << position;
|
||||
|
||||
|
||||
|
||||
@@ -1118,7 +1117,7 @@ void BuildingViewerDdsController::onPositionChanged(const ParticipantManagement:
|
||||
}
|
||||
else
|
||||
{
|
||||
WARNING_LOG(m_logger) << "onPositionChanged: Room id can not be mapped! Building id: " << position.buildingId()<<", room id: "<< position.roomId();
|
||||
WARNING_LOG() << "onPositionChanged: Room id can not be mapped! Building id: " << position.buildingId()<<", room id: "<< position.roomId();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1157,7 +1156,7 @@ void BuildingViewerDdsController::onPositionChanged(const ParticipantManagement:
|
||||
|
||||
if (!m_baseCoordinate.isValid())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "not calling playerPlace as there is no base coordinate set - are there no buildings in this exercise?";
|
||||
WARNING_LOG() << "not calling playerPlace as there is no base coordinate set - are there no buildings in this exercise?";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1196,7 +1195,7 @@ void BuildingViewerDdsController::createParticipant(const ParticipantManagement:
|
||||
{
|
||||
if (!m_baseCoordinate.isValid())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "not calling playerPlace as there is no base coordinate set - are there no buildings in this exercise?";
|
||||
WARNING_LOG() << "not calling playerPlace as there is no base coordinate set - are there no buildings in this exercise?";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1241,8 +1240,8 @@ void BuildingViewerDdsController::createBoobyTrap(const AreaEffectSimulation::Bo
|
||||
pos.lat() = trap.impactPosition().lat();
|
||||
pos.lon() = trap.impactPosition().lon();
|
||||
|
||||
DEBUG_LOG(m_logger) << "Try create Booby trap with id " << trap.id() << " internal id " << participant.id();
|
||||
DEBUG_LOG(m_logger) << "Try create Booby trap with pos " << pos.lat() << " " << pos.lon();
|
||||
DEBUG_LOG() << "Try create Booby trap with id " << trap.id() << " internal id " << participant.id();
|
||||
DEBUG_LOG() << "Try create Booby trap with pos " << pos.lat() << " " << pos.lon();
|
||||
m_connection->playerCreate(participant.id(), participant.partyId(),
|
||||
buildPlayerSymbolFilePath(participant.id()),
|
||||
toRelative3D(pos),
|
||||
@@ -1322,7 +1321,7 @@ void BuildingViewerDdsController::createSymbolResultWatcher(const ParticipantMan
|
||||
std::shared_ptr<int> symbolWatcherDeleter(nullptr, [this, pSymbolWatcher, symbolWatcherBenchmark](int *)
|
||||
{
|
||||
if (symbolWatcherBenchmark && pSymbolWatcher->m_et != nullptr)
|
||||
DEBUG_LOG(m_logger) << "Symbol creation took " << pSymbolWatcher->m_et->elapsed() << " ms";
|
||||
DEBUG_LOG() << "Symbol creation took " << pSymbolWatcher->m_et->elapsed() << " ms";
|
||||
|
||||
pSymbolWatcher->deleteLater();
|
||||
});
|
||||
@@ -1330,7 +1329,7 @@ void BuildingViewerDdsController::createSymbolResultWatcher(const ParticipantMan
|
||||
|
||||
if (!pSymbolWatcher->symbolResult()->symbolImage().isValid())
|
||||
{
|
||||
WARNING_LOG(m_logger) << getSessionInfo() << "'slot_SymbolWatcherResultReady': Symbol creation failed -> '!symbolImage.isValid()', BgViewer might not display symbol(s)!";
|
||||
WARNING_LOG() << getSessionInfo() << "'slot_SymbolWatcherResultReady': Symbol creation failed -> '!symbolImage.isValid()', BgViewer might not display symbol(s)!";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1339,7 +1338,7 @@ void BuildingViewerDdsController::createSymbolResultWatcher(const ParticipantMan
|
||||
if (writeParticipantSymbols)
|
||||
if (!pSymbolWatcher->symbolResult()->symbolImage().image().save(symbolInfo.strPathToSymbolFile))
|
||||
{
|
||||
WARNING_LOG(m_logger) << getSessionInfo() << "Could not write symbol file for BgViewer: \"" << symbolInfo.strPathToSymbolFile << "\", BgViewer might not display symbol(s)!";
|
||||
WARNING_LOG() << getSessionInfo() << "Could not write symbol file for BgViewer: \"" << symbolInfo.strPathToSymbolFile << "\", BgViewer might not display symbol(s)!";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1389,7 +1388,7 @@ void BuildingViewerDdsController::onSynchronizeSimulationTime()
|
||||
m_connection->systemSetSimulationTime(m_session->partitionTime());
|
||||
}
|
||||
else
|
||||
WARNING_LOG(m_logger) << getSessionInfo() << "'slotSynchronizeSimulationTime': m_session is nullptr, could not query partitionTime!";
|
||||
WARNING_LOG() << getSessionInfo() << "'slotSynchronizeSimulationTime': m_session is nullptr, could not query partitionTime!";
|
||||
}
|
||||
|
||||
void BuildingViewerDdsController::updateBuildingRoomNames(const InfrastructureManagement::MainStructureElement& building)
|
||||
@@ -1422,7 +1421,7 @@ void BuildingViewerDdsController::onPlayerPicked(int playerId)
|
||||
if (m_ppmGuiIfc)
|
||||
m_ppmGuiIfc->showParticipantInfoWindow(playerId, true);
|
||||
else
|
||||
INFO_LOG(m_logger) << "No m_ppmGuiIfc";
|
||||
INFO_LOG() << "No m_ppmGuiIfc";
|
||||
}
|
||||
|
||||
|
||||
@@ -1431,13 +1430,13 @@ void BuildingViewerDdsController::effectGenerationUnitPicked(int structureElemen
|
||||
if (m_blgGuiIfc)
|
||||
m_blgGuiIfc->showEffectGenerationUnitWindow(structureElementId);
|
||||
else
|
||||
INFO_LOG(m_logger) << "No m_blgGuiIfc";
|
||||
INFO_LOG() << "No m_blgGuiIfc";
|
||||
}
|
||||
|
||||
|
||||
void BuildingViewerDdsController::onAssetPicked(int structureElementId)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "User clicked on asset with structureElementId " << structureElementId << " from " << QString::number((quintptr)m_session->adr(), 16);
|
||||
DEBUG_LOG() << "User clicked on asset with structureElementId " << structureElementId << " from " << QString::number((quintptr)m_session->adr(), 16);
|
||||
|
||||
if (m_session->isReplayPartition())
|
||||
return;
|
||||
@@ -1447,7 +1446,7 @@ void BuildingViewerDdsController::onAssetPicked(int structureElementId)
|
||||
auto it = m_mountingPointId2AssetType.find(structureElementId);
|
||||
if (it == m_mountingPointId2AssetType.end())
|
||||
{
|
||||
WARNING_LOG(m_logger) << "onAssetPicked: User clicked on asset mounted to structureElementId " << structureElementId << " which was not added beforehand?! Ignoring...";
|
||||
WARNING_LOG() << "onAssetPicked: User clicked on asset mounted to structureElementId " << structureElementId << " which was not added beforehand?! Ignoring...";
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1455,18 +1454,18 @@ void BuildingViewerDdsController::onAssetPicked(int structureElementId)
|
||||
switch (assetType)
|
||||
{
|
||||
case BuildingViewer::AssetTypes::AnnouncementUnit:
|
||||
DEBUG_LOG(m_logger) << "Clicked asset is of type is AnnouncementUnit";
|
||||
DEBUG_LOG() << "Clicked asset is of type is AnnouncementUnit";
|
||||
if (m_avmIfc)
|
||||
m_avmIfc->showAnnouncementUnit(structureElementId);
|
||||
return;
|
||||
|
||||
case BuildingViewer::AssetTypes::EffectGenerationUnit:
|
||||
DEBUG_LOG(m_logger) << "Clicked asset is of type is EffectGenerationUnit";
|
||||
DEBUG_LOG() << "Clicked asset is of type is EffectGenerationUnit";
|
||||
effectGenerationUnitPicked(structureElementId);
|
||||
return;
|
||||
|
||||
case BuildingViewer::AssetTypes::IndoorCameraWithSpeaker:
|
||||
DEBUG_LOG(m_logger) << "Clicked asset is of type is IndoorCameraWithSpeaker";
|
||||
DEBUG_LOG() << "Clicked asset is of type is IndoorCameraWithSpeaker";
|
||||
if (m_avmIfc)
|
||||
{
|
||||
m_avmIfc->showCamera(m_irreplacableWidget, structureElementId);
|
||||
@@ -1475,12 +1474,12 @@ void BuildingViewerDdsController::onAssetPicked(int structureElementId)
|
||||
return;
|
||||
|
||||
case BuildingViewer::AssetTypes::IndoorCamera:
|
||||
DEBUG_LOG(m_logger) << "Clicked asset is of type is IndoorCamera";
|
||||
DEBUG_LOG() << "Clicked asset is of type is IndoorCamera";
|
||||
if (m_avmIfc)
|
||||
m_avmIfc->showCamera(m_irreplacableWidget, structureElementId);
|
||||
return;
|
||||
}
|
||||
WARNING_LOG(m_logger) << "onAssetPicked: BuildingViewer::AssetTypes is unknown: " << assetType;
|
||||
WARNING_LOG() << "onAssetPicked: BuildingViewer::AssetTypes is unknown: " << assetType;
|
||||
}
|
||||
|
||||
|
||||
@@ -1515,12 +1514,12 @@ void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::
|
||||
{
|
||||
int topidId = static_cast <int>(hli.id());
|
||||
|
||||
DEBUG_LOG(m_logger) << "onBuildingHitLineInfoChanged: " << hli;
|
||||
DEBUG_LOG() << "onBuildingHitLineInfoChanged: " << hli;
|
||||
|
||||
const QString &strFeatureID = BuildingViewer::databaseId2FeatureId(hli.buildingId());
|
||||
if (!m_viewerInterface->isViewOpen(strFeatureID.toStdString()))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "building not opened: hli.buildingId()=" << hli.buildingId() ;
|
||||
DEBUG_LOG() << "building not opened: hli.buildingId()=" << hli.buildingId() ;
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1530,11 +1529,11 @@ void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::
|
||||
|
||||
|
||||
const bool isRemove = (modType == DataModification::eRemoved);
|
||||
DEBUG_LOG(m_logger) << "isRemove=" << isRemove;
|
||||
DEBUG_LOG() << "isRemove=" << isRemove;
|
||||
|
||||
if (isRemove)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onBuildingHitLineInfoChanged: remove ";
|
||||
DEBUG_LOG() << "onBuildingHitLineInfoChanged: remove ";
|
||||
QVector<BuildingHit> &bhl = m_buildingHits[hli.buildingId()];
|
||||
|
||||
auto it = std::find_if(bhl.begin(), bhl.end(), [hli](const BuildingHit &bh)
|
||||
@@ -1544,7 +1543,7 @@ void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::
|
||||
|
||||
if (it != bhl.end())
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "bhl.erase(it)";
|
||||
DEBUG_LOG() << "bhl.erase(it)";
|
||||
bhl.erase(it);
|
||||
}
|
||||
m_connection->removeRoomHit(hli.id());
|
||||
@@ -1579,7 +1578,7 @@ void BuildingViewerDdsController::onBuildingHitLineInfoChanged(const Buildings::
|
||||
|
||||
void BuildingViewerDdsController::onCleanupBuildingHitlines()
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "onCleanupBuildingHitlines: ";
|
||||
DEBUG_LOG() << "onCleanupBuildingHitlines: ";
|
||||
const qint64 tNow = QDateTime::currentMSecsSinceEpoch();
|
||||
const auto isOutdated = [tNow](const BuildingHit &bh)
|
||||
{
|
||||
@@ -1601,7 +1600,7 @@ void BuildingViewerDdsController::onMainStructureElementChanged(const Infrastruc
|
||||
{
|
||||
if (mse.modelId() != 0 && m_ismDtc->isElementAssignedToExercise(mse, m_exerciseId))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "m_buildingHeight.insert id=" << mse.id() << " z=" << mse.geoPosition().z();
|
||||
DEBUG_LOG() << "m_buildingHeight.insert id=" << mse.id() << " z=" << mse.geoPosition().z();
|
||||
m_buildingHeight.insert(mse.id(), mse.geoPosition().z());
|
||||
QHash<int, int> roomId2RoomNumber;
|
||||
for (const InfrastructureManagement::StructureElement &se : mse.elements())
|
||||
@@ -1639,7 +1638,7 @@ void BuildingViewerDdsController::onFireEventFlashTimer()
|
||||
|
||||
if (m_session == nullptr)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << getSessionInfo() << "onFireEventFlashTimer: Session is not available, flashing not possible!";
|
||||
DEBUG_LOG() << getSessionInfo() << "onFireEventFlashTimer: Session is not available, flashing not possible!";
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user