| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This change follows the recommendation announced by the Modbus
organization in the press release of July 9th, 2020.
Task-number: QTBUG-91213
Change-Id: Id946eea900b620a7f021caa30ae40e3f0b0c3dc4
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-89995
Change-Id: I401d2511b336367801d941ec1f5e06cc4cd6cd08
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
|
|
|
|
|
|
|
| |
This is required to remove the ; from the macro with Qt 6.
Task-number: QTBUG-82978
Change-Id: I76cbcea127f326d61bfb9420e4afe0b260a3f190
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-79312
Change-Id: Iec1f9a0427bd04ebb8ceb4c66ece96e443092a6e
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
| |
Replace QSerialPort::error(QSerialPort::SerialPortError) with
QSerialPort::errorOccurred(QSerialPort::SerialPortError).
Task-number: QTBUG-76491
Change-Id: Ic1d0a9ff89d346eca6cd2fd448cc02360c5e8783
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
Sometimes it is necessary to get the device to set some special
option on the device, like setting the HW flow control (RTS/CTS)
parameters on the QSerialPort etc.
Task-number: QTBUG-75405
Task-number: QTBUG-76232
Change-Id: I20e4824dcb8bde7020972607c6a76a01a5d01fc1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Introduces some methods to set the turnaround delay between a
Modbus broadcast message and a following Modbus message. More
details can be found in the Modbus_over_serial_line_V1.pdf spec
at page 10.
Change-Id: Iddeb7247566663facb79032135c1e4cc2434ca4f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
Task-number: QTBUG-73965
Task-number: QTBUG-73230
Change-Id: I4e4b201b172d32802ce934f111631279dc7157e1
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
| |
Change-Id: I259175817d5767c7cf24c6f04f4faae190f773ed
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
| |
Change-Id: Ic7f032217e641bf573f66f1231987828ea078709
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The fix for QTBUG-62299 limits the processing of serial responses
in RTU serial master to cases when the state machine is in receive mode
only. So far the Receive state was triggered by the sendTimer. However
modern kernels accept serial packages faster then the sendTimer can fire.
This patches addresses the problem by setting the Receive state even before
sendTimer fires. If the bytesWritten() callback detects that the entire
PDU/ADU was written it stops sendTimer and immediately progresses the
state machine to the Receive state.
Fixes: QTBUG-69188
Change-Id: I1657973ef99f1b3e4008e887029b30890d825d59
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the current QModbusRtuSerialMaster instance is deleted, the
interFrameDelay timer may still be active and trigger the associated
lambda. Since the lambda calls back into the deleted class instance,
a crash may occur. Adding the public class instance as context to
the singleshot connect ensures that the lambda is not called if the class
instance was deleted already.
Fixes: QTBUG-65684
Change-Id: Ic7d90ba68a1533e6de50c61117f5de8dc5e048b4
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the nature of our serial bus device, a frame could already
be send completely, but the bytes written did not report that yet.
Then we received an answer before we reached the receive state,
messing up the whole state logic. Now we process incoming frames
only if we are in receive state, otherwise drop full frames.
Task-number: QTBUG-62144
Task-number: QTBUG-62299
Change-Id: I88a4cf0b64a823409cbb277431a004a9d126cddc
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
|
|
| |
qmodbusrtuserialmaster_p.h:356:68: error: lambda capture 'this' is not used [-Werror,-Wunused-lambda-capture]
Change-Id: Ia53158e207a94bf49489fffd14c7903c7e4655cb
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|
|
|
|
| |
Change-Id: I7d38491c7ee15a1de788375acf9144c59b507d2a
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
|\
| |
| |
| | |
Change-Id: Iba3271a050240b60f21e1696af320fdf82a7dd34
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
QSerialPort::aboutToClose calls q->close() which leads to an infinite
recursion. Calling QModbusRtuSerialMaster::close() explicitly is not
necessary because when the serial port is closed,
QModbusRtuSerialMaster::close() has been invoked already in all cases.
Moreover, QSerialPort::aboutToClose asserts that serial master is
always in closing state.
Task-number: QTBUG-56009
Change-Id: If0dce93bbaa22116328b467f26c289cb58efc93f
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a properly set or calculated value, do not sporadically
calculate it inside a sending function. The only place the
caluculation shall happen is in setupEnvironment().
Task-number: QTBUG-53767
Change-Id: Id40fd3406bee404b9d44c8ad43a5160622eda2de
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Use a properly set or calculated value, do not sporadically
calculate it inside a sending function. The only place the
caluculation shall happen is in calculateInterFrameDelay().
Task-number: QTBUG-53767
Change-Id: I15fdd42990f1211ab0133b557c5b0ffd625038c1
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
|\|
| |
| |
| | |
Change-Id: I687907747e05cedbd3f9f1c20df95e5de2d5cd48
|
| |
| |
| |
| |
| | |
Change-Id: Iebbd61359296499600fe164429e710273a94b86d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I3d915a6230a1f35317abc39d6266a9d46a5d9be6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
|
| |
| |
| |
| |
| | |
Change-Id: I729e6b53cbc0b9a16c72c2351cc95d6bd7a2a0aa
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|\|
| |
| |
| | |
Change-Id: If97de045fd88034b9379ff1abef8633a1e73b37a
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fix issues introduced by commit e40343337940705ceb830f9f20a:
* Setup the serial line environment before open, calls after
open will not change the the values until reconnect.
* Calling clear on an closed port will set and emit an error,
successive calls to open() will fail because of how the error
signal is received. Even though the error was set before the
successful open, the signal is delivered after the open call
and and so we close the connection again.
Change-Id: Ic694e9d144c24bf94c4e94e5483aaddcc4c664a5
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|/
|
|
|
| |
Change-Id: Id09913509802c74b1a389d7a83a1136bbeccbaf6
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I25ee09e5fe70464048500dc4d376d4e38805ca50
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I1a07113ae1b6089a315862638dca8e6d4018fdd2
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
API:
* We pass the PDU already, no need to pass the data part
because we can get it from the PDU inside the function.
Calculation:
* Ignore the fact that "Diagnostics:ReturnQueryData" and
"EncapsulatedInterfaceTransport" can be of variable length.
A proper fix needs to be employed in the receiving code.
* Refactor stream operator into a single function, it was
quite similar except {minimum|calculate} data size.
* Take into account that only "Diagnostics:ReturnQueryData"
and "EncapsulatedInterfaceTransport" are of variable size.
Change-Id: I0f958395f10bf4d93cc2436399ddc36c87f1c4da
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ia93089df68775bcba62ab71b198d903c2100915f
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
- Implements 3.5 character timeout handling.
- Take send and response timeouts into account.
Change-Id: I765dfe188b45671f007cb3f8f1cc66bb48ce94ed
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ibb6da3a63ed8f6097eccf51019733beb9f257db9
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id2c01e09e5d24bf2ecce57211cb13299478544e3
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I52bfdcd84d2164b45754fdfe85a96679f64133f2
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I32355dce87d571a9d8f116d96b7d38cf133e0b21
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Id6f79d0d4b160295f87aae0790ac84cd8c9cd5cb
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ibe9902e2a884b844898a88544fed809d3c7f5eeb
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
| |
Makes the connection and update of running timers a bit less
verbose.
Change-Id: I372f4ea8a23b5eace2e5d3b790a4a6e35a93da37
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: If3d1f50b431793dcb9209cfd20f077aa98675431
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ifce397518fb6544a7080201ed29172d319d4c0da
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I6ca93f853f8b56cb97d2f724f32a4f3ea08d805e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I043b1b522401782b243ef0cbd869c5cfbcc616b7
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
* fix debug output and use QT_MODBUS_LOW
* clear the serial port buffer before next write
* restart the proccessing once we received an timeout
* enqueue the PDU in case we proccess requests already
Change-Id: Id7413977731d377bb8d5128a9e93b80a9faca46d
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ifb4f0964f47b48f0cb9b33056c732a039cbaee69
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
| |
The TCP client doesn't use a queue system for requests and therefore
needs one timer per request. Therefore the abstraction offered by
QModbusClient is not suitable for the TCP client. As a consequence
we move the response timer into the RTU client implementation.
Change-Id: Ic30dfd730bcdae42ee7515be0fdf0eaff64af2fa
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
|
|
|
|
|
|
| |
Change-Id: I3d2d4f75e02659eabdb63ac78667f764e998f58a
Reviewed-by: Ralf Nolden <nolden@kde.org>
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: I6564e771830f8c2575e8c35376a36275728d06d4
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The idea is to reuse this later in case of sending raw
requests that we have no real data units for the return.
This makes the protocol error functions superfluous as
well, as now, the actual response can be queried for the
real exception code.
Change-Id: I5d6b5e050b273c8ff4ed19f0a3eae5c31420942e
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
| |
Change-Id: Ia71200686660f25f624e83d7bb3f8b3a8cb1b774
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
|
|
|
|
|
|
|
|
|
| |
This allows us to get rid of several public pure virtual
functions and to have the implementation in a single place
instead of duplicating it in several classes.
Change-Id: I88fb28a5d507c7b64d20bba73765534e2925165e
Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
|