类 Modbus
java.lang.Object
com.huangjian.modbus4j.Modbus
- 直接已知子类:
ModbusMaster,ModbusSlaveSet
Base level for masters and slaves/listeners
TODO: - handle echoing in RS485
-
字段概要
字段修饰符和类型字段说明static final intConstantDEFAULT_MAX_READ_BIT_COUNT=2000static final intConstantDEFAULT_MAX_READ_REGISTER_COUNT=125static final intConstantDEFAULT_MAX_WRITE_REGISTER_COUNT=120 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明Getter for the fieldexceptionHandler.intGetter for the fieldmaxReadBitCount.intgetMaxReadCount(int registerRange) getMaxReadCount.intGetter for the fieldmaxReadRegisterCount.intGetter for the fieldmaxWriteRegisterCount.voidsetExceptionHandler(MessagingExceptionHandler exceptionHandler) Setter for the fieldexceptionHandler.voidsetMaxReadBitCount(int maxReadBitCount) Setter for the fieldmaxReadBitCount.voidsetMaxReadRegisterCount(int maxReadRegisterCount) Setter for the fieldmaxReadRegisterCount.voidsetMaxWriteRegisterCount(int maxWriteRegisterCount) Setter for the fieldmaxWriteRegisterCount.voidvalidateNumberOfBits(int bits) validateNumberOfBits.voidvalidateNumberOfRegisters(int registers) validateNumberOfRegisters.
-
字段详细资料
-
DEFAULT_MAX_READ_BIT_COUNT
public static final int DEFAULT_MAX_READ_BIT_COUNTConstantDEFAULT_MAX_READ_BIT_COUNT=2000- 另请参阅:
-
DEFAULT_MAX_READ_REGISTER_COUNT
public static final int DEFAULT_MAX_READ_REGISTER_COUNTConstantDEFAULT_MAX_READ_REGISTER_COUNT=125- 另请参阅:
-
DEFAULT_MAX_WRITE_REGISTER_COUNT
public static final int DEFAULT_MAX_WRITE_REGISTER_COUNTConstantDEFAULT_MAX_WRITE_REGISTER_COUNT=120- 另请参阅:
-
-
构造器详细资料
-
Modbus
public Modbus()
-
-
方法详细资料
-
getMaxReadCount
public int getMaxReadCount(int registerRange) getMaxReadCount.
- 参数:
registerRange- a int.- 返回:
- a int.
-
validateNumberOfBits
validateNumberOfBits.
- 参数:
bits- a int.- 抛出:
ModbusTransportException- if any.
-
validateNumberOfRegisters
validateNumberOfRegisters.
- 参数:
registers- a int.- 抛出:
ModbusTransportException- if any.
-
setExceptionHandler
Setter for the field
exceptionHandler.- 参数:
exceptionHandler- aMessagingExceptionHandlerobject.
-
getExceptionHandler
Getter for the field
exceptionHandler.- 返回:
- a
MessagingExceptionHandlerobject.
-
getMaxReadBitCount
public int getMaxReadBitCount()Getter for the field
maxReadBitCount.- 返回:
- a int.
-
setMaxReadBitCount
public void setMaxReadBitCount(int maxReadBitCount) Setter for the field
maxReadBitCount.- 参数:
maxReadBitCount- a int.
-
getMaxReadRegisterCount
public int getMaxReadRegisterCount()Getter for the field
maxReadRegisterCount.- 返回:
- a int.
-
setMaxReadRegisterCount
public void setMaxReadRegisterCount(int maxReadRegisterCount) Setter for the field
maxReadRegisterCount.- 参数:
maxReadRegisterCount- a int.
-
getMaxWriteRegisterCount
public int getMaxWriteRegisterCount()Getter for the field
maxWriteRegisterCount.- 返回:
- a int.
-
setMaxWriteRegisterCount
public void setMaxWriteRegisterCount(int maxWriteRegisterCount) Setter for the field
maxWriteRegisterCount.- 参数:
maxWriteRegisterCount- a int.
-