You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
980 B
50 lines
980 B
#ifndef MAINWINDOW_H
|
|
#define MAINWINDOW_H
|
|
|
|
#include <QMainWindow>
|
|
#include "mymodbustcp.h"
|
|
|
|
QT_BEGIN_NAMESPACE
|
|
namespace Ui { class MainWindow; }
|
|
QT_END_NAMESPACE
|
|
|
|
class MainWindow : public QMainWindow
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
MainWindow(QWidget *parent = nullptr);
|
|
~MainWindow();
|
|
QTimer *timer1;
|
|
MyModbusTcp *modbusTcpClient = nullptr;
|
|
|
|
private slots:
|
|
/**
|
|
* @brief on_connectBTN_clicked 连接
|
|
*/
|
|
void on_connectBTN_clicked();
|
|
/**
|
|
* @brief on_disconnectBTN_clicked 断开连接
|
|
*/
|
|
void on_disconnectBTN_clicked();
|
|
/**
|
|
* @brief on_ontimeBTN_clicked 持续读
|
|
*/
|
|
void on_ontimeBTN_clicked();
|
|
/**
|
|
* @brief on_stopOntimeBTN_clicked 停止读
|
|
*/
|
|
void on_stopOntimeBTN_clicked();
|
|
/**
|
|
* @brief ontimeRead 持续都写
|
|
*/
|
|
void ontimeRead();
|
|
|
|
void on_pushButton_clicked();
|
|
|
|
void on_pushButton_2_clicked();
|
|
|
|
private:
|
|
Ui::MainWindow *ui;
|
|
};
|
|
#endif // MAINWINDOW_H
|
|
|