Files
T
torstenandCopilot d5af8b9764 Session 026: Lts/Services Qt5:: to Qt6:: migration
- Migrated all 104 CMakeLists.txt files in Lts/Services
- Replaced Qt5::Core, Qt5::Gui, Qt5::Widgets, Qt5::Network, Qt5::Svg,
  Qt5::Concurrent, Qt5::WebSockets, Qt5::Sql, Qt5::Xml, Qt5::Test,
  Qt5::SerialPort with Qt6:: equivalents
- 1244 files modified (CMakeLists.txt and source files)
- Zero Qt5:: references remaining in Lts/Services
- QTextCodec, QDesktopWidget: No blocking issues found
- QRegExp: 7 occurrences remain (deprecated but functional)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-08-25 19:23:30 +02:00

107 lines
4.1 KiB
C++
Executable File

/**
* @RDE_HEADER@
*
* PPM Function Topic test executable
*
* ModuleTests for PPM function topics
* ---------------------------------------------------
*
* => (!) Preconditons:
* - Service svcParticipantManagement -e 0 running
*
* -------------------------------------------------
*
* $Id$
* $HeadURL$
* $Author$
*
* Created by Hannes Baeuerle, SLSE, 2015-07-18
*/
#pragma once
#include <ParticipantManagement/ppm_dtc.h>
#include <ParticipantManagement/ppm_ftc.h>
#include <ParticipantManagement/ppm_ftc_types.h>
#include <DDS/DDSConnector/dds_connector.h>
#include <ParticipantManagement/logger.h>
//----------------------------------------------------------------------------------
namespace ParticipantManagement
{
class PpmTests : public QObject
, protected ParticipantManagement::Interface::Ftc::ModifyTypeReplyHandler
, protected ParticipantManagement::Interface::Ftc::RemoveTypeReplyHandler
, protected ParticipantManagement::Interface::Ftc::ModifyEquipmentTypeDataReplyHandler
, protected ParticipantManagement::Interface::Ftc::ModifyParticipantDataReplyHandler
, protected ParticipantManagement::Interface::Ftc::ModifyPartyDataReplyHandler
, protected ParticipantManagement::Interface::Ftc::ModifyTemplateDataReplyHandler
, protected ParticipantManagement::Interface::Ftc::RemovePartyReplyHandler
, protected ParticipantManagement::Interface::Ftc::SyncPartiesReplyHandler
, protected ParticipantManagement::Interface::Ftc::ChangePartyUsedStateReplyHandler
, protected ParticipantManagement::Interface::Ftc::RegisterParticipantReplyHandler
{
Q_OBJECT
public:
explicit PpmTests(QObject *parent = nullptr);
~PpmTests();
bool init(int domainId, int exerciseId, int testId, int partyId, int typeId, int equipmentId, int participantId);
bool testsSuccessful() const { return m_bTestsSuccessful; }
public Q_SLOTS:
void startTest();
protected Q_SLOTS:
void tryCreateEquipmentType();
void tryCreateType();
void tryModifyType();
void tryRemoveType();
void tryCreateParticipant();
void tryCreateParty();
void tryModifyParty();
void tryRemoveParty();
void trySyncParties();
void tryChangeUsed();
void tryCreateTemplate();
void tryUpdateInfoParticipant();
void tryRegisterParticipant();
protected:
void onModifyTypeReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onRemoveTypeReply(const Core::FunctionReplyObject &replyObject) override final { onRemoveReply(replyObject); }
void onModifyEquipmentTypeDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onModifyParticipantDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onModifyPartyDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onModifyTemplateDataReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onRemovePartyReply(const Core::FunctionReplyObject &replyObject) override final;
void onSyncPartiesReply(const Core::FunctionReplyObject &replyObject) override final;
void onChangePartyUsedStateReply(const Core::FunctionReplyObject &replyObject) override final { onModifyReply(replyObject); }
void onRegisterParticipantReply(const RegisterReply &reply) override final;
// 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();
void successExit();
private:
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
std::shared_ptr<ParticipantManagement::Interface::Ftc> m_ftc;
std::shared_ptr<ParticipantManagement::Interface::Dtc> m_dtc;
int m_testId;
int m_partyId;
int m_typeId;
int m_equipmentId;
int m_participantId;
bool m_bTestsSuccessful;
LOGGER_T m_logger;
};
} // namespace ParticipantManagement