summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/serialbus/qmodbusdevice.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/serialbus/qmodbusdevice.cpp b/src/serialbus/qmodbusdevice.cpp
index 7ef358c..aa1bddc 100644
--- a/src/serialbus/qmodbusdevice.cpp
+++ b/src/serialbus/qmodbusdevice.cpp
@@ -228,10 +228,14 @@ void QModbusDevice::setConnectionParameter(int parameter, const QVariant &value)
*/
/*!
- Connects the device to the Modbus network. Returns \c true on success;
- otherwise \c false.
+ Connects the device to the Modbus network. Returns \c true if the connection
+ process was successfully initiated; otherwise \c false. Final connection
+ success confirmation requires the \l state() changing to \l QModbusDevice::ConnectedState.
+
This function calls \l open() as part of its implementation.
+
+ \sa open()
*/
bool QModbusDevice::connectDevice()
{
@@ -333,11 +337,13 @@ QString QModbusDevice::errorString() const
This function is called by connectDevice(). Subclasses must provide
an implementation that returns \c true on successful Modbus connection
- or \c false otherwise.
+ or connection initiation; otherwise returns \c false.
The implementation must ensure that the instance's \l state()
- is set to \l QModbusDevice::ConnectedState upon success; otherwise
- \l QModbusDevice::UnconnectedState.
+ is set to \l QModbusDevice::ConnectingState or \l QModbusDevice::ConnectedState upon success; otherwise
+ \l QModbusDevice::UnconnectedState. Typically, \l QModbusDevice::ConnectingState is used
+ when the connection process reports back asynchronously and \l QModbusDevice::ConnectedState
+ in case of synchronous connect behavior.
\sa connectDevice()
*/