diff options
author | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2016-02-17 13:02:08 +0100 |
---|---|---|
committer | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2016-02-17 19:10:37 +0000 |
commit | fe47101cc0738e4c9a198148e6ebe631d11b8dba (patch) | |
tree | f2d604fff5ca502e13fec2ca0aa61abe3e6fe30e /src/serialbus/qmodbuspdu.cpp | |
parent | 0420e57c90ccdb94b89761da47140f284eb89d37 (diff) |
Use a more explictit type for data minimum size request.
Update docs. We do no calculation, it's a simple lookup.
Change-Id: Idbaa52c0d37e029c0ea21f7ad616d540ed65cd8d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/serialbus/qmodbuspdu.cpp')
-rw-r--r-- | src/serialbus/qmodbuspdu.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/serialbus/qmodbuspdu.cpp b/src/serialbus/qmodbuspdu.cpp index dd53092..41ee906 100644 --- a/src/serialbus/qmodbuspdu.cpp +++ b/src/serialbus/qmodbuspdu.cpp @@ -436,12 +436,12 @@ QDataStream &operator<<(QDataStream &stream, const QModbusPdu &pdu) */ /*! - Returns the minimum data size for a request, based on the \a pdu function code. - \note The function returns \c {-1} if the size could not be properly calculated. + Returns the expected minimum data size for \a request based on the + request's function code; \c {-1} if the function code is not known. */ -int QModbusRequest::minimumDataSize(const QModbusPdu &pdu) +int QModbusRequest::minimumDataSize(const QModbusRequest &request) { - return Private::minimumDataSize(pdu, Private::Type::Request); + return Private::minimumDataSize(request, Private::Type::Request); } /*! @@ -588,12 +588,12 @@ QDataStream &operator>>(QDataStream &stream, QModbusRequest &pdu) */ /*! - Returns the minimum data size for a response, based on the \a pdu function code. - \note The function returns \c {-1} if the size could not be properly calculated. + Returns the expected minimum data size for \a response based on the + response's function code; \c {-1} if the function code is not known. */ -int QModbusResponse::minimumDataSize(const QModbusPdu &pdu) +int QModbusResponse::minimumDataSize(const QModbusResponse &response) { - return Private::minimumDataSize(pdu, Private::Type::Response); + return Private::minimumDataSize(response, Private::Type::Response); } /*! |