47 lines
1.2 KiB
C++
Executable File
47 lines
1.2 KiB
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 <QSet>
|
|
#include <QString>
|
|
#include <memory>
|
|
#include "logger.h"
|
|
|
|
namespace WlsTetra
|
|
{
|
|
class WlsDispatcher;
|
|
class WlsHandlerRx : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit WlsHandlerRx(const std::shared_ptr<TrainingAreaBase::RecvFromTab> &recvFromTabCb,
|
|
WlsDispatcher *dispatcher);
|
|
|
|
bool handleTelegram(const QByteArray &baJson);
|
|
bool handleTelegram(TrainingAreaBase::TetraIcd::TrainingAreaTelegram *tabTele);
|
|
|
|
void participantLicenseChange(const TrainingAreaBase::TetraIcd::ParticipantLicenseChange &lc);
|
|
Q_SIGNALS:
|
|
void participantConnectionState(int equipmentNumber, bool dataCommunicationPossible);
|
|
private:
|
|
void sfmData(const TrainingAreaBase::TetraIcd::WlsBinarySfmData &data);
|
|
|
|
template<typename T>
|
|
void rxData(const T &data);
|
|
private:
|
|
std::shared_ptr<TrainingAreaBase::RecvFromTab> m_rxHandler;
|
|
QSet<int> m_licensedEquipmentNumbers;
|
|
WlsDispatcher *m_dispatcher;
|
|
bool m_bWarnedOnce;
|
|
LOGGER_T m_logger;
|
|
};
|
|
} // namespace WlsTetra
|