udphelper.h 469 B

123456789101112131415161718192021222324
  1. #ifndef UDPHELPER_H
  2. #define UDPHELPER_H
  3. #include <QObject>
  4. #include <QtNetwork/QUdpSocket>
  5. class UdpHelper : public QObject
  6. {
  7. Q_OBJECT
  8. public:
  9. explicit UdpHelper(QObject *parent = nullptr);
  10. int getDeviceTypeAndChannel(int* type,int* channel);
  11. int getPowerInfo(bool* sts,float* vol,float* cur,float* power,float* factor,float* consum);
  12. signals:
  13. public slots:
  14. private:
  15. QUdpSocket *mSocket;
  16. QHostAddress addr;
  17. quint16 port;
  18. };
  19. #endif // _H