2019-07-09 22:01:39 +02:00
|
|
|
class MQTTClientBase:
|
|
|
|
def __init__(self, host, user, password, client_id):
|
|
|
|
self.host = host
|
|
|
|
self.user = user
|
|
|
|
self.password = password
|
|
|
|
self.client_id = client_id
|
|
|
|
|
|
|
|
self._connect()
|
|
|
|
|
|
|
|
def send_data(self, topic, data):
|
|
|
|
raise NotImplementedError("Send not implemented")
|
|
|
|
|
|
|
|
def _connect(self):
|
|
|
|
raise NotImplementedError("Connect not implemented")
|
2019-07-31 22:31:50 +02:00
|
|
|
|
|
|
|
def is_async(self):
|
|
|
|
return False
|