QModbusExceptionResponse Class

QModbusExceptionResponse ist eine Containerklasse, die die Funktion und den Fehlercode innerhalb einer Modbus ADU enthält. Mehr...

Kopfzeile: #include <QModbusExceptionResponse>
CMake: find_package(Qt6 REQUIRED COMPONENTS SerialBus)
target_link_libraries(mytarget PRIVATE Qt6::SerialBus)
qmake: QT += serialbus
Vererbt: QModbusResponse

Öffentliche Funktionen

QModbusExceptionResponse()
QModbusExceptionResponse(const QModbusPdu &pdu)
QModbusExceptionResponse(QModbusPdu::FunctionCode code, QModbusPdu::ExceptionCode ec)
void setExceptionCode(QModbusPdu::ExceptionCode ec)

Reimplementierte öffentliche Funktionen

virtual void setFunctionCode(QModbusPdu::FunctionCode c) override

Detaillierte Beschreibung

Eine typische QModbusExceptionResponse-Antwort kann wie folgt aussehen:

QModbusExceptionResponse exception(QModbusExceptionResponse::ReportServerId,
    QModbusExceptionResponse::ServerDeviceFailure);

Dokumentation der Mitgliedsfunktionen

[constexpr noexcept] QModbusExceptionResponse::QModbusExceptionResponse()

Konstruiert eine ungültige QModbusExceptionResponse.

QModbusExceptionResponse::QModbusExceptionResponse(const QModbusPdu &pdu)

Konstruiert eine Kopie von pdu.

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

Konstruiert eine QModbusExceptionResponse mit dem Funktionscode code und dem Ausnahmefehlercode ec.

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

Setzt den Ausnahmecode der Antwort auf ec.

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

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

Setzt den Funktionscode der Antwort auf c.

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.