Skip to content

Commit e3b8574

Browse files
committed
[roc-status] Report CRU ID
1 parent 393f278 commit e3b8574

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,7 @@ metric format for the CRORC and the CRU is different, as different parameters ar
467467
| Value name | Value | Type |
468468
| --------------------------- | ----------------------- | ------ |
469469
| `"pciAddress"` | - | string |
470+
| `"CRU ID"` | Assigned CRU ID | int |
470471
| `"clock"` | "TTC" or "Local" | string |
471472
| `"dynamicOffset"` | 0/1 (Disabled/Enabled) | int |
472473
| `"userLogic"` | 0/1 (Disabled/Enabled) | int |

src/CommandLineUtilities/ProgramStatus.cxx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ class ProgramStatus : public Program
207207
.addTag(tags::Key::ID, card.sequenceId)
208208
.addTag(tags::Key::Type, tags::Value::CRU));
209209
} else if (mOptions.jsonOut) {
210+
root.put("cruId", reportInfo.cruId);
210211
root.put("clock", clock);
211212
root.put("offset", offset);
212213
root.put("userLogic", userLogic);
@@ -217,11 +218,18 @@ class ProgramStatus : public Program
217218
std::cout << csvLine;
218219
} else {
219220
std::cout << "----------------------------" << std::endl;
221+
std::cout << "CRU ID: " << reportInfo.cruId << std::endl;
220222
std::cout << clock << " clock | ";
221223
std::cout << offset << " offset" << std::endl;
222-
std::cout << "User Logic " << userLogic << std::endl;
223-
std::cout << "Run statistics " << runStats << std::endl;
224-
std::cout << "User and Common logic " << runStats << std::endl;
224+
if (reportInfo.userLogicEnabled) {
225+
std::cout << "User Logic enabled" << std::endl;
226+
}
227+
if (reportInfo.runStatsEnabled) {
228+
std::cout << "Run statistics enabled" << std::endl;
229+
}
230+
if (reportInfo.userAndCommonLogicEnabled) {
231+
std::cout << "User and Common logic enabled" << std::endl;
232+
}
225233
std::cout << "----------------------------" << std::endl;
226234
}
227235

0 commit comments

Comments
 (0)