Package net.solarnetwork.io.modbus
Interface ModbusClientConfig
- All Known Implementing Classes:
NettyModbusClientConfig
public interface ModbusClientConfig
API for Modbus client configuration.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanThe default automatic reconnection setting.static final longThe default reconnection delay seconds. -
Method Summary
Modifier and TypeMethodDescriptiondefault longGet the number of seconds to delay attempting to automatically reestablish a connection when theisAutoReconnect()setting is enabled.Get a description of this Modbus client configuration.default booleanGet the "auto reconnect" setting.
-
Field Details
-
DEFAULT_AUTO_RECONNECT
static final boolean DEFAULT_AUTO_RECONNECTThe default automatic reconnection setting.- See Also:
-
DEFAULT_RECONNECT_DELAY_SECS
static final long DEFAULT_RECONNECT_DELAY_SECSThe default reconnection delay seconds.- See Also:
-
-
Method Details
-
isAutoReconnect
default boolean isAutoReconnect()Get the "auto reconnect" setting.- Returns:
- true if the Modbus connection should try to maintain a persistent connection, and reestablish it if it fails/closes/ends for any reason; false to not automatically reestablish the connection if it fails
-
getAutoReconnectDelaySeconds
default long getAutoReconnectDelaySeconds()Get the number of seconds to delay attempting to automatically reestablish a connection when theisAutoReconnect()setting is enabled.- Returns:
- the number of seconds to delay before attempting to reestablish a
failed/closed/ended connection and
isAutoReconnect()returns true
-
getDescription
String getDescription()Get a description of this Modbus client configuration.This intention of this value is for use in logging and debugging contexts. It should return something meaningful and specific to the configuration, such as a description of the connection like the serial port name or TCP host and port.
- Returns:
- the configuration description, never null
-