49 lines
1.1 KiB
C++
Executable File
49 lines
1.1 KiB
C++
Executable File
/**
|
|
* MainHandler for HighLevelArchitecture
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2017-04-07
|
|
*/
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <memory>
|
|
#include "ngs_handler.h"
|
|
#include <Common/logger.h>
|
|
#include "ngs_connector.h"
|
|
|
|
#include <TrainingAreaBase/training_area_telegrams.h>
|
|
|
|
namespace HighLevelArchitecture
|
|
{
|
|
class NgsHandler : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit NgsHandler(QObject *parent = nullptr);
|
|
~NgsHandler();
|
|
|
|
bool init();
|
|
|
|
std::shared_ptr<NgsConnector> ngsConnector() const { return m_ngsConnector; }
|
|
|
|
bool isConnectedToHla() const;
|
|
|
|
Q_SIGNALS:
|
|
void firstTickFinished();
|
|
// HLA -> TAB
|
|
void externalEquipmentNumberAdded(int equipNo);
|
|
void externalEquipmentNumberRemoved(int equipNo);
|
|
void ngsHandlerReady();
|
|
// TAB -> HLA
|
|
void participantInitRequest(const TrainingAreaBase::TetraIcd::Init &request);
|
|
void participantBiteRequest(const TrainingAreaBase::TetraIcd::DemandBite &request);
|
|
private slots:
|
|
void onFirstTickFinished();
|
|
private:
|
|
std::shared_ptr<NgsConnector> m_ngsConnector;
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace HighLevelArchitecture
|