PySide6.QtSerialBus.QModbusExceptionResponse¶
- class QModbusExceptionResponse¶
- QModbusExceptionResponseis a container class containing the function and error code inside a Modbus ADU. More…- 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 - Detailed Description¶- A typical - QModbusExceptionResponseresponse can looks like this:- QModbusExceptionResponse exception(QModbusExceptionResponse::ReportServerId, QModbusExceptionResponse::ServerDeviceFailure); - __init__()¶
 - Constructs an invalid - QModbusExceptionResponse.- __init__(pdu)
- Parameters:
- pdu – - QModbusPdu
 
 - Constructs a copy of - pdu.- __init__(fc, ec)
- Parameters:
- fc – - FunctionCode
- ec – - ExceptionCode
 
 
 - Constructs a - QModbusExceptionResponsewith function code set to- codeand exception error code set to- ec.- setExceptionCode(ec)¶
- Parameters:
- ec – - ExceptionCode
 
 - Sets the response’s exception code to - ec.