wateruserver.h 629 B

1234567891011121314151617181920212223242526
  1. #ifndef WATERUSERVER_H
  2. #define WATERUSERVER_H
  3. #include <QObject>
  4. #include <QUdpSocket>
  5. #include <QDateTime>
  6. class wateruserver : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. explicit wateruserver(QObject *parent = nullptr);
  11. void start();
  12. int getDevIdx(QString DeviceCode);
  13. signals:
  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 readdata();
  19. private:
  20. QUdpSocket *so;
  21. };
  22. #endif // WATERUSERVER_H