2022-11-12 22:21:23 +08:00
|
|
|
|
|
|
|
class _MQTT:
|
|
|
|
def __init__(self, ip: str, port: int, clinetID: str,
|
|
|
|
username: str, password: str, version: str,
|
|
|
|
ca: str, keepalive: int): ...
|
2022-11-13 15:16:08 +08:00
|
|
|
|
|
|
|
def __del__(self): ...
|
2022-11-18 21:21:09 +08:00
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def set_port(self, port: int) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""Set the port of the MQTTClient."""
|
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def set_host(self, host_url: str) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""Set the host_url of the MQTTClient."""
|
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def set_client_id(self, id: str) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""Set the client_id of the MQTTClient."""
|
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def set_user_name(self, name: str) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""Set the name of the MQTTClient."""
|
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def set_password(self, password: str) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""Set the password of the MQTTClient."""
|
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def connect(self) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""connect to the mqtt-server."""
|
|
|
|
|
2022-11-18 23:38:49 +08:00
|
|
|
def disconnect(self) -> int:
|
2022-11-18 21:21:09 +08:00
|
|
|
"""disconnect to the mqtt-server."""
|