Set master stats colum with to 6.
authorFlorian Pose <fp@igh-essen.com>
Thu, 05 Aug 2010 09:54:06 +0200
changeset 1962 df9b00bda8dc
parent 1956 f461dc0d145a
child 1963 6aaf77798445
Set master stats colum with to 6.
tool/CommandMaster.cpp
tool/CommandMaster.h
--- a/tool/CommandMaster.cpp	Sat Jul 31 16:45:10 2010 +0200
+++ b/tool/CommandMaster.cpp	Thu Aug 05 09:54:06 2010 +0200
@@ -149,8 +149,8 @@
                     << "      Tx frame rate [1/s]: "
                     << setfill(' ') << setprecision(0) << fixed;
                 for (j = 0; j < EC_RATE_COUNT; j++) {
-                    cout <<
-                        setw(5) << data.devices[i].tx_frame_rates[j] / 1000.0;
+                    cout << setw(ColWidth)
+                        << data.devices[i].tx_frame_rates[j] / 1000.0;
                     if (j < EC_RATE_COUNT - 1) {
                         cout << " ";
                     }
@@ -159,7 +159,7 @@
                     << "      Tx rate [KByte/s]:   "
                     << setprecision(1) << fixed;
                 for (j = 0; j < EC_RATE_COUNT; j++) {
-                    cout << setw(5)
+                    cout << setw(ColWidth)
                         << data.devices[i].tx_byte_rates[j] / 1024.0;
                     if (j < EC_RATE_COUNT - 1) {
                         cout << " ";
@@ -169,7 +169,8 @@
                     << "      Loss rate [1/s]:     "
                     << setprecision(0) << fixed;
                 for (j = 0; j < EC_RATE_COUNT; j++) {
-                    cout << setw(5) << data.devices[i].loss_rates[j] / 1000.0;
+                    cout << setw(ColWidth)
+                        << data.devices[i].loss_rates[j] / 1000.0;
                     if (j < EC_RATE_COUNT - 1) {
                         cout << " ";
                     }
@@ -183,7 +184,7 @@
                         perc = 100.0 * data.devices[i].loss_rates[j] /
                             data.devices[i].tx_frame_rates[j];
                     }
-                    cout << setw(5) << perc;
+                    cout << setw(ColWidth) << perc;
                     if (j < EC_RATE_COUNT - 1) {
                         cout << " ";
                     }
--- a/tool/CommandMaster.h	Sat Jul 31 16:45:10 2010 +0200
+++ b/tool/CommandMaster.h	Thu Aug 05 09:54:06 2010 +0200
@@ -42,6 +42,9 @@
 
         string helpString() const;
         void execute(const StringVector &);
+
+    private:
+        enum {ColWidth = 6};
 };
 
 /****************************************************************************/