IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QModbusRtuSerialMaster Class

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

This class was introduced in Qt 5.8.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QModbusRtuSerialMaster Class

  • Header: QModbusRtuSerialMaster

  • Since: Qt 5.8

  • qmake: QT += serialbus

  • Inherits: QModbusClient

Detailed Description

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

 

[explicit] QModbusRtuSerialMaster::QModbusRtuSerialMaster(QObject *parent = nullptr)

Constructs a serial Modbus master with the specified parent.

[override virtual protected] void QModbusRtuSerialMaster::close()

Reimplements: QModbusDevice::close().

int QModbusRtuSerialMaster::interFrameDelay() const

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

See Also

See also setInterFrameDelay()

[override virtual protected] bool QModbusRtuSerialMaster::open()

Reimplements: QModbusDevice::open().

When calling this function, existing buffered data is removed from the serial port.

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.

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.

See Also

See also interFrameDelay()

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+