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.
 
 

28 lines
575 B

#ifndef SIMULATERMODBUS_H
#define SIMULATERMODBUS_H
#include <QBitArray>
#include <QObject>
#include <QTimer>
class Simulatermodbus : public QObject
{
Q_OBJECT
public:
explicit Simulatermodbus(QObject *parent = nullptr);
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);
public:
QTimer *timer;
};
#endif // SIMULATERMODBUS_H