Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+93
@@ -0,0 +1,93 @@
|
||||
/**
|
||||
* @RDE_HEADER@
|
||||
*
|
||||
* EXM Function Topic test executable
|
||||
*
|
||||
* ModuleTests for create/modify/remove exercise
|
||||
* ---------------------------------------------------
|
||||
* Client FTC is implemented
|
||||
*
|
||||
* => (!) Preconditon:
|
||||
* - Service sExeMgmt running
|
||||
*
|
||||
* -------------------------------------------------
|
||||
*
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
*
|
||||
* Created by Hanna E. Rathje, SLSE, 2015-09-10
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <ExerciseManagement/exm_ftc.h>
|
||||
#include <ExerciseManagement/exm_ftc_types.h>
|
||||
#include <AssetManagement/asm_ftc.h>
|
||||
#include <AssetManagement/asm_ftc_types.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include <ExerciseManagement/exm_dtc_types.h>
|
||||
#include <ExerciseManagement/logger.h>
|
||||
#include <DDS/DDSConnector/dds_connector.h>
|
||||
|
||||
//--------------------------------------------------------------------------------------------
|
||||
namespace ExerciseManagement
|
||||
{
|
||||
class ExmTests : public QObject
|
||||
, protected ExerciseManagement::Interface::Ftc::ExerciseCreateReplyHandler
|
||||
, protected ExerciseManagement::Interface::Ftc::ExerciseModifyReplyHandler
|
||||
// , protected ExerciseManagement::Interface::Ftc::ExerciseChangeStateReplyHandler
|
||||
, protected ExerciseManagement::Interface::Ftc::ExerciseRemoveReplyHandler
|
||||
, protected ExerciseManagement::Interface::Ftc::ExercisePhaseCreateReplyHandler
|
||||
, protected ExerciseManagement::Interface::Ftc::ExercisePhaseModifyReplyHandler
|
||||
, protected ExerciseManagement::Interface::Ftc::ExercisePhaseRemoveReplyHandler
|
||||
, protected AssetManagement::Interface::Ftc::TrainingAreaModifyReplyHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ExmTests(QObject *parent = nullptr);
|
||||
~ExmTests();
|
||||
|
||||
bool init(int domainId, int exerciseId, int testId, int trainingAreaId, int phaseId);
|
||||
bool testsSuccessful() const { return m_bTestsSuccessful; }
|
||||
|
||||
public Q_SLOTS:
|
||||
void startTest();
|
||||
protected Q_SLOTS:
|
||||
void tryCreate();
|
||||
void tryCreateTrainingArea();
|
||||
void tryCreateExercisePhase();
|
||||
void tryModify();
|
||||
void tryModifyExercisePhase();
|
||||
void tryDelete();
|
||||
void tryDeleteExercisePhase();
|
||||
void tryStartExercise();
|
||||
void tryGetAllExercises();
|
||||
void tryGetExercise();
|
||||
void onExerciseChanged(const ExerciseManagement::Exercise &data, DataModification modType);
|
||||
protected:
|
||||
void onExerciseCreateReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onExerciseModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
// void onExerciseChangeStateReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onExerciseRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onExercisePhaseCreateReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onExercisePhaseModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onExercisePhaseRemoveReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void onTrainingAreaModifyReply(const Core::FunctionReplyObject &replyObject) override final;
|
||||
void failExit();
|
||||
|
||||
private:
|
||||
std::shared_ptr<DDSConnector::DdsConnector> m_ddsConnector;
|
||||
std::shared_ptr<ExerciseManagement::Interface::Ftc> m_ftc;
|
||||
std::shared_ptr<AssetManagement::Interface::Ftc> m_ftc_asm;
|
||||
std::shared_ptr<ExerciseManagement::Interface::Dtc> m_dtc;
|
||||
|
||||
qint32 m_exerciseId;
|
||||
qint32 m_trainingAreaId;
|
||||
qint32 m_phaseId;
|
||||
int m_testId;
|
||||
bool m_bTestsSuccessful;
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace ExerciseManagement
|
||||
Reference in new issue
Block a user