|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ModbusTransaction
Interface defining a ModbusTransaction.
A transaction is defined by the sequence of sending a request message and receiving a related response message.
Method Summary | |
---|---|
void |
execute()
Executes this ModbusTransaction. |
ModbusRequest |
getRequest()
Returns the ModbusRequest instance associated with this ModbusTransaction. |
ModbusResponse |
getResponse()
Returns the ModbusResponse instance associated with this ModbusTransaction. |
int |
getRetries()
Returns the amount of retries for opening the connection for executing the transaction. |
int |
getTransactionID()
Returns the actual transaction identifier of this ModbusTransaction. |
boolean |
isCheckingValidity()
Tests whether the validity of a transaction will be checked. |
void |
setCheckingValidity(boolean b)
Sets the flag that controls whether the validity of a transaction will be checked. |
void |
setRequest(ModbusRequest req)
Sets the ModbusRequest for this ModbusTransaction. |
void |
setRetries(int retries)
Set the amount of retries for opening the connection for executing the transaction. |
Method Detail |
---|
void setRequest(ModbusRequest req)
The related ModbusResponse is acquired
from the passed in ModbusRequest instance.
req
- a ModbusRequest.ModbusRequest getRequest()
ModbusResponse getResponse()
int getTransactionID()
void setRetries(int retries)
retries
- the amount of retries as int.int getRetries()
void setCheckingValidity(boolean b)
b
- true if checking validity, false otherwise.boolean isCheckingValidity()
void execute() throws ModbusException
ModbusException
- if an I/O error occurs,
or the response is a modbus protocol exception.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |