5.3.1.20.5.2. cli.com.mqtt_com.MQTTProcess

class cli.com.mqtt_com.MQTTProcess(name: str, control: ComControl, parameter: MQTTParameter)

Background process for handling MQTT client connection, publishing, and subscription. Manages the MQTT client lifecycle and message routing.

__init__(name: str, control: ComControl, parameter: MQTTParameter) None

Initializes the MQTT process.

Parameters:
  • name (str) – Process name.

  • control (ComControl) – Communication control object.

  • parameter (MQTTParameter) – MQTT configuration parameters.

Methods

__init__(name, control, parameter)

Initializes the MQTT process.

close()

Close the Process object.

is_alive()

Return whether process is alive

join([timeout])

Wait until child process terminates

kill()

Terminate process; sends SIGKILL signal or uses TerminateProcess()

run()

Starts the MQTT process, connects to the broker, and begins the event loop.

shutdown()

Signals the process to shut down by setting the shutdown event.

start()

Start child process

terminate()

Terminate process; sends SIGTERM signal or uses TerminateProcess()

Attributes

authkey

daemon

Return whether process is a daemon

exitcode

Return exit code of process or None if it has yet to stop

ident

Return identifier (PID) of process or None if it has yet to start

name

pid

Return identifier (PID) of process or None if it has yet to start

sentinel

Return a file descriptor (Unix) or handle (Windows) suitable for waiting for process termination.

control

parameter