""" \author Tristan Israël """
from . import MqttClient, ConnectionType, Constants
[docs]
class MqttFactory():
[docs]
@staticmethod
def create_mqtt_client_domu(identifier:str) -> MqttClient:
return MqttClient(identifier, ConnectionType.SERIAL_PORT, Constants.SERIAL_PORT_MSG)
[docs]
@staticmethod
def create_mqtt_client_dom0(identifier:str) -> MqttClient:
return MqttClient(identifier, ConnectionType.UNIX_SOCKET, Constants.MQTT_MSG_BROKER_SOCKET)
[docs]
@staticmethod
def create_mqtt_network_dev(identifier:str) -> MqttClient:
return MqttClient(identifier, ConnectionType.TCP_DEBUG, "localhost")