QModbusExceptionResponse Class

QModbusExceptionResponse は Modbus ADU 内のファンクションとエラー・コードを含むコンテナ・クラスです。詳細...

ヘッダー #include <QModbusExceptionResponse>
CMake: find_package(Qt6 REQUIRED COMPONENTS SerialBus)
target_link_libraries(mytarget PRIVATE Qt6::SerialBus)
qmake: QT += serialbus
継承: QModbusResponse

パブリック関数

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

再実装されたパブリック関数

virtual void setFunctionCode(QModbusPdu::FunctionCode c) override

詳細説明

典型的な QModbusExceptionResponse レスポンスは以下のようになります:

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

メンバ関数ドキュメント

[constexpr noexcept] QModbusExceptionResponse::QModbusExceptionResponse()

無効な QModbusExceptionResponse を構築します。

QModbusExceptionResponse::QModbusExceptionResponse(const QModbusPdu &pdu)

pdu のコピーを作成する。

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

関数コードをcode に設定し、例外エラーコードをec に設定した QModbusExceptionResponse を構築します。

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

レスポンスの例外コードをec に設定する。

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

再実装:QModbusPdu::setFunctionCode(QModbusPdu::FunctionCode code).

レスポンスのファンクションコードを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.