public abstract class AbstractModbusListener extends Object implements Runnable
| Constructor and Description |
|---|
AbstractModbusListener() |
| Modifier and Type | Method and Description |
|---|---|
InetAddress |
getAddress()
Returns the address bound to this socket
|
String |
getError()
Returns any startup errors that may have aoccurred
|
int |
getPort()
Returns the port being listened on
|
ProcessImage |
getProcessImage(int unitId)
Returns the related process image for this listener and Unit Id
|
String |
getThreadName()
Gets the name of the thread used by the listener
|
int |
getTimeout()
Get the socket timeout
|
boolean |
isListening()
Tests if this ModbusTCPListener is listening and accepting
incoming connections.
|
void |
setAddress(InetAddress addr)
Sets the address of the interface to be listened to.
|
void |
setListening(boolean b)
Set the listening state of this ModbusTCPListener object.
|
void |
setPort(int port)
Sets the port to be listened to.
|
void |
setThreadName(String threadName)
Sets the name of the thread used by the listener
|
void |
setTimeout(int timeout)
Sets the socket timeout
|
abstract void |
stop()
Stop the listener thread for this ModbusListener instance.
|
public abstract void stop()
public void setPort(int port)
port - the number of the IP port as int.public int getPort()
public void setAddress(InetAddress addr)
addr - an InetAddress instance.public InetAddress getAddress()
public boolean isListening()
public void setListening(boolean b)
b - listening statepublic String getError()
public int getTimeout()
public void setTimeout(int timeout)
timeout - Timeout in millisecondspublic ProcessImage getProcessImage(int unitId)
unitId - Unit IDpublic String getThreadName()
public void setThreadName(String threadName)
threadName - Name to use for the threadCopyright © 2025. All Rights Reserved.