接口 ProcessImage

所有已知实现类:
BasicProcessImage

public interface ProcessImage
Used by slave implementors. Provides an interface by which slaves can easily manage data.
  • 方法概要

    修饰符和类型
    方法
    说明
    boolean
    getCoil(int offset)
    Returns the current value of the coil for the given offset.
    byte
    Returns the current value of the exception status.
    short
    getHoldingRegister(int offset)
    Returns the current value of the holding register for the given offset.
    boolean
    getInput(int offset)
    Returns the current value of the input for the given offset.
    short
    getInputRegister(int offset)
    Returns the current value of the input register for the given offset.
    byte[]
    Returns the data for the report slave id command.
    int
    getSlaveId.
    void
    setCoil(int offset, boolean value)
    Used internally for setting the value of the coil.
    void
    setHoldingRegister(int offset, short value)
    Used internally for setting the value of the holding register.
    void
    setInput(int offset, boolean value)
    Used internally for setting the value of the input.
    void
    setInputRegister(int offset, short value)
    Used internally for setting the value of the input register.
    void
    writeCoil(int offset, boolean value)
    Used to set the coil as a result of a write command from the master.
    void
    writeHoldingRegister(int offset, short value)
    Used to set the holding register as a result of a write command from the master.
  • 方法详细资料

    • getSlaveId

      int getSlaveId()

      getSlaveId.

      返回:
      a int.
    • getCoil

      boolean getCoil(int offset) throws IllegalDataAddressException
      Returns the current value of the coil for the given offset.
      参数:
      offset - a int.
      返回:
      the value of the coil
      抛出:
      IllegalDataAddressException - if any.
    • setCoil

      void setCoil(int offset, boolean value)
      Used internally for setting the value of the coil.
      参数:
      offset - a int.
      value - a boolean.
    • writeCoil

      void writeCoil(int offset, boolean value) throws IllegalDataAddressException
      Used to set the coil as a result of a write command from the master.
      参数:
      offset - a int.
      value - a boolean.
      抛出:
      IllegalDataAddressException - if any.
    • getInput

      boolean getInput(int offset) throws IllegalDataAddressException
      Returns the current value of the input for the given offset.
      参数:
      offset - a int.
      返回:
      the value of the input
      抛出:
      IllegalDataAddressException - if any.
    • setInput

      void setInput(int offset, boolean value)
      Used internally for setting the value of the input.
      参数:
      offset - a int.
      value - a boolean.
    • getHoldingRegister

      short getHoldingRegister(int offset) throws IllegalDataAddressException
      Returns the current value of the holding register for the given offset.
      参数:
      offset - a int.
      返回:
      the value of the register
      抛出:
      IllegalDataAddressException - if any.
    • setHoldingRegister

      void setHoldingRegister(int offset, short value)
      Used internally for setting the value of the holding register.
      参数:
      offset - a int.
      value - a short.
    • writeHoldingRegister

      void writeHoldingRegister(int offset, short value) throws IllegalDataAddressException
      Used to set the holding register as a result of a write command from the master.
      参数:
      offset - a int.
      value - a short.
      抛出:
      IllegalDataAddressException - if any.
    • getInputRegister

      short getInputRegister(int offset) throws IllegalDataAddressException
      Returns the current value of the input register for the given offset.
      参数:
      offset - a int.
      返回:
      the value of the register
      抛出:
      IllegalDataAddressException - if any.
    • setInputRegister

      void setInputRegister(int offset, short value)
      Used internally for setting the value of the input register.
      参数:
      offset - a int.
      value - a short.
    • getExceptionStatus

      byte getExceptionStatus()
      Returns the current value of the exception status.
      返回:
      the current value of the exception status.
    • getReportSlaveIdData

      byte[] getReportSlaveIdData()
      Returns the data for the report slave id command.
      返回:
      the data for the report slave id command.