The QModbusRtuSerialMaster class represents a Modbus client that uses a serial bus for its communication with the Modbus server. 更多...
头: | #include <QModbusRtuSerialMaster> |
qmake: | QT += serialbus |
Since: | Qt 5.6 |
继承: | QModbusClient |
QModbusRtuSerialMaster (QObject * parent = nullptr) | |
int | interFrameDelay () const |
void | setInterFrameDelay (int microseconds ) |
virtual void | close () override |
virtual bool | open () override |
The QModbusRtuSerialMaster class represents a Modbus client that uses a serial bus for its communication with the Modbus server.
Communication via Modbus requires the interaction between a single Modbus client instance and multiple Modbus servers. This class provides the client implementation via a serial port.
Constructs a serial Modbus master with the specified parent .
[override virtual protected]
void
QModbusRtuSerialMaster::
close
()
重实现自 QModbusDevice::close ().
Returns the amount of microseconds for the silent interval between two consecutive Modbus messages.
该函数在 Qt 5.7 引入。
另请参阅 setInterFrameDelay ().
[override virtual protected]
bool
QModbusRtuSerialMaster::
open
()
重实现自 QModbusDevice::open ().
注意: When calling this function, existing buffered data is removed from the serial port.
Sets the amount of microseconds for the silent interval between two consecutive Modbus messages. By default, the class implementation will use a pre-calculated value according to the Modbus specification. A active or running connection is not affected by such delay changes.
注意: 若 microseconds is set to -1 or microseconds is less than the pre-calculated delay then this pre-calculated value is used as frame delay.
该函数在 Qt 5.7 引入。
另请参阅 interFrameDelay ().