Fix MqttPubSub Constructor
* Fix MqttPubSub constructor * Add MQTT client accessor to MqttConnector
This commit is contained in:
parent
7d3bbf4240
commit
51dabb705f
@ -21,6 +21,9 @@ class MqttConnector {
|
|||||||
}
|
}
|
||||||
|
|
||||||
virtual void onConnect() = 0;
|
virtual void onConnect() = 0;
|
||||||
|
|
||||||
|
public:
|
||||||
|
inline AsyncMqttClient* getMqttClient() const { return _mqttClient; }
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -141,8 +144,8 @@ class MqttPubSub : public MqttPub<T>, public MqttSub<T> {
|
|||||||
String pubTopic = "",
|
String pubTopic = "",
|
||||||
String subTopic = "") :
|
String subTopic = "") :
|
||||||
MqttConnector<T>(statefulService, mqttClient),
|
MqttConnector<T>(statefulService, mqttClient),
|
||||||
MqttPub<T>(jsonSerializer, statefulService, mqttClient, pubTopic = ""),
|
MqttPub<T>(jsonSerializer, statefulService, mqttClient, pubTopic),
|
||||||
MqttSub<T>(jsonDeserializer, statefulService, mqttClient, subTopic = "") {
|
MqttSub<T>(jsonDeserializer, statefulService, mqttClient, subTopic) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
Loading…
Reference in New Issue
Block a user