Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list
Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF
Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
- Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
- Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)
Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified
Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
102 lines
4.7 KiB
C++
Executable File
102 lines
4.7 KiB
C++
Executable File
/**
|
|
* @RDE_HEADER@
|
|
* HMI Plugin for ExerciseManangement - Exercise Overview Dialog
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Mike Wille, SLSE, 2016-03-30
|
|
*/
|
|
|
|
#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 ExerciseManagementDialogModel;
|
|
// --------------------------------------------------------
|
|
// ExerciseManagementDialog
|
|
// --------------------------------------------------------
|
|
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); }
|
|
|
|
// TODO: raus, String soll gepublished werden
|
|
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;
|
|
|
|
LOGGER_T m_logger;
|
|
|
|
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);
|
|
};
|
|
}
|