BUILD_RTI: Fix 4 compile errors and add missing type headers
- generic_base.h: Fix dds::topic namespace issue, move RTI includes inside BUILD_RTI guard - wait_set_handler.h: Remove duplicate m_logger declarations (3→1) - pub_sub_base.cpp: Fix constructor initializer list syntax (.→,), add m_logger initialization - training_area_telegrams.h: Fix field naming (m_ prefix) for accessor methods - PdmComboBox CMakeLists.txt: Add BUILD_RTI AND TARGET guards for svcPdmCommon/svcPdmClient - PdmDataPlugin CMakeLists.txt: Wrap svcPdmClient link in BUILD_RTI guard - CMakeLists.txt: Add RTI_UNIX, RTI_POSIX_THREADS compile definitions, remove duplicate add_subdirectory - alm_types.h, ppm_types.h: Copy missing type headers from include/ directories Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
c042faae9e
commit
ec75789fae
9 files changed
+157
-40
No files matched your search
@@ -222,9 +222,11 @@ IF(BUILD_RTI)
|
||||
ENDIF()
|
||||
|
||||
# Include Verzeichnisse für alle Varianten
|
||||
# RTI_UNIX required for basic types (RTI_INT32, RTI_UINT32, etc.)
|
||||
# RTI_POSIX_THREADS required for pthread support
|
||||
SET_TARGET_PROPERTIES(RTI::${lib} PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${RTI_INCLUDE_DIRS}"
|
||||
INTERFACE_COMPILE_DEFINITIONS "RTI_LINUX"
|
||||
INTERFACE_COMPILE_DEFINITIONS "RTI_LINUX;RTI_UNIX;RTI_POSIX_THREADS"
|
||||
)
|
||||
ENDFOREACH()
|
||||
|
||||
@@ -470,12 +472,14 @@ endfunction()
|
||||
# Add only guarded subdirectories
|
||||
NGL_ADD_SUBDIR_GUARDED(TetraIF)
|
||||
NGL_ADD_SUBDIR_GUARDED(Z/src)
|
||||
# Services are included before plugins via Lts/CMakeLists.txt (LTS_SUBDIRS order)
|
||||
NGL_ADD_SUBDIR_GUARDED(Lts)
|
||||
# TrainingAreaBase is included via Lts/Proxies when Lts is processed
|
||||
# Special-case: when migrating TetraIF, also include ProjectDataManagement so generated headers
|
||||
# and internal logger target are available in the same build tree for TetraIF dependents.
|
||||
if(DEFINED MIGRATE_MODULE AND MIGRATE_MODULE STREQUAL "TetraIF")
|
||||
message(STATUS "Including helper modules for TetraIF migration: Lts/Plugins/ProjectDataManagement")
|
||||
# Services already included above when BUILD_RTI=ON
|
||||
add_subdirectory(Lts/Plugins/ProjectDataManagement)
|
||||
endif()
|
||||
# at last, to make sure we get all targets in NGL_TS_TARGETS property
|
||||
|
||||
@@ -10,6 +10,6 @@ namespace DDSConnector
|
||||
PubSubBase::PubSubBase(const dds::domain::DomainParticipant &domainParticipant, const std::string &partition, const char *loggerName)
|
||||
: m_domainParticipant(domainParticipant)
|
||||
, m_partitions({partition})
|
||||
.getNGLLogger(loggerName))
|
||||
, m_logger(NGL::getNGLLogger(loggerName))
|
||||
{}
|
||||
}
|
||||
@@ -3,12 +3,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#if BUILD_RTI
|
||||
#include <dds/core/xtypes/DynamicData.hpp>
|
||||
#include <dds/core/xtypes/DynamicType.hpp>
|
||||
#include <dds/topic/Topic.hpp>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
#include <ddsgen_export.h>
|
||||
|
||||
@@ -25,10 +19,13 @@ namespace DDS
|
||||
template<typename T>
|
||||
struct topic_type_name {
|
||||
static std::string value() {
|
||||
#if BUILD_RTI
|
||||
return dds::topic::topic_type_name<T>::value();
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
};
|
||||
#if BUILD_RTI
|
||||
template<>
|
||||
struct topic_type_name<dds::core::xtypes::DynamicData> {
|
||||
static std::string value() {
|
||||
|
||||
@@ -38,6 +38,7 @@ class DDSGEN_EXPORT WaitSetHandler final
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void waitSetTask();
|
||||
|
||||
struct WaitSetData final
|
||||
{
|
||||
@@ -49,12 +50,6 @@ class DDSGEN_EXPORT WaitSetHandler final
|
||||
WaitSetData(const dds::core::cond::Condition& cond, CallbackInterface* cb) : condition(cond), callback(cb) {}
|
||||
};
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
void waitSetTask();
|
||||
|
||||
private:
|
||||
NGL::INGLLogger& m_logger;
|
||||
dds::core::cond::WaitSet m_waitSet;
|
||||
dds::core::cond::GuardCondition m_abortCondition;
|
||||
std::future<void> m_task;
|
||||
|
||||
+5
-1
@@ -12,10 +12,14 @@ NGL_ADD_LIBRARY(WS PdmDataPlugin MODULE pdm_data_plugin.cpp pdm_data_plugin.h)
|
||||
NGL_TARGET_LINK_LIBRARIES(PdmDataPlugin
|
||||
Qt6::Core
|
||||
PdmDataPluginInterface
|
||||
svcPdmClient
|
||||
NGLLogger
|
||||
LtsSessionDataDds
|
||||
ngltranslator
|
||||
LtsUtilsGuiDds # dds-vec => QByteArray
|
||||
)
|
||||
IF(BUILD_RTI)
|
||||
NGL_TARGET_LINK_LIBRARIES(PdmDataPlugin
|
||||
svcPdmClient
|
||||
)
|
||||
ENDIF(BUILD_RTI)
|
||||
NGL_INSTALL_TARGET(PdmDataPlugin)
|
||||
+13
-6
@@ -16,13 +16,9 @@ SET(pdm_combobox_gui_SRCS
|
||||
NGL_WRAP_UI(pdm_combobox_gui_SRCS pdm_charge_selector.ui)
|
||||
NGL_ADD_LIBRARY(WS PdmComboBoxGui STATIC ${pdm_combobox_gui_SRCS})
|
||||
|
||||
# Get include directories from svcPdmCommon (contains export header location)
|
||||
GET_TARGET_PROPERTY(SVCPDMCOMMON_INCLUDE_DIRS svcPdmCommon INTERFACE_INCLUDE_DIRECTORIES)
|
||||
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(PdmComboBoxGui
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/../../..
|
||||
${SVCPDMCOMMON_INCLUDE_DIRS}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(PdmComboBoxGui
|
||||
PRIVATE
|
||||
@@ -31,9 +27,20 @@ NGL_TARGET_LINK_LIBRARIES(PdmComboBoxGui
|
||||
PUBLIC
|
||||
PdmGuiPluginInterface
|
||||
Qt6::Core
|
||||
svcPdmClient
|
||||
svcPdmCommon
|
||||
)
|
||||
IF(BUILD_RTI AND TARGET svcPdmCommon)
|
||||
# Get include directories from svcPdmCommon (contains export header location)
|
||||
GET_TARGET_PROPERTY(SVCPDMCOMMON_INCLUDE_DIRS svcPdmCommon INTERFACE_INCLUDE_DIRECTORIES)
|
||||
NGL_TARGET_INCLUDE_DIRECTORIES(PdmComboBoxGui
|
||||
PUBLIC
|
||||
${SVCPDMCOMMON_INCLUDE_DIRS}
|
||||
)
|
||||
NGL_TARGET_LINK_LIBRARIES(PdmComboBoxGui
|
||||
PUBLIC
|
||||
svcPdmClient
|
||||
svcPdmCommon
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
SET(pdm_combobox_gui_plugin_SRCS
|
||||
pdm_combobox_gui_plugin.cpp
|
||||
|
||||
+39
-18
@@ -372,8 +372,11 @@ enum class UAVState
|
||||
|
||||
struct Header
|
||||
{
|
||||
int equipmentNumber = 0;
|
||||
qint64 timeStamp = 0;
|
||||
int m_equipmentNumber = 0;
|
||||
qint64 m_timeStamp = 0;
|
||||
|
||||
int equipmentNumber() const { return m_equipmentNumber; }
|
||||
qint64 timeStamp() const { return m_timeStamp; }
|
||||
|
||||
static Header fromJson(const QJsonObject &obj);
|
||||
QJsonObject toJson() const;
|
||||
@@ -488,15 +491,25 @@ struct WlsParticipantState
|
||||
|
||||
struct BatteryState
|
||||
{
|
||||
int batteryPort;
|
||||
int batteryPercent;
|
||||
int voltage;
|
||||
int temperature;
|
||||
int frequency;
|
||||
int generic;
|
||||
int current;
|
||||
bool switchOrValue;
|
||||
QString serialNumber;
|
||||
int m_batteryPort;
|
||||
int m_batteryPercent;
|
||||
int m_voltage;
|
||||
int m_temperature;
|
||||
int m_frequency;
|
||||
int m_generic;
|
||||
int m_current;
|
||||
bool m_switchOrValue;
|
||||
QString m_serialNumber;
|
||||
|
||||
int batteryPort() const { return m_batteryPort; }
|
||||
int batteryPercent() const { return m_batteryPercent; }
|
||||
int voltage() const { return m_voltage; }
|
||||
int temperature() const { return m_temperature; }
|
||||
int frequency() const { return m_frequency; }
|
||||
int generic() const { return m_generic; }
|
||||
int current() const { return m_current; }
|
||||
bool switchOrValue() const { return m_switchOrValue; }
|
||||
QString serialNumber() const { return m_serialNumber; }
|
||||
|
||||
static BatteryState fromJson(const QJsonObject &obj);
|
||||
QJsonObject toJson() const;
|
||||
@@ -2279,13 +2292,21 @@ template <> struct Constraints<BatteryInfo>
|
||||
|
||||
struct BatteryAlarm : TrainingAreaTelegramTmpl<BatteryAlarm>
|
||||
{
|
||||
Header header;
|
||||
int id;
|
||||
QString description;
|
||||
bool acknowledge;
|
||||
bool condition;
|
||||
int uniqueAlarmNumber;
|
||||
qint64 alarmTime;
|
||||
Header m_header;
|
||||
int m_id;
|
||||
QString m_description;
|
||||
bool m_acknowledge;
|
||||
bool m_condition;
|
||||
int m_uniqueAlarmNumber;
|
||||
qint64 m_alarmTime;
|
||||
|
||||
Header header() const { return m_header; }
|
||||
TelegramId id() const { return static_cast<TelegramId>(m_id); }
|
||||
QString description() const { return m_description; }
|
||||
bool acknowledge() const { return m_acknowledge; }
|
||||
bool condition() const { return m_condition; }
|
||||
int uniqueAlarmNumber() const { return m_uniqueAlarmNumber; }
|
||||
qint64 alarmTime() const { return m_alarmTime; }
|
||||
|
||||
static BatteryAlarm fromJson(const QJsonObject &obj);
|
||||
QJsonObject toJson() const override;
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include <QString>
|
||||
#include "almcommon_export.h"
|
||||
|
||||
namespace AlarmManagement
|
||||
{
|
||||
|
||||
// STUB: AlarmConfig - wird durch echten DDS-Typ ersetzt
|
||||
class ALMCOMMON_EXPORT AlarmConfig
|
||||
{
|
||||
public:
|
||||
AlarmConfig() = default;
|
||||
|
||||
int eventTypeId() const { return m_eventTypeId; }
|
||||
void setEventTypeId(int id) { m_eventTypeId = id; }
|
||||
|
||||
bool messageWindow() const { return m_messageWindow; }
|
||||
void setMessageWindow(bool value) { m_messageWindow = value; }
|
||||
|
||||
bool setMarker() const { return m_setMarker; }
|
||||
void setSetMarker(bool value) { m_setMarker = value; }
|
||||
|
||||
int participantId() const { return m_participantId; }
|
||||
void setParticipantId(int id) { m_participantId = id; }
|
||||
|
||||
int id() const { return m_id; }
|
||||
void setId(int id) { m_id = id; }
|
||||
|
||||
bool global() const { return m_global; }
|
||||
void setGlobal(bool value) { m_global = value; }
|
||||
|
||||
int vulnerabilityState() const { return m_vulnerabilityState; }
|
||||
void setVulnerabilityState(int value) { m_vulnerabilityState = value; }
|
||||
|
||||
private:
|
||||
int m_eventTypeId = 0;
|
||||
bool m_messageWindow = false;
|
||||
bool m_setMarker = false;
|
||||
int m_participantId = 0;
|
||||
int m_id = 0;
|
||||
bool m_global = false;
|
||||
int m_vulnerabilityState = -1;
|
||||
};
|
||||
|
||||
} // namespace AlarmManagement
|
||||
@@ -0,0 +1,40 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include <QString>
|
||||
#include <ostream>
|
||||
#include "ppm_enums.hpp"
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
|
||||
// STUB: Type - wird durch echten DDS-Typ ersetzt
|
||||
struct Type
|
||||
{
|
||||
int id = 0;
|
||||
QString name;
|
||||
TypeClass typeClass = TypeClass::Unknown;
|
||||
// Weitere Felder werden bei Bedarf ergänzt
|
||||
};
|
||||
|
||||
// STUB: Participant - wird durch echten DDS-Typ ersetzt
|
||||
struct Participant
|
||||
{
|
||||
int id = 0;
|
||||
QString name;
|
||||
QString callsign;
|
||||
Type type;
|
||||
// Weitere Felder werden bei Bedarf ergänzt
|
||||
};
|
||||
|
||||
// Stream-Operator für Logger-Unterstützung
|
||||
inline std::ostream& operator<<(std::ostream& os, const Participant& participant)
|
||||
{
|
||||
os << "Participant(id=" << participant.id << ", name=" << participant.name.toStdString()
|
||||
<< ", callsign=" << participant.callsign.toStdString() << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ParticipantManagement
|
||||
Reference in new issue
Block a user