Skip to content
Snippets Groups Projects
Commit 7b1274d0 authored by Florian Pose's avatar Florian Pose
Browse files

Set master stats colum with to 6.

parent 47603961
No related branches found
No related tags found
No related merge requests found
...@@ -149,8 +149,8 @@ void CommandMaster::execute(const StringVector &args) ...@@ -149,8 +149,8 @@ void CommandMaster::execute(const StringVector &args)
<< " Tx frame rate [1/s]: " << " Tx frame rate [1/s]: "
<< setfill(' ') << setprecision(0) << fixed; << setfill(' ') << setprecision(0) << fixed;
for (j = 0; j < EC_RATE_COUNT; j++) { for (j = 0; j < EC_RATE_COUNT; j++) {
cout << cout << setw(ColWidth)
setw(5) << data.devices[i].tx_frame_rates[j] / 1000.0; << data.devices[i].tx_frame_rates[j] / 1000.0;
if (j < EC_RATE_COUNT - 1) { if (j < EC_RATE_COUNT - 1) {
cout << " "; cout << " ";
} }
...@@ -159,7 +159,7 @@ void CommandMaster::execute(const StringVector &args) ...@@ -159,7 +159,7 @@ void CommandMaster::execute(const StringVector &args)
<< " Tx rate [KByte/s]: " << " Tx rate [KByte/s]: "
<< setprecision(1) << fixed; << setprecision(1) << fixed;
for (j = 0; j < EC_RATE_COUNT; j++) { for (j = 0; j < EC_RATE_COUNT; j++) {
cout << setw(5) cout << setw(ColWidth)
<< data.devices[i].tx_byte_rates[j] / 1024.0; << data.devices[i].tx_byte_rates[j] / 1024.0;
if (j < EC_RATE_COUNT - 1) { if (j < EC_RATE_COUNT - 1) {
cout << " "; cout << " ";
...@@ -169,7 +169,8 @@ void CommandMaster::execute(const StringVector &args) ...@@ -169,7 +169,8 @@ void CommandMaster::execute(const StringVector &args)
<< " Loss rate [1/s]: " << " Loss rate [1/s]: "
<< setprecision(0) << fixed; << setprecision(0) << fixed;
for (j = 0; j < EC_RATE_COUNT; j++) { 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) { if (j < EC_RATE_COUNT - 1) {
cout << " "; cout << " ";
} }
...@@ -183,7 +184,7 @@ void CommandMaster::execute(const StringVector &args) ...@@ -183,7 +184,7 @@ void CommandMaster::execute(const StringVector &args)
perc = 100.0 * data.devices[i].loss_rates[j] / perc = 100.0 * data.devices[i].loss_rates[j] /
data.devices[i].tx_frame_rates[j]; data.devices[i].tx_frame_rates[j];
} }
cout << setw(5) << perc; cout << setw(ColWidth) << perc;
if (j < EC_RATE_COUNT - 1) { if (j < EC_RATE_COUNT - 1) {
cout << " "; cout << " ";
} }
......
...@@ -42,6 +42,9 @@ class CommandMaster: ...@@ -42,6 +42,9 @@ class CommandMaster:
string helpString() const; string helpString() const;
void execute(const StringVector &); void execute(const StringVector &);
private:
enum {ColWidth = 6};
}; };
/****************************************************************************/ /****************************************************************************/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment