Break domain output data after 16 bytes.
authorFlorian Pose <fp@igh-essen.com>
Mon, 07 Jul 2008 08:06:27 +0000
changeset 1101 f8d13814af03
parent 1100 af0b187de6ef
child 1102 5461894b05ab
Break domain output data after 16 bytes.
TODO
tools/Master.cpp
tools/Master.h
--- a/TODO	Mon Jul 07 07:59:07 2008 +0000
+++ b/TODO	Mon Jul 07 08:06:27 2008 +0000
@@ -20,7 +20,6 @@
 * Distributed clocks.
 * Fix datagram errors on application loading/unloading.
 * Race in jiffies frame timeout?
-* Break 'ethercat domain' output at 16 bytes.
 
 Future issues:
 
--- a/tools/Master.cpp	Mon Jul 07 07:59:07 2008 +0000
+++ b/tools/Master.cpp	Mon Jul 07 08:06:27 2008 +0000
@@ -1238,6 +1238,8 @@
 
         cout << "    " << hex << setfill('0');
         for (j = 0; j < fmmu.data_size; j++) {
+            if (j && !(j % BreakAfterBytes))
+                cout << endl << "    ";
             cout << setw(2)
                 << (unsigned int) *(processData + dataOffset + j) << " ";
         }
--- a/tools/Master.h	Mon Jul 07 07:59:07 2008 +0000
+++ b/tools/Master.h	Mon Jul 07 08:06:27 2008 +0000
@@ -74,6 +74,7 @@
         void showDetailedConfigs();
         void listConfigs();
         void outputDomainData(unsigned int);
+        enum {BreakAfterBytes = 16};
         void showDomain(unsigned int);
         void listSlavePdos(uint16_t, bool = false);
         void listSlaveSdos(uint16_t, bool = false);