Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+54
@@ -0,0 +1,54 @@
|
||||
/**
|
||||
* Handle the mapping real aircraft <-> nasat configuration
|
||||
* $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 <GuezNasat/gna_db.h>
|
||||
#include "logger.h"
|
||||
#include "guez_nasat_telegrams.h"
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
class DatabaseInterface;
|
||||
class Initialization;
|
||||
class HandlerNasatAircraft final : public QObject
|
||||
, protected Interface::Fts::ModifyNasatAircraftRequestHandler
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit HandlerNasatAircraft(Initialization *mainHandler);
|
||||
~HandlerNasatAircraft();
|
||||
|
||||
bool init();
|
||||
|
||||
int nasatIdFromNasatAircraftId(int nasatAircraftId) const;
|
||||
|
||||
public Q_SLOTS:
|
||||
void simulationStatusChanged(const NasatSimulationStatus &data);
|
||||
void flaFluSimulationChanged(int nasatId, bool bSimulationActive);
|
||||
Q_SIGNALS:
|
||||
void activateNasatAircraftSimulation(int nasatId, bool bActivateSimulation);
|
||||
void nasatIdChanged(int oldNasatId, int newNasatId);
|
||||
protected:
|
||||
void onModifyNasatAircraftRequest(const rti::core::SampleIdentity &cookie,
|
||||
const NasatAircraft &request) override;
|
||||
Core::FunctionReplyObject createNasatAircraftRequest(const NasatAircraft &request);
|
||||
Core::FunctionReplyObject modifyNasatAircraftRequest(const NasatAircraft &request);
|
||||
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, NasatAircraft> m_nasatAircrafts;
|
||||
NGL::INGLLogger &m_logger;
|
||||
};
|
||||
} // namespace GuezNasat
|
||||
Reference in new issue
Block a user