1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #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 "algorithms/coder_array.h"
- #include "algorithms/fun1_false_target_distance.h"
- #include "algorithms/fun2.h"
- #include "algorithms/fun4_S_jam.h"
- #include "algorithms/fun8_2_FMjamming_H.h"
- #include "algorithms/fun8_AMJamming_H.h"
- #include "algorithms/fun8_3_jamming_H.h"
- #include "algorithms/fun5.h"
- #include "algorithms/fun6.h"
- #include "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 returnMessage(QWebSocket *pSender, QJsonObject *obj);
- // 初始化状态接口
- 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 getLocalMap(QWebSocket *pSender, QJsonObject obj);
- void getRemoteMap(QWebSocket *pSender, QJsonObject obj);
- void getCombineMap(QWebSocket *pSender, QJsonObject obj);
- void getGlobalMap(QWebSocket *pSender, QJsonObject obj);
- // 雷达、ECM显控接口
- 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);
-
- };
- #endif // WSSERVER_H
|