Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
18662 files changed
+4115092
-5435
No files matched your search
@@ -0,0 +1,118 @@
|
||||
/**
|
||||
* MainHandler for TetraRadio
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-04-14
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <memory>
|
||||
#include "exm_handler.h"
|
||||
#include "ism_handler.h"
|
||||
#include "pdm_handler.h"
|
||||
#include "ppm_handler.h"
|
||||
#include "tab_db.h"
|
||||
#include "dds_handler.h"
|
||||
#include "position_handler.h"
|
||||
#include "send_to_dds.h"
|
||||
#include "recv_from_dds_aes.h"
|
||||
#include "recv_from_dds_fts.h"
|
||||
#include "send_to_tab.h"
|
||||
#include "tx_mixin.h"
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include "tab_plugin_interface.h"
|
||||
#include "WebSocketInterface/websocket_interface_handler.h"
|
||||
#include <ngldb/db_service_handler.h>
|
||||
|
||||
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
namespace NGLDB
|
||||
{
|
||||
template <typename DB> class DbServiceHandler;
|
||||
}
|
||||
|
||||
namespace LtsPluginManager
|
||||
{
|
||||
struct PluginInstance;
|
||||
}
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
using DbHandler = NGLDB::DbServiceHandler<DatabaseInterface>;
|
||||
class MainHandler final : public QObject, public Plugin::DataProvider
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit MainHandler(QObject *parent = nullptr);
|
||||
~MainHandler();
|
||||
|
||||
bool init(int domainId, int exerciseId);
|
||||
|
||||
std::shared_ptr<DdsHandler> ddsHandler() const { return m_ddsHandler; }
|
||||
std::shared_ptr<DbHandler> dbHandler() const { return m_dbHandler; }
|
||||
std::shared_ptr<DatabaseInterface> db() const { return m_dbHandler->db(); }
|
||||
|
||||
std::shared_ptr<RecvFromTab> rxHandler() const { return m_rxHandler; }
|
||||
std::shared_ptr<RecvFromDdsFts> ftsHandler() const { return m_ftsHandler; }
|
||||
std::shared_ptr<SendToTab> txHandler() const { return m_txHandler; }
|
||||
std::shared_ptr<RecvFromDdsAes> aesHandler() const { return m_aesHandler; }
|
||||
std::shared_ptr<ExmHandler> exmHandler() const { return m_exmHandler; }
|
||||
std::shared_ptr<IsmHandler> ismHandler() const { return m_ismHandler; }
|
||||
std::shared_ptr<PdmHandler> pdmHandler() const { return m_pdmHandler; }
|
||||
std::shared_ptr<PpmHandler> ppmHandler() const { return m_ppmHandler; }
|
||||
std::shared_ptr<PositionHandler> posHandler() const { return m_posHandler; }
|
||||
|
||||
// Plugin::DataProvider
|
||||
int exerciseId() const override { return m_ddsHandler->ddsConnector()->getPartitionId(); }
|
||||
bool useTetraScrambling() const override;
|
||||
ProjectDataManagement::RadioGroup exerciseRadioGroup() const override;
|
||||
TetraIcd::ExerciseEnvironmentData exerciseEnvironmentData() const override;
|
||||
TetraIcd::ExerciseStateData exerciseStateData() const override;
|
||||
TetraIcd::ExerciseEquipmentAssignmentComplete exerciseEquipmentAssignment() const override;
|
||||
QVector<TetraIcd::TrainingAreaTelegram*> aesTelegrams() const override;
|
||||
QSqlDatabase databaseConnection() const override;
|
||||
QString databaseSchemaName() const override;
|
||||
int domainId() const override;
|
||||
|
||||
const std::vector<std::shared_ptr<Plugin::Interface>> &getPluginList() const { return m_interfaces; }
|
||||
|
||||
private Q_SLOTS:
|
||||
void onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification modType);
|
||||
void onExercise2RadioGroupChanged();
|
||||
void onConnectionState(const QString &name, bool connectionState);
|
||||
void onDirectMessage(const QByteArray &jsonMessage);
|
||||
void onPositionChanged(int equipNo, const ParticipantManagement::ParticipantPosition &pos);
|
||||
|
||||
private:
|
||||
bool loadPlugin(const LtsPluginManager::PluginInstance &pi);
|
||||
QString getErrorString(const ParticipantManagement::BiteError &error) const;
|
||||
QString getCanDeviceName(int id) const;
|
||||
QString getSubDeviceName(int id) const;
|
||||
private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler;
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<RecvFromTab> m_rxHandler;
|
||||
std::shared_ptr<RecvFromDdsFts> m_ftsHandler;
|
||||
std::shared_ptr<TxMixin> m_txHandler;
|
||||
std::shared_ptr<RecvFromDdsAes> m_aesHandler;
|
||||
std::shared_ptr<IsmHandler> m_ismHandler;
|
||||
std::shared_ptr<ExmHandler> m_exmHandler;
|
||||
std::shared_ptr<PdmHandler> m_pdmHandler;
|
||||
std::shared_ptr<PpmHandler> m_ppmHandler;
|
||||
std::shared_ptr<PositionHandler> m_posHandler;
|
||||
std::vector<std::shared_ptr<Plugin::Interface>> m_interfaces;
|
||||
std::shared_ptr<WebSocketInterface::WebSocketInterfaceHandler> m_handlerWebSocket;
|
||||
|
||||
|
||||
ExerciseManagement::Exercise m_exerciseData;
|
||||
QMap<int, ProjectDataManagement::CanComponentString> m_ccsMap;
|
||||
QMap<int, ProjectDataManagement::BiteComponentText> m_bctMap;
|
||||
QMap<QString, bool> m_ifcConnectionState;
|
||||
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace TrainingAreaBase
|
||||
Reference in new issue
Block a user