public class ModbusSerialTransaction extends ModbusTransaction
| Constructor and Description |
|---|
ModbusSerialTransaction()
Constructs a new ModbusSerialTransaction
instance.
|
ModbusSerialTransaction(AbstractSerialConnection con)
Constructs a new ModbusSerialTransaction
instance with a given ModbusRequest to
be send when the transaction is executed.
|
ModbusSerialTransaction(ModbusRequest request)
Constructs a new ModbusSerialTransaction
instance with a given ModbusRequest to
be send when the transaction is executed.
|
| Modifier and Type | Method and Description |
|---|---|
void |
execute()
Executes this ModbusTransaction.
|
int |
getTransDelayMS()
Get the TransDelayMS value.
|
void |
setSerialConnection(AbstractSerialConnection con)
Sets the port on which this ModbusTransaction
should be executed.
|
void |
setTransDelayMS(int newTransDelayMS)
Set the TransDelayMS value.
|
void |
setTransport(ModbusSerialTransport transport) |
getRequest, getResponse, getTransactionID, isCheckingValidity, setCheckingValidity, setRequest, setRetriespublic ModbusSerialTransaction()
public ModbusSerialTransaction(ModbusRequest request)
request - a ModbusRequest instance.public ModbusSerialTransaction(AbstractSerialConnection con)
con - a TCPMasterConnection instance.public void setSerialConnection(AbstractSerialConnection con)
con - a SerialConnection.public void setTransport(ModbusSerialTransport transport)
public int getTransDelayMS()
public void setTransDelayMS(int newTransDelayMS)
newTransDelayMS - The new TransDelayMS value.public void execute()
throws ModbusException
ModbusTransactionexecute in class ModbusTransactionModbusException - if an I/O error occurs,
or the response is a modbus protocol exception.Copyright © 2025. All Rights Reserved.