5.3.1.20.4.2. cli.com.modbus_com.ModbusProcess

class cli.com.modbus_com.ModbusProcess(name: str, control: ComControl, parameter: ModbusParameter)

Background process that owns a ModbusTcpClient and executes commands.

The process:

  • Connects to a Modbus TCP server.

  • Pulls commands from the input queue.

  • Executes the appropriate pymodbus method based on ‘code’.

  • Pushes results (including ‘values’) onto the output queue.

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

Initialize the Modbus process.

Parameters:
  • name (str) – Process name (used for logging).

  • control (ComControl) – Inter-process control and queues.

  • parameter (ModbusParameter) – Modbus TCP configuration parameters.

Methods

__init__(name, control, parameter)

Initialize the Modbus 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()

Process entry point.

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