diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/serialbus/qmodbusclient.cpp | 8 | ||||
-rw-r--r-- | src/serialbus/qmodbusdevice.cpp | 7 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/serialbus/qmodbusclient.cpp b/src/serialbus/qmodbusclient.cpp index 72cc5a0..a91ba46 100644 --- a/src/serialbus/qmodbusclient.cpp +++ b/src/serialbus/qmodbusclient.cpp @@ -222,8 +222,12 @@ QModbusClient::QModbusClient(QModbusClientPrivate &dd, QObject *parent) : } /*! - Processes a Modbus server \a response and stores the decoded information in \a data. Returns - true on success; otherwise false. + Processes a Modbus server \a response and stores the decoded information in + \a data. Returns \c true on success; otherwise \c false. + + \note The default implementation does not support all + \l {QModbusPdu::}{FunctionCode}s. Override this method in a custom Modbus + client implementations to handle the needed functions. */ bool QModbusClient::processResponse(const QModbusResponse &response, QModbusDataUnit *data) { diff --git a/src/serialbus/qmodbusdevice.cpp b/src/serialbus/qmodbusdevice.cpp index 8036355..91a7652 100644 --- a/src/serialbus/qmodbusdevice.cpp +++ b/src/serialbus/qmodbusdevice.cpp @@ -204,6 +204,13 @@ void QModbusDevice::setConnectionParameter(int parameter, const QVariant &value) \value ReplyAbortedError The reply was aborted due to a disconnection of the device. \value UnknownError An unknown error occurred. + + \note An UnknownError can also indicate that the received + \l {QModbusPdu::}{FunctionCode} is not supported in the current + implementation. In this case custom Modbus client implementations need to + override the \l {QModbusClient::}{processResponse()} and + \l {QModbusClient::}{processPrivateResponse()} methods to provide support + for needed functions. */ /*! |