5.3.1.20.4.1. cli.com.modbus_com.Modbus
- class cli.com.modbus_com.Modbus(name: str, parameter: ModbusParameter)
High-level adapter for Modbus process-based communication.
This class manages the lifecycle of a ModbusProcess and provides queue-based read/write methods for commands and results.
- __init__(name: str, parameter: ModbusParameter) None
Initialize the Modbus communication interface.
- Parameters:
name (str) – A human-readable name for the interface (used for logging).
parameter (ModbusParameter) – Configuration parameters for Modbus TCP.
Methods
__init__(name, parameter)Initialize the Modbus communication interface.
is_alive([process_name])Checks whether the managed process or all processes are still alive.
read([block, timeout])Read a result dictionary 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(command)Send a Modbus command to the input queue for execution.