public class RtuNettyModbusClient extends net.solarnetwork.io.modbus.netty.handler.NettyModbusClient<RtuModbusClientConfig> implements io.netty.channel.ChannelFactory<net.solarnetwork.io.modbus.netty.serial.SerialPortChannel>
ModbusClient.| Constructor and Description |
|---|
RtuNettyModbusClient(RtuModbusClientConfig clientConfig,
io.netty.channel.EventLoopGroup eventLoopGroup,
net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
Constructor.
|
RtuNettyModbusClient(RtuModbusClientConfig clientConfig,
ScheduledExecutorService scheduler,
ConcurrentMap<net.solarnetwork.io.modbus.ModbusMessage,net.solarnetwork.io.modbus.netty.handler.NettyModbusClient.PendingMessage> pending,
io.netty.channel.EventLoopGroup eventLoopGroup,
net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
Constructor.
|
RtuNettyModbusClient(RtuModbusClientConfig clientConfig,
ScheduledExecutorService scheduler,
io.netty.channel.EventLoopGroup eventLoopGroup,
net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
Constructor.
|
RtuNettyModbusClient(RtuModbusClientConfig clientConfig,
net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected io.netty.channel.ChannelFuture |
connect() |
protected void |
initChannel(io.netty.channel.Channel channel) |
net.solarnetwork.io.modbus.netty.serial.SerialPortChannel |
newChannel() |
CompletableFuture<?> |
stop() |
getClientConfig, getConnectionObserver, getPendingMessageTtl, getReplyTimeout, isConnected, isStarted, isWireLogging, newModbusChannelHandler, send, sendAsync, setConnectionObserver, setPendingMessageTtl, setReplyTimeout, setWireLogging, startpublic RtuNettyModbusClient(RtuModbusClientConfig clientConfig, net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
clientConfig - the client configurationserialPortProvider - the serial port providerIllegalArgumentException - if any argument is nullpublic RtuNettyModbusClient(RtuModbusClientConfig clientConfig, io.netty.channel.EventLoopGroup eventLoopGroup, net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
clientConfig - the client configurationeventLoopGroup - the event loop group, or null to create an internal oneserialPortProvider - the serial port providerIllegalArgumentException - if any argument except eventLoopGroup is nullpublic RtuNettyModbusClient(RtuModbusClientConfig clientConfig, ScheduledExecutorService scheduler, io.netty.channel.EventLoopGroup eventLoopGroup, net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
clientConfig - the client configurationscheduler - the scheduler, or null to create an internal oneserialPortProvider - the serial port providerIllegalArgumentException - if any argument except eventLoopGroup is nullpublic RtuNettyModbusClient(RtuModbusClientConfig clientConfig, ScheduledExecutorService scheduler, ConcurrentMap<net.solarnetwork.io.modbus.ModbusMessage,net.solarnetwork.io.modbus.netty.handler.NettyModbusClient.PendingMessage> pending, io.netty.channel.EventLoopGroup eventLoopGroup, net.solarnetwork.io.modbus.serial.SerialPortProvider serialPortProvider)
clientConfig - the client configurationscheduler - the scheduler, or null to create an internal onepending - a map for request messages pending responseseventLoopGroup - the event loop group, or null to create an internal oneserialPortProvider - the serial port providerIllegalArgumentException - if any argument except eventLoopGroup is nullpublic net.solarnetwork.io.modbus.netty.serial.SerialPortChannel newChannel()
newChannel in interface io.netty.bootstrap.ChannelFactory<net.solarnetwork.io.modbus.netty.serial.SerialPortChannel>protected io.netty.channel.ChannelFuture connect()
throws IOException
connect in class net.solarnetwork.io.modbus.netty.handler.NettyModbusClient<RtuModbusClientConfig>IOExceptionpublic CompletableFuture<?> stop()
stop in interface net.solarnetwork.io.modbus.ModbusClientstop in class net.solarnetwork.io.modbus.netty.handler.NettyModbusClient<RtuModbusClientConfig>protected void initChannel(io.netty.channel.Channel channel)
initChannel in class net.solarnetwork.io.modbus.netty.handler.NettyModbusClient<RtuModbusClientConfig>