QModbusExceptionResponse Class

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

头: #include <QModbusExceptionResponse>
qmake: QT += serialbus
Since: Qt 5.8
继承: QModbusResponse

公共函数

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

重实现公共函数

virtual void setFunctionCode (FunctionCode c )

额外继承成员

详细描述

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

典型 QModbusExceptionResponse response can looks like this:

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

成员函数文档编制

[default] QModbusExceptionResponse:: QModbusExceptionResponse ()

构造无效 QModbusExceptionResponse .

QModbusExceptionResponse:: QModbusExceptionResponse (const QModbusPdu & pdu )

构造副本为 pdu .

QModbusExceptionResponse:: QModbusExceptionResponse ( FunctionCode code , ExceptionCode ec )

构造 QModbusExceptionResponse with function code set to code and exception error code set to ec .

void QModbusExceptionResponse:: setExceptionCode ( ExceptionCode ec )

Sets the response's exception code to ec .

[虚拟] void QModbusExceptionResponse:: setFunctionCode ( FunctionCode c )

重实现自 QModbusPdu::setFunctionCode ().

Sets the response's function code to c .