41 lines
989 B
C++
Executable File
41 lines
989 B
C++
Executable File
/**
|
|
* Convert Json from WLS to internal telegrams
|
|
* $Id$
|
|
* $HeadURL$
|
|
* $Author$
|
|
* Created by Christian Ehrlicher, SLSE, 2016-09-26
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <TrainingAreaBase/recv_from_tab.h>
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <memory>
|
|
#include "logger.h"
|
|
|
|
namespace HlaJson
|
|
{
|
|
class HlaDispatcher;
|
|
class HlaHandlerRx : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit HlaHandlerRx(const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
|
|
HlaDispatcher *dispatcher);
|
|
|
|
bool handleTelegram(const QByteArray &baJson);
|
|
bool handleTelegram(TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tabTele);
|
|
Q_SIGNALS:
|
|
void participantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
|
private:
|
|
template<typename T>
|
|
void rxData(const T &data);
|
|
private:
|
|
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_rxHandler;
|
|
HlaDispatcher *m_dispatcher;
|
|
bool m_bWarnedOnce;
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace HlaJson
|