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.

29 lines
575 B

4 years ago
#ifndef SIMULATERMODBUS_H
#define SIMULATERMODBUS_H
4 years ago
#include <QBitArray>
4 years ago
#include <QObject>
4 years ago
#include <QTimer>
4 years ago
4 years ago
class Simulatermodbus : public QObject
{
Q_OBJECT
public:
explicit Simulatermodbus(QObject *parent = nullptr);
4 years ago
void init();
void open(QString serialPort , int slaveAddress);
void readCoil(int startAddress, quint16 readSize);
public: signals:
void initiateStateResult(bool initFlag);
void openStateResult(bool openFlag);
void coilIsReady(QBitArray coilDataFromClient);
4 years ago
4 years ago
public:
4 years ago
QTimer *timer;
4 years ago
};
#endif // SIMULATERMODBUS_H