Open clabnet opened 2 years ago
Hi, I have this class :
class MqttBackend : PubSubClient { public: MqttBackend(WiFiClient &wifiClient); MqttBackend(TinyGsmClient &gsmClient); ....
and the main class as is :
#include <MqttBackend.h> class SASModem : public MqttBackend { private: TinyGsmClient &_gsmClient; public: SASModem() { MqttBackend(&_gsmClient); } bool init(); \\ init the modem network connection bool close(); \\ close the modem connection };
How to instanciate the PubSubClient passing it the gsmClient OR the WiFiClient ?
Thank's
Have you figured this out? I think you might be looking for an initialization list in your class constructor.
Hi, I have this class :
and the main class as is :
How to instanciate the PubSubClient passing it the gsmClient OR the WiFiClient ?
Thank's