类 AsciiMaster
java.lang.Object
com.huangjian.modbus4j.Modbus
com.huangjian.modbus4j.ModbusMaster
com.huangjian.modbus4j.serial.SerialMaster
com.huangjian.modbus4j.serial.ascii.AsciiMaster
AsciiMaster class.
-
字段概要
从类继承的字段 com.huangjian.modbus4j.serial.SerialMaster
serialPortOpen, transport, wrapper从类继承的字段 com.huangjian.modbus4j.ModbusMaster
connected, initialized, validateResponse从类继承的字段 com.huangjian.modbus4j.Modbus
DEFAULT_MAX_READ_BIT_COUNT, DEFAULT_MAX_READ_REGISTER_COUNT, DEFAULT_MAX_WRITE_REGISTER_COUNT -
构造器概要
构造器构造器说明AsciiMaster(SerialPortWrapper wrapper) Constructor for AsciiMaster.AsciiMaster(SerialPortWrapper wrapper, boolean validateResponse) -
方法概要
修饰符和类型方法说明voiddestroy()destroy.voidinit()init.protected voidopenConnection(MessageControl toClose) Open the serial port and initialize the transport, ensure connection is closed firstsendImpl(ModbusRequest request) sendImpl.从类继承的方法 com.huangjian.modbus4j.serial.SerialMaster
close, closeConnection从类继承的方法 com.huangjian.modbus4j.ModbusMaster
closeMessageControl, getDiscardDataDelay, getePoll, getIoLog, getMessageControl, getRetries, getTimeout, getValue, isConnected, isInitialized, isMultipleWritesOnly, scanForSlaveNodes, scanForSlaveNodes, send, send, setConnected, setDiscardDataDelay, setePoll, setIoLog, setMultipleWritesOnly, setRetries, setTimeout, setValue, testSlaveNode
-
构造器详细资料
-
AsciiMaster
Constructor for AsciiMaster.
Default to validating the slave id in responses- 参数:
wrapper- aSerialPortWrapperobject.
-
AsciiMaster
- 参数:
wrapper- aSerialPortWrapperobject.validateResponse- - confirm that requested slave id is the same in the response
-
-
方法详细资料
-
init
init.
- 覆盖:
init在类中SerialMaster- 抛出:
ModbusInitException- if any.
-
openConnection
从类复制的说明:SerialMasterOpen the serial port and initialize the transport, ensure connection is closed first- 覆盖:
openConnection在类中SerialMaster- 参数:
toClose-- 抛出:
Exception
-
destroy
public void destroy()destroy.
- 指定者:
destroy在类中ModbusMaster
-
sendImpl
sendImpl.
- 指定者:
sendImpl在类中ModbusMaster- 参数:
request- aModbusRequestobject.- 返回:
- a
ModbusResponseobject. - 抛出:
ModbusTransportException- if any.
-