类 BatchRead<K>

java.lang.Object
com.huangjian.modbus4j.BatchRead<K>
类型参数:
K - - Type of read

public class BatchRead<K> extends Object
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.
  • 构造器详细资料

    • 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

      public List<ReadFunctionGroup<K>> getReadFunctionGroups(ModbusMaster master)

      getReadFunctionGroups.

      参数:
      master - a ModbusMaster object.
      返回:
      a List object.
    • addLocator

      public void addLocator(K id, BaseLocator<?> locator)

      addLocator.

      参数:
      id - a K object.
      locator - a BaseLocator object.
    • isCancel

      public boolean isCancel()

      isCancel.

      返回:
      a boolean.
    • setCancel

      public void setCancel(boolean cancel)

      Setter for the field cancel.

      参数:
      cancel - a boolean.