MQTT client fonctionnel
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
#ifndef MQTTCLIENTWRAPPER_H
|
||||
#define MQTTCLIENTWRAPPER_H
|
||||
|
||||
#include "defines.h"
|
||||
#include <QtMqtt/QtMqtt>
|
||||
#include <QMqttClient>
|
||||
#include "CloudParams.h"
|
||||
#include "MQTTMessage.h"
|
||||
#include <QList>
|
||||
|
||||
class CMQTTClientWrapper : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CMQTTClientWrapper();
|
||||
int SetMQTTParams(CCloudParams *Params);
|
||||
int ConnectToBroker();
|
||||
int SendMQTTMessages(QList<CMQTTMessage> MessagesList);
|
||||
int DisconnectFromBroker();
|
||||
|
||||
QString mMQTTClientID;
|
||||
|
||||
private:
|
||||
QMqttClient mMQTTClient;
|
||||
CCloudParams mMQTTParams;
|
||||
|
||||
public slots:
|
||||
void StateChanged();
|
||||
|
||||
};
|
||||
|
||||
#endif // MQTTCLIENTWRAPPER_H
|
||||
Reference in New Issue
Block a user