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,110 @@
|
||||
/**
|
||||
* WebSocket connection to AVS to retrieve AVS events
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-02-06
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QAbstractSocket>
|
||||
#include <QTimer>
|
||||
#include <QVector>
|
||||
#include <QSharedPointer>
|
||||
#include "logger.h"
|
||||
|
||||
#include "dds_handler.h"
|
||||
#include "eem_db.h"
|
||||
#include <ngldb/db_service_handler.h>
|
||||
|
||||
#include <ExerciseEventManagement/eem.hpp>
|
||||
|
||||
#include <ProjectDataManagement/pdm_enums.hpp>
|
||||
#include <AudioVideoManagement/avm_dtc.h>
|
||||
#include <InfrastructureManagement/ism_dtc.h>
|
||||
|
||||
class QWebSocket;
|
||||
namespace ExerciseEventManagement
|
||||
{
|
||||
class MainHandler;
|
||||
class WebSocketEventServer;
|
||||
|
||||
using DbHandler = NGLDB::DbServiceHandler<DatabaseInterface>;
|
||||
struct AvsData
|
||||
{
|
||||
int id;
|
||||
qint64 eventTime;
|
||||
qint64 endTime;
|
||||
ProjectDataManagement::EventType eventType;
|
||||
QString streamName;
|
||||
int mainStructureElementId;
|
||||
QSharedPointer<QTimer> timer; // no plain ptr here since AvsData is copied
|
||||
AvsData()
|
||||
: id(0)
|
||||
, eventTime(0)
|
||||
, endTime(-1)
|
||||
, eventType(ProjectDataManagement::EventType::Unknown)
|
||||
, mainStructureElementId(0)
|
||||
, timer(new QTimer)
|
||||
{
|
||||
timer->setSingleShot(true);
|
||||
timer->setInterval(3000);
|
||||
}
|
||||
};
|
||||
|
||||
class WebSocketAvs : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
WebSocketAvs(MainHandler *mainHandler,
|
||||
const std::shared_ptr<DdsHandler> &ddsHandler,
|
||||
const std::shared_ptr<DbHandler> &db,
|
||||
const std::shared_ptr<WebSocketEventServer> &eventServer,
|
||||
const std::shared_ptr<AudioVideoManagement::Interface::Dtc> &avmDtc,
|
||||
const std::shared_ptr<InfrastructureManagement::Interface::Dtc> &ismDtc,
|
||||
int exerciseId,
|
||||
QObject *parent = nullptr);
|
||||
~WebSocketAvs();
|
||||
|
||||
void setWsUrl(const QString &url);
|
||||
void init();
|
||||
|
||||
private Q_SLOTS:
|
||||
void onTextMessageReceived(const QString &message);
|
||||
void handleAvsData(const AvsData &data, const bool &lastRangeClosed);
|
||||
int publishData(const QString &streamName);
|
||||
void openWebSocket();
|
||||
void closeWebSocket();
|
||||
void onWebSocketError(QAbstractSocket::SocketError error);
|
||||
void onWebSocketConnected();
|
||||
void onWebSocketDisconnected();
|
||||
void onSendExerciseId();
|
||||
|
||||
void onCleanUpDbInternal();
|
||||
QMap<QString, QVector<AvsData>> getAllAvsData();
|
||||
QMap<QString, QVector<AvsData>> getAllInternalDbData();
|
||||
|
||||
private:
|
||||
AvsData jsonObjectToAvsData(const QJsonObject &obj);
|
||||
Database::EemEvent avsDataToEemEvent(const AvsData &data);
|
||||
ExerciseEventManagement::Event avsDataToEvent(const AvsData &data);
|
||||
|
||||
private:
|
||||
std::shared_ptr<DdsHandler> m_ddsHandler; ///< Pointer to DDS handler
|
||||
std::shared_ptr<DbHandler> m_dbHandler;
|
||||
std::shared_ptr<WebSocketEventServer> m_eventServer;
|
||||
std::shared_ptr<AudioVideoManagement::Interface::Dtc> m_avmDtc;
|
||||
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_ismDtc;
|
||||
MainHandler *m_mainHandler;
|
||||
QWebSocket *m_wsSocket;
|
||||
QTimer *m_wsReconnectTimer;
|
||||
QTimer *m_cleanupTimer;
|
||||
QString m_wsUrl;
|
||||
QMap<QString, AvsData> m_avsDataMap;
|
||||
int m_exerciseId;
|
||||
qint64 m_lastUpdate;
|
||||
bool m_bWebSocketDisconnectedWarnedOnce;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
} // namespace ExerciseEventManagement
|
||||
Reference in new issue
Block a user