1 #ifndef artdaq_DAQrate_detail_RequestMessage_hh
2 #define artdaq_DAQrate_detail_RequestMessage_hh
4 #include "artdaq-core/Data/Fragment.hh"
5 #define MAX_REQUEST_MESSAGE_SIZE 65000
72 RequestPacket(
const Fragment::sequence_id_t& seq,
const Fragment::timestamp_t& ts)
125 std::vector<uint8_t> GetMessage()
129 assert(
size < MAX_REQUEST_MESSAGE_SIZE);
130 auto output = std::vector<uint8_t>(
size);
150 size_t size()
const {
return packets_.size(); }
157 void addRequest(
const Fragment::sequence_id_t& seq,
const Fragment::timestamp_t& time)
164 std::vector<RequestPacket> packets_;
167 #endif // artdaq_DAQrate_detail_RequestMessage
End of Run mode (Used to end request processing on receiver)
void addRequest(const Fragment::sequence_id_t &seq, const Fragment::timestamp_t &time)
Add a request for a sequence ID and timestamp combination.
Fragment::timestamp_t timestamp
The timestamp of the request.
A RequestMessage consists of a RequestHeader and zero or more RequestPackets. They will usually be se...
RequestPacket()
Default Constructor.
void setMode(RequestMessageMode mode)
Set the Request Message Mode for this request.
The RequestPacket contains information about a single data request.
RequestMessageMode
Mode used to indicate current run conditions to the request receiver.
size_t size() const
Get the number of RequestPackets in the RequestMessage.
bool isValid() const
Check the magic bytes of the packet.
RequestMessage()
Default Constructor.
RequestPacket(const Fragment::sequence_id_t &seq, const Fragment::timestamp_t &ts)
Create a RequestPacket using the given sequence ID and timestmap.
Fragment::sequence_id_t sequence_id
The sequence ID that responses to this request should use.