diff options
author | Karsten Heimrich <karsten.heimrich@theqtcompany.com> | 2015-10-13 12:55:49 +0200 |
---|---|---|
committer | Alex Blasche <alexander.blasche@theqtcompany.com> | 2015-10-13 11:17:03 +0000 |
commit | 2453c100939d671d47f292eb1a52e75b57e77e82 (patch) | |
tree | fd48f453fc3c4fbbab908539b0e565a22423fdec | |
parent | c813bd71ce7cd4ffc97b183e7a0b333a7b9d6ca1 (diff) |
We have only 2 bytes for data size.
Change-Id: Ifc5b1d726f07b74ce4adbaae63a465f972a79909
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
-rw-r--r-- | src/serialbus/qmodbuspdu.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/serialbus/qmodbuspdu.h b/src/serialbus/qmodbuspdu.h index 29e29b7..0950c5c 100644 --- a/src/serialbus/qmodbuspdu.h +++ b/src/serialbus/qmodbuspdu.h @@ -93,8 +93,8 @@ public: } bool isException() const { return m_code & quint8(0x80); } - qint32 size() const { return dataSize() + 1; } - qint32 dataSize() const { return m_data.size(); } + qint16 size() const { return dataSize() + 1; } + qint16 dataSize() const { return m_data.size(); } FunctionCode functionCode() const { return m_code; } virtual void setFunctionCode(FunctionCode code) { m_code = code; } |