接口 ProcessImage
- 所有已知实现类:
BasicProcessImage
public interface ProcessImage
Used by slave implementors. Provides an interface by which slaves can easily manage data.
-
方法概要
修饰符和类型方法说明booleangetCoil(int offset) Returns the current value of the coil for the given offset.byteReturns the current value of the exception status.shortgetHoldingRegister(int offset) Returns the current value of the holding register for the given offset.booleangetInput(int offset) Returns the current value of the input for the given offset.shortgetInputRegister(int offset) Returns the current value of the input register for the given offset.byte[]Returns the data for the report slave id command.intgetSlaveId.voidsetCoil(int offset, boolean value) Used internally for setting the value of the coil.voidsetHoldingRegister(int offset, short value) Used internally for setting the value of the holding register.voidsetInput(int offset, boolean value) Used internally for setting the value of the input.voidsetInputRegister(int offset, short value) Used internally for setting the value of the input register.voidwriteCoil(int offset, boolean value) Used to set the coil as a result of a write command from the master.voidwriteHoldingRegister(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
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
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
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
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
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
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.
-