- NGL_ADD_LIBRARY2: 87 CMakeLists.txt konvertiert für Export-Header Generierung - 44 Export-Header Include-Pfade korrigiert (_export.h) - 81 DDS-Stub-Header generiert (*_dtc.h, *_fts.h, *_dts.h, *_ftc.h) - INGLLogger: Duplikat gelöscht, m_logger Member entfernt, variadische Makros - Q_FUNC_INFO Redefinition behoben (Qt6 definiert bereits) - FATAL_LOG Makro hinzugefügt - InfrastructureManagement DDS-Stubs (ism.hpp, ism_enums.hpp, ism_ftc.h) - FilterManagement DDS-Stubs (flt_ftc.h, flt_dts.h) - AreaEffectSimulation DDS-Stubs (aes.hpp, aes_enums.hpp) - SymbolAppearance Klasse vollständig definiert mit content() Methode - BuildingComponentFilter Klasse definiert mit Copy-Konstruktor - Ftc Factory: nullptr Return (abstract class) - AesFilter Klasse in aes.hpp hinzugefügt - Dtc Klasse in ppm.hpp mit participantChanged Signal - AesType Enum: alle 15 At* Werte definiert - AesEffectState_def: EsReceived hinzugefügt - DataModification Enum: eAdded/eModified/eRemoved - function_reply_object.h → core_types.h Include-Pfad (72 Dateien) - Enum-Class-Streaming Template-Operator in INGLLogger.h - ism_mounting_point.h: QImage → QtGui/QImage, QGuiApplication/QScreen - ism_data_plugin_interface.h: QSet Include, Include-Reihenfolge - QRegExp → QRegularExpression in tpm_js_parser.cpp - .underlying() Aufrufe zu direktem Enum-Vergleich korrigiert - Include-Pfade: aes.hpp in symbol_appearance_settings_impl.h und aes_display_filter_impl.h Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
93 lines
4.3 KiB
C++
Executable File
93 lines
4.3 KiB
C++
Executable File
|
|
|
|
|
|
#pragma once
|
|
|
|
#include "scm_dialog_group.h"
|
|
|
|
#include <ServiceManagement/scm_ftc.h>
|
|
#include <ServiceManagement/scm_dtc.h>
|
|
#include <ExerciseManagement/exm_dtc.h>
|
|
#include <ServiceManagement/logger.h>
|
|
#include <LtsWidgets/lts_dialog.h>
|
|
#include <LtsUtilsGuiDds/request_helper.h>
|
|
|
|
|
|
namespace Ui
|
|
{
|
|
class ServiceManagementDialog;
|
|
}
|
|
|
|
namespace ServiceManagement
|
|
{
|
|
|
|
|
|
|
|
|
|
class ServiceManagementDialog : public LtsWidgets::LtsDialog
|
|
, protected ServiceManagement::Interface::Ftc::RestartServiceReplyHandler
|
|
, protected ServiceManagement::Interface::Ftc::RestartGroupReplyHandler
|
|
, protected ServiceManagement::Interface::Ftc::StartGroupReplyHandler
|
|
, protected ServiceManagement::Interface::Ftc::StopGroupReplyHandler
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit ServiceManagementDialog(QWidget *parent = nullptr);
|
|
~ServiceManagementDialog();
|
|
|
|
bool init(const std::shared_ptr<Interface::Dtc> &dtc,
|
|
const std::shared_ptr<Interface::Ftc> &ftc,
|
|
const std::shared_ptr<ExerciseManagement::Interface::Dtc> &dtcExm);
|
|
|
|
virtual void onRestartServiceReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
virtual void onRestartGroupReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
virtual void onStartGroupReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
virtual void onStopGroupReply(const Core::FunctionReplyObject &replyObject) override final { m_requestHelper->requestReply(replyObject); }
|
|
|
|
|
|
static QString groupEnumToGroupName(const Core::ServiceGroupType &type)
|
|
{
|
|
QMap<QString, Core::ServiceGroupType_def::type> groupNameMapping;
|
|
groupNameMapping.insert(QLatin1String("Master"), Core::ServiceGroupType_def::Master);
|
|
groupNameMapping.insert(QLatin1String("Core"), Core::ServiceGroupType_def::Core);
|
|
groupNameMapping.insert(QLatin1String("ExercisePreparation"), Core::ServiceGroupType_def::ExercisePreparation);
|
|
groupNameMapping.insert(QLatin1String("ExerciseExecution"), Core::ServiceGroupType_def::ExerciseExecution);
|
|
groupNameMapping.insert(QLatin1String("ExercisePaused"), Core::ServiceGroupType_def::ExercisePaused);
|
|
groupNameMapping.insert(QLatin1String("ExerciseAfterActionReview"), Core::ServiceGroupType_def::ExerciseAfterActionReview);
|
|
groupNameMapping.insert(QLatin1String("Playback"), Core::ServiceGroupType_def::Playback);
|
|
|
|
return groupNameMapping.key(type.underlying());
|
|
}
|
|
|
|
private:
|
|
void retranslate() override;
|
|
|
|
static QString craftBaseName(const QString &server, const QString &exercise) { return server + QLatin1Char('.') + exercise + QLatin1Char('.'); }
|
|
|
|
GroupWidget *addGroup(const Core::ServiceGroupType &groupType, int server, int exercise, int32_t replayPartitionId,
|
|
const QString &groupName, long long timestamp, const QVector<int> &servicesList);
|
|
void addService(const ServiceInformation &svc);
|
|
|
|
LtsUtils::RequestHelper *m_requestHelper;
|
|
|
|
public:
|
|
static QString craftGroupName(int server, int exercise, const QString &groupName) { return craftBaseName(QString::number(server), QString::number(exercise)) + groupName; }
|
|
static QString craftServiceName(int server, int exercise, const QString &groupName, int serviceId) { return craftGroupName(server, exercise, groupName) + QLatin1Char('.') + QString::number(serviceId); }
|
|
static QString craftWildcardedServiceName(int serviceId) { return craftBaseName(QLatin1String("*"), QLatin1String("*")) + QString::number(serviceId); }
|
|
|
|
Ui::ServiceManagementDialog *m_ui;
|
|
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtcExm;
|
|
std::shared_ptr<ServiceManagement::Interface::Dtc> m_dtc;
|
|
std::shared_ptr<ServiceManagement::Interface::Ftc> m_ftc;
|
|
private slots:
|
|
void slotRestartService(int serviceID);
|
|
void slotRestartGroup(const Core::ServiceGroupType &groupType, int exercise, int server, int32_t replayPartitionId);
|
|
void slotStartGroup(const Core::ServiceGroupType &groupType, int exercise, int server, int32_t replayPartitionId);
|
|
void slotStopGroup(const Core::ServiceGroupType &groupType, int exercise, int server, int32_t replayPartitionId);
|
|
|
|
void slotGroupInformationChanged(ServiceManagement::GroupInformation, DataModification);
|
|
void slotServiceInformationChanged(ServiceManagement::ServiceInformation, DataModification);
|
|
};
|
|
}
|