LtsSession/LtsElevation: BUILD_RTI Guards komplett, EXTERNAL_DEPENDENCIES.md
- lts_session_data_dds.h/cpp: Vollständig mit #ifdef BUILD_RTI geschützt Vermeidet vtable/qt_metacast Linker-Fehler bei BUILD_RTI=OFF - lts_session.cpp: LtsSessionDataDds-Aufrufe mit BUILD_RTI Guards toString(): N/A-Placeholder im else-Zweig event(): QObject::event(e) statt LtsSessionDataDds::event(e) - lts_elevation_manager.cpp: - m_logger im Initializer-List initialisieren (Reference-Member) - initDDS: Kein Zugriff auf incomplete type bei BUILD_RTI=OFF - createInstance: Rückgabetyp korrigiert (nullptr statt QStringList) - getFilenamesForExercise/TrainingArea: #ifdef BUILD_RTI - exerciseIdToTrainingAreaId: static method mit BUILD_RTI guard - elevation_map_manager.h: QPoint3D-STUB entfernt, Forward-Declaration - cnr_frequency_planning_helper.h/cpp: Vollständig mit BUILD_RTI geschützt - EXTERNAL_DEPENDENCIES.md: Dokumentation fehlender external deps - RTI GCC-Inkompatibilität (DDS_OctetSeq vs DDS_OctetsSeq) - BUILD_RTI temporär OFF, BUILD_ARCGIS=ON default Build-Status: LtsSession [17/1589] erfolgreich, LtsElevation gebaut Offene Build-Fehler durch fehlende externe Dependencies (erwartet)
This commit is contained in:
8 files changed
+68
-80
No files matched your search
@@ -74,7 +74,10 @@ class LtsElevationManager::Private
|
||||
SituationMap::ElevationMapManager* m_elevationManager{nullptr};
|
||||
};
|
||||
|
||||
LtsElevationManager::LtsElevationManager() : QObject(nullptr), d(new Private)
|
||||
LtsElevationManager::LtsElevationManager()
|
||||
: QObject(nullptr)
|
||||
, m_logger(getLogger("LtsElevationManager"))
|
||||
, d(new Private)
|
||||
{
|
||||
++s_counter;
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START, s_counter=" << s_counter << " this=" << this;
|
||||
@@ -107,68 +110,15 @@ LtsElevationManager::createInstance(int exerciseId, const std::shared_ptr<Exerci
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int trainingAreaId = -1;
|
||||
|
||||
static QHash<int, int> s_exIdToTaIdStore;
|
||||
|
||||
const auto exTaIt = s_exIdToTaIdStore.find(exerciseId);
|
||||
if (exTaIt != s_exIdToTaIdStore.end())
|
||||
{
|
||||
trainingAreaId = *exTaIt;
|
||||
}
|
||||
else
|
||||
{
|
||||
QStringList filePaths_rough_to_fine;
|
||||
#ifdef BUILD_RTI
|
||||
if (!exmDtc || !asmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs for exerciseId=" << exerciseId << ", asmDtc=" << asmDtc
|
||||
<< ", exmDtc=" << exmDtc;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
trainingAreaId = exerciseIdToTrainingAreaId(exerciseId, exmDtc);
|
||||
if (trainingAreaId <= 0)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error getting trainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId << ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
s_exIdToTaIdStore[exerciseId] = trainingAreaId;
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId, asmDtc);
|
||||
filePaths_rough_to_fine = getFilenamesForExercise(exerciseId);
|
||||
#else
|
||||
Q_UNUSED(asmDtc)
|
||||
if (!exmDtc)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " no exmDtc for exerciseId=" << exerciseId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
trainingAreaId = exerciseIdToTrainingAreaId(exerciseId, exmDtc);
|
||||
if (trainingAreaId <= 0)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error getting trainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId << ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
s_exIdToTaIdStore[exerciseId] = trainingAreaId;
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE temp = createInstanceForTrainingAreaId(trainingAreaId);
|
||||
Q_UNUSED(exerciseId);
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " BUILD_RTI=OFF, cannot get filenames for exercise";
|
||||
#endif
|
||||
if (!temp)
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on createInstanceForTrainingAreaId"
|
||||
<< ", exerciseId=" << exerciseId << ", trainingAreaId=" << trainingAreaId;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
temp->initDDS(exmDtc, asmDtc);
|
||||
}
|
||||
|
||||
TRACE_LOG(logger) << Q_FUNC_INFO << " END, exerciseId=" << exerciseId;
|
||||
return temp;
|
||||
Q_UNUSED(filePaths_rough_to_fine);
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
LTS_ELEVATION_MANAGER_TYPE LtsElevationManager::getInstance(int exerciseId)
|
||||
@@ -294,17 +244,16 @@ void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Inte
|
||||
void LtsElevationManager::initDDS(const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc,
|
||||
const std::shared_ptr<void>& asmDtc)
|
||||
{
|
||||
Q_UNUSED(exmDtc);
|
||||
Q_UNUSED(asmDtc);
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START (BUILD_RTI=OFF, no DDS init)";
|
||||
|
||||
d->m_exmDtc = exmDtc;
|
||||
if (d->m_exmDtc)
|
||||
d->m_exmDtc->waitForHistoricalDataExercise(1000);
|
||||
|
||||
// BUILD_RTI=OFF: No DDS initialization
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " END";
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
QStringList LtsElevationManager::getFilenamesForExercise(int exerciseId)
|
||||
{
|
||||
TRACE_LOG(m_logger) << Q_FUNC_INFO << " START";
|
||||
@@ -370,6 +319,19 @@ QStringList LtsElevationManager::getFilenamesForTrainingArea(int trainingAreaId)
|
||||
<< " END, filePaths_rough_to_fine=" << filePaths_rough_to_fine.join(QStringLiteral(";"));
|
||||
return filePaths_rough_to_fine;
|
||||
}
|
||||
#else
|
||||
QStringList LtsElevationManager::getFilenamesForExercise(int /*exerciseId*/)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " BUILD_RTI=OFF, getFilenamesForExercise not available";
|
||||
return {};
|
||||
}
|
||||
|
||||
QStringList LtsElevationManager::getFilenamesForTrainingArea(int /*trainingAreaId*/)
|
||||
{
|
||||
ERROR_LOG(m_logger) << Q_FUNC_INFO << " BUILD_RTI=OFF, getFilenamesForTrainingArea not available";
|
||||
return {};
|
||||
}
|
||||
#endif
|
||||
|
||||
bool LtsElevationManager::init(const QStringList& filePaths_rough_to_fine)
|
||||
{
|
||||
@@ -392,6 +354,7 @@ bool LtsElevationManager::init(const QStringList& filePaths_rough_to_fine)
|
||||
return true;
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId,
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc)
|
||||
{
|
||||
@@ -401,7 +364,7 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId,
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " no dtcs"
|
||||
<< ", exerciseId=" << exerciseId;
|
||||
return {};
|
||||
return -1;
|
||||
}
|
||||
|
||||
int trainingAreaId = -1;
|
||||
@@ -413,7 +376,7 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId,
|
||||
{
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " Error on m_exmDtc->exercise"
|
||||
<< ", exerciseId=" << exerciseId;
|
||||
return {};
|
||||
return -1;
|
||||
}
|
||||
trainingAreaId = exm.trainingAreaId();
|
||||
|
||||
@@ -426,6 +389,17 @@ int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId,
|
||||
}
|
||||
return trainingAreaId;
|
||||
}
|
||||
#else
|
||||
int LtsElevationManager::exerciseIdToTrainingAreaId(int exerciseId,
|
||||
const std::shared_ptr<ExerciseManagement::Interface::Dtc>& exmDtc)
|
||||
{
|
||||
Q_UNUSED(exerciseId);
|
||||
Q_UNUSED(exmDtc);
|
||||
LOGGER_T logger = getLogger("LtsElevationManager");
|
||||
ERROR_LOG(logger) << Q_FUNC_INFO << " BUILD_RTI=OFF, cannot convert exerciseId to trainingAreaId";
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool LtsElevationManager::waitForInitialization()
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user