QModbusExceptionResponse is a container class containing the function and error code inside a Modbus ADU. More...
Header: | #include <QModbusExceptionResponse> |
qmake: | QT += serialbus |
Since: | Qt 5.8 |
Inherits: | QModbusResponse |
QModbusExceptionResponse(QModbusPdu::FunctionCode code, QModbusPdu::ExceptionCode ec) | |
QModbusExceptionResponse(const QModbusPdu &pdu) | |
QModbusExceptionResponse() | |
void | setExceptionCode(QModbusPdu::ExceptionCode ec) |
virtual void | setFunctionCode(QModbusPdu::FunctionCode c) override |
A typical QModbusExceptionResponse response can looks like this:
QModbusExceptionResponse exception(QModbusExceptionResponse::ReportServerId, QModbusExceptionResponse::ServerDeviceFailure);
Constructs a QModbusExceptionResponse with function code set to code and exception error code set to ec.
Constructs a copy of pdu.
Constructs an invalid QModbusExceptionResponse.
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.
© The Qt Company Ltd
Licensed under the GNU Free Documentation License, Version 1.3.
https://doc.qt.io/qt-6.2/qmodbusexceptionresponse.html