- class QModbusExceptionResponse¶
QModbusExceptionResponse
is 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
QModbusExceptionResponse
response 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
QModbusExceptionResponse
with function code set tocode
and exception error code set toec
.- setExceptionCode(ec)¶
- Parameters:
ec –
ExceptionCode
Sets the response’s exception code to
ec
.