类 BinaryLocator

java.lang.Object
com.huangjian.modbus4j.locator.BaseLocator<Boolean>
com.huangjian.modbus4j.locator.BinaryLocator

public class BinaryLocator extends BaseLocator<Boolean>

BinaryLocator class.

  • 构造器详细资料

    • BinaryLocator

      public BinaryLocator(int slaveId, int range, int offset)

      Constructor for BinaryLocator.

      参数:
      slaveId - a int.
      range - a int.
      offset - a int.
    • BinaryLocator

      public BinaryLocator(int slaveId, int range, int offset, int bit)

      Constructor for BinaryLocator.

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

    • isBinaryRange

      public static boolean isBinaryRange(int range)

      isBinaryRange.

      参数:
      range - a int.
      返回:
      a boolean.
    • validate

      protected void validate()

      validate.

    • getBit

      public int getBit()

      Getter for the field bit.

      返回:
      a int.
    • getDataType

      public int getDataType()

      getDataType.

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

      public int getRegisterCount()

      getRegisterCount.

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

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

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

      bytesToValueRealOffset.

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

      public short[] valueToShorts(Boolean value)

      valueToShorts.

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