summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorLena Biliaieva <lena.biliaieva@qt.io>2023-12-20 18:37:01 +0100
committerLena Biliaieva <lena.biliaieva@qt.io>2023-12-21 15:16:30 +0100
commitbf8557be37420f946b8171dc27b1387363b8926f (patch)
treea5df65aad88903e199b84c426c61db13547f01c5 /examples
parentc7baf0b2d83cd9ec0e71cd593eea742b686d8dc1 (diff)
Review Simulation Server Ex: Add to documentation
Create documentation. Update links for Water Pump examples. Fixes: QTBUG-120312 Pick-to: 6.7 Change-Id: I96b65cc6c5b9887d1b1c13e8e6438566115df4d9 Reviewed-by: Ievgenii Meshcheriakov <ievgenii.meshcheriakov@qt.io>
Diffstat (limited to 'examples')
-rw-r--r--examples/opcua/waterpump/simulationserver/doc/simulationserver.qdoc66
-rw-r--r--examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc5
-rw-r--r--examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc5
3 files changed, 68 insertions, 8 deletions
diff --git a/examples/opcua/waterpump/simulationserver/doc/simulationserver.qdoc b/examples/opcua/waterpump/simulationserver/doc/simulationserver.qdoc
new file mode 100644
index 0000000..25bed46
--- /dev/null
+++ b/examples/opcua/waterpump/simulationserver/doc/simulationserver.qdoc
@@ -0,0 +1,66 @@
+// Copyright (C) 2023 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
+
+/*!
+ \example waterpump/simulationserver
+ \ingroup qtopcua-examples
+ \title Water Pump Simulation Server
+ \examplecategory {Data Processing & I/O}
+ \brief An OPC UA server that implements a simple water pump machine simulation.
+
+ \e {Water Pump Simulation Server} is created using OPC UA for the \l{Water Pump} and \l {Qt Quick Water Pump} examples.
+
+ \section1 The Simulation
+ The OPC UA server runs a simulation of a machine
+ containing two tanks, a water pump, and a valve. Water can be pumped from the
+ first tank into the second tank and then be flushed from the second tank
+ by opening the valve. Both operations have a user-configurable setpoint,
+ allowing control over the amount of water pumped into or flushed from the second tank.
+
+ The following nodes exist on the server:
+
+ \table
+ \header
+ \li NodeId
+ \li Function
+ \row
+ \li ns=2;s=Machine
+ \li The folder containing the method and variable nodes for the machine
+ \row
+ \li ns=2;s=Machine.State
+ \li The state of the machine
+ \row
+ \li ns=2;s=Machine.Tank1.PercentFilled
+ \li The current fill status of the first tank
+ \row
+ \li ns=2;s=Machine.Tank2.PercentFilled
+ \li The current fill status of the second tank
+ \row
+ \li ns=2;s=Machine.Tank2.TargetPercent
+ \li The setpoint for pumping and flushing
+ \row
+ \li ns=2;s=Machine.Tank2.ValveState
+ \li The state of the valve of the second tank
+ \row
+ \li ns=2;s=Machine.Designation
+ \li A human readable designation of the machine for display purposes
+ \row
+ \li ns=2;s=Machine.Start
+ \li Call this method to start the pump
+ \row
+ \li ns=2;s=Machine.Stop
+ \li Call this method to stop the pump
+ \row
+ \li ns=2;s=Machine.FlushTank2
+ \li Call this method to flush tank 2
+ \row
+ \li ns=2;s=Machine.Reset
+ \li Call this method to reset the simulation
+ \endtable
+
+ All methods return \l {QOpcUa::UaStatusCode} {Good} in case of success and
+ \l {QOpcUa::UaStatusCode} {BadUserAccessDenied} if the operation is illegal
+ (for example, trying to start the pump if the first tank is empty).
+
+ \sa {Qt Quick Water Pump}, {Water Pump}
+*/
diff --git a/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc b/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc
index b477e0f..209b657 100644
--- a/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc
+++ b/examples/opcua/waterpump/waterpump-qml/doc/waterpump-qml.qdoc
@@ -16,10 +16,7 @@
\image tankexample.png
\section1 Building the Server
- Before you can use the Water Pump examples, you need to build the \l
- {https://code.qt.io/cgit/qt/qtopcua.git/tree/examples/opcua/waterpump/simulationserver}
- {simulation server}.
- The simulation server project resides next to the Water Pump examples.
+ Before you can use the Water Pump examples, you need to build the \l {Water Pump Simulation Server}.
You can open and build it in QtCreator or from the terminal as usual.
\section1 The Simulation
diff --git a/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc b/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc
index d1988d2..163c058 100644
--- a/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc
+++ b/examples/opcua/waterpump/waterpump-qmlcpp/doc/waterpump-qmlcpp.qdoc
@@ -17,10 +17,7 @@
\image tankexample.png
\section1 Building the Server
- Before you can use the Water Pump examples, you need to build the \l
- {https://code.qt.io/cgit/qt/qtopcua.git/tree/examples/opcua/waterpump/simulationserver}
- {simulation server}.
- The simulation server project resides next to the Water Pump examples.
+ Before you can use the Water Pump examples, you need to build the \l {Water Pump Simulation Server}.
You can open and build it in QtCreator or from the terminal as usual.
\section1 The Simulation