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 .
构造副本为 pdu .
构造 QModbusExceptionResponse with function code set to code and exception error code set to ec .
Sets the response's exception code to ec .
[虚拟]
void
QModbusExceptionResponse::
setFunctionCode
(
FunctionCode
c
)
重实现自 QModbusPdu::setFunctionCode ().
Sets the response's function code to c .