Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* Handle the mapping real aircraft <-> participant in exercise
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2018-08-02
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <GuezNasat/gna_dts.h>
|
||||
#include <GuezNasat/gna_fts.h>
|
||||
#include <ExerciseManagement/exm_dtc.h>
|
||||
#include "logger.h"
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
|
||||
class DatabaseInterface;
|
||||
class Initialization;
|
||||
|
||||
/*!
|
||||
* \brief The HandlerNasatAircraftParticipant class
|
||||
* This class implements the create and mofify operation for association
|
||||
* between NasatAircraft and Participant
|
||||
* During exercise the user can link NasatAircraft and Participant.
|
||||
* If the exercise is terminated a cleanup is done.
|
||||
*/
|
||||
class HandlerNasatAircraftParticipant final : public QObject
|
||||
, protected Interface::Fts::ModifyNasatAircraftParticipantRequestHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HandlerNasatAircraftParticipant(Initialization *mainHandler);
|
||||
~HandlerNasatAircraftParticipant();
|
||||
|
||||
bool init();
|
||||
|
||||
public Q_SLOTS:
|
||||
void aircraftRemoved(int nasatAircraftId);
|
||||
void participantRemoved(int exerciseId, int participantId);
|
||||
|
||||
void onExerciseChanged(const ExerciseManagement::Exercise &exercise, DataModification modType);
|
||||
|
||||
void dumpNasatAircraftParticipants();
|
||||
void dumpExercises();
|
||||
|
||||
protected:
|
||||
void removeNasatAircraftParticipant(const NasatAircraftParticipant &val);
|
||||
void onModifyNasatAircraftParticipantRequest(const rti::core::SampleIdentity &cookie,
|
||||
const NasatAircraftParticipant &request) override;
|
||||
Core::FunctionReplyObject createNasatAircraftParticipantRequest(const NasatAircraftParticipant &request);
|
||||
Core::FunctionReplyObject modifyNasatAircraftParticipantRequest(const NasatAircraftParticipant &request);
|
||||
|
||||
// context Exercise:
|
||||
int removeNapsOfExercise(int exerciseId);
|
||||
|
||||
|
||||
private:
|
||||
Initialization *m_mainHandler;
|
||||
std::shared_ptr<GuezNasat::Interface::Dts> m_dts;
|
||||
std::shared_ptr<GuezNasat::Interface::Fts> m_fts;
|
||||
std::shared_ptr<DatabaseInterface> m_db;
|
||||
QHash<int, NasatAircraftParticipant> m_nasatAircraftParticipants;
|
||||
QHash<int, ExerciseManagement::Exercise> m_exercises;
|
||||
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace GuezNasat
|
||||
Reference in new issue
Block a user