Skip to content

Commit 3b98562

Browse files
committed
roc-status monitoring added link 15 when UL enabled
1 parent 664dc04 commit 3b98562

File tree

4 files changed

+39
-17
lines changed

4 files changed

+39
-17
lines changed

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,9 @@ metric format for the CRORC and the CRU is different, as different parameters ar
671671
| `tags::Key::ID` | ID of the link |
672672
| `tags::Key::Type` | `tags::Value::CRU` |
673673
674+
675+
NB: For link 15 (User Logic), when enabled, the list of values exported is a subset of the metrics above: `"orbitSor"`.
676+
674677
Logging
675678
-------------------
676679
Logging is achieved through the use of the [InfoLogger](https://github.com/AliceO2Group/InfoLogger) library.

src/CommandLineUtilities/ProgramStatus.cxx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -466,6 +466,20 @@ class ProgramStatus : public Program
466466
table << format;
467467
}
468468
}
469+
470+
/* PARAMETERS FOR USER LOGIC */
471+
if (reportInfo.userLogicEnabled) {
472+
if (mOptions.monitoring) {
473+
monitoring->send(Metric{ "link" }
474+
.addValue((uint64_t)reportInfo.userLogicOrbitSor, "orbitSor")
475+
.addTag(tags::Key::SerialId, card.serialId.getSerial())
476+
.addTag(tags::Key::Endpoint, card.serialId.getEndpoint())
477+
.addTag(tags::Key::CRU, card.sequenceId)
478+
.addTag(tags::Key::ID, reportInfo.userLogicLinkId)
479+
.addTag(tags::Key::Type, tags::Value::CRU));
480+
}
481+
}
482+
469483
} else {
470484
std::cout << "Invalid card type" << std::endl;
471485
return;

src/Cru/Common.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,8 @@ struct ReportInfo {
120120
uint32_t triggerWindowSize;
121121
bool gbtEnabled;
122122
bool userLogicEnabled;
123+
uint32_t userLogicLinkId;
124+
uint32_t userLogicOrbitSor;
123125
bool runStatsEnabled;
124126
bool userAndCommonLogicEnabled;
125127
uint16_t timeFrameLength;

src/Cru/CruBar.cxx

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -545,10 +545,12 @@ Cru::ReportInfo CruBar::report(bool forConfig)
545545
bool dynamicOffset = datapathWrapper.getDynamicOffsetEnabled(mEndpoint);
546546
uint32_t triggerWindowSize = datapathWrapper.getTriggerWindowSize(mEndpoint);
547547

548+
uint32_t userLogicLinkId = 15;
548549
Link userLogicLink;
549550
userLogicLink.dwrapper = mEndpoint;
550-
userLogicLink.dwrapperId = 15;
551+
userLogicLink.dwrapperId = userLogicLinkId;
551552
bool userLogicEnabled = datapathWrapper.isLinkEnabled(userLogicLink);
553+
uint32_t userLogicOrbitSor = datapathWrapper.getLinkRegister(userLogicLink, Cru::Registers::DATALINK_ORBIT_SOR);
552554

553555
Link runStatsLink;
554556
runStatsLink.dwrapper = mEndpoint;
@@ -560,22 +562,23 @@ Cru::ReportInfo CruBar::report(bool forConfig)
560562

561563
bool dmaStatus = getDmaStatus();
562564

563-
Cru::ReportInfo reportInfo = {
564-
linkMap,
565-
clock,
566-
downstreamData,
567-
ponStatusRegister,
568-
onuAddress,
569-
cruId,
570-
dynamicOffset,
571-
triggerWindowSize,
572-
gbtEnabled,
573-
userLogicEnabled,
574-
runStatsEnabled,
575-
userAndCommonLogicEnabled,
576-
timeFrameLength,
577-
dmaStatus
578-
};
565+
Cru::ReportInfo reportInfo;
566+
reportInfo.linkMap = linkMap;
567+
reportInfo.ttcClock = clock;
568+
reportInfo.downstreamData = downstreamData;
569+
reportInfo.ponStatusRegister = ponStatusRegister;
570+
reportInfo.onuAddress = onuAddress;
571+
reportInfo.cruId = cruId;
572+
reportInfo.dynamicOffset = dynamicOffset;
573+
reportInfo.triggerWindowSize = triggerWindowSize;
574+
reportInfo.gbtEnabled = gbtEnabled;
575+
reportInfo.userLogicEnabled = userLogicEnabled;
576+
reportInfo.userLogicLinkId = userLogicLinkId;
577+
reportInfo.userLogicOrbitSor = userLogicOrbitSor;
578+
reportInfo.runStatsEnabled = runStatsEnabled;
579+
reportInfo.userAndCommonLogicEnabled = userAndCommonLogicEnabled;
580+
reportInfo.timeFrameLength = timeFrameLength;
581+
reportInfo.dmaStatus = dmaStatus;
579582

580583
return reportInfo;
581584
}

0 commit comments

Comments
 (0)