public abstract class AbstractUDPTerminal extends Object
| Constructor and Description |
|---|
AbstractUDPTerminal() |
| Modifier and Type | Method and Description |
|---|---|
abstract void |
activate()
Activate this UDPTerminal.
|
abstract void |
deactivate()
Deactivates this UDPTerminal.
|
InetAddress |
getAddress()
Gets the local adapter address
|
int |
getPort()
Returns the local port the terminal is listening on
|
ModbusUDPTransport |
getTransport()
Get the transport
|
boolean |
isActive()
Tests if this UDPSlaveTerminal is active.
|
abstract byte[] |
receiveMessage()
Receives and returns a message.
|
abstract void |
sendMessage(byte[] msg)
Sends the given message.
|
void |
setTimeout(int timeout)
Sets the timeout in milliseconds for this UDPSlaveTerminal.
|
public InetAddress getAddress()
public int getPort()
public boolean isActive()
public void setTimeout(int timeout)
timeout - the timeout as int.public ModbusUDPTransport getTransport()
public abstract void activate()
throws Exception
Exception - if there is a network failure.public abstract void deactivate()
public abstract void sendMessage(byte[] msg)
throws Exception
msg - the message as byte[].Exception - if sending the message fails.Copyright © 2025. All Rights Reserved.