During initialization and connection to an inverter the connected flag is set to True and this value is kept for the whole application runtime. In case of a meanwhile connection failure a command for register-read fails with a ModbusIOException which is caught and rethrown in the method read_raw_value. In this case the connected flag should be set to False to indicate that a reconnect might be required.
During initialization and connection to an inverter the
connected
flag is set to True and this value is kept for the whole application runtime. In case of a meanwhile connection failure a command for register-read fails with aModbusIOException
which is caught and rethrown in the methodread_raw_value
. In this case theconnected
flag should be set to False to indicate that a reconnect might be required.