类 NumericLocator

java.lang.Object
com.huangjian.modbus4j.locator.BaseLocator<Number>
com.huangjian.modbus4j.locator.NumericLocator

public class NumericLocator extends BaseLocator<Number>

NumericLocator class.

  • 构造器详细资料

    • NumericLocator

      public NumericLocator(int slaveId, int range, int offset, int dataType)

      Constructor for NumericLocator.

      参数:
      slaveId - a int.
      range - a int.
      offset - a int.
      dataType - a int.
  • 方法详细资料

    • getDataType

      public int getDataType()

      getDataType.

      指定者:
      getDataType 在类中 BaseLocator<Number>
      返回:
      a int.
    • getRoundingMode

      public RoundingMode getRoundingMode()

      Getter for the field roundingMode.

      返回:
      a RoundingMode object.
    • setRoundingMode

      public void setRoundingMode(RoundingMode roundingMode)

      Setter for the field roundingMode.

      参数:
      roundingMode - a RoundingMode object.
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object
    • getRegisterCount

      public int getRegisterCount()

      getRegisterCount.

      指定者:
      getRegisterCount 在类中 BaseLocator<Number>
      返回:
      a int.
    • bytesToValueRealOffset

      public Number bytesToValueRealOffset(byte[] data, int offset)

      bytesToValueRealOffset.

      指定者:
      bytesToValueRealOffset 在类中 BaseLocator<Number>
      参数:
      data - an array of
      引用无效
      byte
      objects.
      offset - a int.
      返回:
      a T object.
    • valueToShorts

      public short[] valueToShorts(Number value)

      valueToShorts.

      指定者:
      valueToShorts 在类中 BaseLocator<Number>
      参数:
      value - a T object.
      返回:
      an array of
      引用无效
      short
      objects.