PySide6.QtSerialBus.QModbusExceptionResponse¶
- class QModbusExceptionResponse¶
 QModbusExceptionResponseis a container class containing the function and error code inside a Modbus ADU.Details
A typical
QModbusExceptionResponseresponse can looks like this:QModbusExceptionResponse exception(QModbusExceptionResponse::ReportServerId, QModbusExceptionResponse::ServerDeviceFailure);
Synopsis¶
Methods¶
def
__init__()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- __init__()¶
 
Constructs an invalid
QModbusExceptionResponse.- __init__(pdu)
 - Parameters:
 pdu –
QModbusPdu
Constructs a copy of
pdu.- __init__(fc, ec)
 - Parameters:
 fc –
FunctionCodeec –
ExceptionCode
Constructs a
QModbusExceptionResponsewith function code set tocodeand exception error code set toec.- setExceptionCode(ec)¶
 - Parameters:
 ec –
ExceptionCode
Sets the response’s exception code to
ec.