QModbusRtuSerialMaster Class

The QModbusRtuSerialMaster class represents a Modbus client that uses a serial bus for its communication with the Modbus server. More...

Header: #include <QModbusRtuSerialMaster>
qmake: QT += serialbus
Since: Qt 5.6
Inherits: QModbusClient

Public Functions

QModbusRtuSerialMaster(QObject *parent = nullptr)
int interFrameDelay() const
void setInterFrameDelay(int microseconds)

Additional Inherited Members

Detailed Description

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.

Member Function Documentation

QModbusRtuSerialMaster::QModbusRtuSerialMaster(QObject *parent = nullptr)

Constructs a serial Modbus master with the specified parent.

int QModbusRtuSerialMaster::interFrameDelay() const

Returns the amount of microseconds for the silent interval between two consecutive Modbus messages.

This function was introduced in Qt 5.7.

See also setInterFrameDelay().

void QModbusRtuSerialMaster::setInterFrameDelay(int microseconds)

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.

Note: If microseconds is set to -1 or microseconds is less than the pre-calculated delay then this pre-calculated value is used as frame delay.

This function was introduced in Qt 5.7.

See also interFrameDelay().