You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
55 lines
1.0 KiB
C++
55 lines
1.0 KiB
C++
#ifndef GDDCDLG_H
|
|
#define GDDCDLG_H
|
|
|
|
#include <QWidget>
|
|
#include <QUdpSocket>
|
|
#include <QHostAddress>
|
|
#include <QNetworkDatagram>
|
|
#include <QByteArray>
|
|
#include <QTimer>
|
|
|
|
|
|
#define cmdLength 44
|
|
namespace Ui {
|
|
class GDDCdlg;
|
|
}
|
|
|
|
class GDDCdlg : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit GDDCdlg(QWidget *parent = nullptr);
|
|
~GDDCdlg();
|
|
|
|
private slots:
|
|
void on_pushButton_11_pressed();
|
|
|
|
void on_pushButton_11_released();
|
|
|
|
private:
|
|
Ui::GDDCdlg *ui;
|
|
QTimer *GDDCControlTimer;
|
|
public slots:
|
|
void GDDCControlTimeOut();
|
|
|
|
public:
|
|
QByteArray m_DCcmdBuffer;//存储吊舱控制指令
|
|
std::byte TJDCCmdBuffer[10];
|
|
void UpdateDataTJDC();
|
|
void clearTJDCCmdBuffer();
|
|
//socket对象
|
|
QUdpSocket *udpSocket;
|
|
QString RemoteIP; //目标IP
|
|
QHostAddress RemoteAddr; //目标地址
|
|
quint16 RemotePort; //目标port
|
|
|
|
//初始化UDPSocket
|
|
void initUDPSocket();
|
|
void initWindow();//初始化窗口
|
|
void initParam();//初始化参数
|
|
|
|
};
|
|
|
|
#endif // GDDCDLG_H
|