Removes migration stub headers superseded by codegen outputs
Drops 184 stub headers and obsolete stub tests now generated in the build tree.
This commit is contained in:
184 files changed
-8951
No files matched your search
@@ -1,22 +0,0 @@
|
||||
/**
|
||||
* Export definitions
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Hanna E. Rathje, SLSE, 2015-08-04
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
#ifndef SAATELEGRAMS_EXPORT
|
||||
# ifdef BUILD_STATIC_LIBRARIES
|
||||
# define SAATELEGRAMS_EXPORT
|
||||
# else
|
||||
# if defined(MAKE_SAATELEGRAMS_LIB)
|
||||
# define SAATELEGRAMS_EXPORT Q_DECL_EXPORT
|
||||
# else
|
||||
# define SAATELEGRAMS_EXPORT Q_DECL_IMPORT
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
@@ -1,104 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* AesHandler for AdlerJson Plugin
|
||||
* $Id: aes_handler.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/aes_handler.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Core/core_types.h"
|
||||
#include "logger.h"
|
||||
#include "main_dispatcher.h"
|
||||
#include "telegrams.h"
|
||||
#include <QtCore/QDateTime>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QUrl>
|
||||
#include <AreaEffectSimulation/aes_dtc.h>
|
||||
#include <AreaEffectSimulation/aes_ftc.h>
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
#include <LtsUtils/LtsUtilsGui/LtsUtilsGuiDds/request_helper.h>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
|
||||
class MainDispatcher;
|
||||
class AesHandler
|
||||
: public QObject
|
||||
, protected AreaEffectSimulation::Interface::Ftc::AirSupportImpactModifyReplyHandler
|
||||
, protected AreaEffectSimulation::Interface::Ftc::OffRouteMineModifyReplyHandler
|
||||
, protected AreaEffectSimulation::Interface::Ftc::EffectClusterModifyReplyHandler
|
||||
, protected AreaEffectSimulation::Interface::Ftc::TrajectoryAdlerModifyReplyHandler
|
||||
, protected NotificationManagement::Interface::Ftc::CreateNotificationReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AesHandler(std::shared_ptr<TrainingAreaBase::Interface::Fts> ftsTab, QObject *parent = nullptr);
|
||||
|
||||
bool init(MainDispatcher *mainDispatcher);
|
||||
bool sendAesModifyRequest(const QJsonObject &obj);
|
||||
bool sendExplosionArea(const QJsonObject &data);
|
||||
// DDS Overrides
|
||||
void onAirSupportImpactModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onOffRouteMineModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onEffectClusterModifyReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override;
|
||||
|
||||
// Internal
|
||||
void onExplosionSingleChanged(const AreaEffectSimulation::ExplosionSingle &data, DataModification modType);
|
||||
void onEffectClusterChanged(const AreaEffectSimulation::EffectCluster &data, DataModification modType);
|
||||
|
||||
void handleCreateSingleExplosion(const TrainingAreaBase::TetraIcd::CreateSingleExplosion &data);
|
||||
void handleEXFire(const Feuerkampfdaten &data, int wsId);
|
||||
void handleEXDontFire(const Feuerkampfdaten &data, int wsId);
|
||||
// Reald Data
|
||||
void sendTrajectoryAdlerModifyRequest(const WirkfeldplanungData &data, int participantId, int wirkmittelIndex, int aesId);
|
||||
void handleEffectCluster(const WirkfeldplanungData &data, int wsId);
|
||||
|
||||
//
|
||||
void removeAllPendingEffectCluster(int partyId);
|
||||
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> getDtc() { return m_dtcAes; };
|
||||
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> getFtc() { return m_ftcAes; };
|
||||
|
||||
private:
|
||||
AreaEffectSimulation::Area createMinimumRect(int zone, const QVector<QPointF> &points);
|
||||
|
||||
signals:
|
||||
void explosionSingleChanged(const QJsonObject &jsonObj);
|
||||
|
||||
private:
|
||||
QList<qint32> findAllPendingEffectCluster(int partyId);
|
||||
void handleAmmoCount(const Feuerkampfdaten &data, int saaPartyId, bool sendExVollzug = false);
|
||||
|
||||
private:
|
||||
MainDispatcher *m_mainDispatcher;
|
||||
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> m_ftcAes;
|
||||
std::shared_ptr<AreaEffectSimulation::Interface::Dtc> m_dtcAes;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtcPpm;
|
||||
std::shared_ptr<TrainingAreaBase::DdsHandler> m_ddsHandler;
|
||||
|
||||
void onTrajectoryAdlerModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
|
||||
LtsUtils::RequestHelper *m_requestHelper;
|
||||
|
||||
QHash<int, AreaEffectSimulation::AesEffectState> m_singleExplosions;
|
||||
|
||||
WirkfeldplanungData m_wirkfeldPlanungsData;
|
||||
QHash<int, QString> m_aesIdToFeuerkampfReferenz; // key = aesId, value = feuerkampfReferenz
|
||||
|
||||
QHash<QString, int> m_feuerkampReferenzAmmoCounter; // key = feuerkampfReferenz, value = AmmoCounter
|
||||
QHash<QString, std::vector<ProjectDataManagement::L27_EffectorId>> m_feuerkampfReferenzWirkmittel; // key = feuerkampfReferenz, value = Kenner
|
||||
QHash<QString, bool> m_feuerkampfReferenzUsedFeuerHalt; // key = feuerkampfReferenz, value = boolean -> if Feuerhalt was activ
|
||||
|
||||
int m_participantId;
|
||||
int m_wirkmittelIndex;
|
||||
int m_aesId;
|
||||
QHash<int, int> aesIdWsId; // key = aesId value = wsId
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,50 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* $Id: $
|
||||
* $HeadURL: $
|
||||
* $Author: $
|
||||
* Created by Steve K., ESZS 12-01-2026
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "logger.h"
|
||||
#include <AssetManagement/asm_dtc.h>
|
||||
#include <AssetManagement/asm_ftc.h>
|
||||
#include "main_dispatcher.h"
|
||||
#include <QtCore/QObject>
|
||||
|
||||
namespace AssetManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
}
|
||||
}
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
|
||||
class MainDispatcher;
|
||||
class AsmHandler : public QObject
|
||||
, protected AssetManagement::Interface::Ftc::AssetModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AsmHandler(QObject *parent = nullptr);
|
||||
bool init(MainDispatcher* mainDispatcher);
|
||||
|
||||
std::shared_ptr<AssetManagement::Interface::Dtc> getDtc() { return m_dtcAsm; }
|
||||
std::shared_ptr<AssetManagement::Interface::Ftc> getFtc() { return m_ftcAsm; }
|
||||
void modifyAssetAdlerProperties(int assetId, bool isSaaConnected = false);
|
||||
private:
|
||||
void onAssetModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
|
||||
private:
|
||||
std::shared_ptr<AssetManagement::Interface::Dtc> m_dtcAsm;
|
||||
std::shared_ptr<AssetManagement::Interface::Ftc> m_ftcAsm;
|
||||
int m_exerciseId;
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,67 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* FlmHandler for UFomHlaJson Plugin
|
||||
* $Id: pdm_handler.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/UFomHlaJson/pdm_handler.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "logger.h"
|
||||
#include <QtCore/QObject>
|
||||
#include <Lts/Services/FileManagement/flm_ftc.h>
|
||||
#include <NotificationManagement/nom_ftc.h>
|
||||
#include <NotificationManagement/nom_ftc_types.h>
|
||||
#include <OperatorManagement/opm_data_plugin_interface.h>
|
||||
#include <TrainingAreaBase/dds_handler.h>
|
||||
|
||||
namespace FileManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
}
|
||||
} // namespace FileManagement
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
|
||||
class MainDispatcher;
|
||||
class FlmHandler
|
||||
: public QObject
|
||||
, protected FileManagement::Interface::Ftc::FileContentModifyReplyHandler
|
||||
, protected FileManagement::Interface::Ftc::PathCreateReplyHandler
|
||||
, protected NotificationManagement::Interface::Ftc::CreateNotificationReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit FlmHandler(QObject *parent = nullptr);
|
||||
|
||||
bool processHQMessage(int partyId, const QString &name, int meldungsnummer, const QJsonObject &obj);
|
||||
void createHQNotification(const int partyId, const int folderId, const int fileId);
|
||||
signals:
|
||||
public slots:
|
||||
bool init(MainDispatcher *mainDispatcher);
|
||||
void initHQFolders(int partyId);
|
||||
|
||||
private:
|
||||
void onFileContentModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onPathCreateReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
bool parseContent(const QString &contentString, QMap<QString, QString> &retMap);
|
||||
|
||||
private:
|
||||
MainDispatcher *m_mainDispatcher = nullptr;
|
||||
int m_exerciseId;
|
||||
int m_parentFolderId;
|
||||
int m_partyId;
|
||||
int m_folderHXMessagesId;
|
||||
std::shared_ptr<FileManagement::Interface::Dtc> m_dtcFlm;
|
||||
std::shared_ptr<FileManagement::Interface::Ftc> m_ftcFlm;
|
||||
std::shared_ptr<NotificationManagement::Interface::Ftc> m_ftcNom;
|
||||
std::shared_ptr<OperatorManagement::Interface::Dtc> m_opmDtc;
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,54 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "telegrams.h"
|
||||
|
||||
class GenerateTelegrams
|
||||
{
|
||||
public:
|
||||
GenerateTelegrams();
|
||||
|
||||
static void SAATELEGRAMS_EXPORT addHeaderData(AdlerJson::EXTelegramBase &tele, const int saaId, const QString referenceUuid = QString{});
|
||||
static void SAATELEGRAMS_EXPORT generateConnectResponseMessage(AdlerJson::ExAnmeldebestaetigung &exAnmeldebestaetigung);
|
||||
static void SAATELEGRAMS_EXPORT generateConnectMessage(AdlerJson::EXRegistration &exRegistration, int partyId, bool isVerbund = true);
|
||||
static void SAATELEGRAMS_EXPORT generateDisconnectMessage(AdlerJson::EXDeregistration &eXDeregistration, int partyId);
|
||||
static void SAATELEGRAMS_EXPORT generateStatusMessage(AdlerJson::EXStatus &exStatus, AdlerJson::Szenarstatus status);
|
||||
static void SAATELEGRAMS_EXPORT generateConnectionTestMessage();
|
||||
static void SAATELEGRAMS_EXPORT generateAbmeldung(AdlerJson::EXDeregistration &req);
|
||||
static void SAATELEGRAMS_EXPORT generateZeit1(AdlerJson::Zeitangabe_DTG &zeit);
|
||||
static void SAATELEGRAMS_EXPORT generateZeit2(AdlerJson::Zeitangabe_DTG &zeit);
|
||||
|
||||
// fire
|
||||
static void SAATELEGRAMS_EXPORT generateZieldaten(AdlerJson::Zieldaten &wzd);
|
||||
static void SAATELEGRAMS_EXPORT generateWirkmittelFeuerkommando_Gmlrs(QVector<AdlerJson::WirkmittelFeuerkommandoRakete> &wfr);
|
||||
static void SAATELEGRAMS_EXPORT generateEXFQBABBFK(AdlerJson::ExAwesPlanning &req);
|
||||
static void SAATELEGRAMS_EXPORT generateEXFQBABBFK_Gmlrs(AdlerJson::ExAwesPlanning &req);
|
||||
static void SAATELEGRAMS_EXPORT generateEXFQBABBFK_Dm72(AdlerJson::ExAwesPlanning &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFeuerbereit(AdlerJson::ExFeuerbereit &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFeuern(AdlerJson::ExFeuern &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFeuern_Gmlrs(AdlerJson::ExFeuern &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFeuern_Dm72(AdlerJson::ExFeuern &req);
|
||||
static void SAATELEGRAMS_EXPORT generateNichtFeuern(AdlerJson::exNichtFeuern &req);
|
||||
|
||||
static void SAATELEGRAMS_EXPORT generateAbgefeuert(AdlerJson::ExAbgefeuert &req);
|
||||
static void SAATELEGRAMS_EXPORT generateVollzugsmeldung(AdlerJson::ExVollzugsmeldung &req);
|
||||
// static void SAATELEGRAMS_EXPORT generateErkundungsanfrage(AdlerJson::ExErkundungsanfrage &req);
|
||||
static void SAATELEGRAMS_EXPORT generateErkundungsergebnisse(AdlerJson::ExErkundungsergebnisse &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFeuerkampf(AdlerJson::ExFeuerkampf &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFeuerhalt(AdlerJson::ExFeuerhalt &req);
|
||||
static void SAATELEGRAMS_EXPORT generateStellungsmeldungFS(AdlerJson::ExFeuerstellungFS &req);
|
||||
static void SAATELEGRAMS_EXPORT generateStellungsmeldungWS(AdlerJson::ExFeuerstellungWS &req);
|
||||
static void SAATELEGRAMS_EXPORT generateStellungsmeldungWS_Gmlrs(AdlerJson::ExFeuerstellungWS &req);
|
||||
static void SAATELEGRAMS_EXPORT generateStellungsmeldungWS_Dm72(AdlerJson::ExFeuerstellungWS &req);
|
||||
static void SAATELEGRAMS_EXPORT generateStellungsmeldungLP(AdlerJson::ExFeuerstellungLP &req);
|
||||
static void SAATELEGRAMS_EXPORT generateStellungswechsel(AdlerJson::ExStellungswechsel &req);
|
||||
static void SAATELEGRAMS_EXPORT generateKoordinierungsmassnahmen(AdlerJson::ExHqKoordinierungsmassnahmen &req);
|
||||
static void SAATELEGRAMS_EXPORT generateKoordinierungsmassnahmen_EX_L25(AdlerJson::ExHqKoordinierungsmassnahmen &req,
|
||||
ProjectDataManagement::L25_KindGuidingLine kind, int i);
|
||||
static void SAATELEGRAMS_EXPORT generateFuehrungslinien(AdlerJson::ExHqFuehrungslinien &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFuehrungslinien_EX_L24(AdlerJson::ExHqFuehrungslinien &req, AdlerJson::Art_L24 art24, int meldungsnummer);
|
||||
static void SAATELEGRAMS_EXPORT generateTechnischeQuittung(AdlerJson::ExTqTechnischeQuittung &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFreitextmeldung(AdlerJson::ExAqFreitextmeldung &req);
|
||||
static void SAATELEGRAMS_EXPORT generateManuelleQuittung(AdlerJson::ExMqManuelleQuittung &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFlugbahnberechnung(AdlerJson::ExFlugbahnberechnung &req);
|
||||
static void SAATELEGRAMS_EXPORT generateFlugbahndaten(AdlerJson::ExFlugbahndaten &req);
|
||||
};
|
||||
@@ -1,15 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
class InterfaceController
|
||||
{
|
||||
public:
|
||||
InterfaceController();
|
||||
|
||||
public Q_SLOTS:
|
||||
void onRegistration();
|
||||
void onDeregistration();
|
||||
|
||||
void onNewConnection();
|
||||
void onWebSocketDisconnected();
|
||||
void onTextMessageReceived(const QByteArray &baJson);
|
||||
};
|
||||
@@ -1,158 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HlaDispatcher for AdlerJson Plugin
|
||||
* $Id: hla_dispatcher.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/hla_dispatcher.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtWebSockets/QWebSocket>
|
||||
#include <Core/core_types.h> // tr_lts
|
||||
#include <TrainingAreaBase/tab_plugin_interface.h>
|
||||
// #include "logger.h"
|
||||
#include "aes_handler.h"
|
||||
#include "asm_handler.h"
|
||||
#include "flm_handler.h"
|
||||
#include "pdm_handler.h"
|
||||
#include "ppm_handler.h"
|
||||
#include "saa_interface.h"
|
||||
#include "telegrams.h"
|
||||
#include "ws_interface.h"
|
||||
|
||||
// #include <NotificationManagement/nom_ftc.h>
|
||||
#include <NotificationManagement/nom_enums.hpp>
|
||||
// #include <TrainingAreaBase/tab_dts.h>
|
||||
// #include <TrainingAreaBase/tab_fts.h>
|
||||
|
||||
class QTimer;
|
||||
namespace AdlerJson
|
||||
{
|
||||
using namespace TrainingAreaBase;
|
||||
class JsonHandlerRx;
|
||||
class JsonHandlerTx;
|
||||
class DdsHandler;
|
||||
// class EXStatus;
|
||||
|
||||
struct TrajectoryIdentifier
|
||||
{
|
||||
int aesItemId;
|
||||
int explosionId;
|
||||
};
|
||||
|
||||
class JsonDispatcher final
|
||||
: public TrainingAreaBase::Plugin::Interface
|
||||
, protected TrainingAreaBase::Interface::Fts::AdlerCalculateTrajectoryRequestHandler
|
||||
, protected NotificationManagement::Interface::Ftc::CreateNotificationReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
JsonDispatcher(TrainingAreaBase::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
|
||||
const std::shared_ptr<TrainingAreaBase::TxMixin> &sendToTabCb,
|
||||
NGL::Settings *settings,
|
||||
std::shared_ptr<TrainingAreaBase::DdsHandler> &ddsHandler,
|
||||
std::shared_ptr<FlmHandler> &flmHandler,
|
||||
MainDispatcher *mainDispatcher);
|
||||
|
||||
public Q_SLOTS:
|
||||
bool init() override;
|
||||
|
||||
public:
|
||||
std::shared_ptr<TrainingAreaBase::SendToTab> sendToTab() override;
|
||||
bool isDebugInterface() const override { return false; }
|
||||
bool canSendData() const override;
|
||||
void exerciseChanged() override { return; }
|
||||
const char *name() const override { return tr_lts("dds", "APHLA"); }
|
||||
std::shared_ptr<SAAInterface> getSAAByParty(const int partyId);
|
||||
std::shared_ptr<SAAInterface> getSAAByWs(const int wsId);
|
||||
QString getSender() { return QStringLiteral("EXCON@GUEZ.DE"); }
|
||||
// SendToTele
|
||||
bool sendExFeuerbereit(const ExFeuerbereit &exFBDataIn, const int partyId);
|
||||
bool sendExAbgefeuert(const ExAbgefeuert &exAFDataIn, int partyId);
|
||||
bool sendExMqManuelleQuittung(const ExMqManuelleQuittung &exMQDataIn, int partyId);
|
||||
bool sendExTqTechnischeQuittung(const ExTqTechnischeQuittung &exTQDataIn, int partyId);
|
||||
bool sendExVollzugsmeldung(const ExVollzugsmeldung &exVZDataIn, int partyId);
|
||||
void onAdlerCalculateTrajectoryRequest(const rti::core::SampleIdentity &cookie, const TrainingAreaBase::AdlerCalculateTrajectoryRequest &request) override;
|
||||
int getAssetId(const QString &saaName) const;
|
||||
// misc
|
||||
void cleanupSaaInterfaces(const QString &saaName, int wsId, int partyId);
|
||||
void getCreateNotificationRequestData(const int wsId,
|
||||
const QString &title,
|
||||
NotificationManagement::CreateNotification &data,
|
||||
const QString &content = {},
|
||||
const QStringList &contentArgs = {});
|
||||
void createNotificationRequest(const int wsId, const QString &title, const NotificationManagement::MessageType messageType, const NotificationManagement::NotificationType notificationType, const QString &content = {}, const QStringList &contentArgs = {});
|
||||
|
||||
public Q_SLOTS:
|
||||
void onSAARegistration(const int wsId, const int partyId, const QString &saaName, const QString &szenarName, bool isVerbund, const QString &uuid);
|
||||
void onSAADeregistration(const int wsId, const int partyId);
|
||||
void onSAAConnectionTest(const int wsId, const QString &uuid);
|
||||
void onSAAStatus(const int wsId, const EXStatus &status);
|
||||
void onSAAExceptionStatus(const int wsId, const TechnischeDaten &exceptionStatus);
|
||||
void onSAASQWS(const int wsId, const Waffensystemdaten &exSQWS);
|
||||
void onSAASQFS(const int wsId, const Feuerstellungsdaten &exSQFS);
|
||||
void onSAASQLP(const int wsId, const Ladeplatzdaten &exSQLP);
|
||||
void onSAAHXGuidingLines(const int wsId, const Koordinierungsdaten &koordinierungsdaten);
|
||||
void onSAAHXGuidingLinesAndBoundaries(const int wsId, const Fuehrungsdaten &fuehrungsdaten);
|
||||
void onSSAEXFIREHALT(const int wsId, const FeuerHaltDaten &feuerhaltdaten);
|
||||
void onSAATrajectoryData(const int wsId, const Flugbahndaten &exFlugbahndaten, const QString referenceUuid);
|
||||
|
||||
void onWebSocketConnected();
|
||||
void onNewWebsocketConnected(const int wsId, const QString &address, qint16 port);
|
||||
void onWSDisconnected(const int wsId);
|
||||
void onWebsocketExternalConnectionStateChanged(bool bConnected);
|
||||
void onWebSocketError();
|
||||
void onRecivedTelegram(int wsId, const QJsonObject &telegramData);
|
||||
void onTextMessageReceived(const QByteArray &message);
|
||||
void connectWebsocket();
|
||||
void reallyConnectWebsocket() { connectWebsocket(); }
|
||||
|
||||
void onKeepAliveTimerTimeout();
|
||||
void onCreateNotificationReply(const Core::FunctionReplyObject &replyObject);
|
||||
Q_SIGNALS:
|
||||
void broadcastTelegramsRequest(const int equipmentNumber, const int broadcastIndex, const int resetCounter);
|
||||
void jsonTelegramReceived(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tele);
|
||||
void websocketConnected(quint16 port);
|
||||
|
||||
private:
|
||||
QUrl webSocketUrl() const;
|
||||
bool isConnectionTest(QJsonDocument &doc);
|
||||
QString getParticipantInfoLink(const QString &verein, const int partyId, const bool isVerbund);
|
||||
|
||||
std::shared_ptr<SAAInterface> getSAAByName(const QString &saaName);
|
||||
|
||||
private:
|
||||
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_recvFromTabCb;
|
||||
std::shared_ptr<JsonHandlerRx> m_recvFromWebsocket;
|
||||
std::shared_ptr<JsonHandlerTx> m_sendToWebsocket;
|
||||
// DDS
|
||||
MainDispatcher *m_mainDispatcher;
|
||||
std::shared_ptr<FlmHandler> m_flmHandler;
|
||||
std::shared_ptr<PpmHandler> m_ppmHandler;
|
||||
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Fts> m_ftsTab;
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dts> m_dtsTab;
|
||||
std::shared_ptr<NotificationManagement::Interface::Ftc> m_ftcNom;
|
||||
|
||||
QVector<std::shared_ptr<SAAInterface>> m_saaInterfaces;
|
||||
QMap<int, QTimer *> m_connectionKeepaliveTimer;
|
||||
|
||||
QHash<QString, TrajectoryIdentifier> m_trajectoryIdentifier; // key = exFlugbahnberechnung.uuid
|
||||
QHash<QString, Core::GeoPosition> m_positionsLaunch; // key = exFlugbahnberechnung.uuid
|
||||
|
||||
NGL::Settings *m_settings;
|
||||
QWebSocket *m_webSocket;
|
||||
std::shared_ptr<TrainingAreaBase::WebSocketInterface> m_webSocketInterface;
|
||||
QTimer *m_webSocketReconnectTimer;
|
||||
bool m_bWarnedOnce;
|
||||
rti::core::SampleIdentity m_cookieCalculateTrajectoryAdler;
|
||||
int m_explosionIndex;
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,59 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* JsonHandlerRx for AdlerJson Plugin
|
||||
* $Id: hla_handler_rx.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/hla_handler_rx.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <TrainingAreaBase/recv_from_tab.h>
|
||||
#include <TrainingAreaBase/tx_mixin.h>
|
||||
#include <TrainingAreaBase/tab_plugin_interface.h>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <memory>
|
||||
#include "logger.h"
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
class AesHandler;
|
||||
class PpmHandler;
|
||||
class JsonDispatcher;
|
||||
class JsonHandlerRx : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit JsonHandlerRx(const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
|
||||
const std::shared_ptr<TrainingAreaBase::TxMixin> &sendToTabCb,
|
||||
JsonDispatcher *dispatcher,
|
||||
AesHandler *aesHandler,
|
||||
PpmHandler *ppmHandler);
|
||||
|
||||
bool handleTelegram (const QByteArray &baJson );
|
||||
bool handleTelegram (TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tabTele);
|
||||
bool handleTelegram (int wsId, const QJsonObject& telegram, int &errorcode);
|
||||
Q_SIGNALS:
|
||||
void participantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
||||
private:
|
||||
template<typename T>
|
||||
void rxData (const T &data );
|
||||
|
||||
template<typename T>
|
||||
void txData (const T &data );
|
||||
|
||||
bool checkExercise (int equipmentNumber) const;
|
||||
private:
|
||||
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_rxHandler;
|
||||
std::shared_ptr<TrainingAreaBase::TxMixin> m_txHandler;
|
||||
JsonDispatcher *m_dispatcher;
|
||||
bool m_bWarnedOnce;
|
||||
bool m_bWarnedOnceTx;
|
||||
AesHandler *m_aesHandler;
|
||||
PpmHandler *m_ppmHandler;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,107 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* HlaHandlerTx for AdlerJson Plugin
|
||||
* $Id: hla_handler_tx.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/hla_handler_tx.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "ppm_handler.h"
|
||||
#include "pdm_handler.h"
|
||||
#include "logger.h"
|
||||
//#include "ws_handler.h"
|
||||
#include "ws_interface.h"
|
||||
#include <TrainingAreaBase/send_to_tab.h>
|
||||
#include <TrainingAreaBase/recv_from_tab.h>
|
||||
#include <TrainingAreaBase/tab_plugin_interface.h>
|
||||
#include <QtCore/QHash>
|
||||
|
||||
class QWebSocket;
|
||||
class PpmHandler;
|
||||
class PdmHandler;
|
||||
class AesHandler;
|
||||
namespace AdlerJson
|
||||
{
|
||||
class JsonHandlerTx final : public QObject, public TrainingAreaBase::SendToTab
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit JsonHandlerTx(TrainingAreaBase::Plugin::DataProvider *pdp, MainDispatcher *mainDispatcher);
|
||||
|
||||
void onWebSocketConnected (QWebSocket *webSocket);
|
||||
void onWebSocketDisconnected ( );
|
||||
void onWebsocketConnectedToExternalSystem (bool bConnected );
|
||||
void setWSInterface(std::shared_ptr<TrainingAreaBase::WebSocketInterface> wsInterface) {m_wsInterface = wsInterface;};
|
||||
|
||||
const char *name () const override { return "ApAdler"; }
|
||||
void resetSendCounter () override;
|
||||
|
||||
HandleState canHandleTelegram (int equipmentNumber, int telegramId) const override;
|
||||
|
||||
bool txData (const TrainingAreaBase::TetraIcd::Acknowledge &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DemandBite &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::Init &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::SetVulnerabilityModel &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DemandEquipmentConfigurationReport &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DemandVulnerabilityStateChange &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::LanguageSelection &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::EquipmentMessage &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::EquipmentMessageOC &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateSingleExplosion &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateAreaExplosion &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateMineArea &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::MineAreaSingleMineState &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateNContamination &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateCContamination &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DeactivateEffectSimulation &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ModifyAreaEffectSimulationName &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::PauseEffectSimulation &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ResumeEffectSimulation &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::MineTriggered &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DusMineReactivation &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateFunctionalArea &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CreateDusSingleMine &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ExerciseEnvironmentData &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ExerciseStateData &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::OpaquePayloadDataOut &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ParticipantSwVersionsRequest &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CesHitInformation &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::TechnicalArea &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::CesHitRequest &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ParticipantMode &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DemandParticipantMode &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ParticipantConfiguration &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::DemandParticipantConfiguration &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ExerciseEquipmentAssignmentComplete &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::Sanitation &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::SelectiveReammunition &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::SetDevicePowerRequest &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::OcCommand &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::UAVPerformMission &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::UAVChangeState &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ExFireReadiness &data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ExFiredReport&data) override;
|
||||
bool txData (const TrainingAreaBase::TetraIcd::ExConfirmationReport &data) override;
|
||||
|
||||
QHash<int, bool> dataCommunicationPossible() const;
|
||||
public slots:
|
||||
void onParticipantConnectionState (const int equipmentNumber, const bool dataCommunicationPossible);
|
||||
void onGenericTelegram (const QJsonObject &telegram);
|
||||
void onGenericTelegram1 (const int wsId, const QJsonObject &telegram);
|
||||
private:
|
||||
bool sendToTx(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data, const bool bForce = false);
|
||||
private:
|
||||
TrainingAreaBase::Plugin::DataProvider *m_pdp;
|
||||
QHash<int, bool> m_dataCommunicationPossible; // equioNo, reachable
|
||||
MainDispatcher *m_mainDispatcher;
|
||||
QWebSocket *m_webSocket;
|
||||
std::shared_ptr<TrainingAreaBase::WebSocketInterface> m_wsInterface;
|
||||
bool m_bWebsocketConnectedToExternalSystem;
|
||||
LOGGER_T m_logger;
|
||||
|
||||
};
|
||||
|
||||
}// namespace AdlerJson
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Logger for AdlerJson Plugin
|
||||
* $Id: logger.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/logger.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger&;
|
||||
|
||||
LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
}
|
||||
} // namespace AdlerJson
|
||||
@@ -1,84 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* MainDispatcher for AdlerJson Plugin
|
||||
* $Id: main_dispatcher.h 62899 2024-05-29 11:08:50Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/main_dispatcher.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <TrainingAreaBase/tab_plugin_interface.h>
|
||||
#include <Core/core_types.h> // tr_lts
|
||||
#include <TrainingAreaBase/dds_handler.h>
|
||||
//#include "logger.h"
|
||||
#include "ppm_handler.h"
|
||||
#include "pdm_handler.h"
|
||||
#include "aes_handler.h"
|
||||
#include "flm_handler.h"
|
||||
#include "asm_handler.h"
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
class JsonDispatcher;
|
||||
class PpmHandler;
|
||||
class PdmHandler;
|
||||
class AesHandler;
|
||||
class FlmHandler;
|
||||
class AsmHandler;
|
||||
|
||||
class MainDispatcher final : public TrainingAreaBase::Plugin::Interface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
MainDispatcher( TrainingAreaBase::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
|
||||
const std::shared_ptr<TrainingAreaBase::TxMixin> &sendToTabCb,
|
||||
const std::shared_ptr<TrainingAreaBase::DdsHandler> &ddsHandler,
|
||||
NGL::Settings *settings);
|
||||
~MainDispatcher();
|
||||
|
||||
std::shared_ptr<PpmHandler> ppmHandler() const { return m_ppmHandler; }
|
||||
std::shared_ptr<PdmHandler> pdmHandler() const { return m_pdmHandler; }
|
||||
std::shared_ptr<AesHandler> aesHandler() const { return m_aesHandler; }
|
||||
std::shared_ptr<AsmHandler> asmHandler() const { return m_asmHandler; }
|
||||
JsonDispatcher* jsonDispatcher() const { return m_adlerDispatcher; }
|
||||
std::shared_ptr<TrainingAreaBase::DdsHandler> ddsHandler() const { return m_ddsHandler; }
|
||||
|
||||
int exerciseId() const { return m_exerciseId; }
|
||||
|
||||
public slots:
|
||||
bool init() override;
|
||||
void onWebsocketConnected(quint16 port);
|
||||
|
||||
public:
|
||||
std::shared_ptr<TrainingAreaBase::SendToTab> sendToTab() override;
|
||||
bool canSendData () const override;
|
||||
void exerciseChanged () override;
|
||||
bool isDebugInterface () const override { return false; }
|
||||
const char *name () const override { return tr_lts("dds", "ApHlaJson"); }
|
||||
|
||||
private:
|
||||
JsonDispatcher *m_adlerDispatcher;
|
||||
|
||||
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_recvFromTabCb;
|
||||
const std::shared_ptr<TrainingAreaBase::TxMixin> m_sendToTab;
|
||||
std::shared_ptr<TrainingAreaBase::SendToTab> m_mainHandlerTx;
|
||||
TrainingAreaBase::Plugin::DataProvider *m_pdp;
|
||||
|
||||
NGL::Settings *m_settings;
|
||||
|
||||
std::shared_ptr<PpmHandler> m_ppmHandler;
|
||||
std::shared_ptr<PdmHandler> m_pdmHandler;
|
||||
std::shared_ptr<AesHandler> m_aesHandler;
|
||||
std::shared_ptr<FlmHandler> m_flmHandler;
|
||||
std::shared_ptr<AsmHandler> m_asmHandler;
|
||||
std::shared_ptr<TrainingAreaBase::DdsHandler> m_ddsHandler;
|
||||
|
||||
int m_domainId;
|
||||
int m_exerciseId;
|
||||
};
|
||||
} // namespace AdlerJson
|
||||
|
||||
@@ -1,44 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* PdmHandler for AdlerJson Plugin
|
||||
* $Id: pdm_handler.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/pdm_handler.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "main_dispatcher.h"
|
||||
#include "logger.h"
|
||||
#include <TrainingAreaBase/dds_handler.h>
|
||||
#include <ProjectDataManagement/pdm.hpp>
|
||||
#include <ProjectDataManagement/pdm_dtc.h>
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QDateTime>
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
|
||||
class MainDispatcher;
|
||||
class PdmHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PdmHandler(QObject *parent = nullptr);
|
||||
void getChargeTypes();
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> getDtc() { return m_dtcPdm; }
|
||||
signals:
|
||||
void sendChargeTypes(QJsonObject jsonObj);
|
||||
public slots:
|
||||
bool init(MainDispatcher* mainDispatcher);
|
||||
|
||||
private:
|
||||
|
||||
std::shared_ptr<ProjectDataManagement::Interface::Dtc> m_dtcPdm;
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* TabAdlerPlugin for AdlerJson Plugin
|
||||
* $Id: plugin.h 62304 2024-03-21 08:17:45Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/plugin.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "TrainingAreaBase/dds_handler.h"
|
||||
#include <QtCore/QObject>
|
||||
#include <TrainingAreaBase/tab_plugin_interface.h>
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
class TabAdlerPlugin : public QObject, public TrainingAreaBase::Plugin::Plugin
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PLUGIN_METADATA(IID "special:3:tab.aphla")
|
||||
Q_INTERFACES(TrainingAreaBase::Plugin::Plugin)
|
||||
public:
|
||||
TabAdlerPlugin() = default;
|
||||
~TabAdlerPlugin() = default;
|
||||
std::shared_ptr<TrainingAreaBase::Plugin::Interface> createInterface(TrainingAreaBase::Plugin::DataProvider *pdp,
|
||||
const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
|
||||
const std::shared_ptr<TrainingAreaBase::TxMixin> &sendToTab,
|
||||
const std::shared_ptr<TrainingAreaBase::DdsHandler> &ddsHandler,
|
||||
NGL::Settings *settings) override;
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,111 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* PpmHandler for AdlerJson Plugin
|
||||
* $Id: ppm_handler.h 62899 2024-05-29 11:08:50Z ewert_j $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/ufom/Lts/Proxies/TrainingAreaBase/Plugins/AdlerJson/ppm_handler.h $
|
||||
* $Author: ewert_j $
|
||||
* Created by Julius Ewert, ESIM, 2024-03-20
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Core/core.hpp"
|
||||
#include "main_dispatcher.h"
|
||||
#include "logger.h"
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <ParticipantManagement/ppm_ftc.h>
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
#include <QtCore/QTimer>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QHash>
|
||||
#include <QtCore/QUrl>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <telegrams.h>
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
|
||||
class MainDispatcher;
|
||||
class PpmHandler
|
||||
: public QObject
|
||||
, protected ParticipantManagement::Interface::Ftc::ModifyParticipantDataReplyHandler
|
||||
, protected ParticipantManagement::Interface::Ftc::ModifyPartyDataReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit PpmHandler(QObject *parent = nullptr);
|
||||
bool init(MainDispatcher* mainDispatcher);
|
||||
void getParticipants();
|
||||
bool isEqNumberInExercise(const int equipmentNumber) const;
|
||||
|
||||
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> getDtc() { return m_dtcPpm; }
|
||||
std::shared_ptr<ParticipantManagement::Interface::Ftc> getFtc() { return m_ftcPpm; }
|
||||
|
||||
void onCreateParticipant();
|
||||
|
||||
// ModifyParticipantDataRequestHandler interface
|
||||
void onModifyParticipantDataReply(const Core::FunctionReply &reply);
|
||||
void onModifyPartyDataReply(const Core::FunctionReply &reply);
|
||||
void modifyPartyAdlerProperties(const int wsId, const int assetId, const int partyId, const QString &saaName, const QString &szenarName,
|
||||
const ParticipantManagement::ConnectState &connectState, const bool isVerbund);
|
||||
|
||||
//parse functions that trigger other services
|
||||
void parseSQFS(const Feuerstellungsdaten &exSQFS, const int wsId);
|
||||
void parseSQWS(const Waffensystemdaten &exSQWS, const int wsId);
|
||||
void parseSQLP(const Ladeplatzdaten &exSQLP, const int wsId);
|
||||
|
||||
void removeAllSAAParticipants(const int partyId);
|
||||
ParticipantManagement::Participant findParticipantByInternalName(const QString &internalName, const int partyId, const bool isVerbund);
|
||||
|
||||
signals:
|
||||
void participantChanged(const QJsonObject &jsonObj);
|
||||
void participantUnmount(const QJsonObject &jsonObj);
|
||||
void participantMount(const QJsonObject &jsonObj);
|
||||
|
||||
private slots:
|
||||
void onPartyChanged(const ParticipantManagement::Party &data, DataModification modType);
|
||||
void onParticipantChanged(const ParticipantManagement::Participant &data, DataModification modType);
|
||||
void onParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &data, DataModification modType);
|
||||
void onDynamicParticipantDataChanged(const ParticipantManagement::DynamicParticipantData &data, DataModification modType);
|
||||
void onSendParticipantDataTimeout();
|
||||
private:
|
||||
void handleParticipantPositionChangedExternal(const ParticipantManagement::ParticipantPosition &position);
|
||||
void handleParticipantPositionChangedInternal(const ParticipantManagement::ParticipantPosition &position);
|
||||
|
||||
void sendParticipantMount(const ParticipantManagement::Participant &part, const ParticipantManagement::Participant &partToBeMounted);
|
||||
void sendParticipantUnmount(const ParticipantManagement::Participant &participant);
|
||||
void sendParticipantPositionChanged(const ParticipantManagement::ParticipantPosition &position);
|
||||
void onModifyParticipantDataReply(const Core::FunctionReplyObject &reply) override;
|
||||
void onModifyPartyDataReply(const Core::FunctionReplyObject &reply) override;
|
||||
|
||||
QList<ParticipantManagement::Participant> findAllSAAParticipants(const int partyId);
|
||||
ParticipantManagement::ParticipantData findParticipantDataByInternalName(int &randomNumberInOut, const QString &internalName, const bool isVerbund);
|
||||
ParticipantManagement::ParticipantData findRootUnit(const int partyId);
|
||||
|
||||
void sendPositionFromTempMap(int rndNmbr, const int partyId, const bool isVerbund);
|
||||
void sendChargesFromTempMap(const int rndNmbr, const int partyId, const bool isVerbund);
|
||||
void sendReadyMessageFromTempMap(int rndNmbr, const int partyId, const bool isVerbund);
|
||||
int convertStatus_L28(const ProjectDataManagement::L28_Status &status);
|
||||
|
||||
QVector<AdlerJson::Geschoss> sumUpAnzahlForSameGeschoss(const QVector<AdlerJson::Geschoss> &geschosse) const;
|
||||
private:
|
||||
MainDispatcher *m_mainDispatcher;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtcPpm;
|
||||
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ftcPpm;
|
||||
QHash<int, int> m_participantIdsByEqNo; // eqNo, partId
|
||||
QHash<int, int> m_mountedParticipants;// participantId of passanger, participantId of Vehicle
|
||||
QTimer *m_sendParticipantDataTimer;
|
||||
QVector<int> m_randomNumbers;
|
||||
//maps
|
||||
QMap<ProjectDataManagement::L19_Oi, KoordinateMitHoehe> m_mapLocationToPosition;
|
||||
QMap<int, QMap<QString,KoordinateMitHoehe>> m_tempPositionMap;
|
||||
QMap<int, QVector<QString>> m_tempinternalNameMap;
|
||||
QMap<int, QMap<QString,QVector<Geschoss>>> m_tempChargesMap;
|
||||
QMap<int, std::vector<ParticipantManagement::ParticipantData>> m_tempPartDataList;
|
||||
QMap<int, QMap<QString,ProjectDataManagement::L28_Status>> m_tempReadyMessage;
|
||||
|
||||
};
|
||||
|
||||
} // namespace AdlerJson
|
||||
@@ -1,103 +0,0 @@
|
||||
#pragma once
|
||||
#include <QtCore/QString>
|
||||
#include <AdlerJson/telegrams.h>
|
||||
#include "ppm_handler.h"
|
||||
#include "aes_handler.h"
|
||||
#include "pdm_handler.h"
|
||||
|
||||
#include "logger.h"
|
||||
|
||||
// Forward:
|
||||
namespace LtsCoordTrans
|
||||
{
|
||||
struct UtmCoordinate;
|
||||
}
|
||||
|
||||
namespace AdlerJson
|
||||
{
|
||||
enum class ScenarioStatus // Szenarstatus
|
||||
{
|
||||
NONE ,
|
||||
INACTIVE , // Inaktiv
|
||||
PLANNED , // Geplant
|
||||
ACTIVE , // Aktiv
|
||||
STOPPED // Gestoppt
|
||||
};
|
||||
QString statusToStr(ScenarioStatus status);
|
||||
|
||||
ScenarioStatus strToStatus(QString status);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Convert (relative) Flugbahnpunkt to EXCON coordinate system
|
||||
* @param fbPos Flugbahnpunkt to be converted.
|
||||
* @param transformMatrix QTransform to be applied (most likely rotation).
|
||||
* @param utmLaunch launch coordinate for debugging purpose
|
||||
* @param logger to be used.
|
||||
* @return Coordinate transformed (rotated) in EXCON coordinate system.
|
||||
*/
|
||||
static Core::RelativePositionRelativeTime convertFlugbahnpunkt(const Flugbahnpunkt &fbPos,
|
||||
const QTransform &transformMatrix,
|
||||
const LtsCoordTrans::UtmCoordinate &utmLaunch,
|
||||
LOGGER_T logger);
|
||||
|
||||
|
||||
class JsonDispatcher;
|
||||
class SAAInterface
|
||||
: public QObject
|
||||
, protected AreaEffectSimulation::Interface::Ftc::TrajectoryAdlerModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
SAAInterface(int wsId, int partyId, const QString& saaName, const QString& szenarName, bool isVerbund, QObject *parent = nullptr);
|
||||
|
||||
bool init(std::shared_ptr<PpmHandler> ppmHandler,
|
||||
std::shared_ptr<PdmHandler> pdmHandler,
|
||||
std::shared_ptr<AesHandler> aesHandler,
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dts> dtsTab);
|
||||
|
||||
|
||||
int getWsId(){ return m_wsId; };
|
||||
void setWsId(int wsId){ m_wsId = wsId;};
|
||||
int getPartyId(){ return m_partyId; };
|
||||
void setPartyId(int partyId){ m_partyId = partyId; };
|
||||
QString getSAAName(){ return m_saaName; };
|
||||
//QString getSAAName(){ return QStringLiteral("SAA.GUEZ.DE"); };
|
||||
void setSaaName(const QString& saaName){ m_saaName = saaName; };
|
||||
//void setSaaName(const QString& saaName){ Q_UNUSED(saaName); m_saaName = QStringLiteral("SAA@GUEZ.de"); };
|
||||
QString getSzenarName() {return m_szenarName; }
|
||||
void setSzenarName(const QString &szenarName) { m_szenarName = szenarName; }
|
||||
Szenarstatus getStatus(){ return m_status; };
|
||||
void setStatus(Szenarstatus status);
|
||||
void setIsVerbund(bool isVerbund) { m_isVerbund = isVerbund; }
|
||||
bool getIsVerbund(){ return m_isVerbund; }
|
||||
void setIsAlive(bool isAlive) { m_isAlive = isAlive; }
|
||||
bool getIsAlive(){ return m_isAlive; }
|
||||
|
||||
//parse functions that trigger other services
|
||||
void parseFlugbahndaten(const Flugbahndaten &flugbahndaten, int aesItemId, int exposionId, const Core::GeoPosition &positionLaunch);
|
||||
|
||||
template<typename T>
|
||||
void rxData (const T &data );
|
||||
|
||||
private:
|
||||
void onTrajectoryAdlerModifyReply(const Core::FunctionReplyObject &reply) override;
|
||||
|
||||
int m_wsId;
|
||||
int m_partyId;
|
||||
QString m_saaName;
|
||||
QString m_szenarName;
|
||||
Szenarstatus m_status;
|
||||
bool m_isVerbund;
|
||||
bool m_isAlive=false;
|
||||
|
||||
//int m_currentRandomNumber{0};
|
||||
//DDS
|
||||
std::shared_ptr<PpmHandler> m_ppmHandler;
|
||||
std::shared_ptr<PdmHandler> m_pdmHandler;
|
||||
std::shared_ptr<AesHandler> m_aesHandler;
|
||||
|
||||
std::shared_ptr<AreaEffectSimulation::Interface::Ftc> m_ftcAes;
|
||||
std::shared_ptr<TrainingAreaBase::Interface::Dts> m_dtsTab;
|
||||
};
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* Settings for TetraRadio
|
||||
* $Id: settings.h 63154 2024-06-25 11:19:33Z karwat $
|
||||
* $HeadURL: svn://slssvn/TDS/branches/product/features/24_adler/Lts/Proxies/TrainingAreaBase/settings.h $
|
||||
* $Author: karwat $
|
||||
* Created by Christian Ehrlicher, SLSE, 2016-04-14
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QJsonObject>
|
||||
|
||||
namespace NGL
|
||||
{
|
||||
class Settings;
|
||||
}
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
|
||||
namespace Settings
|
||||
{
|
||||
|
||||
//!< The real NGL::Settings - object
|
||||
NGL::Settings *settings();
|
||||
|
||||
void setIniFile(const QString &ini);
|
||||
QString txDir();
|
||||
QString rxDir();
|
||||
QPair<quint16, quint16> getWebSocketServerPortRange(int type);
|
||||
}
|
||||
|
||||
} // namespace TrainingAreaBase
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,78 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include "ws_interface.h"
|
||||
#include "logger.h"
|
||||
|
||||
#include <TrainingAreaBase/training_area_telegrams.h>
|
||||
#include <QtWebSockets/QWebSocketServer>
|
||||
#include <QtCore/QObject>
|
||||
#include <memory>
|
||||
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
class WebSocketWrapper;
|
||||
|
||||
class WebSocketHandler : public WebSocketInterface
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WebSocketHandler(QObject *parent = nullptr);
|
||||
~WebSocketHandler();
|
||||
|
||||
// WSInterface interface
|
||||
public:
|
||||
bool init(quint16 listenPort) override;
|
||||
bool isConnected() const override;
|
||||
quint16 getPort() const override;
|
||||
bool sendTelegram(const int typeId, const QJsonObject *data, const int exerciseId) override;
|
||||
bool sendTelegram(const int wsId, const QJsonObject *data) override;
|
||||
bool disconnectWs(int wsId) override;
|
||||
QString getPeerAddress(int wsId) const override;
|
||||
QUrl getPeerUrl(int wsId) const override;
|
||||
|
||||
int getExerciseId(int wsId) const override;
|
||||
|
||||
//Q_SIGNALS:
|
||||
// void wsDisconnect(const int wsId);
|
||||
private Q_SLOTS:
|
||||
void onNewConnection();
|
||||
void onWebSocketDisconnected();
|
||||
void onTextMessageReceived(const QByteArray &baJson);
|
||||
private:
|
||||
bool sendTelegramInternal(const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data, const QString &type, int exerciseId);
|
||||
bool sendTelegramInternal(const int wsId, const TrainingAreaBase::TetraIcd::TrainingAreaTelegram *data, const QString &type, const int exerciseId);
|
||||
int getWSIdFromWS( WebSocketWrapper* wsw );
|
||||
private:
|
||||
QWebSocketServer *m_webSocketServer;
|
||||
//QVector<std::shared_ptr<WebSocketWrapper>> m_webSockets;
|
||||
QMap<int, std::shared_ptr<WebSocketWrapper>> m_connections; // key = wsId
|
||||
|
||||
int m_nextWsId = 1;
|
||||
AdlerJson::LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
class WebSocketWrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit WebSocketWrapper(QWebSocket *ws);
|
||||
~WebSocketWrapper();
|
||||
|
||||
bool sendTextMessage(const QString &msg);
|
||||
|
||||
void setExerciseId(int exerciseId);
|
||||
void setWsId(int wsId){ m_wsId = wsId; }
|
||||
int getWsId(){ return m_wsId; }
|
||||
int exerciseId() const { return m_exerciseId; }
|
||||
QWebSocket *webSocket() const { return m_webSocket; }
|
||||
Q_SIGNALS:
|
||||
void textMessageReceived(const QByteArray &data);
|
||||
private Q_SLOTS:
|
||||
void onTextMessageReceived(const QString &data);
|
||||
private:
|
||||
QWebSocket *m_webSocket;
|
||||
int m_wsId;
|
||||
int m_exerciseId;
|
||||
};
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <qobjectdefs.h>
|
||||
|
||||
namespace TrainingAreaBase {
|
||||
|
||||
class WebSocketInterface : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
|
||||
virtual bool init(quint16 listenPort) = 0;
|
||||
bool init(const QPair<quint16, quint16> &portRange)
|
||||
{
|
||||
for (quint16 currentPort = portRange.first; currentPort != portRange.second; ++currentPort)
|
||||
{
|
||||
if (init(currentPort))
|
||||
return true;
|
||||
}
|
||||
|
||||
return init(0);
|
||||
}
|
||||
virtual bool isConnected() const = 0;
|
||||
virtual quint16 getPort() const = 0;
|
||||
|
||||
virtual bool disconnectWs(int wsId) = 0;
|
||||
|
||||
virtual bool sendTelegram(int typeId, const QJsonObject *data, int exerciseId) = 0;
|
||||
virtual bool sendTelegram(int wsId, const QJsonObject *data) = 0;
|
||||
virtual QString getPeerAddress(int wsId) const = 0;
|
||||
virtual QUrl getPeerUrl(int wsId) const = 0;
|
||||
virtual int getExerciseId(int wsId) const = 0;
|
||||
Q_SIGNALS:
|
||||
void recivedTelegram(int wsId, const QJsonObject& telegramData);
|
||||
void newConnection(int wsId, const QString& address, qint16 port);
|
||||
void wsDisconnected(int wsId);
|
||||
|
||||
|
||||
public:
|
||||
explicit WebSocketInterface(QObject* parent = nullptr) : QObject(parent){}
|
||||
virtual ~WebSocketInterface() {}
|
||||
};
|
||||
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "LtsUtils/LtsUtilsCore/data_modification_enum.h"
|
||||
#include "ProjectDataManagement/pdm_types.h"
|
||||
|
||||
namespace AlarmManagement
|
||||
{
|
||||
|
||||
// Position-Struct (wird normalerweise von DDS generiert)
|
||||
struct Position
|
||||
{
|
||||
double longitude = 0.0;
|
||||
double latitude = 0.0;
|
||||
|
||||
double lon() const { return longitude; }
|
||||
double lat() const { return latitude; }
|
||||
};
|
||||
|
||||
// Notification-Struct (wird normalerweise von DDS generiert)
|
||||
struct Notification
|
||||
{
|
||||
int32_t id = 0;
|
||||
int64_t time() const { return timestamp; }
|
||||
int64_t timestamp = 0;
|
||||
int32_t type = 0;
|
||||
int32_t priority = 0;
|
||||
int32_t status = 0;
|
||||
std::string description;
|
||||
|
||||
// Zusätzliche Member für AlarmHistoryModel
|
||||
int32_t operatorId() const { return m_operatorId; }
|
||||
int32_t equipmentNumber() const { return m_equipmentNumber; }
|
||||
std::optional<int32_t> participantId() const { return m_participantId; }
|
||||
std::optional<int32_t> aesId() const { return m_aesId; }
|
||||
ProjectDataManagement::EventType eventType() const { return m_eventType; }
|
||||
Position position() const { return m_position; }
|
||||
const std::string& properties() const { return m_properties; }
|
||||
|
||||
int32_t m_operatorId = 0;
|
||||
int32_t m_equipmentNumber = 0;
|
||||
std::optional<int32_t> m_participantId;
|
||||
std::optional<int32_t> m_aesId;
|
||||
ProjectDataManagement::EventType m_eventType = ProjectDataManagement::EventType::Unknown;
|
||||
Position m_position;
|
||||
std::string m_properties;
|
||||
};
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Dtc interface class with signals for Qt6 migration STUB
|
||||
class Dtc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Dtc(QObject* parent = nullptr) : QObject(parent) {}
|
||||
~Dtc() override = default;
|
||||
|
||||
// Callback registration instead of enableNotification()
|
||||
void notifications(std::function<void(const Notification&)> callback)
|
||||
{
|
||||
m_notificationCallback = callback;
|
||||
}
|
||||
|
||||
// Trigger notification changed (for STUB testing)
|
||||
void triggerNotificationChanged(const Notification& notification, DataModification modType)
|
||||
{
|
||||
emit notificationChanged(notification, modType);
|
||||
if (m_notificationCallback)
|
||||
{
|
||||
m_notificationCallback(notification);
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void notificationChanged(const Notification& notification, DataModification modType);
|
||||
|
||||
private:
|
||||
std::function<void(const Notification&)> m_notificationCallback;
|
||||
};
|
||||
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace AlarmManagement
|
||||
@@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Translation Helper für AlarmManagement Module
|
||||
// Wrapper für QObject::tr() in nicht-QObject Klassen
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include "svcalmcommon_export.h"
|
||||
|
||||
namespace AlarmManagement
|
||||
{
|
||||
|
||||
SVCALMCOMMON_EXPORT QString tr(const char *sourceText, const char *comment = nullptr, int n = -1);
|
||||
|
||||
} // namespace AlarmManagement
|
||||
@@ -1,49 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include <QtCore/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
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace AreaEffectSimulation
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace AssetManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace AssetManagement
|
||||
@@ -1,322 +0,0 @@
|
||||
/**
|
||||
* STUB-HEADER: Diese Datei wird normalerweise von AudioVideoManagement generiert
|
||||
* Für die Migration ohne RTI erstellen wir minimale Typ-Definitionen
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QMetaType>
|
||||
#include "svcavmcommon_export.h"
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QStringList>
|
||||
#include <QtCore/QVector>
|
||||
#include <QtCore/QPair>
|
||||
#include <chrono>
|
||||
#include <cstdint>
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
|
||||
class StreamNameMapping;
|
||||
|
||||
enum class AvaVisibility
|
||||
{
|
||||
Visible = 1,
|
||||
Hidden = 0
|
||||
};
|
||||
|
||||
enum class AvaStreamState
|
||||
{
|
||||
Stop = 0,
|
||||
Start = 1,
|
||||
Pause = 2,
|
||||
NotPossible = 3
|
||||
};
|
||||
|
||||
enum class AvaStreamType
|
||||
{
|
||||
Audio = 1,
|
||||
Video = 2
|
||||
};
|
||||
|
||||
enum class AvaStreamSource
|
||||
{
|
||||
Interface = 1, //!< live streams
|
||||
Server = 2, //!< stored streams for playback
|
||||
Local = 4
|
||||
};
|
||||
|
||||
enum class AvaScriptSource
|
||||
{
|
||||
ServerAudio = 1,
|
||||
ServerVideo = 2,
|
||||
LocalAudio = 3,
|
||||
LocalVideo = 4
|
||||
};
|
||||
|
||||
enum class AvaElokaMode
|
||||
{
|
||||
EndlessLoop = 0,
|
||||
Once = 1
|
||||
};
|
||||
|
||||
enum class AvaQueryElokaMode
|
||||
{
|
||||
Stop = 0, //!< stop previously requested asynchronous notifications
|
||||
Poll = 1, //!< poll active ELOKA measures once
|
||||
Push = 2 //!< request asynchronous notifications from AVS
|
||||
};
|
||||
|
||||
enum class AvaSumChannel
|
||||
{
|
||||
Right = 1,
|
||||
Left = 2
|
||||
};
|
||||
|
||||
enum class AvaRtButtonState
|
||||
{
|
||||
NotAvailable = 0,
|
||||
None = 1,
|
||||
Left = 2,
|
||||
Right = 3,
|
||||
Both = 4
|
||||
};
|
||||
|
||||
class AVM_COMMON_EXPORT AvaSpeed
|
||||
{
|
||||
public:
|
||||
explicit AvaSpeed(int speed = 0) : m_speed(speed) {}
|
||||
|
||||
operator int() const { return m_speed; }
|
||||
|
||||
static const QVector<int> &allowedValues()
|
||||
{
|
||||
static const QVector<int> values = {0, 25, 50, 75, 100, 125, 150, 175, 200};
|
||||
return values;
|
||||
}
|
||||
|
||||
private:
|
||||
int m_speed;
|
||||
};
|
||||
|
||||
|
||||
class AVM_COMMON_EXPORT AvaVolume
|
||||
{
|
||||
public:
|
||||
explicit AvaVolume(int db = 0) : m_db(db) {}
|
||||
|
||||
operator int() const { return m_db; }
|
||||
|
||||
static AvaVolume min() { return AvaVolume(-50); }
|
||||
static AvaVolume max() { return AvaVolume(20); }
|
||||
|
||||
private:
|
||||
int m_db;
|
||||
};
|
||||
|
||||
|
||||
class AVM_COMMON_EXPORT AvaAudioPrio
|
||||
{
|
||||
public:
|
||||
explicit AvaAudioPrio(int prio = 0) : m_prio(prio) {}
|
||||
|
||||
operator int() const { return m_prio; }
|
||||
|
||||
static AvaAudioPrio min() { return AvaAudioPrio(0); }
|
||||
static AvaAudioPrio max() { return AvaAudioPrio(255); }
|
||||
|
||||
private:
|
||||
int m_prio;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Position (index) of a radio circuit in the AVS_Workstation GUI.
|
||||
* The index must be in [1, 8].
|
||||
*/
|
||||
class AVM_COMMON_EXPORT AvaRtPos
|
||||
{
|
||||
public:
|
||||
explicit AvaRtPos(int pos = 1) : m_pos(pos) {}
|
||||
|
||||
operator int() const { return m_pos; }
|
||||
|
||||
static constexpr int min() { return 1; }
|
||||
static constexpr int max() { return 8; }
|
||||
static constexpr int count() { return max() - min() + 1; }
|
||||
|
||||
private:
|
||||
int m_pos;
|
||||
};
|
||||
|
||||
|
||||
enum class AvaGuiStyle
|
||||
{
|
||||
Light = 0,
|
||||
Dark
|
||||
};
|
||||
|
||||
using AvaDuration = std::chrono::duration<int64_t, std::centi>;
|
||||
using AvaTimePoint = std::chrono::time_point<std::chrono::system_clock, AvaDuration>;
|
||||
|
||||
/**
|
||||
* Information about a stream in response to getStreamList.
|
||||
*/
|
||||
struct AVM_COMMON_EXPORT AvaStream
|
||||
{
|
||||
/**
|
||||
* @param nameWithSourceSpec is the AVS-internal stream name plus a source specifier that must match
|
||||
* the given AvaStreamSource, "(S)" for Server, "(L)" for Local, nothing for Interface.
|
||||
*/
|
||||
static AvaStream create(AvaStreamType, AvaStreamSource, const QString &nameWithSourceSpec, StreamNameMapping *streamNameMapping)
|
||||
{
|
||||
Q_UNUSED(nameWithSourceSpec)
|
||||
Q_UNUSED(streamNameMapping)
|
||||
return AvaStream{};
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the AVS-internal stream name plus a source specifier at the end
|
||||
* as described in create().
|
||||
*/
|
||||
QString toString() const { return internalName; }
|
||||
/** Same as toString() but for a vector of streams. */
|
||||
static QStringList toStringList(const QVector<AvaStream> &streams)
|
||||
{
|
||||
QStringList result;
|
||||
for (const auto &s : streams) {
|
||||
result.append(s.toString());
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
bool operator==(const AvaStream &other) const
|
||||
{
|
||||
return type == other.type && source == other.source &&
|
||||
internalName == other.internalName && displayName == other.displayName;
|
||||
}
|
||||
bool operator!=(const AvaStream &other) const { return !(*this == other); }
|
||||
|
||||
AvaStreamType type = AvaStreamType::Audio;
|
||||
AvaStreamSource source = AvaStreamSource::Interface;
|
||||
QString internalName; //!< AVS-internal stream name without source specifier
|
||||
QString displayName; //!< name to be displayed in the GUI without source specifier
|
||||
};
|
||||
|
||||
/**
|
||||
* Information about a stream as contained in StreamInfo in response to chooseStream.
|
||||
*/
|
||||
struct AVM_COMMON_EXPORT AvaStreamInfo
|
||||
{
|
||||
AvaTimePoint start;
|
||||
AvaTimePoint end;
|
||||
AvaDuration duration;
|
||||
};
|
||||
|
||||
|
||||
using AvaTimelinePart = QPair<AvaTimePoint, AvaTimePoint>;
|
||||
|
||||
class AVM_COMMON_EXPORT AvaTimeline
|
||||
{
|
||||
public:
|
||||
AvaTimeline() = default;
|
||||
explicit AvaTimeline(const QVector<AvaTimelinePart> &parts) : m_parts(parts) {}
|
||||
|
||||
bool isEmpty() const { return m_parts.isEmpty(); }
|
||||
|
||||
const AvaTimePoint &startTime() const
|
||||
{
|
||||
static AvaTimePoint dummy;
|
||||
return m_parts.isEmpty() ? dummy : m_parts.first().first;
|
||||
}
|
||||
const AvaTimePoint &endTime() const
|
||||
{
|
||||
static AvaTimePoint dummy;
|
||||
return m_parts.isEmpty() ? dummy : m_parts.last().second;
|
||||
}
|
||||
|
||||
void clear() { m_parts.clear(); }
|
||||
void append(const AvaTimelinePart &part) { m_parts.append(part); }
|
||||
void merge(const AvaTimeline &other)
|
||||
{
|
||||
m_parts.append(other.m_parts);
|
||||
}
|
||||
|
||||
const QVector<AvaTimelinePart> &parts() const { return m_parts; }
|
||||
|
||||
bool operator==(const AvaTimeline &other) const { return m_parts == other.m_parts; }
|
||||
bool operator!=(const AvaTimeline &other) const { return m_parts != other.m_parts; }
|
||||
|
||||
private:
|
||||
void checkConsistency() const {}
|
||||
|
||||
QVector<AvaTimelinePart> m_parts;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* Information about an eloka in response to queryEloka.
|
||||
*/
|
||||
struct AVM_COMMON_EXPORT AvaEloka
|
||||
{
|
||||
QString signal;
|
||||
QString stream;
|
||||
qint32 priority = 0;
|
||||
AvaTimePoint time;
|
||||
|
||||
bool operator==(const AvaEloka &other) const
|
||||
{
|
||||
return signal == other.signal && stream == other.stream &&
|
||||
priority == other.priority && time == other.time;
|
||||
}
|
||||
bool operator!=(const AvaEloka &other) const { return !(*this == other); }
|
||||
};
|
||||
|
||||
/**
|
||||
* Information about a script entry.
|
||||
*/
|
||||
struct AVM_COMMON_EXPORT AvaScriptEntry
|
||||
{
|
||||
bool operator==(const AvaScriptEntry &other) const
|
||||
{
|
||||
return name == other.name && speed == other.speed &&
|
||||
start == other.start && stop == other.stop &&
|
||||
db == other.db && mute == other.mute && pint == other.pint;
|
||||
}
|
||||
bool operator!=(const AvaScriptEntry &other) const { return !(*this == other); }
|
||||
|
||||
QString name;
|
||||
AvaSpeed speed{100};
|
||||
AvaTimePoint start;
|
||||
AvaTimePoint stop;
|
||||
AvaVolume db{0};
|
||||
bool mute = false;
|
||||
bool pint = false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Represents the JSON data for a AV script topic in a C++ way.
|
||||
*/
|
||||
struct AVM_COMMON_EXPORT AvaTopicData
|
||||
{
|
||||
public:
|
||||
explicit AvaTopicData(const QJsonObject &data) : m_isAudio(false), isValid(true)
|
||||
{
|
||||
Q_UNUSED(data)
|
||||
}
|
||||
|
||||
bool isAudio() const { return m_isAudio; }
|
||||
const QString &scriptName() const { return m_scriptName; }
|
||||
const QVector<AvaScriptEntry> &streamList() const { return m_streamList; }
|
||||
|
||||
bool isValid = true;
|
||||
|
||||
private:
|
||||
bool m_isAudio = false;
|
||||
QString m_scriptName;
|
||||
QVector<AvaScriptEntry> m_streamList;
|
||||
};
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
|
||||
Q_DECLARE_METATYPE(AudioVideoManagement::AvaStream)
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace AudioVideoManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace AudioVideoManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Stub export header for non-RTI builds
|
||||
* When BUILD_RTI=OFF, svcAvmCommon library is not built
|
||||
* This stub allows dependent code to compile
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
// Stub export macros for non-RTI builds
|
||||
#define AVM_COMMON_EXPORT
|
||||
#define AVM_CLIENT_EXPORT
|
||||
#define AVM_SERVER_EXPORT
|
||||
@@ -1,77 +0,0 @@
|
||||
/**
|
||||
* @file avm_translation.h
|
||||
* @brief Translation functions for AudioVideoManagement enums
|
||||
*
|
||||
* This file provides toString() functions for AVM enums used in CNR frequency planning.
|
||||
*/
|
||||
|
||||
#ifndef AVM_TRANSLATION_H
|
||||
#define AVM_TRANSLATION_H
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include "avm_enums.hpp"
|
||||
|
||||
namespace AudioVideoManagement {
|
||||
|
||||
// RcOperatingMode toString - using actual enum values from stub
|
||||
inline QString toString(RcOperatingMode mode)
|
||||
{
|
||||
switch (mode.underlying()) {
|
||||
case RcOperatingMode::FixedFreqEncNone: return QStringLiteral("FixedFreqEncNone");
|
||||
case RcOperatingMode::FixedFreqEncHwKr: return QStringLiteral("FixedFreqEncHwKr");
|
||||
case RcOperatingMode::FixedFreqEncHwKrKl: return QStringLiteral("FixedFreqEncHwKrKl");
|
||||
case RcOperatingMode::AkwEncNone: return QStringLiteral("AkwEncNone");
|
||||
case RcOperatingMode::AkwEncEccm: return QStringLiteral("AkwEncEccm");
|
||||
case RcOperatingMode::SIMPLEX: return QStringLiteral("SIMPLEX");
|
||||
case RcOperatingMode::HALFDUPLEX: return QStringLiteral("HALFDUPLEX");
|
||||
case RcOperatingMode::DUPLEX: return QStringLiteral("DUPLEX");
|
||||
default: return QStringLiteral("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
// FrequencyBand toString
|
||||
inline QString toString(FrequencyBand band)
|
||||
{
|
||||
switch (band.underlying()) {
|
||||
case FrequencyBand::Undefined: return QStringLiteral("Undefined");
|
||||
case FrequencyBand::HF: return QStringLiteral("HF");
|
||||
case FrequencyBand::VHF: return QStringLiteral("VHF");
|
||||
case FrequencyBand::UHF: return QStringLiteral("UHF");
|
||||
case FrequencyBand::REL: return QStringLiteral("REL");
|
||||
default: return QStringLiteral("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
// ModulationType toString
|
||||
inline QString toString(ModulationType mod)
|
||||
{
|
||||
switch (mod.underlying()) {
|
||||
case ModulationType::AM: return QStringLiteral("AM");
|
||||
case ModulationType::FM: return QStringLiteral("FM");
|
||||
default: return QStringLiteral("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
// ChannelSpacingHF toString
|
||||
inline QString toString(ChannelSpacingHF spacing)
|
||||
{
|
||||
switch (spacing.underlying()) {
|
||||
case ChannelSpacingHF::CS_100_Hz: return QStringLiteral("CS_100_Hz");
|
||||
default: return QStringLiteral("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
// ChannelSpacing toString
|
||||
inline QString toString(ChannelSpacing spacing)
|
||||
{
|
||||
switch (spacing.underlying()) {
|
||||
case ChannelSpacing::CS_25_00_kHz: return QStringLiteral("CS_25_00_kHz");
|
||||
case ChannelSpacing::CS_12_50_kHz: return QStringLiteral("CS_12_50_kHz");
|
||||
case ChannelSpacing::CS_8_33_kHz: return QStringLiteral("CS_8_33_kHz");
|
||||
default: return QStringLiteral("Unknown");
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace AudioVideoManagement
|
||||
|
||||
#endif // AVM_TRANSLATION_H
|
||||
@@ -1,13 +0,0 @@
|
||||
#ifndef SVCAVMCOMMON_EXPORT_H
|
||||
#define SVCAVMCOMMON_EXPORT_H
|
||||
|
||||
// Stub export header for non-RTI builds
|
||||
// When BUILD_RTI=OFF, svcAvmCommon library is not built
|
||||
// This stub allows dependent code to compile
|
||||
|
||||
// Map to the actual macro names used in avm_export.h
|
||||
#define AVM_COMMON_EXPORT
|
||||
#define AVM_CLIENT_EXPORT
|
||||
#define AVM_SERVER_EXPORT
|
||||
|
||||
#endif /* SVCAVMCOMMON_EXPORT_H */
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace Buildings
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace Buildings
|
||||
@@ -1,30 +0,0 @@
|
||||
// Stub file for bld_enums.hpp - used when BUILD_RTI=OFF
|
||||
#ifndef BLD_ENUMS_HPP
|
||||
#define BLD_ENUMS_HPP
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace Buildings {
|
||||
|
||||
enum class BuildingType : std::int32_t {
|
||||
Residential = 0,
|
||||
Commercial = 1,
|
||||
Industrial = 2
|
||||
};
|
||||
|
||||
enum class BuildingStatus : std::int32_t {
|
||||
Active = 0,
|
||||
Inactive = 1,
|
||||
UnderConstruction = 2
|
||||
};
|
||||
|
||||
struct BuildingInfo {
|
||||
int id = 0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
};
|
||||
|
||||
} // namespace Buildings
|
||||
|
||||
#endif // BLD_ENUMS_HPP
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace CentralEffectSimulation
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace CentralEffectSimulation
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace CodificationManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace CodificationManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace ComponentMonitor
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace ComponentMonitor
|
||||
@@ -1,107 +0,0 @@
|
||||
/**
|
||||
* @file core.hpp
|
||||
* @brief Core DDS Sammel-Header
|
||||
*
|
||||
* Beinhaltet alle Core-Typen für DDS-Integration.
|
||||
*
|
||||
* STUB: Diese Datei wird normalerweise von DDS generiert.
|
||||
* Für die Qt6-Migration erstellen wir einen minimalen Stub.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <Core/core_types.h>
|
||||
#include <Core/core_enums.hpp>
|
||||
#include <Core/core_dtc.h>
|
||||
#include <ostream>
|
||||
|
||||
namespace Core
|
||||
{
|
||||
/**
|
||||
* @brief GeoPosition - Stub für DDS GeoPosition
|
||||
*
|
||||
* Einfache Struktur für geographische Positionen.
|
||||
*/
|
||||
struct GeoPosition
|
||||
{
|
||||
double longitude = 0.0;
|
||||
double latitude = 0.0;
|
||||
double altitude = 0.0;
|
||||
|
||||
GeoPosition() = default;
|
||||
|
||||
GeoPosition(double lon, double lat, double z)
|
||||
: longitude(lon)
|
||||
, latitude(lat)
|
||||
, altitude(z)
|
||||
{
|
||||
}
|
||||
|
||||
double lon() const { return longitude; }
|
||||
double lat() const { return latitude; }
|
||||
double z() const { return altitude; }
|
||||
|
||||
void lon(double lon) { longitude = lon; }
|
||||
void lat(double lat) { latitude = lat; }
|
||||
void z(double z) { altitude = z; }
|
||||
|
||||
void setLon(double lon) { longitude = lon; }
|
||||
void setLat(double lat) { latitude = lat; }
|
||||
void setZ(double z) { altitude = z; }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief GeoPosition2D - 2D GeoPosition (ohne Altitude)
|
||||
*
|
||||
* Wird für Koordinaten ohne Höheninformation verwendet.
|
||||
* Implizite Konversion von GeoPosition ermöglicht Downcast.
|
||||
*/
|
||||
struct GeoPosition2D
|
||||
{
|
||||
double longitude = 0.0;
|
||||
double latitude = 0.0;
|
||||
|
||||
GeoPosition2D() = default;
|
||||
|
||||
GeoPosition2D(double lon, double lat)
|
||||
: longitude(lon)
|
||||
, latitude(lat)
|
||||
{
|
||||
}
|
||||
|
||||
// Implizite Konversion von GeoPosition (Downcast ignoriert altitude)
|
||||
GeoPosition2D(const GeoPosition& pos)
|
||||
: longitude(pos.lon())
|
||||
, latitude(pos.lat())
|
||||
{
|
||||
}
|
||||
|
||||
double lon() const { return longitude; }
|
||||
double lat() const { return latitude; }
|
||||
|
||||
void lon(double lon) { longitude = lon; }
|
||||
void lat(double lat) { latitude = lat; }
|
||||
|
||||
void setLon(double lon) { longitude = lon; }
|
||||
void setLat(double lat) { latitude = lat; }
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief ostream operator für GeoPosition (Debug/Logging)
|
||||
*/
|
||||
inline std::ostream& operator<<(std::ostream& os, const GeoPosition& pos)
|
||||
{
|
||||
os << "GeoPosition(lon=" << pos.lon() << ", lat=" << pos.lat() << ", alt=" << pos.z() << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief ostream operator für GeoPosition2D (Debug/Logging)
|
||||
*/
|
||||
inline std::ostream& operator<<(std::ostream& os, const GeoPosition2D& pos)
|
||||
{
|
||||
os << "GeoPosition2D(lon=" << pos.lon() << ", lat=" << pos.lat() << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace Core
|
||||
@@ -1,16 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
namespace Core
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace Core
|
||||
} // namespace DDS
|
||||
@@ -1,144 +0,0 @@
|
||||
/**
|
||||
* @file core_types.h
|
||||
* @brief Core DDS-Typen Stubs
|
||||
*
|
||||
* Minimalistische Definitionen für DDS-generierte Core-Typen.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QtCore/QString>
|
||||
|
||||
namespace Core
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief FunctionReplyObject - DDS-Stub für Function Reply Handling
|
||||
*
|
||||
* Simuliert QString::arg() Verhalten und sammelt Argumente.
|
||||
*/
|
||||
class FunctionReplyObject
|
||||
{
|
||||
public:
|
||||
explicit FunctionReplyObject(int id = -1, const char *str = nullptr)
|
||||
: m_str(str ? str : std::string())
|
||||
, m_id(id)
|
||||
{}
|
||||
|
||||
explicit FunctionReplyObject(const char *str)
|
||||
: m_str(str ? str : std::string())
|
||||
{}
|
||||
|
||||
explicit FunctionReplyObject(int id, const std::string &errStr, const std::vector<std::string> &errArgs)
|
||||
: m_str(errStr)
|
||||
, m_args(errArgs)
|
||||
, m_id(id)
|
||||
{}
|
||||
|
||||
explicit FunctionReplyObject(int id, std::string &&errStr, std::vector<std::string> &&errArgs)
|
||||
: m_str(std::move(errStr))
|
||||
, m_args(std::move(errArgs))
|
||||
, m_id(id)
|
||||
{}
|
||||
|
||||
explicit FunctionReplyObject(int id, const std::string &errStr, const std::vector<std::string> &errArgs, const std::string &additionalInfo)
|
||||
: m_str(errStr)
|
||||
, m_additionalInfo(additionalInfo)
|
||||
, m_args(errArgs)
|
||||
, m_id(id)
|
||||
{}
|
||||
|
||||
explicit FunctionReplyObject(int id, std::string &&errStr, std::vector<std::string> &&errArgs, std::string &&additionalInfo)
|
||||
: m_str(std::move(errStr))
|
||||
, m_additionalInfo(std::move(additionalInfo))
|
||||
, m_args(std::move(errArgs))
|
||||
, m_id(id)
|
||||
{}
|
||||
|
||||
~FunctionReplyObject() = default;
|
||||
|
||||
// simulate QString::arg() behaviour
|
||||
FunctionReplyObject &arg(qint64 val) { (void)val; return *this; }
|
||||
FunctionReplyObject &arg(const std::string &str) { m_args.push_back(str); return *this; }
|
||||
FunctionReplyObject &arg(const QString &str) { m_args.push_back(str.toStdString()); return *this; }
|
||||
|
||||
/**
|
||||
* @brief true if the object contains an error description
|
||||
*/
|
||||
bool error() const { return !m_str.empty(); }
|
||||
void setId(int id) { m_id = id; }
|
||||
FunctionReplyObject &setStr(const char *str) { m_str = str; return *this; }
|
||||
FunctionReplyObject &setAdditionalInfo(const char *additionalInfo) { m_additionalInfo = additionalInfo; return *this; }
|
||||
|
||||
int id() const { return m_id; }
|
||||
std::string str() const { return m_str; }
|
||||
std::string additionalInfo() const { return m_additionalInfo; }
|
||||
|
||||
std::vector<std::string> args() const { return m_args; }
|
||||
|
||||
/**
|
||||
* @brief convert the error string and arguments to an untranslated std::string
|
||||
*/
|
||||
std::string operator()() const { return m_str; }
|
||||
|
||||
/**
|
||||
* @brief convert and translate the error string and arguments to a translated QString
|
||||
*/
|
||||
QString translated() const { return QString::fromStdString(m_str); }
|
||||
|
||||
int64_t uniqueId() const { return m_uniqueId; }
|
||||
void setUniqueId(int64_t uniqueId) { m_uniqueId = uniqueId; }
|
||||
|
||||
private:
|
||||
std::string m_str;
|
||||
std::string m_additionalInfo;
|
||||
std::vector<std::string> m_args;
|
||||
int64_t m_uniqueId = 0;
|
||||
int m_id = -1;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief FunctionReply - Stub für DDS Function Reply bei BUILD_RTI=OFF
|
||||
*
|
||||
* Minimaler Stub der API-Kompatibilität für request_helper.h bietet.
|
||||
*/
|
||||
class FunctionReply
|
||||
{
|
||||
public:
|
||||
FunctionReply() = default;
|
||||
|
||||
// Konstruktor für Kompatibilität mit FunctionReplyObject
|
||||
FunctionReply(int id, const std::string& str, const std::vector<std::string>& args = {}, const std::string& additionalInfo = {})
|
||||
: m_str(str)
|
||||
, m_args(args)
|
||||
, m_additionalInfo(additionalInfo)
|
||||
, m_id(id)
|
||||
{}
|
||||
|
||||
~FunctionReply() = default;
|
||||
|
||||
int id() const { return m_id; }
|
||||
void setId(int id) { m_id = id; }
|
||||
|
||||
std::string str() const { return m_str; }
|
||||
void setStr(const std::string& str) { m_str = str; }
|
||||
|
||||
bool error() const { return !m_str.empty(); }
|
||||
|
||||
int64_t uniqueId() const { return m_uniqueId; }
|
||||
void setUniqueId(int64_t uniqueId) { m_uniqueId = uniqueId; }
|
||||
|
||||
std::vector<std::string> args() const { return m_args; }
|
||||
std::string additionalInfo() const { return m_additionalInfo; }
|
||||
|
||||
private:
|
||||
std::string m_str;
|
||||
std::vector<std::string> m_args;
|
||||
std::string m_additionalInfo;
|
||||
int m_id = -1;
|
||||
int64_t m_uniqueId = 0;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
@@ -1,61 +0,0 @@
|
||||
|
||||
|
||||
#pragma once
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
#include <dds/sub/LoanedSamples.hpp>
|
||||
|
||||
namespace NGLLogger
|
||||
{
|
||||
class INGLLogger;
|
||||
}
|
||||
|
||||
namespace DTC
|
||||
{
|
||||
class SubscriberListener;
|
||||
|
||||
template <typename DRO_OBJECT, typename SC> class GenericDtcSC
|
||||
{
|
||||
public:
|
||||
using DataReaderObject = DRO_OBJECT;
|
||||
using SubscriberCallback = SC;
|
||||
using TopicType = typename DRO_OBJECT::TopicType;
|
||||
|
||||
GenericDtcSC() = default;
|
||||
virtual ~GenericDtcSC() = default;
|
||||
|
||||
virtual bool setSubscriberCallback(const SubscriberCallback& subscriberCallback) = 0;
|
||||
virtual dds::sub::LoanedSamples<TopicType> readAlive() const = 0;
|
||||
virtual dds::sub::LoanedSamples<TopicType> takeAlive() const = 0;
|
||||
virtual dds::sub::LoanedSamples<TopicType> takeDisposed() const = 0;
|
||||
virtual bool hasSamples() const = 0;
|
||||
virtual DataReaderObject* dataReader() const = 0;
|
||||
virtual bool waitForHistoricalData(int timeoutMSec) = 0;
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class GenericDtc
|
||||
: public GenericDtcSC<DRO_OBJECT, std::function<void(const typename DRO_OBJECT::TopicType&, DataModification)>>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class GenericDtcSampleInfo
|
||||
: public GenericDtcSC<DRO_OBJECT,
|
||||
std::function<void(const typename DRO_OBJECT::TopicType&, const dds::sub::SampleInfo&)>>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class Ddtc
|
||||
: public GenericDtcSC<
|
||||
DRO_OBJECT, std::function<void(const typename DRO_OBJECT::TopicType&, const std::string&, DataModification)>>
|
||||
{
|
||||
};
|
||||
|
||||
template <typename DRO_OBJECT>
|
||||
class DdtcSampleInfo
|
||||
: public GenericDtcSC<DRO_OBJECT, std::function<void(const typename DRO_OBJECT::TopicType&, const std::string&,
|
||||
const dds::sub::SampleInfo&)>>
|
||||
{
|
||||
};
|
||||
} // namespace DTC
|
||||
@@ -1,319 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* DataTopicClient (DTC) - Generic
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <DDS/Generic/generic_data_reader.h>
|
||||
#include <DDS/Generic/subscriber_listener.h>
|
||||
#include <DDS/Generic/generic_logger.h>
|
||||
#include <QTimer>
|
||||
|
||||
#include <dds/core/cond/StatusCondition.hpp>
|
||||
#include <dds/core/cond/WaitSet.hpp>
|
||||
|
||||
#include "generic_dtc.h"
|
||||
|
||||
|
||||
namespace DDSGeneric
|
||||
{
|
||||
class DynamicDataReader;
|
||||
}
|
||||
namespace DTC
|
||||
{
|
||||
|
||||
template<typename SuperClass>
|
||||
class GenericDtcImplSubscriberTemplate : public DDSGeneric::SubscriberListenerCallback, public SuperClass
|
||||
{
|
||||
public:
|
||||
using DataReaderObject = typename SuperClass::DataReaderObject;
|
||||
using SubscriberCallback = typename SuperClass::SubscriberCallback;
|
||||
using TopicTypeRead = typename DataReaderObject::TopicType;
|
||||
using TopicTypeSubscribe = typename DataReaderObject::TopicType;
|
||||
using DataReader = typename DataReaderObject::DataReader;
|
||||
|
||||
GenericDtcImplSubscriberTemplate(const dds::domain::DomainParticipant &domainParticipant,
|
||||
const dds::sub::Subscriber &ddsSubscriber,
|
||||
DDSGeneric::SubscriberListener *subscriberListener,
|
||||
const std::string &topicName = DDS::Helper::getShortTopicName(DDS::topic_type_name<TopicTypeRead>::value()))
|
||||
: m_subscriberListener(subscriberListener)
|
||||
, m_dataReaderObject(new DataReaderObject)
|
||||
, m_subscriberCallback(nullptr)
|
||||
, m_writerState(0)
|
||||
, m_logger(DDS::getLogger(DDS::topic_type_name<TopicTypeRead>::value(), DDS::DataType::DATA_TOPIC_CLIENT))
|
||||
{
|
||||
createInternal(m_dataReaderObject->create(domainParticipant, ddsSubscriber, topicName));
|
||||
}
|
||||
|
||||
GenericDtcImplSubscriberTemplate(const dds::domain::DomainParticipant &domainParticipant,
|
||||
const dds::sub::Subscriber &ddsSubscriber,
|
||||
DDSGeneric::SubscriberListener *subscriberListener,
|
||||
const dds::topic::Filter &filter,
|
||||
const std::string &topicName)
|
||||
: m_subscriberListener(subscriberListener)
|
||||
, m_dataReaderObject(new DataReaderObject)
|
||||
, m_subscriberCallback(nullptr)
|
||||
, m_writerState(0)
|
||||
, m_logger(DDS::getLogger(DDS::topic_type_name<TopicTypeRead>::value(), DDS::DataType::DATA_TOPIC_CLIENT))
|
||||
{
|
||||
createInternal(m_dataReaderObject->create(domainParticipant, ddsSubscriber, topicName, filter));
|
||||
}
|
||||
|
||||
GenericDtcImplSubscriberTemplate(const dds::domain::DomainParticipant &domainParticipant,
|
||||
const dds::sub::Subscriber &ddsSubscriber,
|
||||
DDSGeneric::SubscriberListener *subscriberListener,
|
||||
const dds::core::xtypes::StructType &structType,
|
||||
const std::string &topicName)
|
||||
: m_subscriberListener(subscriberListener)
|
||||
, m_dataReaderObject(new DataReaderObject)
|
||||
, m_subscriberCallback(nullptr)
|
||||
, m_logger(DDS::getLogger(DDS::topic_type_name<TopicTypeRead>::value(), DDS::DataType::DATA_TOPIC_CLIENT))
|
||||
{
|
||||
createInternal(m_dataReaderObject->create(domainParticipant, ddsSubscriber, topicName, structType));
|
||||
}
|
||||
|
||||
~GenericDtcImplSubscriberTemplate()
|
||||
{
|
||||
if (m_dataReaderObject && m_subscriberCallback)
|
||||
m_subscriberListener->removeCallback(m_dataReaderObject->getDataReader(), this);
|
||||
delete m_dataReaderObject;
|
||||
}
|
||||
|
||||
bool setSubscriberCallback(const SubscriberCallback &subscriberCallback) override final
|
||||
{
|
||||
if (m_subscriberCallback)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not set subscriber callback - already set ...";
|
||||
return false;
|
||||
}
|
||||
if (!m_subscriberListener)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not set subscriber callback - no subscriber listener ...";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_subscriberCallback = subscriberCallback;
|
||||
|
||||
if (!m_dataReaderObject)
|
||||
{
|
||||
WARNING_LOG(m_logger) << "Can not set subscriber callback - no data reader object ...";
|
||||
return false;
|
||||
}
|
||||
|
||||
m_dataReaderObject->setHaveSubscriberCallback(m_subscriberCallback != nullptr);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
dds::sub::LoanedSamples<TopicTypeRead> readAlive() const override final
|
||||
{
|
||||
if (!m_dataReaderObject)
|
||||
return dds::sub::LoanedSamples<TopicTypeRead>();
|
||||
|
||||
bool bSeenUnreadSamples = false;
|
||||
auto ret = m_dataReaderObject->readAlive(bSeenUnreadSamples);
|
||||
if (bSeenUnreadSamples)
|
||||
QTimer::singleShot(0, this, &GenericDtcImplSubscriberTemplate::unreadSamplesDuringRead);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
dds::sub::LoanedSamples<TopicTypeRead> takeAlive() const override final
|
||||
{
|
||||
if (!m_dataReaderObject)
|
||||
return dds::sub::LoanedSamples<TopicTypeRead>();
|
||||
|
||||
bool bSeenUnreadSamples = false;
|
||||
auto ret = m_dataReaderObject->takeAlive(bSeenUnreadSamples);
|
||||
if (bSeenUnreadSamples)
|
||||
QTimer::singleShot(0, this, &GenericDtcImplSubscriberTemplate::unreadSamplesDuringRead);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
dds::sub::LoanedSamples<TopicTypeRead> takeDisposed() const override final
|
||||
{
|
||||
if (!m_dataReaderObject)
|
||||
return dds::sub::LoanedSamples<TopicTypeRead>();
|
||||
|
||||
return m_dataReaderObject->takeDisposed();
|
||||
}
|
||||
|
||||
bool hasSamples() const override final
|
||||
{
|
||||
if (!m_dataReaderObject)
|
||||
return false;
|
||||
|
||||
return m_dataReaderObject->hasSamples();
|
||||
}
|
||||
|
||||
DataReaderObject *dataReader() const override final
|
||||
{
|
||||
return m_dataReaderObject;
|
||||
}
|
||||
|
||||
bool waitForHistoricalData(int timeoutMSec) override
|
||||
{
|
||||
if (m_dataReaderObject == nullptr ||
|
||||
m_dataReaderObject->getDataReader() == nullptr)
|
||||
return false;
|
||||
|
||||
const bool bWaitForever = (timeoutMSec < 0);
|
||||
auto dr = m_dataReaderObject->getDataReader();
|
||||
try
|
||||
{
|
||||
if (dr.subscription_matched_status().current_count() == 0)
|
||||
{
|
||||
dds::core::cond::WaitSet ws;
|
||||
dds::core::cond::StatusCondition cond(dr);
|
||||
cond.enabled_statuses(dds::core::status::StatusMask::subscription_matched());
|
||||
ws.attach_condition(cond);
|
||||
const dds::core::Duration waitTimeout(bWaitForever ? dds::core::Duration::infinite() : dds::core::Duration::from_millisecs(timeoutMSec));
|
||||
const dds::core::cond::WaitSet::ConditionSeq seq(ws.wait(waitTimeout));
|
||||
// empty sequence -> timeout
|
||||
if (seq.empty())
|
||||
return false;
|
||||
}
|
||||
dr.wait_for_historical_data(dds::core::Duration(1));
|
||||
}
|
||||
catch (const dds::core::Exception &)
|
||||
{
|
||||
// timeout
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
void unreadSamplesDuringRead()
|
||||
{
|
||||
droDataAvailable(DDS::topic_type_name<TopicTypeRead>::value(), m_dataReaderObject->topicName());
|
||||
}
|
||||
|
||||
void droDataAvailable(const std::string &topicType, const std::string &topicName) override final
|
||||
{
|
||||
Q_UNUSED(topicType);
|
||||
if (m_writerState.testAndSetRelaxed(1, 0))
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Recreate Reader for topic " << topicName
|
||||
<< ", type name " << DDS::topic_type_name<TopicTypeRead>::value();
|
||||
if (m_subscriberListener)
|
||||
m_subscriberListener->removeCallback(m_dataReaderObject->getDataReader(), this);
|
||||
m_dataReaderObject->recreateReader();
|
||||
if (m_subscriberListener)
|
||||
m_subscriberListener->addCallback(m_dataReaderObject->getDataReader(), this);
|
||||
}
|
||||
|
||||
DEBUG_LOG(m_logger) << "IN droDataAvailable(), topic name: " << topicName
|
||||
<< ", type name " << DDS::topic_type_name<TopicTypeRead>::value()
|
||||
<< ", this: " << this
|
||||
<< ", m_dataReaderObject: " << m_dataReaderObject
|
||||
<< ", hasSamples: " << (m_dataReaderObject ? m_dataReaderObject->hasSamples() : -1);
|
||||
|
||||
if (m_subscriberListener)
|
||||
m_subscriberListener->enableCallback(m_dataReaderObject->getDataReader(), this);
|
||||
|
||||
if (!m_dataReaderObject || !m_subscriberCallback)
|
||||
return;
|
||||
|
||||
m_dataReaderObject->read(m_subscriberCallback);
|
||||
}
|
||||
|
||||
void noWriterAnymore(const std::string &topicType, const std::string &topicName) override
|
||||
{
|
||||
Q_UNUSED(topicType);
|
||||
Q_UNUSED(topicName);
|
||||
m_writerState = -1;
|
||||
}
|
||||
|
||||
void writerAvailable(const std::string &topicType, const std::string &topicName) override
|
||||
{
|
||||
Q_UNUSED(topicType);
|
||||
Q_UNUSED(topicName);
|
||||
m_writerState.testAndSetRelaxed(-1, 1);
|
||||
}
|
||||
|
||||
bool createInternal(bool droInitOk)
|
||||
{
|
||||
if (!droInitOk)
|
||||
{
|
||||
ERROR_LOG(m_logger) << "Error initializing DRO for type " << DDS::topic_type_name<TopicTypeRead>::value();
|
||||
delete m_dataReaderObject;
|
||||
m_dataReaderObject = nullptr;
|
||||
return false;
|
||||
}
|
||||
|
||||
if (m_subscriberListener)
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "subscriberListener exists, adding type "
|
||||
<< DDS::topic_type_name<TopicTypeRead>::value();
|
||||
m_subscriberListener->addCallback(m_dataReaderObject->getDataReader(), this);
|
||||
}
|
||||
else
|
||||
{
|
||||
DEBUG_LOG(m_logger) << "Cannot add DTC to subscriberListener callback - type: "
|
||||
<< DDS::topic_type_name<TopicTypeRead>::value();
|
||||
}
|
||||
m_dataReaderObject->setHaveSubscriberCallback(m_subscriberListener != nullptr);
|
||||
return true;
|
||||
}
|
||||
|
||||
private:
|
||||
DDSGeneric::SubscriberListener *m_subscriberListener;
|
||||
|
||||
// DataReaderObjects (DROs)
|
||||
DataReaderObject *m_dataReaderObject;
|
||||
|
||||
// Callback for data processing
|
||||
SubscriberCallback m_subscriberCallback;
|
||||
|
||||
QAtomicInt m_writerState;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
|
||||
// Typed topic callback (DataReader)
|
||||
template<typename DRO_OBJECT>
|
||||
class GenericDtcImpl final
|
||||
: public GenericDtcImplSubscriberTemplate<GenericDtc<DRO_OBJECT>>
|
||||
{
|
||||
using BaseClass = GenericDtcImplSubscriberTemplate<GenericDtc<DRO_OBJECT>>;
|
||||
public:
|
||||
using BaseClass::BaseClass;
|
||||
};
|
||||
|
||||
// Typed topic callback (DataReader) with SampleInfo
|
||||
template<typename DRO_OBJECT>
|
||||
class GenericDtcImplSampleInfo final
|
||||
: public GenericDtcImplSubscriberTemplate<GenericDtcSampleInfo<DRO_OBJECT>>
|
||||
{
|
||||
using BaseClass = GenericDtcImplSubscriberTemplate<GenericDtcSampleInfo<DRO_OBJECT>>;
|
||||
public:
|
||||
using BaseClass::BaseClass;
|
||||
};
|
||||
|
||||
// Dynamic topic callback (DynamicDataReader)
|
||||
template<typename DRO_OBJECT>
|
||||
class DdtcImpl final
|
||||
: public GenericDtcImplSubscriberTemplate<Ddtc<DRO_OBJECT>>
|
||||
{
|
||||
using BaseClass = GenericDtcImplSubscriberTemplate<Ddtc<DRO_OBJECT>>;
|
||||
public:
|
||||
using BaseClass::BaseClass;
|
||||
};
|
||||
|
||||
// Dynamic topic callback (DynamicDataReader) with SampleInfo
|
||||
template<typename DRO_OBJECT>
|
||||
class DdtcImplSampleInfo final
|
||||
: public GenericDtcImplSubscriberTemplate<DdtcSampleInfo<DRO_OBJECT>>
|
||||
{
|
||||
using BaseClass = GenericDtcImplSubscriberTemplate<DdtcSampleInfo<DRO_OBJECT>>;
|
||||
public:
|
||||
using BaseClass::BaseClass;
|
||||
};
|
||||
|
||||
} // namespace DTC
|
||||
@@ -1,32 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
// Original ddsconnector_export.h is generated by CMake when BUILD_RTI=ON
|
||||
|
||||
// For BUILD_RTI=OFF, we don't need DLL export/import macros
|
||||
// Define DDSCONNECTOR_EXPORT as empty
|
||||
#ifndef DDSCONNECTOR_EXPORT
|
||||
#define DDSCONNECTOR_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSCONNECTOR_NO_EXPORT
|
||||
#define DDSCONNECTOR_NO_EXPORT
|
||||
#endif
|
||||
|
||||
// Static library marker (not used for BUILD_RTI=OFF)
|
||||
#ifndef DDSCONNECTOR_STATIC_DEFINE
|
||||
#define DDSCONNECTOR_STATIC_DEFINE
|
||||
#endif
|
||||
|
||||
// Deprecated marker (optional, can be empty)
|
||||
#ifndef DDSCONNECTOR_DEPRECATED
|
||||
#define DDSCONNECTOR_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef DDSCONNECTOR_DEPRECATED_EXPORT
|
||||
#define DDSCONNECTOR_DEPRECATED_EXPORT DDSCONNECTOR_DEPRECATED DDSCONNECTOR_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSCONNECTOR_DEPRECATED_NO_EXPORT
|
||||
#define DDSCONNECTOR_DEPRECATED_NO_EXPORT DDSCONNECTOR_DEPRECATED DDSCONNECTOR_NO_EXPORT
|
||||
#endif
|
||||
@@ -1,32 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
// Original ddsgen_export.h comes from RTI Connext DDS code generation
|
||||
|
||||
// For BUILD_RTI=OFF, we don't need DLL export/import macros
|
||||
// Define DDSGEN_EXPORT as empty
|
||||
#ifndef DDSGEN_EXPORT
|
||||
#define DDSGEN_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSGEN_NO_EXPORT
|
||||
#define DDSGEN_NO_EXPORT
|
||||
#endif
|
||||
|
||||
// Static library marker (not used for BUILD_RTI=OFF)
|
||||
#ifndef DDSGEN_STATIC_DEFINE
|
||||
#define DDSGEN_STATIC_DEFINE
|
||||
#endif
|
||||
|
||||
// Deprecated marker (optional, can be empty)
|
||||
#ifndef DDSGEN_DEPRECATED
|
||||
#define DDSGEN_DEPRECATED
|
||||
#endif
|
||||
|
||||
#ifndef DDSGEN_DEPRECATED_EXPORT
|
||||
#define DDSGEN_DEPRECATED_EXPORT DDSGEN_DEPRECATED DDSGEN_EXPORT
|
||||
#endif
|
||||
|
||||
#ifndef DDSGEN_DEPRECATED_NO_EXPORT
|
||||
#define DDSGEN_DEPRECATED_NO_EXPORT DDSGEN_DEPRECATED DDSGEN_NO_EXPORT
|
||||
#endif
|
||||
@@ -1,51 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
// Original generic_base.h uses RTI Connext DDS types
|
||||
|
||||
#include <string>
|
||||
#include <ddsgen_export.h>
|
||||
#include <QMetaMethod>
|
||||
|
||||
// Forward declarations for Qt types used in getMethod
|
||||
class QObject;
|
||||
|
||||
// Forward declaration for NGL logger
|
||||
namespace NGL {
|
||||
class INGLLogger;
|
||||
}
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
|
||||
// Template for topic type name - returns empty string for BUILD_RTI=OFF
|
||||
template<typename T>
|
||||
struct topic_type_name {
|
||||
static std::string value() {
|
||||
return "";
|
||||
}
|
||||
};
|
||||
|
||||
namespace Helper
|
||||
{
|
||||
// Stub implementations for BUILD_RTI=OFF
|
||||
DDSGEN_EXPORT inline std::string getFunctionTopicName(const std::string &fqName) {
|
||||
return fqName;
|
||||
}
|
||||
|
||||
DDSGEN_EXPORT inline std::string getShortTopicName(const std::string &fqName) {
|
||||
return fqName;
|
||||
}
|
||||
|
||||
// Stub for getMethod - returns default-constructed QMetaMethod
|
||||
DDSGEN_EXPORT inline QMetaMethod getMethod(NGL::INGLLogger & /*logger*/,
|
||||
QObject * /*objectToInform*/,
|
||||
const char * /*slotToExecute*/,
|
||||
const char * /*signalSignature*/,
|
||||
bool /*bWarnOnEmptySlot*/ = true) {
|
||||
// Stub implementation - returns default QMetaMethod
|
||||
return QMetaMethod();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace DDS
|
||||
@@ -1,116 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
/**
|
||||
* @file generic_data_reader.h
|
||||
* @brief Generic Data Reader wrapper for DDS
|
||||
*
|
||||
* Provides GenericDataReader template class that wraps RTI DataReader
|
||||
* when BUILD_RTI=ON, or provides stub implementation when BUILD_RTI=OFF.
|
||||
*/
|
||||
|
||||
#include <dds/sub/subfwd.hpp>
|
||||
|
||||
namespace DDSGeneric
|
||||
{
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// RTI DDS is available - include full DynamicDataReader implementation
|
||||
#include <Lts/DDS/Generic/dynamic_data_reader.h>
|
||||
|
||||
// Forward declaration stub for DataReader
|
||||
// RTI 7.7 signature: template <typename T, template <typename Q> class DELEGATE = dds::sub::detail::DataReaderImpl>
|
||||
template<typename T>
|
||||
class GenericDataReader {
|
||||
public:
|
||||
using DataType = T;
|
||||
using ReaderType = dds::sub::DataReader<T>;
|
||||
|
||||
// Minimal interface - extend as needed
|
||||
bool has_data() const { return false; }
|
||||
T read_data() { return T{}; }
|
||||
void cleanup() {}
|
||||
|
||||
// Access to underlying RTI reader if needed
|
||||
ReaderType& reader() { return m_reader; }
|
||||
const ReaderType& reader() const { return m_reader; }
|
||||
|
||||
private:
|
||||
ReaderType m_reader;
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class GenericDataReaderContentFilter {
|
||||
public:
|
||||
using DataType = T;
|
||||
// Minimal stub - extend as needed
|
||||
};
|
||||
|
||||
#else
|
||||
// BUILD_RTI=OFF: Provide minimal stub definitions
|
||||
|
||||
namespace dds {
|
||||
namespace sub {
|
||||
namespace detail {
|
||||
|
||||
// Dummy delegate class to serve as default template parameter
|
||||
template<typename Q>
|
||||
class DataReaderImpl {
|
||||
// Empty stub implementation
|
||||
};
|
||||
|
||||
} // namespace detail
|
||||
|
||||
// Forward declaration stub for DataReader
|
||||
// Must match RTI 7.7 signature for compatibility
|
||||
template<typename T, template <typename Q> class DELEGATE = detail::DataReaderImpl>
|
||||
class DataReader {
|
||||
public:
|
||||
// Minimal stub interface - add methods as needed by the codebase
|
||||
T read() { return T{}; }
|
||||
void take() {}
|
||||
};
|
||||
|
||||
} // namespace sub
|
||||
} // namespace dds
|
||||
|
||||
// GenericDataReader stub template
|
||||
template<typename T>
|
||||
class GenericDataReader {
|
||||
public:
|
||||
using DataType = T;
|
||||
|
||||
// Minimal stub methods - extend as needed
|
||||
bool has_data() const { return false; }
|
||||
T read_data() { return T{}; }
|
||||
void cleanup() {}
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
class GenericDataReaderContentFilter {
|
||||
public:
|
||||
using DataType = T;
|
||||
// Minimal stub - extend as needed
|
||||
};
|
||||
|
||||
// DynamicDataReader stub for BUILD_RTI=OFF
|
||||
class DynamicDataReader {
|
||||
public:
|
||||
using TopicType = void*;
|
||||
using DataReader = void*;
|
||||
using DataTopic = void*;
|
||||
|
||||
DynamicDataReader() {}
|
||||
~DynamicDataReader() {}
|
||||
|
||||
bool create(const void* domainParticipant, const void* ddsSubscriber,
|
||||
const std::string& specialTopicName, const void* structType)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool hasSamples() const { return false; }
|
||||
};
|
||||
|
||||
#endif // BUILD_RTI
|
||||
|
||||
} // namespace DDSGeneric
|
||||
@@ -1,84 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#ifdef BUILD_RTI
|
||||
// Real implementation with RTI NGL logger
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <ddsgen_export.h>
|
||||
#include <string>
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
|
||||
enum class DataType
|
||||
{
|
||||
DATA_TYPE_UNKNOWN = 0,
|
||||
|
||||
DATA_WRITER = 1,
|
||||
DATA_READER = 2,
|
||||
|
||||
DYNAMIC_DATA_WRITER = 3,
|
||||
DYNAMIC_DATA_READER = 4,
|
||||
|
||||
DATA_TOPIC_SERVER = 8,
|
||||
DATA_TOPIC_CLIENT = 9,
|
||||
|
||||
FUNCTION_TOPIC_SERVER = 12,
|
||||
FUNCTION_TOPIC_CLIENT = 13
|
||||
};
|
||||
|
||||
using LOGGER_T = NGL::INGLLogger&;
|
||||
|
||||
DDSGEN_EXPORT LOGGER_T getLogger(const char *name, DataType dt);
|
||||
inline LOGGER_T getLogger(const std::string &loggerName, DataType dt)
|
||||
{
|
||||
return getLogger(loggerName.data(), dt);
|
||||
}
|
||||
|
||||
} // namespace DDS
|
||||
#else
|
||||
// Stub header for BUILD_RTI=OFF
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include <ddsgen_export.h>
|
||||
#include <string>
|
||||
|
||||
namespace DDS
|
||||
{
|
||||
|
||||
// DataType enum - same as original, no RTI dependency
|
||||
enum class DataType
|
||||
{
|
||||
DATA_TYPE_UNKNOWN = 0,
|
||||
|
||||
DATA_WRITER = 1,
|
||||
DATA_READER = 2,
|
||||
|
||||
DYNAMIC_DATA_WRITER = 3,
|
||||
DYNAMIC_DATA_READER = 4,
|
||||
|
||||
DATA_TOPIC_SERVER = 8,
|
||||
DATA_TOPIC_CLIENT = 9,
|
||||
|
||||
FUNCTION_TOPIC_SERVER = 12,
|
||||
FUNCTION_TOPIC_CLIENT = 13
|
||||
};
|
||||
|
||||
// Logger type alias
|
||||
using LOGGER_T = NGL::INGLLogger&;
|
||||
|
||||
// Stub implementation for getLogger
|
||||
// Returns a dummy logger reference - in real usage, this would need proper initialization
|
||||
DDSGEN_EXPORT inline LOGGER_T getLogger(const char *name, DataType dt) {
|
||||
// Stub: return a static dummy logger
|
||||
// In production code with BUILD_RTI=OFF, this should be replaced with actual logger
|
||||
static NGL::INGLLogger* dummy_logger = nullptr;
|
||||
return *dummy_logger;
|
||||
}
|
||||
|
||||
// Inline overload for std::string
|
||||
inline LOGGER_T getLogger(const std::string &loggerName, DataType dt)
|
||||
{
|
||||
return getLogger(loggerName.data(), dt);
|
||||
}
|
||||
|
||||
} // namespace DDS
|
||||
#endif
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace EffectShowClient
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace EffectShowClient
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace EffectShowManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace EffectShowManagement
|
||||
@@ -1,31 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Stub header for CODEGEN_DATABASE generated code (BUILD_RTI=OFF)
|
||||
* This file is generated by CODEGEN_DATABASE macro when BUILD_RTI=ON
|
||||
* For BUILD_RTI=OFF builds, this stub provides the minimal interface
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Evaluations
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Base class for database interface implementation
|
||||
*
|
||||
* This class is normally generated by CODEGEN_DATABASE macro.
|
||||
* This stub provides minimal interface for BUILD_RTI=OFF builds.
|
||||
*/
|
||||
class DatabaseInterfaceImpl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DatabaseInterfaceImpl(QObject *parent = nullptr) : QObject(parent) {}
|
||||
virtual ~DatabaseInterfaceImpl() = default;
|
||||
|
||||
// Virtual methods that can be overridden by custom implementations
|
||||
virtual bool removeCategoryLinesPerNineLiner(qint64 nineLinerId) = 0;
|
||||
};
|
||||
|
||||
} // namespace Evaluations
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace Evaluations
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace Evaluations
|
||||
@@ -1,10 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Convenience header for ExerciseEventManagement
|
||||
// Includes all common types and enums
|
||||
|
||||
#include <ExerciseEventManagement/eem_enums.hpp>
|
||||
#include <ExerciseEventManagement/eem_dtc.h>
|
||||
#include <ExerciseEventManagement/eem_types.h>
|
||||
|
||||
// Additional forward declarations and common types can be added here
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace ExerciseEventManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace ExerciseEventManagement
|
||||
@@ -1,11 +0,0 @@
|
||||
/**
|
||||
* Stub export header for ExerciseEventManagement non-RTI builds
|
||||
* When BUILD_RTI=OFF, svcEemCommon library is not built
|
||||
* This stub allows dependent code to compile
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/qglobal.h>
|
||||
|
||||
// Stub export macros for non-RTI builds
|
||||
#define EEM_EXPORT
|
||||
@@ -1,37 +0,0 @@
|
||||
/**
|
||||
* Stub type definitions for ExerciseEventManagement
|
||||
* When BUILD_RTI=OFF, DDS-generated types are not available
|
||||
* This stub allows dependent code to compile
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <ExerciseEventManagement/eem_export.h>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QDateTime>
|
||||
#include <memory>
|
||||
|
||||
namespace ExerciseEventManagement
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Stub Event type for non-RTI builds
|
||||
*/
|
||||
struct EEM_EXPORT Event
|
||||
{
|
||||
Event() = default;
|
||||
~Event() = default;
|
||||
|
||||
// Basic fields - adjust based on actual usage
|
||||
QString id;
|
||||
QString type;
|
||||
QDateTime timestamp;
|
||||
QString description;
|
||||
|
||||
// Copy/move operations
|
||||
Event(const Event&) = default;
|
||||
Event(Event&&) = default;
|
||||
Event& operator=(const Event&) = default;
|
||||
Event& operator=(Event&&) = default;
|
||||
};
|
||||
|
||||
} // namespace ExerciseEventManagement
|
||||
@@ -1,165 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von DDS/RTI Codegen generiert
|
||||
// Für die Migration mit BUILD_RTI=OFF erstellen wir minimale Implementierungen
|
||||
|
||||
#include "exm_enums.hpp"
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QByteArray>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class Exercise;
|
||||
class ExercisePhase;
|
||||
|
||||
/**
|
||||
* @brief Exercise class - Stub für DDS-generierten Code
|
||||
*
|
||||
* Diese Klasse wird normalerweise von DDS aus exm_service.xml generiert.
|
||||
* Für BUILD_RTI=OFF verwenden wir diese minimale Implementierung.
|
||||
*/
|
||||
class Exercise
|
||||
{
|
||||
public:
|
||||
Exercise()
|
||||
: m_id(0)
|
||||
, m_stateId(0)
|
||||
, m_operatorId(0)
|
||||
, m_workstationId(0)
|
||||
, m_trainingAreaId(0)
|
||||
, m_radioGroupId(std::nullopt)
|
||||
, m_activePhaseId(std::nullopt)
|
||||
, m_symbolFillTypeId(0)
|
||||
, m_linkedExerciseId(std::nullopt)
|
||||
, m_sendToWms(false)
|
||||
, m_transferred(false)
|
||||
, m_hasHlaInterface(false)
|
||||
{}
|
||||
|
||||
// Getter
|
||||
int32_t id() const { return m_id; }
|
||||
std::string name() const { return m_name.toStdString(); }
|
||||
QString nameQString() const { return m_name; }
|
||||
int32_t stateId() const { return m_stateId; }
|
||||
int32_t operatorId() const { return m_operatorId; }
|
||||
int32_t workstationId() const { return m_workstationId; }
|
||||
QDateTime beginTime() const { return m_beginTime; }
|
||||
QDateTime endTime() const { return m_endTime; }
|
||||
QDateTime created() const { return m_created; }
|
||||
QDateTime startTime() const { return m_startTime; }
|
||||
QDateTime stopTime() const { return m_stopTime; }
|
||||
int32_t trainingAreaId() const { return m_trainingAreaId; }
|
||||
std::optional<int32_t> radioGroupId() const { return m_radioGroupId; }
|
||||
std::optional<int32_t> activePhaseId() const { return m_activePhaseId; }
|
||||
int32_t symbolFillTypeId() const { return m_symbolFillTypeId; }
|
||||
std::optional<int32_t> linkedExerciseId() const { return m_linkedExerciseId; }
|
||||
QString defaultTimeZone() const { return m_defaultTimeZone; }
|
||||
bool sendToWms() const { return m_sendToWms; }
|
||||
QString forces() const { return m_forces; }
|
||||
QString description() const { return m_description; }
|
||||
bool transferred() const { return m_transferred; }
|
||||
bool hasHlaInterface() const { return m_hasHlaInterface; }
|
||||
|
||||
// Setter
|
||||
void setId(int32_t id) { m_id = id; }
|
||||
void setName(const QString& name) { m_name = name; }
|
||||
void setName(const std::string& name) { m_name = QString::fromStdString(name); }
|
||||
void setStateId(int32_t stateId) { m_stateId = stateId; }
|
||||
void setOperatorId(int32_t operatorId) { m_operatorId = operatorId; }
|
||||
void setWorkstationId(int32_t workstationId) { m_workstationId = workstationId; }
|
||||
void setBeginTime(const QDateTime& time) { m_beginTime = time; }
|
||||
void setEndTime(const QDateTime& time) { m_endTime = time; }
|
||||
void setCreated(const QDateTime& time) { m_created = time; }
|
||||
void setStartTime(const QDateTime& time) { m_startTime = time; }
|
||||
void setStopTime(const QDateTime& time) { m_stopTime = time; }
|
||||
void setTrainingAreaId(int32_t id) { m_trainingAreaId = id; }
|
||||
void setRadioGroupId(std::optional<int32_t> id) { m_radioGroupId = id; }
|
||||
void setActivePhaseId(std::optional<int32_t> id) { m_activePhaseId = id; }
|
||||
void setSymbolFillTypeId(int32_t id) { m_symbolFillTypeId = id; }
|
||||
void setLinkedExerciseId(std::optional<int32_t> id) { m_linkedExerciseId = id; }
|
||||
void setDefaultTimeZone(const QString& tz) { m_defaultTimeZone = tz; }
|
||||
void setSendToWms(bool send) { m_sendToWms = send; }
|
||||
void setForces(const QString& forces) { m_forces = forces; }
|
||||
void setDescription(const QString& desc) { m_description = desc; }
|
||||
void setTransferred(bool transferred) { m_transferred = transferred; }
|
||||
void setHasHlaInterface(bool has) { m_hasHlaInterface = has; }
|
||||
|
||||
// Utility
|
||||
bool isValid() const { return m_id > 0; }
|
||||
|
||||
private:
|
||||
int32_t m_id;
|
||||
QString m_name;
|
||||
int32_t m_stateId;
|
||||
int32_t m_operatorId;
|
||||
int32_t m_workstationId;
|
||||
QDateTime m_beginTime;
|
||||
QDateTime m_endTime;
|
||||
QDateTime m_created;
|
||||
QDateTime m_startTime;
|
||||
QDateTime m_stopTime;
|
||||
int32_t m_trainingAreaId;
|
||||
std::optional<int32_t> m_radioGroupId;
|
||||
std::optional<int32_t> m_activePhaseId;
|
||||
int32_t m_symbolFillTypeId;
|
||||
std::optional<int32_t> m_linkedExerciseId;
|
||||
QString m_defaultTimeZone;
|
||||
bool m_sendToWms;
|
||||
QString m_forces;
|
||||
QString m_description;
|
||||
bool m_transferred;
|
||||
bool m_hasHlaInterface;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief ExercisePhase class - Stub für DDS-generierten Code
|
||||
*
|
||||
* Diese Klasse wird normalerweise von DDS aus exm_service.xml generiert.
|
||||
* Für BUILD_RTI=OFF verwenden wir diese minimale Implementierung.
|
||||
*/
|
||||
class ExercisePhase
|
||||
{
|
||||
public:
|
||||
ExercisePhase()
|
||||
: m_id(0)
|
||||
, m_exerciseId(0)
|
||||
{}
|
||||
|
||||
// Getter
|
||||
int32_t id() const { return m_id; }
|
||||
std::string name() const { return m_name.toStdString(); }
|
||||
QString nameQString() const { return m_name; }
|
||||
QString description() const { return m_description; }
|
||||
QDateTime beginTime() const { return m_beginTime; }
|
||||
QDateTime endTime() const { return m_endTime; }
|
||||
int32_t exerciseId() const { return m_exerciseId; }
|
||||
|
||||
// Setter
|
||||
void setId(int32_t id) { m_id = id; }
|
||||
void setName(const QString& name) { m_name = name; }
|
||||
void setName(const std::string& name) { m_name = QString::fromStdString(name); }
|
||||
void setDescription(const QString& desc) { m_description = desc; }
|
||||
void setBeginTime(const QDateTime& time) { m_beginTime = time; }
|
||||
void setEndTime(const QDateTime& time) { m_endTime = time; }
|
||||
void setExerciseId(int32_t id) { m_exerciseId = id; }
|
||||
|
||||
// Utility
|
||||
bool isValid() const { return m_id > 0; }
|
||||
|
||||
private:
|
||||
int32_t m_id;
|
||||
QString m_name;
|
||||
QString m_description;
|
||||
QDateTime m_beginTime;
|
||||
QDateTime m_endTime;
|
||||
int32_t m_exerciseId;
|
||||
};
|
||||
|
||||
} // namespace ExerciseManagement
|
||||
@@ -1,123 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include "exm_exercise.h"
|
||||
#include "ParticipantManagement/ppm_enums.hpp"
|
||||
#include "FileManagement/flm_db.h"
|
||||
// FileManagement::Folder (folders()/m_folders) ist ein echt generierter
|
||||
// DDS-Typ und wird — wie im original von ddsdtc generierten exm_dtc.h über
|
||||
// exm_dtc_types.h — aus der generierten flm.hpp (Build-Tree) eingebunden.
|
||||
#include "FileManagement/flm.hpp"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QList>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
|
||||
// ExercisePhase struct
|
||||
struct ExercisePhase
|
||||
{
|
||||
[[nodiscard]] int id() const { return m_id; }
|
||||
[[nodiscard]] std::string name() const { return m_name; }
|
||||
|
||||
int m_id = 0;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Dtc - Data Transfer Component für Exercise Management
|
||||
class Dtc : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc() = default;
|
||||
~Dtc() override = default;
|
||||
|
||||
// Initialization methods
|
||||
void enableExercise() {}
|
||||
void waitForHistoricalDataExercise() {}
|
||||
void enableExercisePhase() {}
|
||||
void waitForHistoricalDataExercisePhase() {}
|
||||
|
||||
// Exercise-Liste abrufen (Callback-basiert)
|
||||
void exercises(const std::function<void(const Exercise&)>& callback) const {
|
||||
for (const auto& ex : m_exercises) {
|
||||
callback(ex);
|
||||
}
|
||||
}
|
||||
|
||||
// Einzelnes Exercise nach ID abrufen
|
||||
Exercise exercise(int id) const {
|
||||
for (const auto& ex : m_exercises) {
|
||||
if (ex.id == id) {
|
||||
return ex;
|
||||
}
|
||||
}
|
||||
return Exercise{}; // Return empty exercise if not found
|
||||
}
|
||||
|
||||
// Exercise-Phase nach ID abrufen
|
||||
ExercisePhase exercisePhase(int phaseId) const {
|
||||
for (const auto& phase : m_phases) {
|
||||
if (phase.m_id == phaseId) {
|
||||
return phase;
|
||||
}
|
||||
}
|
||||
return ExercisePhase{}; // Return empty phase if not found
|
||||
}
|
||||
|
||||
// Folders abrufen (Callback-basiert) - benötigt von LtsFileDialog
|
||||
void folders(const std::function<void(const std::vector<FileManagement::Folder>&)>& callback) const {
|
||||
callback(m_folders);
|
||||
}
|
||||
|
||||
// Exercise-Liste als QList
|
||||
QList<Exercise> exercisesList() const { return m_exercises; }
|
||||
|
||||
// Exercise hinzufügen/entfernen/ändern
|
||||
void addExercise(const Exercise& ex) {
|
||||
m_exercises.append(ex);
|
||||
emit exerciseChanged(ex, ParticipantManagement::DataModification::eAdded);
|
||||
}
|
||||
|
||||
void updateExercise(const Exercise& ex) {
|
||||
for (auto& existing : m_exercises) {
|
||||
if (existing.id == ex.id) {
|
||||
existing = ex;
|
||||
emit exerciseChanged(ex, ParticipantManagement::DataModification::eModified);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addExercise(ex);
|
||||
}
|
||||
|
||||
void removeExercise(int id) {
|
||||
for (auto it = m_exercises.begin(); it != m_exercises.end(); ++it) {
|
||||
if (it->id == id) {
|
||||
Exercise removed = *it;
|
||||
m_exercises.erase(it);
|
||||
emit exerciseChanged(removed, ParticipantManagement::DataModification::eRemoved);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void exerciseChanged(const Exercise& exercise, ParticipantManagement::DataModification modificationType);
|
||||
|
||||
private:
|
||||
QList<Exercise> m_exercises;
|
||||
std::vector<ExercisePhase> m_phases;
|
||||
std::vector<FileManagement::Folder> m_folders;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace ExerciseManagement
|
||||
@@ -1,110 +0,0 @@
|
||||
/**
|
||||
* ExerciseManagement Function Topic Client interface
|
||||
* STUB-HEADER: Diese Datei wird normalerweise von DDS generiert
|
||||
* Für die Migration erstellen wir minimale Implementierungen
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <QObject>
|
||||
|
||||
namespace DDSConnector
|
||||
{
|
||||
class DdsConnector;
|
||||
}
|
||||
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Forward declaration
|
||||
class Ftc;
|
||||
|
||||
// Reply Handler stub classes for Function Topics
|
||||
// These are normally generated from DDS IDL definitions
|
||||
|
||||
class GetExerciseDataReplyHandler
|
||||
{
|
||||
public:
|
||||
GetExerciseDataReplyHandler() = default;
|
||||
virtual ~GetExerciseDataReplyHandler() = default;
|
||||
virtual void onGetExerciseData(const void* /*reply*/) {}
|
||||
};
|
||||
|
||||
class ModifyExerciseDataReplyHandler
|
||||
{
|
||||
public:
|
||||
ModifyExerciseDataReplyHandler() = default;
|
||||
virtual ~ModifyExerciseDataReplyHandler() = default;
|
||||
virtual void onModifyExerciseData(const void* /*reply*/) {}
|
||||
};
|
||||
|
||||
class GetExercisePhaseDataReplyHandler
|
||||
{
|
||||
public:
|
||||
GetExercisePhaseDataReplyHandler() = default;
|
||||
virtual ~GetExercisePhaseDataReplyHandler() = default;
|
||||
virtual void onGetExercisePhaseData(const void* /*reply*/) {}
|
||||
};
|
||||
|
||||
// Ftc - Function Topic Client interface for ExerciseManagement
|
||||
class Ftc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
virtual ~Ftc() = default;
|
||||
|
||||
/**
|
||||
* Create a new instance for ExerciseManagement::Interface::Ftc.
|
||||
* STUB: Returns nullptr - actual implementation would require DDS
|
||||
*/
|
||||
static std::shared_ptr<Ftc> create(const std::shared_ptr<DDSConnector::DdsConnector>& /*ddsConnector*/, bool /*forceCreate*/ = false)
|
||||
{
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique identifier for this FTC
|
||||
*/
|
||||
static inline const char* identifier() { return "ExerciseManagement.Interface.Ftc"; }
|
||||
|
||||
/**
|
||||
* Initialize this Ftc instance with all function topic clients
|
||||
*/
|
||||
virtual bool enableAll(bool /*enable*/ = true) { return false; }
|
||||
|
||||
/**
|
||||
* Enable/disable specific function topic clients
|
||||
*/
|
||||
virtual bool enableGetExerciseData(bool /*enable*/ = true) { return false; }
|
||||
virtual bool isGetExerciseDataEnabled() const { return false; }
|
||||
|
||||
virtual bool enableModifyExerciseData(bool /*enable*/ = true) { return false; }
|
||||
virtual bool isModifyExerciseDataEnabled() const { return false; }
|
||||
|
||||
virtual bool enableGetExercisePhaseData(bool /*enable*/ = true) { return false; }
|
||||
virtual bool isGetExercisePhaseDataEnabled() const { return false; }
|
||||
|
||||
/**
|
||||
* Request methods with reply handlers
|
||||
* STUB: Return -1 to indicate no request was sent
|
||||
*/
|
||||
virtual int64_t requestGetExerciseData(const void* /*request*/, GetExerciseDataReplyHandler* /*handler*/) { return -1; }
|
||||
virtual int64_t requestGetExerciseData(const void* /*request*/, const std::function<void(const void*)>& /*cb*/) { return -1; }
|
||||
virtual int64_t lastGetExerciseDataUniqueId() const { return -1; }
|
||||
|
||||
virtual int64_t requestModifyExerciseData(const void* /*request*/, ModifyExerciseDataReplyHandler* /*handler*/) { return -1; }
|
||||
virtual int64_t requestModifyExerciseData(const void* /*request*/, const std::function<void(const void*)>& /*cb*/) { return -1; }
|
||||
virtual int64_t lastModifyExerciseDataUniqueId() const { return -1; }
|
||||
|
||||
virtual int64_t requestGetExercisePhaseData(const void* /*request*/, GetExercisePhaseDataReplyHandler* /*handler*/) { return -1; }
|
||||
virtual int64_t requestGetExercisePhaseData(const void* /*request*/, const std::function<void(const void*)>& /*cb*/) { return -1; }
|
||||
virtual int64_t lastGetExercisePhaseDataUniqueId() const { return -1; }
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace ExerciseManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace GuezIedManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace GuezIedManagement
|
||||
@@ -1,137 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include "gna_nasat_aircraft.h"
|
||||
#include "gna_nasat_aircraft_participant.h"
|
||||
#include <ParticipantManagement/ppm_enums.hpp>
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <LtsUtils/LtsUtilsCore/data_modification_enum.h>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
// Forward declarations
|
||||
namespace ExerciseManagement { namespace Interface { class Dtc; } }
|
||||
namespace ParticipantManagement { namespace Interface { class Dtc; class ForeignGuiComboboxInterface; } }
|
||||
namespace LtsSession { class LtsSession; }
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
|
||||
// NasatAircraftParticipant und NasatAircraft sind bereits in gna_nasat_aircraft.h definiert
|
||||
// Diese Datei enthält nur die Dtc-Klasse
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Dtc - Data Transfer Component für GuezNasat
|
||||
class Dtc : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc() = default;
|
||||
~Dtc() override = default;
|
||||
|
||||
// NasatAircraftParticipant-Liste abrufen (Callback-basiert)
|
||||
void forEachNasatAircraftParticipant(const std::function<void(const NasatAircraftParticipant&)>& callback) const {
|
||||
for (const auto& nap : m_nasatAircraftParticipants) {
|
||||
callback(nap);
|
||||
}
|
||||
}
|
||||
|
||||
// NasatAircraftParticipant-Liste als QMap (für Model)
|
||||
QMap<qint32, NasatAircraftParticipant> nasatAircraftParticipants() const {
|
||||
QMap<qint32, NasatAircraftParticipant> result;
|
||||
for (const auto& nap : m_nasatAircraftParticipants) {
|
||||
result[nap.id()] = nap;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// NasatAircraft-Liste abrufen (Callback-basiert)
|
||||
void forEachNasatAircraft(const std::function<void(const NasatAircraft&)>& callback) const {
|
||||
for (const auto& na : m_nasatAircrafts) {
|
||||
callback(na);
|
||||
}
|
||||
}
|
||||
|
||||
// NasatAircraft-Liste als QMap
|
||||
QMap<qint32, NasatAircraft> nasatAircrafts() const {
|
||||
QMap<qint32, NasatAircraft> result;
|
||||
for (const auto& na : m_nasatAircrafts) {
|
||||
result[na.id()] = na;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// Daten hinzufügen/entfernen/ändern
|
||||
void addNasatAircraftParticipant(const NasatAircraftParticipant& nap) {
|
||||
m_nasatAircraftParticipants.append(nap);
|
||||
emit nasatAircraftParticipantChanged(nap, DataModification::eAdded);
|
||||
}
|
||||
|
||||
void updateNasatAircraftParticipant(const NasatAircraftParticipant& nap) {
|
||||
for (auto& existing : m_nasatAircraftParticipants) {
|
||||
if (existing.id() == nap.id()) {
|
||||
existing = nap;
|
||||
emit nasatAircraftParticipantChanged(nap, DataModification::eModified);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addNasatAircraftParticipant(nap);
|
||||
}
|
||||
|
||||
void removeNasatAircraftParticipant(int id) {
|
||||
for (auto it = m_nasatAircraftParticipants.begin(); it != m_nasatAircraftParticipants.end(); ++it) {
|
||||
if (it->id() == id) {
|
||||
NasatAircraftParticipant removed = *it;
|
||||
m_nasatAircraftParticipants.erase(it);
|
||||
emit nasatAircraftParticipantChanged(removed, DataModification::eRemoved);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void addNasatAircraft(const NasatAircraft& na) {
|
||||
m_nasatAircrafts.append(na);
|
||||
emit nasatAircraftChanged(na, DataModification::eAdded);
|
||||
}
|
||||
|
||||
void updateNasatAircraft(const NasatAircraft& na) {
|
||||
for (auto& existing : m_nasatAircrafts) {
|
||||
if (existing.id() == na.id()) {
|
||||
existing = na;
|
||||
emit nasatAircraftChanged(na, DataModification::eModified);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addNasatAircraft(na);
|
||||
}
|
||||
|
||||
void removeNasatAircraft(int id) {
|
||||
for (auto it = m_nasatAircrafts.begin(); it != m_nasatAircrafts.end(); ++it) {
|
||||
if (it->id() == id) {
|
||||
NasatAircraft removed = *it;
|
||||
m_nasatAircrafts.erase(it);
|
||||
emit nasatAircraftChanged(removed, DataModification::eRemoved);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void nasatAircraftParticipantChanged(const NasatAircraftParticipant& participant, DataModification modificationType);
|
||||
void nasatAircraftChanged(const NasatAircraft& aircraft, DataModification modificationType);
|
||||
|
||||
private:
|
||||
QList<NasatAircraftParticipant> m_nasatAircraftParticipants;
|
||||
QList<NasatAircraft> m_nasatAircrafts;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace GuezNasat
|
||||
@@ -1,18 +0,0 @@
|
||||
|
||||
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <NGLLogger/INGLLogger.h>
|
||||
#include "gna_export.h"
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
using LOGGER_T = NGL::INGLLogger &;
|
||||
|
||||
GNA_COMMON_EXPORT LOGGER_T getLogger(const char *name);
|
||||
inline LOGGER_T getLogger(const QString &loggerName)
|
||||
{
|
||||
return getLogger(loggerName.toUtf8().constData());
|
||||
}
|
||||
}
|
||||
@@ -1,233 +0,0 @@
|
||||
/**
|
||||
* @file ism.hpp
|
||||
* @brief DDS-Stub-Header für InfrastructureManagement
|
||||
*
|
||||
* Dieser Header ersetzt die von RTI DDS Generator erzeugten Typen.
|
||||
*/
|
||||
|
||||
#ifndef ISM_HPP
|
||||
#define ISM_HPP
|
||||
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QByteArray>
|
||||
#include <QtGui/QImage>
|
||||
#include <QtCore/QMap>
|
||||
#include "InfrastructureManagement/ism_enums.hpp"
|
||||
#include "ParticipantManagement/ppm.hpp"
|
||||
#include "ParticipantManagement/ppm_enums.hpp"
|
||||
|
||||
namespace InfrastructureManagement {
|
||||
|
||||
// Using-declaration for DataModification in InfrastructureManagement namespace
|
||||
using ParticipantManagement::DataModification;
|
||||
|
||||
// Core namespace mit GeoPosition und RelativePosition
|
||||
namespace Core {
|
||||
|
||||
class GeoPosition {
|
||||
public:
|
||||
GeoPosition() : latitude_(0.0), longitude_(0.0), altitude_(0.0) {}
|
||||
double latitude() const { return latitude_; }
|
||||
double longitude() const { return longitude_; }
|
||||
double altitude() const { return altitude_; }
|
||||
void latitude(double v) { latitude_ = v; }
|
||||
void longitude(double v) { longitude_ = v; }
|
||||
void altitude(double v) { altitude_ = v; }
|
||||
private:
|
||||
double latitude_;
|
||||
double longitude_;
|
||||
double altitude_;
|
||||
};
|
||||
|
||||
class RelativePosition {
|
||||
public:
|
||||
RelativePosition() : x_(0.0), y_(0.0), z_(0.0) {}
|
||||
double x() const { return x_; }
|
||||
double y() const { return y_; }
|
||||
double z() const { return z_; }
|
||||
void x(double v) { x_ = v; }
|
||||
void y(double v) { y_ = v; }
|
||||
void z(double v) { z_ = v; }
|
||||
private:
|
||||
double x_;
|
||||
double y_;
|
||||
double z_;
|
||||
};
|
||||
|
||||
} // namespace Core
|
||||
|
||||
// StructureElement Stub-Klasse
|
||||
class StructureElement {
|
||||
public:
|
||||
StructureElement() : id_(0), mainStructureElementId_(0), mountingPointTypeId_(MountingPointType::Undefined), mountingPointId_(0) {}
|
||||
|
||||
int32_t id() const { return id_; }
|
||||
void id(int32_t v) { id_ = v; }
|
||||
|
||||
int32_t mainStructureElementId() const { return mainStructureElementId_; }
|
||||
void mainStructureElementId(int32_t v) { mainStructureElementId_ = v; }
|
||||
|
||||
MountingPointType mountingPointTypeId() const { return mountingPointTypeId_; }
|
||||
void mountingPointTypeId(MountingPointType v) { mountingPointTypeId_ = v; }
|
||||
|
||||
// Für Kompatibilität: structureElementTypeId() als Alias
|
||||
MountingPointType structureElementTypeId() const { return mountingPointTypeId_; }
|
||||
void structureElementTypeId(MountingPointType v) { mountingPointTypeId_ = v; }
|
||||
|
||||
// mountingPointId() für Sub-ID
|
||||
int32_t mountingPointId() const { return mountingPointId_; }
|
||||
void mountingPointId(int32_t v) { mountingPointId_ = v; }
|
||||
|
||||
Core::GeoPosition geoPosition() const { return geoPosition_; }
|
||||
void geoPosition(const Core::GeoPosition& v) { geoPosition_ = v; }
|
||||
|
||||
Core::RelativePosition relPosition() const { return relPosition_; }
|
||||
void relPosition(const Core::RelativePosition& v) { relPosition_ = v; }
|
||||
|
||||
std::string properties() const { return properties_; }
|
||||
void properties(const std::string& v) { properties_ = v; }
|
||||
|
||||
std::string name() const { return name_; }
|
||||
void name(const std::string& v) { name_ = v; }
|
||||
|
||||
std::string displayName() const { return displayName_; }
|
||||
void displayName(const std::string& v) { displayName_ = v; }
|
||||
|
||||
// path() returns vector of IDs im Hierarchie-Pfad
|
||||
const std::vector<int32_t>& path() const { return path_; }
|
||||
void path(const std::vector<int32_t>& v) { path_ = v; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
int32_t mainStructureElementId_;
|
||||
MountingPointType mountingPointTypeId_;
|
||||
int32_t mountingPointId_;
|
||||
Core::GeoPosition geoPosition_;
|
||||
Core::RelativePosition relPosition_;
|
||||
std::string properties_;
|
||||
std::string name_;
|
||||
std::string displayName_;
|
||||
std::vector<int32_t> path_;
|
||||
};
|
||||
|
||||
// MainStructureElement - Stub für DDS-generierten Typ
|
||||
class MainStructureElement {
|
||||
public:
|
||||
MainStructureElement() : id_(0), groupId_(0) {}
|
||||
|
||||
int32_t id() const { return id_; }
|
||||
void id(int32_t v) { id_ = v; }
|
||||
|
||||
int32_t groupId() const { return groupId_; }
|
||||
void groupId(int32_t v) { groupId_ = v; }
|
||||
|
||||
std::string name() const { return name_; }
|
||||
void name(const std::string& v) { name_ = v; }
|
||||
|
||||
std::string displayName() const { return displayName_; }
|
||||
void displayName(const std::string& v) { displayName_ = v; }
|
||||
|
||||
Core::GeoPosition geoPosition() const { return geoPosition_; }
|
||||
void geoPosition(const Core::GeoPosition& v) { geoPosition_ = v; }
|
||||
|
||||
// For compatibility: elements() returns empty vector by default
|
||||
const std::vector<StructureElement>& elements() const { return elements_; }
|
||||
void elements(const std::vector<StructureElement>& v) { elements_ = v; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
int32_t groupId_;
|
||||
std::string name_;
|
||||
std::string displayName_;
|
||||
Core::GeoPosition geoPosition_;
|
||||
std::vector<StructureElement> elements_;
|
||||
};
|
||||
|
||||
// MountingPointAsset - Stub für DDS-generierten Typ
|
||||
class MountingPointAsset {
|
||||
public:
|
||||
MountingPointAsset() : id_(0), mountingPointId_(0), assetId_(0) {}
|
||||
|
||||
int32_t id() const { return id_; }
|
||||
void id(int32_t v) { id_ = v; }
|
||||
|
||||
int32_t mountingPointId() const { return mountingPointId_; }
|
||||
void mountingPointId(int32_t v) { mountingPointId_ = v; }
|
||||
|
||||
int32_t assetId() const { return assetId_; }
|
||||
void assetId(int32_t v) { assetId_ = v; }
|
||||
|
||||
std::string name() const { return name_; }
|
||||
void name(const std::string& v) { name_ = v; }
|
||||
|
||||
// For compatibility: structureElementId() alias for mountingPointId()
|
||||
int32_t structureElementId() const { return mountingPointId_; }
|
||||
void structureElementId(int32_t v) { mountingPointId_ = v; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
int32_t mountingPointId_;
|
||||
int32_t assetId_;
|
||||
std::string name_;
|
||||
};
|
||||
|
||||
// Forward declaration - full definition in ism_mounting_point.h
|
||||
class MountingPoint;
|
||||
|
||||
// FootprintElement - für Footprint-Daten
|
||||
class FootprintElement {
|
||||
public:
|
||||
FootprintElement() : isGroundLevel_(false) {}
|
||||
|
||||
bool isGroundLevel() const { return isGroundLevel_; }
|
||||
void isGroundLevel(bool v) { isGroundLevel_ = v; }
|
||||
|
||||
Core::RelativePosition relPosition() const { return relPosition_; }
|
||||
void relPosition(const Core::RelativePosition& v) { relPosition_ = v; }
|
||||
|
||||
private:
|
||||
bool isGroundLevel_;
|
||||
Core::RelativePosition relPosition_;
|
||||
};
|
||||
|
||||
// MainFootprint - Footprint-Daten für MainStructureElement
|
||||
class MainFootprint {
|
||||
public:
|
||||
MainFootprint() : id_(0) {}
|
||||
|
||||
int32_t id() const { return id_; }
|
||||
void id(int32_t v) { id_ = v; }
|
||||
|
||||
const std::vector<FootprintElement>& elements() const { return elements_; }
|
||||
void elements(const std::vector<FootprintElement>& v) { elements_ = v; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
std::vector<FootprintElement> elements_;
|
||||
};
|
||||
|
||||
// InstrumentationAsset - Stub für DDS-generierten Typ
|
||||
class InstrumentationAsset {
|
||||
public:
|
||||
InstrumentationAsset() : id_(0) {}
|
||||
|
||||
int32_t id() const { return id_; }
|
||||
void id(int32_t v) { id_ = v; }
|
||||
|
||||
std::string name() const { return name_; }
|
||||
void name(const std::string& v) { name_ = v; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
std::string name_;
|
||||
};
|
||||
|
||||
// StructureElementType Enum (Alias für MountingPointType für Kompatibilität)
|
||||
using StructureElementType = MountingPointType;
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
|
||||
#endif // ISM_HPP
|
||||
@@ -1,46 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Stub header for CODEGEN_DATABASE generated code (BUILD_RTI=OFF)
|
||||
* This file is generated by CODEGEN_DATABASE macro when BUILD_RTI=ON
|
||||
* For BUILD_RTI=OFF builds, this stub provides the minimal interface
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <InfrastructureManagement/ism_enums.hpp>
|
||||
|
||||
namespace Database
|
||||
{
|
||||
// Stub struct for IsmMountingPointPlan
|
||||
struct IsmMountingPointPlan
|
||||
{
|
||||
int scheduleId = 0;
|
||||
int mountingPointId = 0;
|
||||
MountingPointState mountingPointState = MountingPointState::Unknown;
|
||||
};
|
||||
} // namespace Database
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Base class for database interface implementation
|
||||
*
|
||||
* This class is normally generated by CODEGEN_DATABASE macro.
|
||||
* This stub provides minimal interface for BUILD_RTI=OFF builds.
|
||||
*/
|
||||
class DatabaseInterfaceImpl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DatabaseInterfaceImpl(QObject *parent = nullptr) : QObject(parent) {}
|
||||
virtual ~DatabaseInterfaceImpl() = default;
|
||||
|
||||
// Virtual methods that can be overridden by custom implementations
|
||||
virtual int copySchedule(int scheduleId) = 0;
|
||||
virtual bool updateMountingPointPlan(int scheduleId, int mountingPointId, MountingPointState mountingPointState) = 0;
|
||||
virtual bool deleteMountingPointPlan(int scheduleId, int mountingPointId) = 0;
|
||||
virtual bool insertMountingPointPlans(const std::vector<Database::IsmMountingPointPlan> &mpps) = 0;
|
||||
};
|
||||
|
||||
} // namespace InfrastructureManagement
|
||||
@@ -1,129 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Implementierungen
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QMap>
|
||||
#include <QtCore/QHash>
|
||||
#include <functional>
|
||||
#include "ism.hpp"
|
||||
#include "ism_mounting_point.h"
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
|
||||
// DataModification Enum
|
||||
enum class DataModification
|
||||
{
|
||||
eAdded,
|
||||
eModified,
|
||||
eRemoved
|
||||
};
|
||||
|
||||
// MountingPointPlan - Planungsdaten für MountingPoints (MUST come before MainSchedule)
|
||||
class MountingPointPlan {
|
||||
public:
|
||||
MountingPointPlan() : structureElementId_(0) {}
|
||||
int32_t structureElementId() const { return structureElementId_; }
|
||||
void structureElementId(int32_t v) { structureElementId_ = v; }
|
||||
|
||||
MountingPointState mountingPointState() const { return mountingPointState_; }
|
||||
void mountingPointState(const MountingPointState& v) { mountingPointState_ = v; }
|
||||
|
||||
private:
|
||||
int32_t structureElementId_;
|
||||
MountingPointState mountingPointState_;
|
||||
};
|
||||
|
||||
// MainSchedule - benötigt für Schedule-Daten
|
||||
class MainSchedule {
|
||||
public:
|
||||
MainSchedule() : id_(0) {}
|
||||
int32_t id() const { return id_; }
|
||||
void id(int32_t v) { id_ = v; }
|
||||
|
||||
// elements() returns vector of MountingPointPlan
|
||||
const std::vector<MountingPointPlan>& elements() const { return elements_; }
|
||||
void elements(const std::vector<MountingPointPlan>& v) { elements_ = v; }
|
||||
|
||||
private:
|
||||
int32_t id_;
|
||||
std::vector<MountingPointPlan> elements_;
|
||||
};
|
||||
|
||||
// InstrumentationAssetState Enum
|
||||
enum class InstrumentationAssetState
|
||||
{
|
||||
Undefined = 0,
|
||||
Ok = 1,
|
||||
Defect = 2
|
||||
};
|
||||
|
||||
// InstrumentationAsset - Asset-Daten
|
||||
class InstrumentationAsset {
|
||||
public:
|
||||
InstrumentationAsset() : assetId_(0), assetStateId_(InstrumentationAssetState::Undefined) {}
|
||||
int32_t assetId() const { return assetId_; }
|
||||
void assetId(int32_t v) { assetId_ = v; }
|
||||
|
||||
InstrumentationAssetState assetStateId() const { return assetStateId_; }
|
||||
void assetStateId(InstrumentationAssetState v) { assetStateId_ = v; }
|
||||
|
||||
private:
|
||||
int32_t assetId_;
|
||||
InstrumentationAssetState assetStateId_;
|
||||
};
|
||||
|
||||
// Dtc - Data Transfer Component (Hauptklasse für ISM-Daten)
|
||||
class Dtc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc(QObject* parent = nullptr) : QObject(parent) {}
|
||||
~Dtc() override = default;
|
||||
|
||||
// MainStructureElement Zugriff
|
||||
virtual const QMap<qint32, MainStructureElement>& mainStructureElements() const = 0;
|
||||
virtual MainStructureElement mainStructureElement(int32_t id) const = 0;
|
||||
virtual bool getStructureElementById(int32_t id, StructureElement& out) const = 0;
|
||||
virtual void waitForHistoricalDataMainStructureElement(int timeoutMs) = 0;
|
||||
|
||||
// MainSchedule Zugriff
|
||||
virtual const QMap<qint32, MainSchedule>& mainSchedules() const = 0;
|
||||
virtual MainSchedule mainSchedule(int32_t id) const = 0;
|
||||
virtual void waitForHistoricalDataMainSchedule(int timeoutMs) = 0;
|
||||
|
||||
// MountingPointAsset Zugriff
|
||||
virtual void mountingPointAssets(const std::function<void(const MountingPointAsset&)>& cb) = 0;
|
||||
virtual void waitForHistoricalDataMountingPointAsset(int timeoutMs) = 0;
|
||||
virtual InstrumentationAsset instrumentationAsset(int32_t assetId) const = 0;
|
||||
|
||||
// MainFootprint Zugriff (wird in ism_dtc_impl_custom_p.h verwendet)
|
||||
virtual MainFootprint mainFootprint(int mseId) const = 0;
|
||||
|
||||
signals:
|
||||
void mainStructureElementChanged(const MainStructureElement& data, DataModification modType);
|
||||
void mainScheduleChanged(const MainSchedule& data, DataModification modType);
|
||||
void mountingPointAssetChanged(const MountingPointAsset& data, DataModification modType);
|
||||
};
|
||||
|
||||
// Ftc - Forward Declaration (wird später implementiert)
|
||||
class Ftc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Ftc(QObject* parent = nullptr) : QObject(parent) {}
|
||||
~Ftc() override = default;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace InfrastructureManagement
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsftc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Ftc;
|
||||
}
|
||||
}
|
||||
@@ -1,58 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
#include <cstdint>
|
||||
#include <functional>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include <QtCore/QObject>
|
||||
|
||||
#include "LtsUtils/LtsUtilsCore/data_modification_enum.h"
|
||||
#include "mrk_marker.h"
|
||||
|
||||
namespace MarkerManagement
|
||||
{
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Dtc interface class with signals for Qt6 migration STUB
|
||||
class Dtc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit Dtc(QObject* parent = nullptr) : QObject(parent) {}
|
||||
~Dtc() override = default;
|
||||
|
||||
// Callback registration instead of enableNotification()
|
||||
void markers(std::function<void(const Marker&)> callback)
|
||||
{
|
||||
m_markerCallback = callback;
|
||||
}
|
||||
|
||||
// Trigger marker changed (for STUB testing)
|
||||
void triggerMarkerChanged(const Marker& marker, DataModification modType)
|
||||
{
|
||||
emit markerChanged(marker, modType);
|
||||
if (m_markerCallback)
|
||||
{
|
||||
m_markerCallback(marker);
|
||||
}
|
||||
}
|
||||
|
||||
signals:
|
||||
void markerChanged(const Marker& marker, DataModification modType);
|
||||
|
||||
private:
|
||||
std::function<void(const Marker&)> m_markerCallback;
|
||||
};
|
||||
|
||||
class Ftc;
|
||||
|
||||
} // namespace Interface
|
||||
|
||||
} // namespace MarkerManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace Messaging
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace Messaging
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace MeteoDataManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace MeteoDataManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace NotificationManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace NotificationManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace OcSituationServer
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace OcSituationServer
|
||||
@@ -1,133 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von DDS/RTI Codegen generiert
|
||||
// Für die Migration mit BUILD_RTI=OFF erstellen wir minimale Implementierungen
|
||||
|
||||
#include "opm_enums.hpp"
|
||||
#include <QString>
|
||||
#include <QDateTime>
|
||||
#include <QByteArray>
|
||||
#include <vector>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
namespace OperatorManagement
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
class Operator;
|
||||
class Group;
|
||||
|
||||
/**
|
||||
* @brief Operator class - Stub für DDS-generierten Code
|
||||
*
|
||||
* Diese Klasse wird normalerweise von DDS aus opm_service.xml generiert.
|
||||
* Für BUILD_RTI=OFF verwenden wir diese minimale Implementierung.
|
||||
*/
|
||||
class Operator
|
||||
{
|
||||
public:
|
||||
Operator()
|
||||
: m_id(0)
|
||||
, m_groupId(0)
|
||||
, m_accessLevel(0)
|
||||
, m_isActive(false)
|
||||
, m_isHidden(false)
|
||||
{}
|
||||
|
||||
// Getter
|
||||
int32_t id() const { return m_id; }
|
||||
std::string name() const { return m_name.toStdString(); }
|
||||
QString nameQString() const { return m_name; }
|
||||
int32_t groupId() const { return m_groupId; }
|
||||
std::string description() const { return m_description.toStdString(); }
|
||||
QByteArray image() const { return m_image; }
|
||||
int32_t accessLevel() const { return m_accessLevel; }
|
||||
bool isActive() const { return m_isActive; }
|
||||
bool isHidden() const { return m_isHidden; }
|
||||
QDateTime created() const { return m_created; }
|
||||
QDateTime modified() const { return m_modified; }
|
||||
|
||||
// Setter
|
||||
void setId(int32_t id) { m_id = id; }
|
||||
void setName(const QString& name) { m_name = name; }
|
||||
void setName(const std::string& name) { m_name = QString::fromStdString(name); }
|
||||
void setGroupId(int32_t groupId) { m_groupId = groupId; }
|
||||
void setDescription(const QString& description) { m_description = description; }
|
||||
void setImage(const QByteArray& image) { m_image = image; }
|
||||
void setAccessLevel(int32_t accessLevel) { m_accessLevel = accessLevel; }
|
||||
void setIsActive(bool active) { m_isActive = active; }
|
||||
void setIsHidden(bool hidden) { m_isHidden = hidden; }
|
||||
void setCreated(const QDateTime& created) { m_created = created; }
|
||||
void setModified(const QDateTime& modified) { m_modified = modified; }
|
||||
|
||||
// Utility
|
||||
bool isValid() const { return m_id > 0; }
|
||||
|
||||
private:
|
||||
int32_t m_id;
|
||||
QString m_name;
|
||||
int32_t m_groupId;
|
||||
QString m_description;
|
||||
QByteArray m_image;
|
||||
int32_t m_accessLevel;
|
||||
bool m_isActive;
|
||||
bool m_isHidden;
|
||||
QDateTime m_created;
|
||||
QDateTime m_modified;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Group class - Stub für DDS-generierten Code
|
||||
*
|
||||
* Diese Klasse wird normalerweise von DDS aus opm_service.xml generiert.
|
||||
* Für BUILD_RTI=OFF verwenden wir diese minimale Implementierung.
|
||||
*/
|
||||
class Group
|
||||
{
|
||||
public:
|
||||
Group()
|
||||
: m_id(0)
|
||||
, m_typeId(0)
|
||||
, m_isHidden(false)
|
||||
{}
|
||||
|
||||
// Getter
|
||||
int32_t id() const { return m_id; }
|
||||
std::string name() const { return m_name.toStdString(); }
|
||||
QString nameQString() const { return m_name; }
|
||||
std::string description() const { return m_description.toStdString(); }
|
||||
int32_t typeId() const { return m_typeId; }
|
||||
bool isHidden() const { return m_isHidden; }
|
||||
std::vector<int32_t> memberIds() const { return m_memberIds; }
|
||||
|
||||
// Setter
|
||||
void setId(int32_t id) { m_id = id; }
|
||||
void setName(const QString& name) { m_name = name; }
|
||||
void setName(const std::string& name) { m_name = QString::fromStdString(name); }
|
||||
void setDescription(const QString& description) { m_description = description; }
|
||||
void setTypeId(int32_t typeId) { m_typeId = typeId; }
|
||||
void setIsHidden(bool hidden) { m_isHidden = hidden; }
|
||||
void setMemberIds(const std::vector<int32_t>& ids) { m_memberIds = ids; }
|
||||
|
||||
// Utility
|
||||
bool isValid() const { return m_id > 0; }
|
||||
void addMember(int32_t operatorId) { m_memberIds.push_back(operatorId); }
|
||||
void removeMember(int32_t operatorId)
|
||||
{
|
||||
m_memberIds.erase(
|
||||
std::remove(m_memberIds.begin(), m_memberIds.end(), operatorId),
|
||||
m_memberIds.end());
|
||||
}
|
||||
|
||||
private:
|
||||
int32_t m_id;
|
||||
QString m_name;
|
||||
QString m_description;
|
||||
int32_t m_typeId;
|
||||
bool m_isHidden;
|
||||
std::vector<int32_t> m_memberIds;
|
||||
};
|
||||
|
||||
} // namespace OperatorManagement
|
||||
@@ -1,43 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Implementierungen
|
||||
|
||||
#include <QtGlobal>
|
||||
#include <string>
|
||||
#include <memory>
|
||||
|
||||
namespace OperatorManagement
|
||||
{
|
||||
|
||||
struct User
|
||||
{
|
||||
[[nodiscard]] qint32 id() const { return m_id; }
|
||||
[[nodiscard]] std::string name() const { return m_name; }
|
||||
|
||||
qint32 m_id = 0;
|
||||
std::string m_name;
|
||||
};
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc
|
||||
{
|
||||
public:
|
||||
// Initialization methods
|
||||
void enableUser() {}
|
||||
void waitForHistoricalDataUser() {}
|
||||
|
||||
User user(qint32 id) const
|
||||
{
|
||||
// STUB-Implementierung - leerer User
|
||||
User u;
|
||||
u.m_id = id;
|
||||
u.m_name = "Unknown";
|
||||
return u;
|
||||
}
|
||||
};
|
||||
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace OperatorManagement
|
||||
@@ -1,93 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* OperatorManagement DTC Implementation
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Stub-Header für Qt6-Migration - ersetzt DDS-generierten Header
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <FileManagement/flm_db_impl.h>
|
||||
#include <QHash>
|
||||
#include <memory>
|
||||
|
||||
// Forward declarations für DDS
|
||||
namespace DDSConnector
|
||||
{
|
||||
class DdsConnector;
|
||||
}
|
||||
|
||||
// User-Klasse Stub für Qt6-Migration
|
||||
// Hinweis: Diese Klasse wird normalerweise von DDS generiert
|
||||
// Dieser Stub stellt die benötigten Methoden für opm_dtc_impl_custom.cpp bereit
|
||||
class User
|
||||
{
|
||||
public:
|
||||
int id() const { return m_id; }
|
||||
QString name() const { return m_name; }
|
||||
QVector<int> effectiveAcls() const { return m_effectiveAcls; }
|
||||
|
||||
struct VisiblePartyByExercise
|
||||
{
|
||||
int exerciseId() const { return m_exerciseId; }
|
||||
std::optional<QVector<int>> visibleParties() const { return m_visibleParties; }
|
||||
std::optional<QVector<int>> hiddenParties() const { return m_hiddenParties; }
|
||||
QString properties() const { return m_properties; }
|
||||
|
||||
int m_exerciseId = 0;
|
||||
std::optional<QVector<int>> m_visibleParties;
|
||||
std::optional<QVector<int>> m_hiddenParties;
|
||||
QString m_properties;
|
||||
};
|
||||
|
||||
QVector<VisiblePartyByExercise> visiblePartiesByExercise() const { return m_visiblePartiesByExercise; }
|
||||
QVector<int> exerciseIds() const { return m_exerciseIds; }
|
||||
QString properties() const { return m_properties; }
|
||||
|
||||
private:
|
||||
int m_id = 0;
|
||||
QString m_name;
|
||||
QVector<int> m_effectiveAcls;
|
||||
QVector<VisiblePartyByExercise> m_visiblePartiesByExercise;
|
||||
QVector<int> m_exerciseIds;
|
||||
QString m_properties;
|
||||
};
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------------
|
||||
namespace OperatorManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
/**
|
||||
* @brief DtcImpl - Basisklasse für OperatorManagement DTC
|
||||
*
|
||||
* Stellt Logger und User-Container für Custom-Implementierungen bereit
|
||||
* Erbt von FileManagement::DatabaseInterfaceImpl für Datenbank-Zugriff
|
||||
*/
|
||||
class DtcImpl : public FileManagement::DatabaseInterfaceImpl
|
||||
{
|
||||
public:
|
||||
explicit DtcImpl(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: FileManagement::DatabaseInterfaceImpl()
|
||||
, m_ddsConnector(ddsConnector)
|
||||
{
|
||||
// Logger wird von DatabaseInterfaceImpl bereitgestellt
|
||||
// m_logger ist in DatabaseInterfaceImpl definiert
|
||||
}
|
||||
|
||||
~DtcImpl() override = default;
|
||||
|
||||
// Virtuelle Methoden für Custom-Implementierung
|
||||
virtual std::vector<int> getOperatorsByOperatorRight(int operatorRight) = 0;
|
||||
virtual std::vector<int> operatorForExerciseParty(int exerciseId, int partyId) = 0;
|
||||
virtual std::vector<int> getNotificationRecipents(int exerciseId, int partyId, int operatorRight, int notificationType) = 0;
|
||||
virtual bool isAdlerAllowedParty(int exerciseId, int partyId, int operatorId) = 0;
|
||||
|
||||
protected:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
QHash<int, User> m_userCont; // User-Container für Operator-Daten
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace OperatorManagement
|
||||
@@ -1,21 +0,0 @@
|
||||
#ifndef OPM_FTC_H
|
||||
#define OPM_FTC_H
|
||||
|
||||
// Stub header for OperatorManagement FTC functionality
|
||||
// This file is part of FilterManagement which is excluded from build
|
||||
// For non-FilterManagement builds, we provide this stub
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QObject>
|
||||
|
||||
// Forward declarations and stubs for FTC (Filter/Translation/Conversion)
|
||||
// Actual implementation is in FilterManagement plugin
|
||||
|
||||
class OpmFtc
|
||||
{
|
||||
public:
|
||||
virtual ~OpmFtc() = default;
|
||||
// Stub methods - actual implementation in FilterManagement
|
||||
};
|
||||
|
||||
#endif // OPM_FTC_H
|
||||
@@ -1,182 +0,0 @@
|
||||
#pragma once
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von DDS generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include "ppm_enums.hpp"
|
||||
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QMap>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
|
||||
// Type - Struct mit id und typeClass (nicht nur Alias!)
|
||||
struct Type {
|
||||
int id = 0;
|
||||
TypeClass typeClass = TypeClass::eUninitialized;
|
||||
|
||||
// Helper methods für Kompatibilität (andere Namen als Member!)
|
||||
int getId() const { return id; }
|
||||
TypeClass getTypeClass() const { return typeClass; }
|
||||
};
|
||||
|
||||
// Participant - Basisdaten eines Teilnehmers
|
||||
struct Participant {
|
||||
int m_id = 0;
|
||||
QString internalName;
|
||||
QString externalName;
|
||||
int typeId = 0;
|
||||
int partyId = 0;
|
||||
bool isVerbund = false;
|
||||
int superiorId = 0;
|
||||
|
||||
// Additional fields as needed
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
double heading = 0.0;
|
||||
|
||||
// Optional fields (für DDS-Kompatibilität)
|
||||
std::optional<int> equipmentNumber;
|
||||
QString m_designator;
|
||||
QString m_tacticalIdentifier;
|
||||
|
||||
// Helper methods
|
||||
QString name() const { return internalName; }
|
||||
QString designator() const { return m_designator; }
|
||||
QString tacticalIdentifier() const { return m_tacticalIdentifier; }
|
||||
std::optional<int> getEquipmentNumber() const { return equipmentNumber; }
|
||||
int id() const { return m_id; }
|
||||
};
|
||||
|
||||
// Party - Gruppe/Organisation von Teilnehmern
|
||||
struct Party {
|
||||
int id = 0;
|
||||
QString name;
|
||||
QString shortName;
|
||||
int color() const { return 0xFF000000; } // Default schwarz als QRgb
|
||||
};
|
||||
|
||||
// ParticipantPosition - Position eines Teilnehmers
|
||||
struct ParticipantPosition {
|
||||
int participantId = 0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
double heading = 0.0;
|
||||
double speed = 0.0;
|
||||
qint64 timestamp = 0;
|
||||
};
|
||||
|
||||
// DynamicParticipantData - Dynamische Teilnehmerdaten
|
||||
struct DynamicParticipantData {
|
||||
int participantId = 0;
|
||||
QString status;
|
||||
QString role;
|
||||
qint64 lastUpdate = 0;
|
||||
};
|
||||
|
||||
// MainSchedule - Stub für DDS-generierten Typ
|
||||
struct MainSchedule {
|
||||
int32_t id = 0;
|
||||
QString name;
|
||||
QString description;
|
||||
qint64 startTime = 0;
|
||||
qint64 endTime = 0;
|
||||
bool isActive = false;
|
||||
};
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
// Using-Declaration für DataModification aus Parent-Namespace
|
||||
using ParticipantManagement::DataModification;
|
||||
|
||||
// Dtc - Data Transfer Component für Participant Management
|
||||
// DDS-generierte Klasse mit participantChanged Signal
|
||||
class Dtc : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc() = default;
|
||||
~Dtc() override = default;
|
||||
|
||||
// Teilnehmer-Liste abrufen (Callback-basiert wie im Original)
|
||||
void participants(const std::function<void(const Participant&)>& callback) const {
|
||||
for (const auto& p : m_participants) {
|
||||
callback(p);
|
||||
}
|
||||
}
|
||||
|
||||
// Teilnehmer-Liste als QList (für direkten Zugriff)
|
||||
QList<Participant> participantsList() const { return m_participants; }
|
||||
|
||||
// Teilnehmer hinzufügen/entfernen/ändern
|
||||
void addParticipant(const Participant& p) {
|
||||
m_participants.append(p);
|
||||
emit participantChanged(p, DataModification::eAdded);
|
||||
}
|
||||
|
||||
void updateParticipant(const Participant& p) {
|
||||
for (auto& existing : m_participants) {
|
||||
if (existing.m_id == p.m_id) {
|
||||
existing = p;
|
||||
emit participantChanged(p, DataModification::eModified);
|
||||
return;
|
||||
}
|
||||
}
|
||||
addParticipant(p);
|
||||
}
|
||||
|
||||
void removeParticipant(int id) {
|
||||
for (auto it = m_participants.begin(); it != m_participants.end(); ++it) {
|
||||
if (it->m_id == id) {
|
||||
Participant removed = *it;
|
||||
m_participants.erase(it);
|
||||
emit participantChanged(removed, DataModification::eRemoved);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Hierarchy-Methoden (STUB)
|
||||
QString hierarchyFromParticipant(int participantId) const {
|
||||
Q_UNUSED(participantId);
|
||||
return QString();
|
||||
}
|
||||
|
||||
// Party-Methoden (STUB)
|
||||
Party party(int partyId) const {
|
||||
Q_UNUSED(partyId);
|
||||
return Party();
|
||||
}
|
||||
|
||||
signals:
|
||||
// Signal für Teilnehmer-Änderungen
|
||||
void participantChanged(const Participant& participant, DataModification modificationType);
|
||||
|
||||
private:
|
||||
QList<Participant> m_participants;
|
||||
QMap<int, QString> m_hierarchies;
|
||||
QMap<int, Party> m_parties;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
|
||||
// Stream operator for logging
|
||||
inline std::ostream& operator<<(std::ostream& os, const Type& t) {
|
||||
os << "Type(id=" << t.id << ", typeClass=" << t.typeClass << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
inline std::ostream& operator<<(std::ostream& os, const Participant& p) {
|
||||
os << "Participant(id=" << p.m_id << ", name=" << p.name().toStdString() << ")";
|
||||
return os;
|
||||
}
|
||||
|
||||
} // namespace ParticipantManagement
|
||||
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Stub header for CODEGEN_DATABASE generated code (BUILD_RTI=OFF)
|
||||
* This file is generated by CODEGEN_DATABASE macro when BUILD_RTI=ON
|
||||
* For BUILD_RTI=OFF builds, this stub provides the minimal interface
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Database
|
||||
{
|
||||
// Stub struct for EquipmentExerciseMapping
|
||||
struct EquipmentExerciseMapping
|
||||
{
|
||||
int equipmentId = 0;
|
||||
int exerciseId = 0;
|
||||
};
|
||||
} // namespace Database
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Base class for database interface implementation
|
||||
*
|
||||
* This class is normally generated by CODEGEN_DATABASE macro.
|
||||
* This stub provides minimal interface for BUILD_RTI=OFF builds.
|
||||
*/
|
||||
class DatabaseInterfaceImpl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DatabaseInterfaceImpl(QObject *parent = nullptr) : QObject(parent) {}
|
||||
virtual ~DatabaseInterfaceImpl() = default;
|
||||
|
||||
// Virtual methods that can be overridden by custom implementations
|
||||
virtual bool removeEquipmentExerciseMapping(const Database::EquipmentExerciseMapping &equipmentExerciseMapping) = 0;
|
||||
};
|
||||
|
||||
} // namespace ParticipantManagement
|
||||
@@ -1,44 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// DDS-Stub-Header für ParticipantManagement FTC (Filter Topic Client)
|
||||
// Generiert für Qt6-Migration ohne RTI DDS
|
||||
|
||||
#include <ParticipantManagement/ppm.hpp>
|
||||
#include <Core/core_types.h>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
class Ftc
|
||||
{
|
||||
public:
|
||||
class ModifyTypeReplyHandler
|
||||
{
|
||||
public:
|
||||
virtual ~ModifyTypeReplyHandler() = default;
|
||||
virtual void onModifyTypeReply(const Core::FunctionReplyObject &replyObject) = 0;
|
||||
};
|
||||
|
||||
Ftc() = default;
|
||||
virtual ~Ftc() = default;
|
||||
|
||||
virtual std::map<int32_t, Type> getTypes() const
|
||||
{
|
||||
return std::map<int32_t, Type>();
|
||||
}
|
||||
|
||||
virtual Type type(int32_t typeId) const
|
||||
{
|
||||
Type t;
|
||||
t.id = typeId;
|
||||
return t;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace ParticipantManagement
|
||||
@@ -1,14 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// Translation Helper für ParticipantManagement Module
|
||||
// Wrapper für QObject::tr() in nicht-QObject Klassen
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include "ppmcommon_export.h"
|
||||
|
||||
namespace ParticipantManagement
|
||||
{
|
||||
|
||||
PPMCOMMON_EXPORT QString tr(const char *sourceText, const char *comment = nullptr, int n = -1);
|
||||
|
||||
} // namespace ParticipantManagement
|
||||
@@ -1,40 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include <QtCore/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
|
||||
@@ -1,190 +0,0 @@
|
||||
/**
|
||||
* @file pre_dtc.h
|
||||
* @brief DDS-generated Stub-Header für PresentationManagement DTC (Data Transfer Component)
|
||||
*
|
||||
* Dieser Header ist ein Stub für den von RTI DDS Generator erzeugten Header.
|
||||
* Ermöglicht Build ohne echte DDS-Codegenerierung.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QObject>
|
||||
#include <QtCore/QString>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace PresentationManagement
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
struct Presentation;
|
||||
struct PresentationContent;
|
||||
struct GetPresentationContentReply;
|
||||
|
||||
// FileStatus Enum - Status einer Präsentation
|
||||
enum class FileStatus : int { Valid = 0, Deleted = 1 };
|
||||
|
||||
// Presentation - DDS-generierter Typ für Präsentationen
|
||||
struct Presentation
|
||||
{
|
||||
int32_t id = 0;
|
||||
QString name;
|
||||
QString description;
|
||||
int32_t operatorId = 0;
|
||||
qint64 lastModified = 0;
|
||||
FileStatus fileStatus = FileStatus::Valid;
|
||||
};
|
||||
|
||||
// PresentationContent - Inhalt einer Präsentation
|
||||
struct PresentationContent
|
||||
{
|
||||
QString attributes;
|
||||
QString channel;
|
||||
QString description;
|
||||
int32_t duration = 0;
|
||||
double height = 0.0;
|
||||
int32_t id = 0;
|
||||
int32_t index = 0;
|
||||
int32_t presentationId = 0;
|
||||
QString presentationTopicType;
|
||||
qint64 startTime = 0;
|
||||
double width = 0.0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
};
|
||||
|
||||
// GetPresentationContentReply - Reply für GetPresentationContent Request
|
||||
struct GetPresentationContentReply
|
||||
{
|
||||
QList<PresentationContent> content;
|
||||
};
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Dtc - Data Transfer Component für Presentation Management
|
||||
*
|
||||
* DDS-generierte Klasse mit Präsentation-Daten und Signalen für Änderungen.
|
||||
*/
|
||||
class Dtc : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
Dtc() = default;
|
||||
~Dtc() override = default;
|
||||
|
||||
// Präsentations-Liste abrufen (Callback-basiert)
|
||||
void presentations(const std::function<void(const Presentation&)>& callback) const
|
||||
{
|
||||
for (const auto& p : m_presentations)
|
||||
{
|
||||
callback(p);
|
||||
}
|
||||
}
|
||||
|
||||
// Präsentations-Liste als QList (für direkten Zugriff)
|
||||
QList<Presentation> presentationsList() const
|
||||
{
|
||||
return m_presentations;
|
||||
}
|
||||
|
||||
// Präsentation hinzufügen/entfernen/ändern
|
||||
void addPresentation(const Presentation& p)
|
||||
{
|
||||
m_presentations.append(p);
|
||||
emit presentationChanged(p, 0); // 0 = added
|
||||
}
|
||||
|
||||
void updatePresentation(const Presentation& p)
|
||||
{
|
||||
for (auto& existing : m_presentations)
|
||||
{
|
||||
if (existing.id == p.id)
|
||||
{
|
||||
existing = p;
|
||||
emit presentationChanged(p, 1); // 1 = modified
|
||||
return;
|
||||
}
|
||||
}
|
||||
addPresentation(p);
|
||||
}
|
||||
|
||||
void removePresentation(int id)
|
||||
{
|
||||
for (auto it = m_presentations.begin(); it != m_presentations.end(); ++it)
|
||||
{
|
||||
if (it->id == id)
|
||||
{
|
||||
Presentation removed = *it;
|
||||
m_presentations.erase(it);
|
||||
emit presentationChanged(removed, 2); // 2 = removed
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Content getter/setter für PresentationContent
|
||||
void content(const std::function<void(const PresentationContent&)>& callback) const
|
||||
{
|
||||
for (const auto& c : m_content)
|
||||
{
|
||||
callback(c);
|
||||
}
|
||||
}
|
||||
|
||||
QList<PresentationContent> contentList() const
|
||||
{
|
||||
return m_content;
|
||||
}
|
||||
|
||||
void setContent(const QList<PresentationContent>& content)
|
||||
{
|
||||
m_content = content;
|
||||
}
|
||||
|
||||
signals:
|
||||
// Signal für Präsentations-Änderungen
|
||||
void presentationChanged(const Presentation& presentation, int modificationType);
|
||||
|
||||
private:
|
||||
QList<Presentation> m_presentations;
|
||||
QList<PresentationContent> m_content;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Ftc - Filter Topic Client für Presentation Management
|
||||
*
|
||||
* DDS-generierte Klasse für Presentation-Client-Operationen.
|
||||
*/
|
||||
class Ftc
|
||||
{
|
||||
public:
|
||||
using ModifyTypeReplyHandler = std::function<void(bool success)>;
|
||||
|
||||
virtual ~Ftc() = default;
|
||||
|
||||
/**
|
||||
* @brief Factory-Methode zur Erstellung einer Ftc-Instanz
|
||||
* @param connector DDS-Connector (wird im Stub ignoriert)
|
||||
* @return Shared Pointer zur Ftc-Instanz (nullptr im Stub)
|
||||
*/
|
||||
static std::shared_ptr<Ftc> create(void* /*connector*/)
|
||||
{
|
||||
return nullptr; // Stub returns nullptr - actual implementation requires DDS
|
||||
}
|
||||
|
||||
// PresentationModify Reply Handler
|
||||
virtual void presentationModifyReply(ModifyTypeReplyHandler handler) = 0;
|
||||
|
||||
// PresentationRemove Reply Handler
|
||||
virtual void presentationRemoveReply(ModifyTypeReplyHandler handler) = 0;
|
||||
|
||||
// GetPresentationContent Reply Handler
|
||||
virtual void getPresentationContentReply(const GetPresentationContentReply& reply) = 0;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace PresentationManagement
|
||||
@@ -1,259 +0,0 @@
|
||||
/**
|
||||
* Stub implementation for DtcImpl base class
|
||||
* Qt6 Migration - provides minimal stub implementations
|
||||
*/
|
||||
|
||||
#include "pdm_dtc_impl.h"
|
||||
#include <QJsonObject>
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
DtcImpl::DtcImpl(const std::shared_ptr<DDSConnector::DdsConnector> &ddsConnector)
|
||||
: m_ddsConnector(ddsConnector)
|
||||
{
|
||||
}
|
||||
|
||||
DtcImpl::~DtcImpl() = default;
|
||||
|
||||
// Data access methods - stub implementations
|
||||
ChargeTypeData DtcImpl::chargeType(int /*chargeTypeId*/)
|
||||
{
|
||||
return ChargeTypeData();
|
||||
}
|
||||
|
||||
IgniterType DtcImpl::igniterType(int /*igniterTypeId*/)
|
||||
{
|
||||
return IgniterType();
|
||||
}
|
||||
|
||||
IgniterFunction DtcImpl::igniterFunction(int /*igniterFunctionId*/)
|
||||
{
|
||||
return IgniterFunction();
|
||||
}
|
||||
|
||||
LoadType DtcImpl::loadType(int /*loadTypeId*/)
|
||||
{
|
||||
return LoadType();
|
||||
}
|
||||
|
||||
GearType DtcImpl::gearType(int /*gearTypeId*/)
|
||||
{
|
||||
return GearType();
|
||||
}
|
||||
|
||||
int DtcImpl::targetType(int /*targetTypeId*/)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
TargetSubType DtcImpl::targetSubType(int /*targetSubTypeId*/)
|
||||
{
|
||||
return TargetSubType();
|
||||
}
|
||||
|
||||
// Collection getters - stub implementations
|
||||
QMap<int, ChargeTypeData> DtcImpl::chargeTypes()
|
||||
{
|
||||
return QMap<int, ChargeTypeData>();
|
||||
}
|
||||
|
||||
QVector<IgniterType> DtcImpl::igniterTypes()
|
||||
{
|
||||
return QVector<IgniterType>();
|
||||
}
|
||||
|
||||
QVector<IgniterFunction> DtcImpl::igniterFunctions()
|
||||
{
|
||||
return QVector<IgniterFunction>();
|
||||
}
|
||||
|
||||
QVector<LoadType> DtcImpl::loadTypes()
|
||||
{
|
||||
return QVector<LoadType>();
|
||||
}
|
||||
|
||||
QVector<GearType> DtcImpl::gearTypes()
|
||||
{
|
||||
return QVector<GearType>();
|
||||
}
|
||||
|
||||
QVector<int> DtcImpl::targetTypes()
|
||||
{
|
||||
return QVector<int>();
|
||||
}
|
||||
|
||||
QVector<TargetSubType> DtcImpl::targetSubTypes()
|
||||
{
|
||||
return QVector<TargetSubType>();
|
||||
}
|
||||
|
||||
QVector<ChargeTypeIgniterTypeIgniterFunction> DtcImpl::chargeTypeIgniterTypeIgniterFunctions()
|
||||
{
|
||||
return QVector<ChargeTypeIgniterTypeIgniterFunction>();
|
||||
}
|
||||
|
||||
QVector<ChargeTypeLoadType> DtcImpl::chargeTypeLoadTypes()
|
||||
{
|
||||
return QVector<ChargeTypeLoadType>();
|
||||
}
|
||||
|
||||
QVector<GearTypeChargeType> DtcImpl::gearTypeChargeTypes()
|
||||
{
|
||||
return QVector<GearTypeChargeType>();
|
||||
}
|
||||
|
||||
QVector<BuildingChargeEffect> DtcImpl::buildingChargeEffects()
|
||||
{
|
||||
return QVector<BuildingChargeEffect>();
|
||||
}
|
||||
|
||||
// isEnabled checks - stub implementations
|
||||
bool DtcImpl::isChargeTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isIgniterTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isIgniterFunctionEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isLoadTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isGearTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isTargetTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isTargetSubTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isChargeTypeIgniterTypeIgniterFunctionEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isChargeTypeLoadTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isGearTypeChargeTypeEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool DtcImpl::isBuildingChargeEffectEnabled()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
// waitForHistoricalData methods - stub implementations
|
||||
void DtcImpl::waitForHistoricalDataChargeType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataIgniterType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataIgniterFunction(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataLoadType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataGearType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataTargetType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataTargetSubType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataChargeTypeIgniterTypeIgniterFunction(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataChargeTypeLoadType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataGearTypeChargeType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataBuildingChargeEffect(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
// Additional enable methods for pdm_handler.cpp
|
||||
void DtcImpl::enableGearType(bool /*enable*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::enableGearTypeChargeType(bool /*enable*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::enableTargetTypeTargetSubType(bool /*enable*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::enableRadioGroup(bool /*enable*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::enableVulnerabilityKind(bool /*enable*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::enableBuildingChargeEffect(bool /*enable*/)
|
||||
{
|
||||
}
|
||||
|
||||
// Additional waitForHistoricalData methods for pdm_handler.cpp
|
||||
void DtcImpl::waitForHistoricalDataTargetTypeTargetSubType(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataRadioGroup(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
void DtcImpl::waitForHistoricalDataVulnerabilityKind(int /*timeout_ms*/)
|
||||
{
|
||||
}
|
||||
|
||||
// Helper methods
|
||||
QJsonObject DtcImpl::propertiesToJson(const std::string & /*properties*/)
|
||||
{
|
||||
return QJsonObject();
|
||||
}
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace ProjectDataManagement
|
||||
@@ -1,7 +0,0 @@
|
||||
// Stub file for pdm_enums.hpp - used when BUILD_RTI=OFF
|
||||
#ifndef PDM_ENUMS_HPP
|
||||
#define PDM_ENUMS_HPP
|
||||
|
||||
// Minimal stub - actual enums generated by rtiddsgen when BUILD_RTI=ON
|
||||
|
||||
#endif // PDM_ENUMS_HPP
|
||||
@@ -1,34 +0,0 @@
|
||||
|
||||
/**
|
||||
* Operator Rights definitions
|
||||
*/
|
||||
|
||||
// warning: this file is generated with command
|
||||
// Lts/Common/CodeGen/codegen_simple.py ALL Lts/Services/ProjectDataManagement/pdm_service.xml build/Lts/Services/ProjectDataManagement/
|
||||
// at Sun Sep 6 18:00:15 2026
|
||||
// it will be overwritten by next run - do not modify!
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace ProjectDataManagement
|
||||
{
|
||||
static const int Offset = 29;
|
||||
}
|
||||
|
||||
namespace OperatorRights
|
||||
{
|
||||
enum Charges
|
||||
{
|
||||
ChargeVisibilityEdit = 0x1d010001,
|
||||
};
|
||||
|
||||
enum Groups_ProjectDataManagement
|
||||
{
|
||||
GroupChargeVisibility = 0x1d010000,
|
||||
};
|
||||
|
||||
enum Plugins_ProjectDataManagement
|
||||
{
|
||||
PluginCharges = 0x1d010000,
|
||||
};
|
||||
} // namespace OperatorRights
|
||||
@@ -1,7 +0,0 @@
|
||||
// Stub file for pdm_translation.h - used when BUILD_GRANTLEE=OFF
|
||||
#ifndef PDM_TRANSLATION_H
|
||||
#define PDM_TRANSLATION_H
|
||||
|
||||
// Minimal stub - actual translation generated by codegen when BUILD_GRANTLEE=ON
|
||||
|
||||
#endif // PDM_TRANSLATION_H
|
||||
@@ -1,15 +0,0 @@
|
||||
// Stub file for pdm_types.h - used when BUILD_GRANTLEE=OFF
|
||||
#ifndef PDM_TYPES_H
|
||||
#define PDM_TYPES_H
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
namespace ProjectDataManagement {
|
||||
|
||||
enum class EventType : std::int32_t {
|
||||
Unknown = 0
|
||||
};
|
||||
|
||||
} // namespace ProjectDataManagement
|
||||
|
||||
#endif // PDM_TYPES_H
|
||||
@@ -1,41 +0,0 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
* Stub header for CODEGEN_DATABASE generated code (BUILD_RTI=OFF)
|
||||
* This file is generated by CODEGEN_DATABASE macro when BUILD_RTI=ON
|
||||
* For BUILD_RTI=OFF builds, this stub provides the minimal interface
|
||||
*/
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
|
||||
namespace Database
|
||||
{
|
||||
// Stub struct for RecSnapshot
|
||||
struct RecSnapshot
|
||||
{
|
||||
qint64 id = 0;
|
||||
// Add other fields as needed
|
||||
};
|
||||
} // namespace Database
|
||||
|
||||
namespace RecordingManagement
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Base class for database interface implementation
|
||||
*
|
||||
* This class is normally generated by CODEGEN_DATABASE macro.
|
||||
* This stub provides minimal interface for BUILD_RTI=OFF builds.
|
||||
*/
|
||||
class DatabaseInterfaceImpl : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit DatabaseInterfaceImpl(QObject *parent = nullptr) : QObject(parent) {}
|
||||
virtual ~DatabaseInterfaceImpl() = default;
|
||||
|
||||
// Virtual methods that can be overridden by custom implementations
|
||||
virtual bool removeNewerEqual(const Database::RecSnapshot &data) = 0;
|
||||
};
|
||||
|
||||
} // namespace RecordingManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace ReportManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace ReportManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace ServiceManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace ServiceManagement
|
||||
@@ -1,93 +0,0 @@
|
||||
#pragma once
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von DDS generiert
|
||||
// Für die Migration erstellen wir minimale Typ-Definitionen
|
||||
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QList>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
namespace AreaEffectSimulation
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
struct ExplosionSingle;
|
||||
struct EffectCluster;
|
||||
struct AirSupportImpact;
|
||||
struct OffRouteMine;
|
||||
struct TrajectoryAdler;
|
||||
|
||||
// ExplosionSingle - Einzelne Explosion
|
||||
struct ExplosionSingle {
|
||||
int id = 0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
double radius = 0.0;
|
||||
double damage = 0.0;
|
||||
qint64 timestamp = 0;
|
||||
QString type;
|
||||
};
|
||||
|
||||
// EffectCluster - Gruppe von Effekten
|
||||
struct EffectCluster {
|
||||
int id = 0;
|
||||
QString name;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
QList<int> effectIds;
|
||||
qint64 timestamp = 0;
|
||||
};
|
||||
|
||||
// AirSupportImpact - Luftunterstützungseffekt
|
||||
struct AirSupportImpact {
|
||||
int id = 0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
QString aircraftType;
|
||||
QString weaponType;
|
||||
qint64 timestamp = 0;
|
||||
};
|
||||
|
||||
// OffRouteMine - Abseits-Mine
|
||||
struct OffRouteMine {
|
||||
int id = 0;
|
||||
double x = 0.0;
|
||||
double y = 0.0;
|
||||
double z = 0.0;
|
||||
bool active = true;
|
||||
QString mineType;
|
||||
qint64 timestamp = 0;
|
||||
};
|
||||
|
||||
// TrajectoryAdler - Flugbahn für Adler
|
||||
struct TrajectoryAdler {
|
||||
int id = 0;
|
||||
QList<double> xPoints;
|
||||
QList<double> yPoints;
|
||||
QList<double> zPoints;
|
||||
qint64 timestamp = 0;
|
||||
QString trajectoryType;
|
||||
};
|
||||
|
||||
// AesFilter - Filter für Area Effect Simulation Entities
|
||||
class AesFilter {
|
||||
public:
|
||||
AesFilter() = default;
|
||||
virtual ~AesFilter() = default;
|
||||
|
||||
// ID getter/setter
|
||||
int id() const { return m_id; }
|
||||
void setId(int id) { m_id = id; }
|
||||
|
||||
// Content getter/setter für DDS-Daten
|
||||
QString content() const { return m_content; }
|
||||
void setContent(const QString& content) { m_content = content; }
|
||||
|
||||
private:
|
||||
int m_id = 0;
|
||||
QString m_content;
|
||||
};
|
||||
|
||||
} // namespace AreaEffectSimulation
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace InfrastructureManagement
|
||||
@@ -1,11 +0,0 @@
|
||||
#pragma once
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsftc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace InfrastructureManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Ftc;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
/**
|
||||
* @file pre_ftc.h
|
||||
* @brief Stub-Header für PresentationManagement FTC (Filter Topic Client)
|
||||
*
|
||||
* Dieser Header ist ein Stub für den von RTI DDS Generator erzeugten Header.
|
||||
* Ermöglicht Build ohne echte DDS-Codegenerierung wenn BUILD_RTI=OFF.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace PresentationManagement
|
||||
{
|
||||
|
||||
// Forward declarations
|
||||
struct Presentation;
|
||||
struct PresentationContent;
|
||||
struct GetPresentationContentReply;
|
||||
|
||||
namespace Interface
|
||||
{
|
||||
|
||||
/**
|
||||
* @brief Ftc - Filter Topic Client für Presentation Management
|
||||
*
|
||||
* Stub-Implementation für DDS-generierten FTC.
|
||||
* Gibt nullptr zurück da keine echte DDS-Verbindung verfügbar.
|
||||
*/
|
||||
class Ftc
|
||||
{
|
||||
public:
|
||||
using ModifyTypeReplyHandler = std::function<void(bool success)>;
|
||||
|
||||
virtual ~Ftc() = default;
|
||||
|
||||
/**
|
||||
* @brief Factory-Methode zur Erstellung einer Ftc-Instanz
|
||||
* @param connector DDS-Connector (wird im Stub ignoriert)
|
||||
* @return Shared Pointer zur Ftc-Instanz (nullptr im Stub)
|
||||
*/
|
||||
static std::shared_ptr<Ftc> create(void* /*connector*/)
|
||||
{
|
||||
return nullptr; // Stub returns nullptr - actual implementation requires DDS
|
||||
}
|
||||
|
||||
// PresentationModify Reply Handler
|
||||
virtual void presentationModifyReply(ModifyTypeReplyHandler /*handler*/) = 0;
|
||||
|
||||
// PresentationRemove Reply Handler
|
||||
virtual void presentationRemoveReply(ModifyTypeReplyHandler /*handler*/) = 0;
|
||||
|
||||
// GetPresentationContent Reply Handler
|
||||
virtual void getPresentationContentReply(const GetPresentationContentReply& /*reply*/) = 0;
|
||||
};
|
||||
|
||||
} // namespace Interface
|
||||
} // namespace PresentationManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace SituationReplay
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace SituationReplay
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace SituationReplayManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace SituationReplayManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace Skeleton
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace Skeleton
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace SoundManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace SoundManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace TargetManagement
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace TargetManagement
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace TrainingAreaBase
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace TrainingAreaBase
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace TrainingAreaBaseOC
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace TrainingAreaBaseOC
|
||||
@@ -1,13 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
// STUB-HEADER: Diese Datei wird normalerweise von ddsdtc generiert
|
||||
// Für die Migration erstellen wir minimale Forward-Declarations
|
||||
|
||||
namespace WarehouseGuez
|
||||
{
|
||||
namespace Interface
|
||||
{
|
||||
class Dtc;
|
||||
class Ftc;
|
||||
} // namespace Interface
|
||||
} // namespace WarehouseGuez
|
||||
Reference in new issue
Block a user