Interface ModbusClientConfig

All Known Implementing Classes:
NettyModbusClientConfig

public interface ModbusClientConfig
API for Modbus client configuration.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final boolean
    The default automatic reconnection setting.
    static final long
    The default reconnection delay seconds.
  • Method Summary

    Modifier and Type
    Method
    Description
    default long
    Get the number of seconds to delay attempting to automatically reestablish a connection when the isAutoReconnect() setting is enabled.
    Get a description of this Modbus client configuration.
    default boolean
    Get the "auto reconnect" setting.
  • Field Details

    • DEFAULT_AUTO_RECONNECT

      static final boolean DEFAULT_AUTO_RECONNECT
      The default automatic reconnection setting.
      See Also:
    • DEFAULT_RECONNECT_DELAY_SECS

      static final long DEFAULT_RECONNECT_DELAY_SECS
      The 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 the isAutoReconnect() 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