Docstrings updated

This commit is contained in:
Nicolas 2025-06-06 16:34:51 +02:00
parent 781816334d
commit 3771cfad05
2 changed files with 8 additions and 24 deletions

View File

@ -225,19 +225,10 @@ class BusCoupler():
"""
Base class for ModBus TCP bus coupler
Args:
host: ip or hostname of the bus coupler
port: port of the modbus host
debug: outputs modbus debug information
timeout: timeout for waiting for the device response
watchdog: time in seconds after the device sets all outputs to
default state. A value of 0 deactivates the watchdog.
debug: If True, debug information is printed.
Attributes:
bus_terminals: A list of bus terminal classes according to the
bus_terminals (list[BusTerminal]): A list of bus terminal classes according to the
connected terminals.
modbus: The underlying modbus client used for the connection.
modbus (SimpleModbusClient): The underlying modbus client used for the connection.
"""
def __init__(self, host: str, port: int = 502, bus_terminals: Iterable[type[BusTerminal]] = [],

View File

@ -48,20 +48,13 @@ class SimpleModbusClient:
"""
A simple Modbus TCP client
Args:
host: hostname or IP address
port: server port
unit_id: ModBus id
timeout: socket timeout in seconds
debug: if True prints out transmitted and received bytes in hex
Attributes:
host: hostname or IP address
port: server port
unit_id: ModBus id
timeout: socket timeout in seconds
last_error: contains last error message or empty string if no error occurred
debug: if True prints out transmitted and received bytes in hex
host (str): hostname or IP address
port (int): server port
unit_id (int): ModBus id
timeout (float): socket timeout in seconds
last_error (str): contains last error message or empty string if no error occurred
debug (bool): if True prints out transmitted and received bytes in hex
"""