LtsSession: STUB-Unterstützung und Build-Fixes
- lts_session_data_dds.h/cpp: BUILD_RTI guards für STUB/Real-Implementation - Include-Pfad fix: DDS/QosProfile/DDS_DefaultQos (ohne .h) - CMakeLists.txt: qtservice_export.h Includer Pfad korrigiert - AdvancedSymbology/Data: Qt6 Core5Compat Verlinkung RTI License: ~/swy/sandbox/rti_license.dat (leer, vom Installer) ArcGIS SDK: ./external/ArcGIS/MapsSDK_Qt_300.0.0/ Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
6 files changed
+253
-69
No files matched your search
@@ -52,6 +52,11 @@ SET(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include)
|
||||
# Include directory for generated export headers
|
||||
include_directories(${CMAKE_BINARY_DIR})
|
||||
# Include directories for external dependencies and internal modules
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Z/src/NGLLogger)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Viewer/SituationMap/Symbology)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/Lts/Proxies/TrainingAreaBase)
|
||||
include_directories(${CMAKE_SOURCE_DIR}/include/ProjectDataManagement)
|
||||
SET(CMAKE_CXX_STANDARD 20)
|
||||
SET(CMAKE_CXX_STANDARD_REQUIRED 14)
|
||||
SET(CMAKE_VISIBILITY_INLINES_HIDDEN ON)
|
||||
|
||||
@@ -8,26 +8,53 @@
|
||||
# RTI Connext DDS - uses IMPORTED targets from parent CMakeLists.txt
|
||||
OPTION(BUILD_RTI "Build with RTI Connext DDS support" ON)
|
||||
|
||||
# LtsSessionDataDds (only with RTI)
|
||||
# Find RTI Connext DDS - manual configuration (no CMake config file available)
|
||||
IF(BUILD_RTI)
|
||||
SET(RTI_BASE_DIR "${CMAKE_SOURCE_DIR}/../../../external/rti_connext_dds-7.7.0")
|
||||
SET(RTI_INCLUDE_DIR "${RTI_BASE_DIR}/include")
|
||||
SET(RTI_LIB_DIR "${RTI_BASE_DIR}/lib/x64Linux4gcc8.5.0")
|
||||
|
||||
# Check if RTI directories exist
|
||||
IF(EXISTS "${RTI_INCLUDE_DIR}" AND EXISTS "${RTI_LIB_DIR}")
|
||||
MESSAGE(STATUS "Using RTI Connext DDS from ${RTI_BASE_DIR}")
|
||||
SET(BUILD_RTI ON)
|
||||
ELSE()
|
||||
MESSAGE(WARNING "RTI Connext DDS not found at ${RTI_BASE_DIR}, building without RTI support")
|
||||
SET(BUILD_RTI OFF)
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
|
||||
# LtsSessionDataDds (always built, with stub implementation for non-RTI builds)
|
||||
SET(LtsSessionDataDds_SRCS
|
||||
lts_session_data_dds.cpp
|
||||
lts_session_data_dds.h
|
||||
)
|
||||
NGL_ADD_LIBRARY2(WS LtsSessionDataDds SHARED ${LtsSessionDataDds_SRCS})
|
||||
set_target_properties(LtsSessionDataDds PROPERTIES AUTOMOC ON)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionDataDds
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionDataDds
|
||||
PRIVATE
|
||||
$<$<BOOL:${BUILD_RTI}>:ddsconnector>
|
||||
PUBLIC
|
||||
$<$<BOOL:${BUILD_RTI}>:nddscore>
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
SET(LtsSessionDataDds_SRCS
|
||||
lts_session_data_dds.cpp
|
||||
lts_session_data_dds.h
|
||||
)
|
||||
NGL_ADD_LIBRARY2(WS LtsSessionDataDds SHARED ${LtsSessionDataDds_SRCS})
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(LtsSessionDataDds
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../
|
||||
${CMAKE_CURRENT_BINARY_DIR}/../
|
||||
${RTI_INCLUDE_DIR}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSessionDataDds
|
||||
NGL_TARGET_LINK_DIRECTORIES(LtsSessionDataDds
|
||||
PRIVATE
|
||||
ddsconnector
|
||||
PUBLIC
|
||||
RTI::nddscore
|
||||
NGLLogger
|
||||
Qt6::Core
|
||||
${RTI_LIB_DIR}
|
||||
)
|
||||
ENDIF()
|
||||
IF(BUILD_RTI)
|
||||
TARGET_COMPILE_DEFINITIONS(LtsSessionDataDds PUBLIC BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
@@ -80,14 +107,14 @@ NGL_TARGET_LINK_LIBRARIES(LtsSession
|
||||
DataPluginInterface
|
||||
NGLLogger
|
||||
ProjectConfig
|
||||
LtsSessionDataDds # Always link, even in stub mode
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(LtsSession
|
||||
PRIVATE
|
||||
ddsconnector
|
||||
PUBLIC
|
||||
LtsSessionDataDds
|
||||
RTI::nddscore
|
||||
nddscore
|
||||
)
|
||||
TARGET_COMPILE_DEFINITIONS(LtsSession PUBLIC BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
@@ -1122,14 +1122,6 @@ bool LtsSession::event(QEvent* e)
|
||||
|
||||
return LtsSessionDataDds::event(e);
|
||||
}
|
||||
#else
|
||||
bool LtsSession::event(QEvent* e)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange)
|
||||
m_baseLayout->setAppName(appToString(app()));
|
||||
|
||||
return QObject::event(e);
|
||||
}
|
||||
#endif // BUILD_RTI
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
@@ -8,13 +8,12 @@
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-02-27
|
||||
*/
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
#include "lts_session_data_dds.h"
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
#include <DDS/DTC/generic_dtc_impl.h>
|
||||
#include <DDS/QosProfile/DDS_DefaultQos.h>
|
||||
#include <DDS/QosProfile/DDS_DefaultQos>
|
||||
#include <NGLLogger/NGLLoggerBootstrap.h>
|
||||
#include <QDebug>
|
||||
#include <QSet>
|
||||
@@ -245,19 +244,19 @@ bool LtsSessionDataDds::init(const dds::domain::DomainParticipant& dp, const Dds
|
||||
m_qosFileList.clear();
|
||||
|
||||
#ifdef WIN_32
|
||||
DDS::QosProfile::ConnectionType type = DDS::QosProfile::ConnectionType::Tablet;
|
||||
DDS::QosProfile::ConnectionType type = DDS::QosProfile::ConnectionType::Tablet;
|
||||
#else
|
||||
DDS::QosProfile::ConnectionType type = DDS::QosProfile::ConnectionType::Client;
|
||||
DDS::QosProfile::ConnectionType type = DDS::QosProfile::ConnectionType::Client;
|
||||
#endif
|
||||
|
||||
if (m_ddsConnector == nullptr)
|
||||
{
|
||||
m_ddsConnector =
|
||||
std::make_shared<DDSConnector::DdsConnector>(dp, connParams.partitionType, type, connParams.partitionId);
|
||||
if (m_ddsConnector == nullptr)
|
||||
{
|
||||
m_ddsConnector =
|
||||
std::make_shared<DDSConnector::DdsConnector>(dp, connParams.partitionType, type, connParams.partitionId);
|
||||
|
||||
s_ddsConnections()->insertConnection(connParams, m_ddsConnector);
|
||||
}
|
||||
return initInternal();
|
||||
s_ddsConnections()->insertConnection(connParams, m_ddsConnector);
|
||||
}
|
||||
return initInternal();
|
||||
}
|
||||
|
||||
Fetcher* LtsSessionDataDds::fetcher(const QString& yourPluginsName)
|
||||
@@ -268,19 +267,19 @@ Fetcher* LtsSessionDataDds::fetcher(const QString& yourPluginsName)
|
||||
return m_fetcher;
|
||||
}
|
||||
|
||||
QString LtsSessionDataDds::partitionTypeString(IDL::PartitionType partitionType)
|
||||
QString LtsSessionDataDds::partitionTypeString(PartitionType partitionType)
|
||||
{
|
||||
switch (partitionType)
|
||||
{
|
||||
case IDL::PartitionType::AllExercises:
|
||||
case PartitionType::AllExercises:
|
||||
return QStringLiteral("AllExercises");
|
||||
case IDL::PartitionType::Any:
|
||||
case PartitionType::Any:
|
||||
return QStringLiteral("Any");
|
||||
case IDL::PartitionType::Exercise:
|
||||
case PartitionType::Exercise:
|
||||
return QStringLiteral("Exercise");
|
||||
case IDL::PartitionType::Global:
|
||||
case PartitionType::Global:
|
||||
return QStringLiteral("Global");
|
||||
case IDL::PartitionType::Replay:
|
||||
case PartitionType::Replay:
|
||||
return QStringLiteral("Replay");
|
||||
}
|
||||
|
||||
@@ -312,9 +311,9 @@ int LtsSessionDataDds::partitionId() const
|
||||
return m_ddsConnector ? m_ddsConnector->getPartitionId() : -1;
|
||||
}
|
||||
|
||||
IDL::PartitionType LtsSessionDataDds::partitionType() const
|
||||
PartitionType LtsSessionDataDds::partitionType() const
|
||||
{
|
||||
return m_ddsConnector ? m_ddsConnector->getPartitionType() : IDL::PartitionType::Global;
|
||||
return m_ddsConnector ? m_ddsConnector->getPartitionType() : PartitionType::Global;
|
||||
}
|
||||
|
||||
QStringList LtsSessionDataDds::qosFile() const
|
||||
@@ -388,4 +387,90 @@ void LtsSessionDataDds::addAvailablaeDataPluginInterfaces(
|
||||
|
||||
} // namespace LtsSession
|
||||
|
||||
#endif // BUILD_RTI
|
||||
#else // !BUILD_RTI - Stub implementation for non-RTI builds
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
|
||||
LtsSessionDataDds::LtsSessionDataDds(QObject* parent)
|
||||
: QObject(parent), m_exerciseId(-1), m_emittedTime(0), m_curMSecSinceEpoch(0), m_active(true), m_fetcher(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
LtsSessionDataDds::~LtsSessionDataDds()
|
||||
{
|
||||
// m_fetcher is void* in stub mode, no deletion needed
|
||||
}
|
||||
|
||||
bool LtsSessionDataDds::init(const DdsConnectionParams& /*connParams*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool LtsSessionDataDds::init(const void* /*dp*/, const DdsConnectionParams& /*connParams*/)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void* LtsSessionDataDds::fetcher(const QString& /*yourPluginsName*/)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString LtsSessionDataDds::partitionTypeString(PartitionType /*partitionType*/)
|
||||
{
|
||||
return QString();
|
||||
}
|
||||
|
||||
QString LtsSessionDataDds::toString() const
|
||||
{
|
||||
return QStringLiteral("(LtsSessionDataDds: STUB - no RTI support)");
|
||||
}
|
||||
|
||||
int LtsSessionDataDds::domainId() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int LtsSessionDataDds::exerciseId() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
int LtsSessionDataDds::partitionId() const
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
|
||||
PartitionType LtsSessionDataDds::partitionType() const
|
||||
{
|
||||
return PartitionType::Global;
|
||||
}
|
||||
|
||||
QStringList LtsSessionDataDds::qosFile() const
|
||||
{
|
||||
return QStringList();
|
||||
}
|
||||
|
||||
QUrl LtsSessionDataDds::tcpConnectionUrl() const
|
||||
{
|
||||
return QUrl();
|
||||
}
|
||||
|
||||
DdsConnectionParams LtsSessionDataDds::connParams() const
|
||||
{
|
||||
return DdsConnectionParams();
|
||||
}
|
||||
|
||||
bool LtsSessionDataDds::initInternal()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void LtsSessionDataDds::onPartitionTimeChangedInternal()
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace LtsSession
|
||||
|
||||
#endif // BUILD_RTI
|
||||
@@ -10,14 +10,28 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
|
||||
#include <QObject>
|
||||
#include <QMap>
|
||||
#include <QUrl>
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
#include <memory>
|
||||
|
||||
#include <QMap>
|
||||
|
||||
// Export macro for shared library
|
||||
#include "ltssessiondatadds_export.h"
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
#include <dds/domain/DomainParticipant.hpp>
|
||||
namespace DDSConnector { class DdsConnector; }
|
||||
namespace DTC { template<typename T> class GenericDTCImpl; }
|
||||
namespace Core { struct PartitionTime; }
|
||||
namespace NGL { class INGLLogger; }
|
||||
class Fetcher;
|
||||
#else
|
||||
// Forward declarations for stub types
|
||||
namespace DataPluginBase { struct Interface; }
|
||||
#endif
|
||||
|
||||
namespace LtsSession
|
||||
{
|
||||
|
||||
@@ -25,7 +39,10 @@ namespace LtsSession
|
||||
enum class PartitionType {
|
||||
Any = 0,
|
||||
Exercise,
|
||||
Replay
|
||||
Replay,
|
||||
AllExercises,
|
||||
Global,
|
||||
Invalid = -1
|
||||
};
|
||||
|
||||
struct DdsConnectionParams
|
||||
@@ -69,37 +86,91 @@ struct DdsConnectionParams
|
||||
return partitionType < o.partitionType;
|
||||
return tcpConnectionUrl.toString() < o.tcpConnectionUrl.toString();
|
||||
}
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
bool hasSameDomainParams(const DdsConnectionParams& o) const
|
||||
{
|
||||
return domainId == o.domainId && partitionType == o.partitionType;
|
||||
}
|
||||
#endif
|
||||
};
|
||||
|
||||
// Stub base class - inherits QObject for compatibility
|
||||
class LtsSessionDataDds : public QObject
|
||||
// Base class for session DDS data - always compiled, but RTI functionality guarded
|
||||
class LTSSESSIONDATADDS_EXPORT LtsSessionDataDds : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
protected:
|
||||
explicit LtsSessionDataDds(QObject* parent = nullptr) : QObject(parent) {}
|
||||
|
||||
public:
|
||||
~LtsSessionDataDds() = default;
|
||||
explicit LtsSessionDataDds(QObject* parent = nullptr);
|
||||
~LtsSessionDataDds();
|
||||
|
||||
int domainId() const { return -1; }
|
||||
int exerciseId() const { return 0; }
|
||||
int partitionId() const { return 0; }
|
||||
QStringList qosFile() const { return QStringList(); }
|
||||
PartitionType partitionType() const { return PartitionType::Any; }
|
||||
static QString partitionTypeString(PartitionType partitionType) { return QString::number(static_cast<int>(partitionType)); }
|
||||
// Initialization
|
||||
#ifdef BUILD_RTI
|
||||
bool init(const DdsConnectionParams& connParams);
|
||||
bool init(const dds::domain::DomainParticipant& dp, const DdsConnectionParams& connParams);
|
||||
Fetcher* fetcher(const QString& yourPluginsName);
|
||||
#else
|
||||
virtual bool init(const DdsConnectionParams& connParams);
|
||||
virtual bool init(const void* dp, const DdsConnectionParams& connParams);
|
||||
virtual void* fetcher(const QString& yourPluginsName);
|
||||
#endif
|
||||
|
||||
bool isExercisePartition() const { return false; }
|
||||
bool isReplayPartition() const { return false; }
|
||||
// Accessors
|
||||
int domainId() const;
|
||||
int exerciseId() const;
|
||||
int partitionId() const;
|
||||
PartitionType partitionType() const;
|
||||
static QString partitionTypeString(PartitionType partitionType);
|
||||
QStringList qosFile() const;
|
||||
QUrl tcpConnectionUrl() const;
|
||||
DdsConnectionParams connParams() const;
|
||||
|
||||
QString toString() const { return QStringLiteral("LtsSessionDataDds(stub)"); }
|
||||
bool isExercisePartition() const { return partitionType() == PartitionType::Exercise; }
|
||||
bool isReplayPartition() const { return partitionType() == PartitionType::Replay; }
|
||||
|
||||
qint64 partitionTime() const { return 0; }
|
||||
QString toString() const;
|
||||
|
||||
signals:
|
||||
qint64 partitionTime() const { return m_emittedTime; }
|
||||
|
||||
// Data plugin interfaces
|
||||
#ifdef BUILD_RTI
|
||||
QMap<QString, std::shared_ptr<DataPluginBase::Interface>> availableDataPluginInterfaces() const;
|
||||
void addAvailablaeDataPluginInterfaces(const QMap<QString, std::shared_ptr<DataPluginBase::Interface>>& dataPlugins);
|
||||
#else
|
||||
// Stub returns empty map - void* doesn't work well in QMap template
|
||||
QMap<QString, void*> availableDataPluginInterfaces() const { return QMap<QString, void*>(); }
|
||||
void addAvailablaeDataPluginInterfaces(const QMap<QString, void*>& /*dataPlugins*/) {}
|
||||
#endif
|
||||
|
||||
signals:
|
||||
void partitionTimeChanged(qint64 newPartitionTime);
|
||||
void partitionTimeChangedInternal();
|
||||
|
||||
protected:
|
||||
#ifdef BUILD_RTI
|
||||
bool initInternal();
|
||||
void onPartitionTimeChangedInternal();
|
||||
|
||||
// Member variables - only with RTI
|
||||
int m_exerciseId;
|
||||
qint64 m_emittedTime;
|
||||
qint64 m_curMSecSinceEpoch;
|
||||
bool m_active;
|
||||
Fetcher* m_fetcher;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnectorGlobal;
|
||||
std::shared_ptr<DTC::GenericDTCImpl<Core::PartitionTime>> m_dtcPartitionTime;
|
||||
NGL::INGLLogger& m_logger;
|
||||
#else
|
||||
// Stub implementation - minimal members
|
||||
bool initInternal();
|
||||
void onPartitionTimeChangedInternal();
|
||||
|
||||
int m_exerciseId;
|
||||
qint64 m_emittedTime;
|
||||
qint64 m_curMSecSinceEpoch;
|
||||
bool m_active;
|
||||
void* m_fetcher;
|
||||
#endif
|
||||
};
|
||||
|
||||
} // namespace LtsSession
|
||||
|
||||
#endif // BUILD_RTI
|
||||
@@ -11,6 +11,10 @@ NGL_ADD_LIBRARY(WS AsbData STATIC
|
||||
logger.cpp
|
||||
logger.h
|
||||
)
|
||||
TARGET_INCLUDE_DIRECTORIES(AsbData PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../../Viewer/SituationMap
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(AsbData
|
||||
GimDataPluginInterface
|
||||
AsbDataPluginInterface
|
||||
|
||||
Reference in new issue
Block a user