Interface PortConfig.Builder

All Superinterfaces:
eu.mihosoft.vmf.runtime.core.Builder
All Known Implementing Classes:
PortConfigImpl.BuilderImpl
Enclosing interface:
PortConfig

public static interface PortConfig.Builder extends eu.mihosoft.vmf.runtime.core.Builder
  • Method Details

    • withBaudRate

      PortConfig.Builder withBaudRate(int baudRate)
      Sets the 'baudRate' property of this builder.
      Parameters:
      baudRate - value to set

      The baud rate used for sending and receiving data.

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setBaudRate(int)
    • withName

      PortConfig.Builder withName(String name)
      Sets the 'name' property of this builder.
      Parameters:
      name - value to set

      The port name used to identify the port, e.g. 'COM3'.

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setName(java.lang.String)
    • withNumberOfDataBits

      PortConfig.Builder withNumberOfDataBits(int numberOfDataBits)
      Sets the 'numberOfDataBits' property of this builder.
      Parameters:
      numberOfDataBits - value to set

      The number of data bits (usually 8).

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setNumberOfDataBits(int)
    • withParityBits

      PortConfig.Builder withParityBits(ParityBits parityBits)
      Sets the 'parityBits' property of this builder.
      Parameters:
      parityBits - value to set

      The number of parity bits.

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setParityBits(eu.mihosoft.devcom.ParityBits)
    • withRS485ModeEnabled

      PortConfig.Builder withRS485ModeEnabled(boolean rS485ModeEnabled)
      Sets the 'rS485ModeEnabled' property of this builder.
      Parameters:
      rS485ModeEnabled - value to set

      Determines, whether RS485 mode should be enabled

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setRS485ModeEnabled(boolean)
    • withSafetyTimeout

      PortConfig.Builder withSafetyTimeout(int safetyTimeout)
      Sets the 'safetyTimeout' property of this builder.
      Parameters:
      safetyTimeout - value to set

      Safety timeout used for opening the port (in milliseconds).

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setSafetyTimeout(int)
    • withStopBits

      PortConfig.Builder withStopBits(StopBits stopBits)
      Sets the 'stopBits' property of this builder.
      Parameters:
      stopBits - value to set

      The number of stop bits.

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setStopBits(eu.mihosoft.devcom.StopBits)
    • withWriteTimeout

      PortConfig.Builder withWriteTimeout(int writeTimeout)
      Sets the 'writeTimeout' property of this builder.
      Parameters:
      writeTimeout - value to set

      Write timeout (in milliseconds).

      Returns:
      this builder
      See Also:
      • eu.mihosoft.devcom.PortConfig#setWriteTimeout(int)
    • build

      PortConfig build()
      Builds a new 'PortConfig' instance.
      Specified by:
      build in interface eu.mihosoft.vmf.runtime.core.Builder
      Returns:
      a new 'PortConfig' instance