public abstract class SerialBuilder<T,S extends SerialBuilder<T,S>> extends Builder<T,S>
| Modifier | Constructor and Description |
|---|---|
protected |
SerialBuilder(java.lang.String serialPortName)
Constructor of the Serial Settings Builder, for connecting M-Bus devices over serial connections like RS232 and
RS485.
|
| Modifier and Type | Method and Description |
|---|---|
protected TransportLayer |
buildTransportLayer()
Build the TransportLayer with the given settings.
|
S |
setBaudrate(int baudrate)
Sets the baudrate of the device
|
S |
setDataBits(org.openmuc.jrxtx.DataBits dataBits)
Sets the number of DataBits, default is
DataBits.DATABITS_8. |
S |
setParity(org.openmuc.jrxtx.Parity parity)
Sets the parity, default is NONE
|
S |
setSerialPortName(java.lang.String serialPortName)
Sets the serial port name of the device
|
S |
setStopBits(org.openmuc.jrxtx.StopBits stopBits)
Sets the stop bits, default is 1
|
build, self, setTimeoutprotected SerialBuilder(java.lang.String serialPortName)
serialPortName - examples for serial port identifiers are on Linux "/dev/ttyS0" or "/dev/ttyUSB0" and on Windows "COM1"public S setBaudrate(int baudrate)
baudrate - the baud rate to use.public S setSerialPortName(java.lang.String serialPortName)
serialPortName - examples for serial port identifiers are on Linux "/dev/ttyS0" or "/dev/ttyUSB0" and
on Windows "COM1".public S setDataBits(org.openmuc.jrxtx.DataBits dataBits)
DataBits.DATABITS_8.dataBits - the new number of databits.public S setStopBits(org.openmuc.jrxtx.StopBits stopBits)
stopBits - Possible values are 1, 1.5 or 2public S setParity(org.openmuc.jrxtx.Parity parity)
parity - Possible values are NONE, EVEN, ODD, SPACE or MARK.protected TransportLayer buildTransportLayer()
BuilderbuildTransportLayer in class Builder<T,S extends SerialBuilder<T,S>>