summaryrefslogtreecommitdiffstats
path: root/src/serialbus/qmodbuspdu.cpp
diff options
context:
space:
mode:
authorRalf Nolden <nolden@kde.org>2015-11-05 15:06:41 +0100
committerKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-11-05 19:10:30 +0000
commitd0deba1cfae95d310dfa72a0d73919e123b307ee (patch)
tree0a313f816f93719e9a6398be505db61ce838ed21 /src/serialbus/qmodbuspdu.cpp
parent39eaed67b3cc98e44d9cdc3057da77e640da1c9b (diff)
Add NegativeAcknowledge (7) missing exception code
Add NegativeAcknowledge to the enum of known exception codes. The code is not included in the current modbus spec but is widely used in devices that use it as a response for programming commands (such as Schneider Electric). The according negative acknowledge message counter is also already present which accompanies this exception code. Change-Id: Ida86914bfe073601e2a286d92978f547e3ae7b60 Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'src/serialbus/qmodbuspdu.cpp')
-rw-r--r--src/serialbus/qmodbuspdu.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/serialbus/qmodbuspdu.cpp b/src/serialbus/qmodbuspdu.cpp
index 0fadbf8..059a07c 100644
--- a/src/serialbus/qmodbuspdu.cpp
+++ b/src/serialbus/qmodbuspdu.cpp
@@ -120,8 +120,13 @@ static quint8 minimumDataSize(QModbusPdu::FunctionCode code, Type type)
was attempting to perform the requested action.
\value Acknowledge Specialized use in conjunction with programming
commands.
- \value ServerDeviceBusy The slave is engaged in processing a long–duration
+ \value ServerDeviceBusy The slave is engaged in processing a long duration
program command.
+ \value NegativeAcknowledge The server cannot perform the program
+ function received in the query. This
+ code is returned for an unsuccessful
+ programming request. The client should request
+ diagnostic or error information from the server.
\value MemoryParityError Indicates that the extended file area failed to
pass a consistency check. Used in conjunction with
function codes 20 and 21. The exception code does