artdaq
v3_09_01
|
The RequestSender contains methods used to send data requests and Routing tokens. More...
#include <artdaq/DAQrate/RequestSender.hh>
Classes | |
struct | Config |
Configuration of the RequestSender. May be used for parameter validation More... | |
struct | RoutingTokenConfig |
Configuration for Routing token sending More... | |
Public Types | |
using | Parameters = fhicl::WrappedTable< Config > |
Used for ParameterSet validation (if desired) | |
Public Member Functions | |
RequestSender ()=delete | |
Default Constructor is deleted. | |
RequestSender (RequestSender const &)=delete | |
Copy Constructor is deleted. | |
RequestSender & | operator= (RequestSender const &)=delete |
Copy Assignment operator is deleted. More... | |
RequestSender (RequestSender &&)=delete | |
Move Constructor is deleted. | |
RequestSender & | operator= (RequestSender &&)=delete |
Move-assignment operator is deleted. | |
RequestSender (const fhicl::ParameterSet &pset) | |
RequestSender Constructor. More... | |
virtual | ~RequestSender () |
RequestSender Destructor. | |
void | SetRequestMode (detail::RequestMessageMode mode) |
Set the mode for RequestMessages. Used to indicate when RequestSender should enter "EndOfRun" mode. More... | |
detail::RequestMessageMode | GetRequestMode () const |
Get the mode for RequestMessages. More... | |
void | SendRequest (bool endOfRunOnly=false) |
Send a request message containing all current requests. More... | |
void | AddRequest (Fragment::sequence_id_t seqID, Fragment::timestamp_t timestamp) |
Add a request to the request list. More... | |
void | RemoveRequest (Fragment::sequence_id_t seqID) |
Remove a request from the request list. More... | |
void | SendRoutingToken (int nSlots, int run_number) |
Send a RoutingToken message indicating that slots are available. More... | |
size_t | GetSentTokenCount () const |
Get the count of number of tokens sent. More... | |
void | SetRunNumber (uint32_t run) |
Set the run number to be used in request messages. More... | |
bool | RoutingTokenSendsEnabled () |
Determine if routing token sends are enabled. More... | |
bool | RequestsInFlight () |
Determine if the RequestSender is currently sending any requests. More... | |
The RequestSender contains methods used to send data requests and Routing tokens.
Definition at line 26 of file RequestSender.hh.
|
explicit |
RequestSender Constructor.
pset | ParameterSet used to configured RequestSender. See artdaq::RequestSender::Config |
Definition at line 19 of file RequestSender.cc.
void artdaq::RequestSender::AddRequest | ( | Fragment::sequence_id_t | seqID, |
Fragment::timestamp_t | timestamp | ||
) |
Add a request to the request list.
seqID | Sequence ID for request |
timestamp | Timestamp to request |
Definition at line 305 of file RequestSender.cc.
|
inline |
Get the mode for RequestMessages.
Definition at line 105 of file RequestSender.hh.
|
inline |
Get the count of number of tokens sent.
Definition at line 137 of file RequestSender.hh.
|
delete |
Copy Assignment operator is deleted.
void artdaq::RequestSender::RemoveRequest | ( | Fragment::sequence_id_t | seqID | ) |
Remove a request from the request list.
seqID | Sequence ID of request |
Definition at line 323 of file RequestSender.cc.
|
inline |
Determine if the RequestSender is currently sending any requests.
This function is used for testing
Definition at line 157 of file RequestSender.hh.
|
inline |
Determine if routing token sends are enabled.
Definition at line 149 of file RequestSender.hh.
void artdaq::RequestSender::SendRequest | ( | bool | endOfRunOnly = false | ) |
Send a request message containing all current requests.
endOfRunOnly | Whether the request should only be sent in EndOfRun RequestMessageMode (default: false) |
Definition at line 285 of file RequestSender.cc.
void artdaq::RequestSender::SendRoutingToken | ( | int | nSlots, |
int | run_number | ||
) |
Send a RoutingToken message indicating that slots are available.
nSlots | Number of slots available |
run_number | Run number for token |
Definition at line 270 of file RequestSender.cc.
void artdaq::RequestSender::SetRequestMode | ( | detail::RequestMessageMode | mode | ) |
Set the mode for RequestMessages. Used to indicate when RequestSender should enter "EndOfRun" mode.
mode | Mode to set |
Definition at line 87 of file RequestSender.cc.
|
inline |
Set the run number to be used in request messages.
run | Run number |
Definition at line 143 of file RequestSender.hh.