/** * ModuleTests for Msg * $Id$ * $HeadURL$ * $Author$ */ #pragma once #include #include #include #include #include #include #include namespace CentralEffectSimulation { class CesTestsOwnership : public QObject , protected CentralEffectSimulation::Interface::Ftc::SetOwnershipReplyHandler { Q_OBJECT public: explicit CesTestsOwnership(QObject *parent = nullptr); ~CesTestsOwnership(); bool init(int domainId, int exerciseId, int testId); bool testsSuccessful() const { return m_bTestsSuccessful; } public Q_SLOTS: void startTest(); protected Q_SLOTS: // //////////////////////// // Participants // //////////////////////// void tryCreateParticipantPosition(); void tryCreateParticipant(); void tryCreateDynamicParticipantData(); void trySetOwnershipRequest(); void failExit(); void ExitSuccess(); protected: void onSetOwnershipReply(const Core::FunctionReplyObject &replyObject) override final; private: // methods void checkParicipantEvent(); private: // structs struct Participant { int participantId; int equipmentNumber; int partyId; int buildingId; int roomId; int relX; int relY; }; private: std::shared_ptr m_ddsConnector; std::shared_ptr m_ddsConnector42; std::shared_ptr m_ppmDts; std::shared_ptr m_cesDtc; std::shared_ptr m_cesFtc; void checkBuildingOwnership(); bool m_bTestsSuccessful; LtsCoordTrans::UtmCoordinate m_housePos; NGL::INGLLogger &m_logger; int m_testId; int m_participantIndex; int m_DynamicParticipantIndex; QVector m_participants; int m_buildingId; }; } // namespace CentralEffectSimulation