Initial commit
This commit is contained in:
commit
b7d90b9afe
16245 files changed
+3396666
No files matched your search
+46
@@ -0,0 +1,46 @@
|
||||
/**
|
||||
* Websocket interface for building control unit
|
||||
* $Id$
|
||||
* $HeadURL$
|
||||
* $Author$
|
||||
* Created by Christian Ehrlicher, SLSE, 2017-01-30
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QObject>
|
||||
#include <QWebSocketServer>
|
||||
#include <logger.h>
|
||||
#include "guez_nasat_telegrams.h"
|
||||
|
||||
namespace GuezNasat
|
||||
{
|
||||
class AbstractSocketHandler : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AbstractSocketHandler(const char *loggerName, QObject *parent = nullptr);
|
||||
|
||||
virtual bool init(quint16 listenPort) = 0;
|
||||
|
||||
virtual bool isConnected() const = 0;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setSimulationStatus(int nasatId, bool bActivateSimulation);
|
||||
|
||||
Q_SIGNALS:
|
||||
void positionReceived(const NasatPosition &data);
|
||||
void weaponReleaseReceived(const NasatWeaponRelease &data);
|
||||
void nineLinerReceived(const NasatNineLiner &data);
|
||||
void simulationStatusReceived(const NasatSimulationStatus &data);
|
||||
|
||||
protected:
|
||||
void textMessageReceived(const QByteArray &msg);
|
||||
bool sendTelegram(const NasatBase *tele);
|
||||
virtual bool sendTelegramInternal(const QByteArray &tele) = 0;
|
||||
|
||||
protected:
|
||||
LOGGER_T m_logger;
|
||||
};
|
||||
|
||||
} // namespace GuezNasat
|
||||
Reference in new issue
Block a user