Display alias adressing in graph. stable-1.5
authorFlorian Pose <fp@igh-essen.com>
Fri, 03 Mar 2017 16:00:35 +0100
branchstable-1.5
changeset 2671 5d7a83195c80
parent 2668 dd32f74ee76e
child 2672 b9cda70ec8b0
Display alias adressing in graph.
tool/CommandGraph.cpp
--- a/tool/CommandGraph.cpp	Fri Mar 03 13:55:01 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;