@Deprecated public interface RxtxChannelConfig extends ChannelConfig
ChannelConfig,
DefaultRxtxChannelConfig allows the following options in the option map:
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
RxtxChannelConfig.Databits
已过时。
|
static class |
RxtxChannelConfig.Paritybit
已过时。
|
static class |
RxtxChannelConfig.Stopbits
已过时。
|
| 限定符和类型 | 方法和说明 |
|---|---|
int |
getBaudrate()
已过时。
|
RxtxChannelConfig.Databits |
getDatabits()
已过时。
|
RxtxChannelConfig.Paritybit |
getParitybit()
已过时。
|
int |
getReadTimeout()
已过时。
Return the maximal time (in ms) to block and wait for something to be ready to read.
|
RxtxChannelConfig.Stopbits |
getStopbits()
已过时。
|
int |
getWaitTimeMillis()
已过时。
|
boolean |
isDtr()
已过时。
|
boolean |
isRts()
已过时。
|
RxtxChannelConfig |
setAllocator(ByteBufAllocator allocator)
已过时。
Set the
ByteBufAllocator which is used for the channel
to allocate buffers. |
RxtxChannelConfig |
setAutoClose(boolean autoClose)
已过时。
Sets whether the
Channel should be closed automatically and immediately on write failure. |
RxtxChannelConfig |
setAutoRead(boolean autoRead)
已过时。
Sets if
ChannelHandlerContext.read() will be invoked automatically so that a user application doesn't
need to call it at all. |
RxtxChannelConfig |
setBaudrate(int baudrate)
已过时。
Sets the baud rate (ie. bits per second) for communication with the serial device.
|
RxtxChannelConfig |
setConnectTimeoutMillis(int connectTimeoutMillis)
已过时。
Sets the connect timeout of the channel in milliseconds.
|
RxtxChannelConfig |
setDatabits(RxtxChannelConfig.Databits databits)
已过时。
Sets the number of data bits to use to make up each character sent to the serial
device.
|
RxtxChannelConfig |
setDtr(boolean dtr)
已过时。
Sets whether the serial device supports the Data Terminal Ready signal, used for
flow control
|
RxtxChannelConfig |
setMaxMessagesPerRead(int maxMessagesPerRead)
已过时。
|
RxtxChannelConfig |
setMessageSizeEstimator(MessageSizeEstimator estimator)
已过时。
Set the
MessageSizeEstimator which is used for the channel
to detect the size of a message. |
RxtxChannelConfig |
setParitybit(RxtxChannelConfig.Paritybit paritybit)
已过时。
Sets the type of parity bit to be used when communicating with the serial device.
|
RxtxChannelConfig |
setReadTimeout(int readTimeout)
已过时。
Sets the maximal time (in ms) to block while try to read from the serial port.
|
RxtxChannelConfig |
setRecvByteBufAllocator(RecvByteBufAllocator allocator)
已过时。
Set the
RecvByteBufAllocator which is used for the channel to allocate receive buffers. |
RxtxChannelConfig |
setRts(boolean rts)
已过时。
Sets whether the serial device supports the Request To Send signal, used for flow
control
|
RxtxChannelConfig |
setStopbits(RxtxChannelConfig.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.
|
RxtxChannelConfig |
setWaitTimeMillis(int waitTimeMillis)
已过时。
Sets the time to wait after opening the serial port and before sending it any
configuration information or data.
|
RxtxChannelConfig |
setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
已过时。
Sets the high water mark of the write buffer.
|
RxtxChannelConfig |
setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
已过时。
Sets the low water mark of the write buffer.
|
RxtxChannelConfig |
setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
已过时。
Set the
WriteBufferWaterMark which is used for setting the high and low
water mark of the write buffer. |
RxtxChannelConfig |
setWriteSpinCount(int writeSpinCount)
已过时。
Sets the maximum loop count for a write operation until
WritableByteChannel.write(ByteBuffer) returns a non-zero value. |
getAllocator, getConnectTimeoutMillis, getMaxMessagesPerRead, getMessageSizeEstimator, getOption, getOptions, getRecvByteBufAllocator, getWriteBufferHighWaterMark, getWriteBufferLowWaterMark, getWriteBufferWaterMark, getWriteSpinCount, isAutoClose, isAutoRead, setOption, setOptionsRxtxChannelConfig setBaudrate(int baudrate)
baudrate - The baud rate (in bits per second)RxtxChannelConfig setStopbits(RxtxChannelConfig.Stopbits stopbits)
stopbits - The number of stop bits to useRxtxChannelConfig setDatabits(RxtxChannelConfig.Databits databits)
databits - The number of data bits to useRxtxChannelConfig setParitybit(RxtxChannelConfig.Paritybit paritybit)
paritybit - The type of parity bit to be usedint getBaudrate()
RxtxChannelConfig.Stopbits getStopbits()
RxtxChannelConfig.Stopbits.STOPBITS_1 if unsetRxtxChannelConfig.Databits getDatabits()
RxtxChannelConfig.Databits.DATABITS_8 if unsetRxtxChannelConfig.Paritybit getParitybit()
RxtxChannelConfig.Paritybit.NONE if unsetboolean isDtr()
RxtxChannelConfig setDtr(boolean dtr)
dtr - true if DTR is supported, false otherwiseboolean isRts()
RxtxChannelConfig setRts(boolean rts)
rts - true if RTS is supported, false otherwiseint getWaitTimeMillis()
RxtxChannelConfig setWaitTimeMillis(int waitTimeMillis)
waitTimeMillis - The number of milliseconds to wait, defaulting to 0 (no
wait) if unsetjava.lang.IllegalArgumentException - if the supplied value is < 0RxtxChannelConfig setReadTimeout(int readTimeout)
int getReadTimeout()
RxtxChannelConfig setConnectTimeoutMillis(int connectTimeoutMillis)
ChannelConfigChannel does not support connect operation, this property is not
used at all, and therefore will be ignored.setConnectTimeoutMillis 在接口中 ChannelConfigconnectTimeoutMillis - the connect timeout in milliseconds.
0 to disable.@Deprecated RxtxChannelConfig setMaxMessagesPerRead(int maxMessagesPerRead)
setMaxMessagesPerRead 在接口中 ChannelConfigRxtxChannelConfig setWriteSpinCount(int writeSpinCount)
ChannelConfigWritableByteChannel.write(ByteBuffer) returns a non-zero value.
It is similar to what a spin lock is used for in concurrency programming.
It improves memory utilization and write throughput depending on
the platform that JVM runs on. The default value is 16.setWriteSpinCount 在接口中 ChannelConfigRxtxChannelConfig setAllocator(ByteBufAllocator allocator)
ChannelConfigByteBufAllocator which is used for the channel
to allocate buffers.setAllocator 在接口中 ChannelConfigRxtxChannelConfig setRecvByteBufAllocator(RecvByteBufAllocator allocator)
ChannelConfigRecvByteBufAllocator which is used for the channel to allocate receive buffers.setRecvByteBufAllocator 在接口中 ChannelConfigRxtxChannelConfig setAutoRead(boolean autoRead)
ChannelConfigChannelHandlerContext.read() will be invoked automatically so that a user application doesn't
need to call it at all. The default value is true.setAutoRead 在接口中 ChannelConfigRxtxChannelConfig setAutoClose(boolean autoClose)
ChannelConfigChannel should be closed automatically and immediately on write failure.
The default is true.setAutoClose 在接口中 ChannelConfigRxtxChannelConfig setWriteBufferHighWaterMark(int writeBufferHighWaterMark)
ChannelConfig
Sets the high water mark of the write buffer. If the number of bytes
queued in the write buffer exceeds this value, Channel.isWritable()
will start to return false.
setWriteBufferHighWaterMark 在接口中 ChannelConfigRxtxChannelConfig setWriteBufferLowWaterMark(int writeBufferLowWaterMark)
ChannelConfig
Sets the low water mark of the write buffer. Once the number of bytes
queued in the write buffer exceeded the
high water mark and then
dropped down below this value, Channel.isWritable() will start to return
true again.
setWriteBufferLowWaterMark 在接口中 ChannelConfigRxtxChannelConfig setWriteBufferWaterMark(WriteBufferWaterMark writeBufferWaterMark)
ChannelConfigWriteBufferWaterMark which is used for setting the high and low
water mark of the write buffer.setWriteBufferWaterMark 在接口中 ChannelConfigRxtxChannelConfig setMessageSizeEstimator(MessageSizeEstimator estimator)
ChannelConfigMessageSizeEstimator which is used for the channel
to detect the size of a message.setMessageSizeEstimator 在接口中 ChannelConfig