Display alias adressing in graph.
authorFlorian Pose <fp@igh-essen.com>
Fri, 03 Mar 2017 16:00:35 +0100
changeset 2675 5944c9a2649d
parent 2670 09c55ee9a69d
child 2676 bb279253ca4b
Display alias adressing in graph.
tool/CommandGraph.cpp
--- a/tool/CommandGraph.cpp	Fri Mar 03 13:50:49 2017 +0100
+++ b/tool/CommandGraph.cpp	Fri Mar 03 16:00:35 2017 +0100
@@ -120,9 +120,18 @@
     }
     cout << endl;
 
+    uint16_t alias = 0x0000;
+    uint16_t pos = 0;
+
     for (si = slaves.begin(); si != slaves.end(); si++) {
+        if (si->alias) {
+            alias = si->alias;
+            pos = 0;
+        }
+
         cout << "    slave" << si->position << " [shape=\"box\""
-            << ",label=\"" << si->position;
+            << ",label=\"" << si->position
+            << " / " << alias << ":" << pos;
         if (string(si->order).size())
             cout << "\\n" << si->order;
         if (si->dc_supported) {
@@ -188,6 +197,7 @@
         }
 
         cout << endl;
+        pos++;
     }
 
     cout << "}" << endl;