artdaq
v3_09_00
|
Public Member Functions | |
RequestBuffer (Fragment::sequence_id_t request_increment=1) | |
void | push (artdaq::Fragment::sequence_id_t seq, artdaq::Fragment::timestamp_t ts) |
void | reset () |
std::map < artdaq::Fragment::sequence_id_t, artdaq::Fragment::timestamp_t > | GetRequests () const |
Get the current requests More... | |
std::pair < artdaq::Fragment::sequence_id_t, artdaq::Fragment::timestamp_t > | GetNextRequest () |
Get the "next" request, i.e. the first unsatisfied request that has not already been returned by GetNextRequest More... | |
void | RemoveRequest (artdaq::Fragment::sequence_id_t reqID) |
Remove the request with the given sequence ID from the request map More... | |
void | ClearRequests () |
Clear all requests from the map More... | |
std::map < artdaq::Fragment::sequence_id_t, artdaq::Fragment::timestamp_t > | GetAndClearRequests () |
Get the current requests, then clear the map More... | |
size_t | size () |
Get the number of requests currently stored in the RequestReceiver More... | |
bool | WaitForRequests (int timeout_ms) |
Wait for a new request message, up to the timeout given More... | |
std::chrono::steady_clock::time_point | GetRequestTime (artdaq::Fragment::sequence_id_t reqID) |
Get the time a given request was received More... | |
bool | isRunning () const |
void | setRunning (bool running) |
Definition at line 11 of file RequestBuffer.hh.
void artdaq::RequestBuffer::ClearRequests | ( | ) |
Clear all requests from the map
Definition at line 133 of file RequestBuffer.cc.
std::map< artdaq::Fragment::sequence_id_t, artdaq::Fragment::timestamp_t > artdaq::RequestBuffer::GetAndClearRequests | ( | ) |
Get the current requests, then clear the map
Definition at line 144 of file RequestBuffer.cc.
std::pair< artdaq::Fragment::sequence_id_t, artdaq::Fragment::timestamp_t > artdaq::RequestBuffer::GetNextRequest | ( | ) |
Get the "next" request, i.e. the first unsatisfied request that has not already been returned by GetNextRequest
This function uses last_next_request_ to ensure that it does not return the same request more than once
Definition at line 73 of file RequestBuffer.cc.
std::map< artdaq::Fragment::sequence_id_t, artdaq::Fragment::timestamp_t > artdaq::RequestBuffer::GetRequests | ( | ) | const |
Get the current requests
Definition at line 62 of file RequestBuffer.cc.
std::chrono::steady_clock::time_point artdaq::RequestBuffer::GetRequestTime | ( | artdaq::Fragment::sequence_id_t | reqID | ) |
Get the time a given request was received
reqID | Request ID of the request |
Definition at line 191 of file RequestBuffer.cc.
void artdaq::RequestBuffer::RemoveRequest | ( | artdaq::Fragment::sequence_id_t | reqID | ) |
Remove the request with the given sequence ID from the request map
reqID | Request ID to remove |
Definition at line 89 of file RequestBuffer.cc.
size_t artdaq::RequestBuffer::size | ( | ) |
Get the number of requests currently stored in the RequestReceiver
Definition at line 164 of file RequestBuffer.cc.
bool artdaq::RequestBuffer::WaitForRequests | ( | int | timeout_ms | ) |
Wait for a new request message, up to the timeout given
timeout_ms | Milliseconds to wait for a new request to arrive |
Definition at line 176 of file RequestBuffer.cc.