Thermostat pour piloter jusqu'à 4 radiateurs avec fil pilote
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.

37 lines
754 B

  1. // SPDX-License-Identifier: GPL-3.0-or-later
  2. /*
  3. * Qt mutizone MQTT thermostat
  4. *
  5. * Copyright (C) 2019 Richard Genoud
  6. *
  7. */
  8. #ifndef MQTTCLIENT_H
  9. #define MQTTCLIENT_H
  10. #include <QHostAddress>
  11. #include <QStringList>
  12. #include "qmqtt.h"
  13. class MQTTSubcriber: public QMQTT::Client
  14. {
  15. Q_OBJECT
  16. public:
  17. explicit MQTTSubcriber(const QHostAddress& host = QHostAddress::LocalHost,
  18. const quint16 port = 1883,
  19. QObject* parent = NULL);
  20. virtual ~MQTTSubcriber();
  21. public slots:
  22. void onConnected();
  23. void onSubscribed(const QString& topic);
  24. void onReceived(const QMQTT::Message& message);
  25. private:
  26. QStringList m_sensor_topics;
  27. QStringList m_availability_topics;
  28. };
  29. #endif
  30. /* vim: set tabstop=8 shiftwidth=8 softtabstop=0 noexpandtab: */