类 BatchRead<K>
java.lang.Object
com.huangjian.modbus4j.BatchRead<K>
- 类型参数:
K- - Type of read
A class for defining the information required to obtain in a batch.
The generic parameterization represents the class of the key that will be used to find the results in the BatchRead
object. Typically String would be used, but any Object is valid.
Some modbus devices have non-contiguous sets of values within a single register range. These gaps between values may
cause the device to return error responses if a request attempts to read them. In spite of this, because it is
generally more efficient to read a set of values with a single request, the batch read by default will assume that no
such error responses will be returned. If your batch request results in such errors, it is recommended that you
separate the offending request to a separate batch read object, or you can use the "contiguous requests" setting
which causes requests to be partitioned into only contiguous sets.
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddLocator(K id, BaseLocator<?> locator) addLocator.getReadFunctionGroups(ModbusMaster master) getReadFunctionGroups.booleanisCancel()isCancel.booleanisContiguousRequests.booleanisErrorsInResults.booleanisExceptionsInResults.voidsetCancel(boolean cancel) Setter for the fieldcancel.voidsetContiguousRequests(boolean contiguousRequests) Setter for the fieldcontiguousRequests.voidsetErrorsInResults(boolean errorsInResults) Setter for the fielderrorsInResults.voidsetExceptionsInResults(boolean exceptionsInResults) Setter for the fieldexceptionsInResults.
-
构造器详细资料
-
BatchRead
public BatchRead()
-
-
方法详细资料
-
isContiguousRequests
public boolean isContiguousRequests()isContiguousRequests.
- 返回:
- a boolean.
-
setContiguousRequests
public void setContiguousRequests(boolean contiguousRequests) Setter for the field
contiguousRequests.- 参数:
contiguousRequests- a boolean.
-
isErrorsInResults
public boolean isErrorsInResults()isErrorsInResults.
- 返回:
- a boolean.
-
setErrorsInResults
public void setErrorsInResults(boolean errorsInResults) Setter for the field
errorsInResults.- 参数:
errorsInResults- a boolean.
-
isExceptionsInResults
public boolean isExceptionsInResults()isExceptionsInResults.
- 返回:
- a boolean.
-
setExceptionsInResults
public void setExceptionsInResults(boolean exceptionsInResults) Setter for the field
exceptionsInResults.- 参数:
exceptionsInResults- a boolean.
-
getReadFunctionGroups
getReadFunctionGroups.
- 参数:
master- aModbusMasterobject.- 返回:
- a
Listobject.
-
addLocator
addLocator.
- 参数:
id- a K object.locator- aBaseLocatorobject.
-
isCancel
public boolean isCancel()isCancel.
- 返回:
- a boolean.
-
setCancel
public void setCancel(boolean cancel) Setter for the field
cancel.- 参数:
cancel- a boolean.
-