artdaq  v3_12_02
artdaq::detail::RequestMessage Class Reference

A RequestMessage consists of a RequestHeader and zero or more RequestPackets. They will usually be sent in two calls to send() More...

#include <artdaq/DAQrate/detail/RequestMessage.hh>

Public Member Functions

 RequestMessage ()
 Default Constructor.
 
std::vector< uint8_t > GetMessage ()
 Get the contents of the RequestMessage. More...
 
void setMode (RequestMessageMode mode)
 Set the Request Message Mode for this request. More...
 
void setRank (int rank)
 Set the rank in the header for this request. This will be the rank from which the request originates. More...
 
void setRunNumber (int run)
 Set the run number in the header for this request. This will be the Run for which the request is valid. More...
 
size_t size () const
 Get the number of RequestPackets in the RequestMessage. More...
 
void addRequest (const Fragment::sequence_id_t &seq, const Fragment::timestamp_t &time)
 Add a request for a sequence ID and timestamp combination. More...
 

Static Public Member Functions

static size_t max_request_count ()
 Get the maximum number of requests that can be sent in a single RequestMessage. More...
 

Detailed Description

A RequestMessage consists of a RequestHeader and zero or more RequestPackets. They will usually be sent in two calls to send()

Definition at line 106 of file RequestMessage.hh.

Member Function Documentation

void artdaq::detail::RequestMessage::addRequest ( const Fragment::sequence_id_t &  seq,
const Fragment::timestamp_t &  time 
)
inline

Add a request for a sequence ID and timestamp combination.

Parameters
seqSequence ID to request
timeTimestamp of request

Definition at line 172 of file RequestMessage.hh.

std::vector<uint8_t> artdaq::detail::RequestMessage::GetMessage ( )
inline

Get the contents of the RequestMessage.

Returns
Vector of bytes corresponding to the full RequestMessage (may span multiple packets)

Definition at line 121 of file RequestMessage.hh.

static size_t artdaq::detail::RequestMessage::max_request_count ( )
inlinestatic

Get the maximum number of requests that can be sent in a single RequestMessage.

Returns
The maximum number of reqeusts that fit in a single UDP datagram

Definition at line 181 of file RequestMessage.hh.

void artdaq::detail::RequestMessage::setMode ( RequestMessageMode  mode)
inline

Set the Request Message Mode for this request.

Parameters
modeMode for this Request Message

Definition at line 137 of file RequestMessage.hh.

void artdaq::detail::RequestMessage::setRank ( int  rank)
inline

Set the rank in the header for this request. This will be the rank from which the request originates.

Parameters
rankRank for this Request Message

Definition at line 146 of file RequestMessage.hh.

void artdaq::detail::RequestMessage::setRunNumber ( int  run)
inline

Set the run number in the header for this request. This will be the Run for which the request is valid.

Parameters
runRun number for this Request Message

Definition at line 156 of file RequestMessage.hh.

size_t artdaq::detail::RequestMessage::size ( ) const
inline

Get the number of RequestPackets in the RequestMessage.

Returns
The number of RequestPackets in the RequestMessage

Definition at line 165 of file RequestMessage.hh.


The documentation for this class was generated from the following file: