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

QModbusExceptionResponse Class

QModbusExceptionResponse is a container class containing the function and error code inside a Modbus ADU.

This class was introduced in Qt 5.8.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QModbusExceptionResponse Class

  • Header: QModbusExceptionResponse

  • Since: Qt 5.8

  • CMake:

    find_package(Qt6 REQUIRED COMPONENTS SerialBus)

    target_link_libraries(mytarget PRIVATE Qt6::SerialBus)

  • qmake: QT += serialbus

  • Inherits: QModbusResponse

Detailed Description

A typical QModbusExceptionResponse response can looks like this:

 
Sélectionnez
QModbusExceptionResponse exception(QModbusExceptionResponse::ReportServerId,
    QModbusExceptionResponse::ServerDeviceFailure);

Member Function Documentation

 

QModbusExceptionResponse::QModbusExceptionResponse()

Constructs an invalid QModbusExceptionResponse.

QModbusExceptionResponse::QModbusExceptionResponse(const QModbusPdu &pdu)

Constructs a copy of pdu.

QModbusExceptionResponse::QModbusExceptionResponse(QModbusPdu::FunctionCode code, QModbusPdu::ExceptionCode ec)

Constructs a QModbusExceptionResponse with function code set to code and exception error code set to ec.

void QModbusExceptionResponse::setExceptionCode(QModbusPdu::ExceptionCode ec)

Sets the response's exception code to ec.

[override virtual] void QModbusExceptionResponse::setFunctionCode(QModbusPdu::FunctionCode c)

Reimplements: QModbusPdu::setFunctionCode(QModbusPdu::FunctionCode code).

Sets the response's function code to c.

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