Files
qt-migration-legatus/qt5-before/dlbo/Lts/Services/InfrastructureManagement/ModuleTests/ism_tests.h
T
torstenandCopilot 7173785915 Qt6 Migration: Complete migration with DDS/RTI support and build validation
Major Changes:
- Merged latest Qt5 devel content from dlbo (292 files changed, 7 new dirs)
- Consolidated forward-declarations and include folders
- Removed unneeded modules per Niklas' repo check list

Build System Fixes:
- Fixed CMake VERSION_GREATER syntax in ParticipantManagement/CMakeLists.txt
- Added VLC packages (libvlc-dev, vlc-plugin-base) to docker_build.sh
- Added PostgreSQL dev packages (libpq-dev, postgresql-server-dev-all) to Dockerfile
- Fixed locale warnings (ANSI_X3.4-1968 → C.UTF-8)
- Fixed ArcGIS SDK path warnings when BUILD_ARCGIS=OFF

Code Generation Fixes:
- Fixed IDL enum collisions (PortType→CorePortType/DdsutPortType, PdmEventType)
- Fixed Grantlee template svc_translation.cpp.grantlee:
  - Changed {{ idl_enum.name }}_def:: to {{ idl_enum.name }}::
  - Fixed .underlying() calls for C++11 scoped enums (enum class)
- Removed generated files from repo (moc_*, *_dtc.h, *_ftc.h)

Validation:
- BUILD_RTI=ON: SUCCESS
- BUILD_RTI=OFF: SUCCESS
- C++17 standard maintained for RTI 7.7 compatibility
- Ubuntu 26.04 Docker environment verified

Remaining Warnings (expected):
- BgViewer, KDChart, KDReports, Poppler-Qt6 not found (optional features)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-09-15 18:20:26 +00:00

130 lines
5.6 KiB
C++

/**
* @RDE_HEADER@
* ISM Function Topic test executable
* $Id$
* $HeadURL$
* $Author$
* Created by Iuliana Ojog, SLSE, 2016-11-28
*/
#pragma once
#include <InfrastructureManagement/ism_ftc.h>
#include <InfrastructureManagement/ism_dtc.h>
#include <InfrastructureManagement/ism_ftc_types.h>
#include <InfrastructureManagement/ism_db.h>
#include <InfrastructureManagement/ism_db_impl_custom.h>
#include <InfrastructureManagement/logger.h>
#include <DDS/DDSConnector/dds_connector.h>
#include <ngldb/db_service_handler.h>
#include <ngldb/dbconnection.h>
namespace InfrastructureManagement
{
using DbHandler = NGLDB::DbServiceHandler<DatabaseInterface>;
class IsmTests : public QObject
, protected InfrastructureManagement::Interface::Ftc::InstrumentationAssetModifyReplyHandler
, protected InfrastructureManagement::Interface::Ftc::InstrumentationAssetRemoveReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MountingPointAssetModifyReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MountingPointAssetRemoveReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MainScheduleModifyReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MainScheduleRemoveReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MountingPointPlanModifyReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MainStructureElementModifyReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MainStructureElementModifyBridgeStatusReplyHandler
, protected InfrastructureManagement::Interface::Ftc::MainStructureElementRemoveReplyHandler
, protected InfrastructureManagement::Interface::Ftc::StructureElementModifyReplyHandler
, protected InfrastructureManagement::Interface::Ftc::InstrumentationAssetSetStateReplyHandler
{
Q_OBJECT
public:
explicit IsmTests(QObject *parent = nullptr);
~IsmTests();
bool init(int domainId, int testId, int assetId, int mainStructureElementId, int structureElementId, int indexNo);
bool testsSuccessful() const { return m_bTestsSuccessful; }
public Q_SLOTS:
void startTest();
protected Q_SLOTS:
// assets
void tryCreateAsset();
void tryModifyAsset();
void tryRemoveAsset();
void tryUnmountAsset();
// main structure elements
void tryCreateMainStructureElement();
void tryModifyMainStructureElement();
void tryRemoveMainStructureElement();
void tryCreateBridge();
void tryChangeBridgeStatus();
// mounting point assets
void tryCreateMountingPointAsset();
void tryRemoveMountingPointAsset();
// mounting point schedule
void tryCreateMainSchedule();
void tryModifyMainSchedule();
void tryRemoveMainSchedule();
void tryChangeStatusSchedule();
void tryCopySchedule();
void checkSchedule();
// mounting point plan
void tryCreateMountingPointPlan();
protected:
// assets
void onInstrumentationAssetModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onInstrumentationAssetRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
void onInstrumentationAssetSetStateReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
// main structure elements
void onMainStructureElementModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onMainStructureElementRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
void onMainStructureElementModifyBridgeStatusReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
// structure elements
void onStructureElementModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
// mounting point assets
void onMountingPointAssetModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onMountingPointAssetRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
// mounting point schedule
void onMainScheduleModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onMainScheduleRemoveReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
// mounting point plan
void onMountingPointPlanModifyReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
// general
void onError(const QString &reason);
void onCreateReply(const Core::FunctionReplyObject &replyObject);
void onModifyReply(const Core::FunctionReplyObject &replyObject);
void onRemoveReply(const Core::FunctionReplyObject &replyObject);
void failExit();
private:
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<InfrastructureManagement::Interface::Ftc> m_ftc;
std::shared_ptr<InfrastructureManagement::Interface::Dtc> m_dtc;
std::shared_ptr<InfrastructureManagement::DatabaseInterface> m_db;
std::shared_ptr<InfrastructureManagement::DbHandler> m_dbHandler;
// given
int m_testId;
int m_assetId; // used for mounting point schedule id as well
int m_mainStructureElementId;
int m_structureElementId;
int m_indexNo;
// found per custom dtc methods
int m_mountingPointAssetId;
int m_mountingPointPlanId;
bool m_bTestsSuccessful;
bool m_replyFinished;
LOGGER_T m_logger;
};
} // namespace InfrastructureManagement