5.3.1.20.5.1. cli.com.mqtt_com.MQTT
- class cli.com.mqtt_com.MQTT(name: str, parameter: MQTTParameter)
Communication interface for sending and receiving messages via MQTT protocol. Initializes and manages a background process for MQTT communication.
- __init__(name: str, parameter: MQTTParameter) None
Initializes the MQTT communication interface.
- Parameters:
name (str) – The name of the interface.
parameter (MQTTParameter) – Configuration parameters for MQTT.
Methods
__init__(name, parameter)Initializes the MQTT communication interface.
is_alive([process_name])Checks whether the managed process or all processes are still alive.
read([block, timeout])Reads an incoming MQTT message from the output queue.
shutdown([block, timeout])Signals all processes to shut down and optionally waits until they have finished.
start()Starts all managed processes and waits until they are ready.
write(msg)Publishes a message to a specific MQTT topic via the input queue.