123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- #ifndef WSSERVER_H
- #define WSSERVER_H
- #include <QObject>
- #include <QList>
- #include <QByteArray>
- #include <QJsonArray>
- #include <QJsonDocument>
- #include <QJsonObject>
- #include <QJsonValue>
- #include <QJsonParseError>
- #include "QtWebSockets/QWebSocketServer"
- #include "QtWebSockets/QWebSocket"
- #include "../share/algorithms/coder_array.h"
- #include "../share/algorithms/fun1_false_target_distance.h"
- #include "../share/algorithms/fun2.h"
- #include "../share/algorithms/fun4_S_jam.h"
- #include "../share/algorithms/fun8_2_FMjamming_H.h"
- #include "../share/algorithms/fun8_AMJamming_H.h"
- #include "../share/algorithms/fun8_3_jamming_H.h"
- #include "../share/algorithms/fun5.h"
- #include "../share/algorithms/fun6.h"
- #include "../share/algorithms/fun7_DRFMRF.h"
- //QT_FORWARD_DECLARE_CLASS(QWebSocketServer)
- //QT_FORWARD_DECLARE_CLASS(QWebSocket)
- class WSServer : public QObject
- {
- Q_OBJECT
- public:
- QWebSocketServer *m_pWebSocketServer;
- QList<QWebSocket *> m_clients;
- explicit WSServer(QObject *parent = nullptr, quint16 port = 80);
- virtual ~WSServer();
- signals:
- public slots:
- void onNewConnection();
- QJsonObject processJsonObj(QJsonObject objin);
- void processMessage(QString message);
- void socketDisconnected();
- void getInit(QWebSocket *pSender, QJsonObject obj);
- void getPlatformTable(QWebSocket *pSender, QJsonObject obj);
- void getLeadPost(QWebSocket *pSender, QJsonObject obj);
- void getTaskPlan(QWebSocket *pSender, QJsonObject obj);
- void getGlobalMap(QWebSocket *pSender, QJsonObject obj);
- void getRadarInstances(QWebSocket *pSender, QJsonObject obj);
- void getRadarParams(QWebSocket *pSender, QJsonObject obj);
- void getJammingInstances(QWebSocket *pSender, QJsonObject obj);
- void getJammingParams(QWebSocket *pSender, QJsonObject obj);
- void setJammingStyle(QWebSocket *pSender, QJsonObject obj);
- void getJammingSig(QWebSocket *pSender, QJsonObject obj);
- void returnMessage(QWebSocket *pSender, QJsonObject *obj);
- };
- #endif // WSSERVER_H
|