|
jamod at SF | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 |
public void setRequest(ModbusRequest req)
The related ModbusResponse is acquired
from the passed in ModbusRequest instance.
req
- a ModbusRequest.public ModbusRequest getRequest()
public ModbusResponse getResponse()
public int getTransactionID()
public void setRetries(int retries)
retries
- the amount of retries as int.public int getRetries()
public void setCheckingValidity(boolean b)
b
- true if checking validity, false otherwise.public boolean isCheckingValidity()
public void execute() throws ModbusException
ModbusException
- if an I/O error occurs,
or the response is a modbus protocol exception.
|
jamod at SF | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |