Skip to content

Commit 5918c6b

Browse files
committed
Clarify usage of dashboard client's command functions
1 parent ed96360 commit 5918c6b

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

doc/architecture/dashboard_client.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ After connecting to the dashboard server by using the ``connect()`` function, da
1010
sent using the ``sendAndReceive()`` function. Answers from the dashboard server will be returned as
1111
string from this function. If no answer is received, a ``UrException`` is thrown.
1212

13+
Some functions are also wrapped into ``command...()`` functions such as
14+
``commandCloseSafetyPopup()``. These functions are blocking and will wait for the necessary action
15+
being done. This can involve querying another call to the dashboard server until the action is
16+
done. For example, ``commandPowerOn()`` will block until the robot reports "Robotmode: RUNNING" or
17+
the given timeout is reached.
18+
1319
The `dashboard_example.cpp <https://github.com/UniversalRobots/Universal_Robots_Client_Library/blob/master/examples/dashboard_example.cpp>`_ shows how to use this class:
1420

1521
.. literalinclude:: ../../examples/dashboard_example.cpp
@@ -19,10 +25,3 @@ The `dashboard_example.cpp <https://github.com/UniversalRobots/Universal_Robots_
1925
:lineno-match:
2026
:start-at: std::make_unique<DashboardClient>
2127
:end-at: my_dashboard->commandCloseSafetyPopup();
22-
23-
24-
.. note::
25-
In order to make this more useful developers are expected to wrap this bare interface into
26-
something that checks the returned string for something that is expected. See the
27-
`DashboardClientROS <https://github.com/UniversalRobots/Universal_Robots_ROS_Driver/blob/master/ur_robot_driver/include/ur_robot_driver/dashboard_client_ros.h>`_ as an example.
28-

0 commit comments

Comments
 (0)