waterserver3.h 986 B

12345678910111213141516171819202122232425262728
  1. #ifndef WATERSERVER3_H
  2. #define WATERSERVER3_H
  3. #include <QTcpServer>
  4. #include <QHostAddress>
  5. #include "sensorthread3.h"
  6. class waterserver3 : public QTcpServer
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit waterserver3(QObject *parent = nullptr);
  11. void start();
  12. signals:
  13. void getOnLine(int deviceidx, bool flag, QDateTime t);
  14. void getValue(int deviceidx, QString d1, int d2, int d3, double d4, QString d5, QDateTime t);
  15. void getAlarm(int deviceidx, QString d1, int d2, int d3, double d4, QString d5, QString note, QDateTime t);
  16. void getCommData(QString data);
  17. public slots:
  18. void incomingConnection(qintptr socketDescriptor) override;
  19. void egetOnLine(int deviceidx, bool flag, QDateTime t);
  20. void egetValue(int deviceidx, QString d1, int d2, int d3, double d4, QString d5, QDateTime t);
  21. void egetAlarm(int deviceidx, QString d1, int d2, int d3, double d4, QString d5, QString note, QDateTime t);
  22. void egetCommData(QString data);
  23. };
  24. #endif // WATERSERVER3_H