Package eu.mihosoft.devcom
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 Summary
Modifier and TypeMethodDescriptionbuild()
Builds a new 'PortConfig
' instance.withBaudRate
(int baudRate) Sets the 'baudRate' property of this builder.Sets the 'name' property of this builder.withNumberOfDataBits
(int numberOfDataBits) Sets the 'numberOfDataBits' property of this builder.withParityBits
(ParityBits parityBits) Sets the 'parityBits' property of this builder.withRS485ModeEnabled
(boolean rS485ModeEnabled) Sets the 'rS485ModeEnabled' property of this builder.withSafetyTimeout
(int safetyTimeout) Sets the 'safetyTimeout' property of this builder.withStopBits
(StopBits stopBits) Sets the 'stopBits' property of this builder.withWriteTimeout
(int writeTimeout) Sets the 'writeTimeout' property of this builder.
-
Method Details
-
withBaudRate
Sets the 'baudRate' property of this builder.- Parameters:
baudRate
- value to setThe baud rate used for sending and receiving data.
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setBaudRate(int)
-
withName
Sets the 'name' property of this builder.- Parameters:
name
- value to setThe port name used to identify the port, e.g. 'COM3'.
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setName(java.lang.String)
-
withNumberOfDataBits
Sets the 'numberOfDataBits' property of this builder.- Parameters:
numberOfDataBits
- value to setThe number of data bits (usually 8).
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setNumberOfDataBits(int)
-
withParityBits
Sets the 'parityBits' property of this builder.- Parameters:
parityBits
- value to setThe number of parity bits.
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setParityBits(eu.mihosoft.devcom.ParityBits)
-
withRS485ModeEnabled
Sets the 'rS485ModeEnabled' property of this builder.- Parameters:
rS485ModeEnabled
- value to setDetermines, whether RS485 mode should be enabled
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setRS485ModeEnabled(boolean)
-
withSafetyTimeout
Sets the 'safetyTimeout' property of this builder.- Parameters:
safetyTimeout
- value to setSafety timeout used for opening the port (in milliseconds).
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setSafetyTimeout(int)
-
withStopBits
Sets the 'stopBits' property of this builder.- Parameters:
stopBits
- value to setThe number of stop bits.
- Returns:
- this builder
- See Also:
-
eu.mihosoft.devcom.PortConfig#setStopBits(eu.mihosoft.devcom.StopBits)
-
withWriteTimeout
Sets the 'writeTimeout' property of this builder.- Parameters:
writeTimeout
- value to setWrite 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 interfaceeu.mihosoft.vmf.runtime.core.Builder
- Returns:
- a new '
PortConfig
' instance
-