|
lcls2
C++ API: public headers of xtcdata, psalg, psdaq and psana
|
Sends L1Accepts to one chosen MEB buffer and transitions to every MEB, over libfabric client links. More...
#include <MebContributor.hh>
Public Types | |
| using | listU32_t = std::list< uint32_t > |
| List of free transition buffer indices (one list per MEB link). | |
Public Member Functions | |
| MebContributor (const MebCtrbParams &) | |
| Keep a reference to the parameters; the event buffer size is prms.maxEvSize rounded up to whole pages. | |
| int | resetCounters () |
| Reset the event and transition counters; returns 0. | |
| int | connect (const std::shared_ptr< MetricExporter >) |
| Register metrics with the exporter (if non-null), size the per-link vectors from prms.addrs and connect to all MEBs with linksConnect(). | |
| int | configure () |
| For each link, (re)allocate the local region if its size changed (maxEvents of that MEB times the event buffer size, plus the transition buffers), exchange region information with EbLfCltLink::prepare() and refill the list of MEB_TR_BUFFERS transition buffer indices. | |
| void | unconfigure () |
| Set enabled() to false. | |
| void | disconnect () |
| Call unconfigure(), disconnect and drop all links, and set the ID to -1. | |
| void | shutdown () |
| Call disconnect() (harmless if already done). | |
| bool | enabled () const |
| Return true between a successful configure() and unconfigure(). | |
| int | post (const Pds::EbDgram *dataDatagram) |
| Send a transition to every MEB: for each link take a free transition buffer index (polling the link, waiting up to 5 s if none is cached), copy the datagram into that local buffer and RDMA-write it. | |
| int | post (const Pds::EbDgram *dataDatagram, uint32_t destination) |
| Send an L1Accept to the MEB and buffer index encoded (ImmData src and idx) in destination: copy it into the matching local buffer and RDMA-write it. | |
Sends L1Accepts to one chosen MEB buffer and transitions to every MEB, over libfabric client links.
Each link gets a local region of event buffers followed by MEB_TR_BUFFERS transition buffers.
| using Pds::Eb::MebContributor::listU32_t = std::list<uint32_t> |
List of free transition buffer indices (one list per MEB link).
| Pds::Eb::MebContributor::MebContributor | ( | const MebCtrbParams & | ) |
Keep a reference to the parameters; the event buffer size is prms.maxEvSize rounded up to whole pages.
| int Pds::Eb::MebContributor::configure | ( | ) |
For each link, (re)allocate the local region if its size changed (maxEvents of that MEB times the event buffer size, plus the transition buffers), exchange region information with EbLfCltLink::prepare() and refill the list of MEB_TR_BUFFERS transition buffer indices.
Sets enabled() true and returns 0, or returns the first error (ENOMEM if allocation fails).
| int Pds::Eb::MebContributor::connect | ( | const std::shared_ptr< MetricExporter > | ) |
Register metrics with the exporter (if non-null), size the per-link vectors from prms.addrs and connect to all MEBs with linksConnect().
Returns 0 or the first error.
| void Pds::Eb::MebContributor::disconnect | ( | ) |
Call unconfigure(), disconnect and drop all links, and set the ID to -1.
|
inline |
Return true between a successful configure() and unconfigure().
| int Pds::Eb::MebContributor::post | ( | const Pds::EbDgram * | dataDatagram | ) |
Send a transition to every MEB: for each link take a free transition buffer index (polling the link, waiting up to 5 s if none is cached), copy the datagram into that local buffer and RDMA-write it.
Aborts if the datagram is larger than maxTrSize, its source is not this contributor's ID, or no buffer index arrives; a failed write is only logged. Returns 0.
| int Pds::Eb::MebContributor::post | ( | const Pds::EbDgram * | dataDatagram, |
| uint32_t | destination | ||
| ) |
Send an L1Accept to the MEB and buffer index encoded (ImmData src and idx) in destination: copy it into the matching local buffer and RDMA-write it.
Aborts on an invalid MEB or index, an oversize datagram (checked after the copy), a source ID mismatch, an out-of-range buffer, a non-advancing pulse ID, or a failed write. Returns 0.
| int Pds::Eb::MebContributor::resetCounters | ( | ) |
Reset the event and transition counters; returns 0.
| void Pds::Eb::MebContributor::shutdown | ( | ) |
Call disconnect() (harmless if already done).
| void Pds::Eb::MebContributor::unconfigure | ( | ) |
Set enabled() to false.