Skip to content

Commit 05d3cb4

Browse files
committed
added superpage link id
1 parent a98b3a9 commit 05d3cb4

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

doc/releaseNotes.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ This file describes the main feature changes for released versions of ReadoutCar
1515

1616
## next
1717
- log messages level updated: moved all Ops messages to Devel. The calling layer is in charge to reporting high level operation messages.
18+
- superpage metadata: added link id.

include/ReadoutCard/Superpage.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,23 @@ struct Superpage {
103103
mUserData = userData;
104104
}
105105

106+
/// Set the link id
107+
void setLink(int id = -1) {
108+
mLink = id;
109+
}
110+
111+
/// Get the link id
112+
int getLink() {
113+
return mLink;
114+
}
115+
106116
private:
107117
size_t mOffset = 0; ///< Offset from the start of the DMA buffer to the start of the superpage
108118
size_t mSize = 0; ///< Size of the superpage in bytes
109119
void* mUserData = nullptr; ///< Pointer that users can use for whatever, e.g. to associate data with the superpage
110120
size_t mReceived = 0; ///< Size of the received data in bytes
111121
bool mReady = false; ///< Indicates this superpage is ready
122+
int mLink = -1; ///< The link producing the data
112123
};
113124

114125
} // namespace roc

src/Cru/CruDmaChannel.cxx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ void CruDmaChannel::transferSuperpageFromLinkToReady(Link& link, bool reclaim)
327327
link.queue->frontPtr()->setReceived(0);
328328
}
329329

330+
link.queue->frontPtr()->setLink(link.id);
330331
mReadyQueue->write(*link.queue->frontPtr());
331332
link.queue->popFront();
332333
link.superpageCounter++;

0 commit comments

Comments
 (0)