mqtt-sensord/mqtt_sensord/mqttlib/base.py

18 lines
451 B
Python

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")
def is_async(self):
return False