public interface JSerialCommChannelConfig
extends io.netty.channel.ChannelConfig
ChannelConfig,
DefaultJSerialCommChannelConfig allows the following options in the option map:
| Modifier and Type | Interface and Description |
|---|---|
static class |
JSerialCommChannelConfig.Paritybit |
static class |
JSerialCommChannelConfig.Stopbits |
| Modifier and Type | Method and Description |
|---|---|
int |
getBaudrate() |
int |
getDatabits() |
JSerialCommChannelConfig.Paritybit |
getParitybit() |
int |
getReadTimeout()
Return the maximal time (in ms) to block and wait for something to be ready to read.
|
JSerialCommChannelConfig.Stopbits |
getStopbits() |
int |
getWaitTimeMillis() |
JSerialCommChannelConfig |
setAllocator(io.netty.buffer.ByteBufAllocator allocator) |
JSerialCommChannelConfig |
setAutoRead(boolean autoRead) |
JSerialCommChannelConfig |
setBaudrate(int baudrate)
Sets the baud rate (ie.
|
JSerialCommChannelConfig |
setConnectTimeoutMillis(int connectTimeoutMillis) |
JSerialCommChannelConfig |
setDatabits(int databits)
Sets the number of data bits to use to make up each character sent to the serial
device.
|
JSerialCommChannelConfig |
setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator) |
JSerialCommChannelConfig |
setParitybit(JSerialCommChannelConfig.Paritybit paritybit)
Sets the type of parity bit to be used when communicating with the serial device.
|
JSerialCommChannelConfig |
setReadTimeout(int readTimeout)
Sets the maximal time (in ms) to block while try to read from the serial port.
|
JSerialCommChannelConfig |
setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator) |
JSerialCommChannelConfig |
setStopbits(JSerialCommChannelConfig.Stopbits stopbits)
Sets the number of stop bits to include at the end of every character to aid the
serial device in synchronising with the data.
|
JSerialCommChannelConfig |
setWaitTimeMillis(int waitTimeMillis)
Sets the time to wait after opening the serial port and before sending it any
configuration information or data.
|
JSerialCommChannelConfig |
setWriteBufferHighWaterMark(int writeBufferHighWaterMark) |
JSerialCommChannelConfig |
setWriteBufferLowWaterMark(int writeBufferLowWaterMark) |
JSerialCommChannelConfig |
setWriteSpinCount(int writeSpinCount) |
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getOption, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setAutoClose, setMaxMessagesPerRead, setOption, setOptions, setWriteBufferWaterMarkJSerialCommChannelConfig setBaudrate(int baudrate)
baudrate - The baud rate (in bits per second)JSerialCommChannelConfig setStopbits(JSerialCommChannelConfig.Stopbits stopbits)
stopbits - The number of stop bits to useJSerialCommChannelConfig setDatabits(int databits)
databits - The number of data bits to useJSerialCommChannelConfig setParitybit(JSerialCommChannelConfig.Paritybit paritybit)
paritybit - The type of parity bit to be usedint getBaudrate()
JSerialCommChannelConfig.Stopbits getStopbits()
JSerialCommChannelConfig.Stopbits.STOPBITS_1 if unsetint getDatabits()
JSerialCommChannelConfig.Paritybit getParitybit()
JSerialCommChannelConfig.Paritybit.NONE if unsetint getWaitTimeMillis()
JSerialCommChannelConfig setWaitTimeMillis(int waitTimeMillis)
waitTimeMillis - The number of milliseconds to wait, defaulting to 0 (no
wait) if unsetIllegalArgumentException - if the supplied value is < 0JSerialCommChannelConfig setReadTimeout(int readTimeout)
int getReadTimeout()
JSerialCommChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
setConnectTimeoutMillis in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setWriteSpinCount(int writeSpinCount)
setWriteSpinCount in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setAllocator(io.netty.buffer.ByteBufAllocator allocator)
setAllocator in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setRecvByteBufAllocator(io.netty.channel.RecvByteBufAllocator allocator)
setRecvByteBufAllocator in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setAutoRead(boolean autoRead)
setAutoRead in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
setWriteBufferHighWaterMark in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
setWriteBufferLowWaterMark in interface io.netty.channel.ChannelConfigJSerialCommChannelConfig setMessageSizeEstimator(io.netty.channel.MessageSizeEstimator estimator)
setMessageSizeEstimator in interface io.netty.channel.ChannelConfigCopyright © 2017. All rights reserved.