- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
121 lines
3.4 KiB
C++
Executable File
121 lines
3.4 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <PluginInterfaces/data_plugin_interface.h>
|
|
#include <Plugins/Timeline/tln_data_plugin_interface.h>
|
|
#include <ExerciseEventManagement/eem.hpp>
|
|
|
|
#include <QHash>
|
|
#include <QMap>
|
|
#include <QVector>
|
|
|
|
class QTimer;
|
|
class QWebSocket;
|
|
namespace TimeLineManagement
|
|
{
|
|
class DataPlugin final : public QObject, public DataPluginBase::Plugin
|
|
{
|
|
Q_PLUGIN_METADATA(IID "data:3:tln")
|
|
Q_INTERFACES(DataPluginBase::Plugin)
|
|
|
|
Q_OBJECT
|
|
public:
|
|
DataPlugin() = default;
|
|
~DataPlugin() = default;
|
|
|
|
QString pluginName() const override { return QStringLiteral("Timeline"); }
|
|
std::shared_ptr<DataPluginBase::Interface> createDataInterface(LtsSession::LtsSessionDataDds *session) override;
|
|
bool availableInPartition(IDL::PartitionType partition) const override
|
|
{
|
|
return partition == IDL::PartitionType::Exercise || partition == IDL::PartitionType::Replay;
|
|
}
|
|
};
|
|
|
|
|
|
class DataInterfaceImpl final : public QObject, public DataInterface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit DataInterfaceImpl(LtsSession::LtsSessionDataDds *session);
|
|
|
|
std::shared_ptr<TimeLineManagement::ForeignDataInterface> getForeignDataInterface() override { return m_foreign; }
|
|
|
|
private:
|
|
std::shared_ptr<TimeLineManagement::ForeignDataInterface> m_foreign;
|
|
};
|
|
|
|
|
|
class TimelineDataProvider final : public QObject, public TimelineDataProviderInterface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
TimelineDataProvider(int requestId, const QUrl &url,
|
|
qint64 from, qint64 to,
|
|
const QVector<int> &eventTypeIds = QVector<int>(),
|
|
const QJsonObject &filter = QJsonObject());
|
|
~TimelineDataProvider();
|
|
|
|
const QVector<ExerciseEventManagement::Event> &eventData() const override { return m_eventData; }
|
|
int requestId() const override { return m_requestId; }
|
|
void getRequestTime(qint64 &requestMin , qint64 &requestMax ) const override { requestMin = m_requestMin; requestMax = m_requestMax; }
|
|
|
|
signals:
|
|
void finished();
|
|
|
|
private:
|
|
void disconnectedFromEem();
|
|
void textMessageFromEem(const QString &message);
|
|
|
|
private:
|
|
QVector<ExerciseEventManagement::Event> m_eventData;
|
|
QWebSocket *m_webSocketEem;
|
|
int m_requestId;
|
|
bool m_bFinshed;
|
|
qint64 m_requestMin;
|
|
qint64 m_requestMax;
|
|
};
|
|
|
|
class ForeignInterfaceImpl final : public ForeignDataInterface
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit ForeignInterfaceImpl(LtsSession::LtsSessionDataDds *session);
|
|
~ForeignInterfaceImpl();
|
|
|
|
TimelineDataProviderInterface *requestData(qint64 from,
|
|
qint64 to,
|
|
const QVector<int> &eventTypeIds = QVector<int>(),
|
|
const QJsonObject &filter = QJsonObject()) override;
|
|
QVector<ExerciseEventManagement::Event> liveHistory() const override;
|
|
const QUrl eemUrl() const override;
|
|
|
|
private:
|
|
void connectToScm();
|
|
void connectedToScm();
|
|
void textMessageFromScm(const QString &message);
|
|
void connectToEem();
|
|
void connectedToEem();
|
|
void disconnectedFromEem();
|
|
void textMessageFromEem(const QString &message);
|
|
|
|
void requestFinished();
|
|
void cleanupSocket(QWebSocket *s);
|
|
|
|
void onClearHistoryBuffer();
|
|
|
|
private:
|
|
QMap<qint64, QVector<ExerciseEventManagement::Event>> m_liveHistoryBuffer;
|
|
QHash<int, TimelineDataProvider *> m_pendingRequests;
|
|
|
|
LtsSession::LtsSessionDataDds *m_session;
|
|
QWebSocket *m_webSocketScm;
|
|
QWebSocket *m_webSocketEem;
|
|
QTimer *m_liveHistoryBufferTimer;
|
|
quint16 m_eemPort;
|
|
};
|
|
|
|
}
|