From 1a9d78ac56558f2379eeb237332a54965b3d66c4 Mon Sep 17 00:00:00 2001 From: Raphael Grimm <raphael.grimm@kit.edu> Date: Fri, 27 Jul 2018 15:26:15 +0200 Subject: [PATCH] Add doxygen --- .../images/NJointControllerDataFlow_Graph.svg | 2 ++ .../images/NJointControllerDataFlow_Graph.xml | 1 + ...NJointControllerWorkerThreadDataFlow_Graph.svg | 2 ++ ...NJointControllerWorkerThreadDataFlow_Graph.xml | 1 + .../NJointControllers/NJointController.h | 15 +++++++++++++++ 5 files changed, 21 insertions(+) create mode 100644 etc/doxygen/images/NJointControllerDataFlow_Graph.svg create mode 100644 etc/doxygen/images/NJointControllerDataFlow_Graph.xml create mode 100644 etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.svg create mode 100644 etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.xml diff --git a/etc/doxygen/images/NJointControllerDataFlow_Graph.svg b/etc/doxygen/images/NJointControllerDataFlow_Graph.svg new file mode 100644 index 000000000..65c53be2c --- /dev/null +++ b/etc/doxygen/images/NJointControllerDataFlow_Graph.svg @@ -0,0 +1,2 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" width="412px" height="90px" version="1.1" content="<mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="8.9.9" editor="www.draw.io" type="device"><diagram id="ef5abcf2-3e1d-c766-55b0-b941bf7457f1" name="Page-1">zVZNj5swEP013PkKSa/JpttK7aWp1O3RhQl4axjkDAv019fEQzBLU1WqNkoOkefNp988SLxoV3aPWtTFZ8xAeaGfdV704IXherU23wPQWyDxNxbItcwsFEzAQf4CBn1GG5nBaRZIiIpkPQdTrCpIaYYJrbGdhx1RzbvWIocFcEiFWqLfZEaFRTcrf8I/gMyLsXPgs+eHSH/mGpuK+3lhdDx/rLsUYy2OPxUiw9aBor0X7TQi2VPZ7UAN1I602bz3V7yXuTVU9E8Jic14EaqBceTzYNSPZJgMw7sxtm0hCQ61SAdPazZvsIJKZazAHMWptss4yg5Mgy3XBk3QXR0wuFzbqAmwBNK9CeGE+B2nsJLCNdutsxcms3BWMmKClZBfKk9smAMTcoWc1b2Ts0lekZPcjJxkSUVmniE2UVOBOVZC7Sd0e34whss/+HNyoJP05Jy/c4jhQfdPrjF6noGo5xeHaAgNNPX8hFhzNTvlMNrfOTY3wUanHMV7JqFz4Kj4z5vQoATJl3n1/+E1XGjuy9f7Ul2Q+HPVjXK6gerWb6E631Fd4KoucFUXvLnq4qXqwhupLl6o7uNuf1+yizc3k50xp5/gs8/5mxPtfwM=</diagram></mxfile>"><defs/><g transform="translate(0.5,0.5)"><ellipse cx="371" cy="40" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><ellipse cx="366" cy="45" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><path d="M 68.14 21 L 325.2 21" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 330.45 21 L 323.45 24.5 L 325.2 21 L 323.45 17.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="40" cy="49" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(31.5,42.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="16" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 17px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">RT</div></div></foreignObject><text x="8" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">RT</text></switch></g><path d="M 331.57 77 L 74.51 77" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 69.26 77 L 76.26 73.5 L 74.51 77 L 76.26 80.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="360" cy="49" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(349.5,42.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="20" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 21px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">ICE</div></div></foreignObject><text x="10" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">ICE</text></switch></g></g></svg> \ No newline at end of file diff --git a/etc/doxygen/images/NJointControllerDataFlow_Graph.xml b/etc/doxygen/images/NJointControllerDataFlow_Graph.xml new file mode 100644 index 000000000..3b6758c3f --- /dev/null +++ b/etc/doxygen/images/NJointControllerDataFlow_Graph.xml @@ -0,0 +1 @@ +<mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="8.9.9" editor="www.draw.io" type="device"><diagram id="ef5abcf2-3e1d-c766-55b0-b941bf7457f1" name="Page-1">zVZNj5swEP013PkKSa/JpttK7aWp1O3RhQl4axjkDAv019fEQzBLU1WqNkoOkefNp988SLxoV3aPWtTFZ8xAeaGfdV704IXherU23wPQWyDxNxbItcwsFEzAQf4CBn1GG5nBaRZIiIpkPQdTrCpIaYYJrbGdhx1RzbvWIocFcEiFWqLfZEaFRTcrf8I/gMyLsXPgs+eHSH/mGpuK+3lhdDx/rLsUYy2OPxUiw9aBor0X7TQi2VPZ7UAN1I602bz3V7yXuTVU9E8Jic14EaqBceTzYNSPZJgMw7sxtm0hCQ61SAdPazZvsIJKZazAHMWptss4yg5Mgy3XBk3QXR0wuFzbqAmwBNK9CeGE+B2nsJLCNdutsxcms3BWMmKClZBfKk9smAMTcoWc1b2Ts0lekZPcjJxkSUVmniE2UVOBOVZC7Sd0e34whss/+HNyoJP05Jy/c4jhQfdPrjF6noGo5xeHaAgNNPX8hFhzNTvlMNrfOTY3wUanHMV7JqFz4Kj4z5vQoATJl3n1/+E1XGjuy9f7Ul2Q+HPVjXK6gerWb6E631Fd4KoucFUXvLnq4qXqwhupLl6o7uNuf1+yizc3k50xp5/gs8/5mxPtfwM=</diagram></mxfile> \ No newline at end of file diff --git a/etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.svg b/etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.svg new file mode 100644 index 000000000..428c211b7 --- /dev/null +++ b/etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.svg @@ -0,0 +1,2 @@ +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> +<svg xmlns="http://www.w3.org/2000/svg" style="background-color: rgb(255, 255, 255);" xmlns:xlink="http://www.w3.org/1999/xlink" width="412px" height="250px" version="1.1" content="<mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="8.9.9" editor="www.draw.io" type="device"><diagram>zVdNj5swEP01XCu+Qsg12fRDai/NSrs9ujABusAgxyzQX18T2wEvmyhVKZBD5HnjGQ/P82wwnF1Wf6KkiL9hCKlhm2FtOA+Gba9Xa/7fAo0APNMXQESTUEBWBxyS3yBBU6JlEsJJm8gQU5YUOhhgnkPANIxQipU+7YipvmpBIhgAh4CkQ/QpCVksUH9ldvhnSKJYrWyZ0vOTBC8RxTKX6xm2czz/hDsjKpecf4pJiFUPcvaGs6OITIyyegdpS62iTcR9vOK91E0hZ/cE2CLglaQlqIrPdbFGccEDOO3c2FZxwuBQkKD1VHzjORazLOWWxYfkVIi9OCY18PxbmRsog/pqfdblqXkzAWbAaMOnyAB3I0NkI9lraVe9bZFcxr0dURiRjRBdMndk8IHk431unKVz43tvuPEm48YdUhFyBUkTKYsxwpyk+w7dnmXRPvyDqZMDdcKee+MfcgrngTbPfUN5fgFjjTw2SMmQQ92aXxELmU1U2ZamcXzCkgYSkpwxQiNQtNt3bwWFlLDkVU//L8SubhKbY/7XTFozMrmZj0hvoN7vj8vSr+WZun6VMCfQ73qUNjP7gv2w0hqtM1UTjthqm2GrefO1mj+6Zq+ffv+fyDlPv81AtE9IX4By7DGmQMJlKdixdQW77nQKVq/K417BNxRt9dtQ+EZsRNV1C5G0Zd1k9+4DUlD43k08PZ0zXsaqnJ6wv+z2yxKz6092HXOz+8Q7+3qf0c7+Dw==</diagram></mxfile>"><defs/><g transform="translate(0.5,0.5)"><ellipse cx="371" cy="40" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><ellipse cx="366" cy="45" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><path d="M 68.14 21 L 325.2 21" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 330.45 21 L 323.45 24.5 L 325.2 21 L 323.45 17.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 68.14 77 L 167.08 176.48" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 170.78 180.21 L 163.37 177.71 L 167.08 176.48 L 168.33 172.78 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="40" cy="49" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(31.5,42.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="16" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 17px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">RT</div></div></foreignObject><text x="8" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">RT</text></switch></g><path d="M 160.14 209 L 44.65 93.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 40.93 89.79 L 48.36 92.27 L 44.65 93.5 L 43.41 97.22 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 228.14 181 L 327.08 81.52" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 330.78 77.79 L 328.33 85.22 L 327.08 81.52 L 323.37 80.29 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="200" cy="209" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(161.5,195.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="77" height="27" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 77px; white-space: normal; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">Worker Thread</div></div></foreignObject><text x="39" y="20" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">Worker Thread</text></switch></g><path d="M 320.14 49 L 86.51 49" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 81.26 49 L 88.26 45.5 L 86.51 49 L 88.26 52.5 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 360.14 89 L 244.65 204.5" fill="none" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><path d="M 240.93 208.21 L 243.41 200.78 L 244.65 204.5 L 248.36 205.73 Z" fill="#000000" stroke="#000000" stroke-miterlimit="10" pointer-events="none"/><ellipse cx="360" cy="49" rx="40" ry="40" fill="#ffffff" stroke="#000000" pointer-events="none"/><g transform="translate(349.5,42.5)"><switch><foreignObject style="overflow:visible;" pointer-events="all" width="20" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"><div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 21px; white-space: nowrap; overflow-wrap: normal; text-align: center;"><div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;">ICE</div></div></foreignObject><text x="10" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica">ICE</text></switch></g></g></svg> \ No newline at end of file diff --git a/etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.xml b/etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.xml new file mode 100644 index 000000000..ef5af4b65 --- /dev/null +++ b/etc/doxygen/images/NJointControllerWorkerThreadDataFlow_Graph.xml @@ -0,0 +1 @@ +<mxfile userAgent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0" version="8.9.9" editor="www.draw.io" type="device"><diagram id="ef5abcf2-3e1d-c766-55b0-b941bf7457f1" name="Page-1">zVfBcpswEP0arh1AGLtXO27amfZSZybpUYU1qAGWkUWAfn2FtRgIdqZtYoIPHu3bXWn1tE8aLLZJq1vJ8/gbhpBYrh1WFruxXHe5WOr/BqgN4NsrA0RShAZyOmAnfgOBNqGFCOEwCFSIiRL5EAwwyyBQA4xLieUwbI/JcNWcRzACdgFPxui9CFVs0NXC7vDPIKK4XdmxyfOTB4+RxCKj9SyX7Y8/4055OxfFH2IeYtmD2NZiG4mozCitNpA01La0mbxPF7ynuiVk6q8SfJPxxJMC2pKPham6JUNnaN61sS5joWCX86DxlPrkNRarNNGWo4f8kJvD2IsK9AJrmhukgupigc5p27qbAFNQstYhlOB9pBTqJHdJdtk7FyIz7h1Ji3HqhOg0c8eGHhAhF8hZzJ2clf+MHH8ycvwxFaHWEJkoVYwRZjzZduj6KIxm8zf2kByohHrojX9QiOZB1g99o/X8AqVqujh4oVBD3ZpfEXOazVTZlPYyx3onWMiAouicFZcRUJR3/iQkJFyJp+Hsr2q6Mz3WIzbD7J+ZdObFJJuISXek3u9389Kv49tD/bbCnOJyc8Zc/Eef2X3FflgMOq0z2y68bq+xca+5U6mWvblqL99/78LkVPcfG6n2HuUjSI3dxRJ4OC8JM3coYc+bTsLLazzBLwja6Teh8V23Db13FLT3NtejYfDcQzwHNqd6ir2RqL9stvMSsrea7C3WZveFd/T1vqLZ9g8=</diagram></mxfile> \ No newline at end of file diff --git a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h index 369109774..53d3decd5 100644 --- a/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h +++ b/source/RobotAPI/components/units/RobotUnit/NJointControllers/NJointController.h @@ -187,6 +187,13 @@ namespace armarx * * \image html NJointControllerTripleBufferDataFlow.svg "Dataflow in a NJointController using a triple buffer for communication between RT and NonRT" * + * + * \image html NJointControllerDataFlow_Graph.svg "Dataflow in a NJointController as a Graph of the two participating domains" + * The above image shows the two participating domains: one RT thread and multiple ICE threads. + * If data has to flow along an arrow, you need some construct for non blocking message passing. + * + * \warning If you use \ref TrippleBuffer "TrippleBuffers" or \ref WriteBufferedTrippleBuffer "WriteBufferedTrippleBuffers" you need a separate one for each arrow. + * * \section expensivework How to do expensive calculations * You have to execute expensive calculations in a different worker thread. * This thread could calculate target values at its own speed (e.g. 100 Hz). @@ -201,6 +208,12 @@ namespace armarx * * \image html NJointControllerWorkerThreadDataFlow.svg "Dataflow in a NJointController using a worker thread" * + * \image html NJointControllerWorkerThreadDataFlow_Graph.svg "Dataflow in a NJointController using a worker thread as a Graph of the three participating domains" + * The above image shows the three participating domains: one RT thread, one worker trhead and multiple ICE threads. + * If data has to flow along an arrow, you need some construct for non blocking message passing. + * + * \warning If you use \ref TrippleBuffer "TrippleBuffers" or \ref WriteBufferedTrippleBuffer "WriteBufferedTrippleBuffers" you need a separate one for each arrow. + * * \section nj-ctor-gui Providing a gui for controller construction. * By implementing these functions: * \code{.cpp} @@ -217,6 +230,8 @@ namespace armarx * * \section Examples * + * More examples can be found in the Tutorials Package + * * \subsection nj-example-1 A simple pass Position controller * \note The code can be found in the Tutorial package * -- GitLab