1 #ifndef artdaq_DAQrate_detail_RoutingPacket_hh
2 #define artdaq_DAQrate_detail_RoutingPacket_hh
4 #include "TRACE/tracemf.h"
5 #include "artdaq-core/Data/Fragment.hh"
12 struct RoutingPacketEntry;
20 struct RoutingConnectHeader;
50 return RoutingManagerMode::INVALID;
62 return "EventBuilding";
64 return "RequestBasedEventBuilding";
67 case RoutingManagerMode::INVALID:
70 return "Unknown Mode";
92 Fragment::sequence_id_t
sequence_id{Fragment::InvalidSequenceID};
99 #define ROUTING_MAGIC 0x1337beef
146 case RequestMode::Connect:
148 case RequestMode::Disconnect:
150 case RequestMode::Request:
152 case RequestMode::Invalid:
160 Fragment::sequence_id_t
sequence_id{artdaq::Fragment::InvalidSequenceID};
187 #define TOKEN_MAGIC 0xbeefcafe
201 #endif // artdaq_Application_Routing_RoutingPacket_hh
RequestMode mode
Mode of the request.
A row of the Routing Table.
static std::string RequestModeToString(RequestMode m)
Convert a RequestMode enumeration value to string.
Convert RoutingManagerMode to/from strings.
unsigned new_slots_free
The number of slots free in the token sender (usually 1)
RoutingManagerMode
Mode indicating whether the RoutingManager is routing events by Sequence ID or by Send Count...
The RoutingToken contains the magic bytes, the rank of the token sender, and the number of slots free...
RoutingPacketEntry(Fragment::sequence_id_t seq, int rank)
Construct a RoutingPacketEntry with the given sequence ID and destination rank.
Multiple sources sending to a single destination. RoutingManager pushes table updates to all senders...
std::vector< RoutingPacketEntry > RoutingPacket
A RoutingPacket is simply a vector of RoutingPacketEntry objects. It is not suitable for network tran...
int rank
The rank from which the RoutingToken came.
Fragment::sequence_id_t sequence_id
The sequence ID of the RoutingPacketEntry.
static RoutingManagerMode stringToRoutingManagerMode(std::string const &modeString)
Convert String to RoutingManagerMode.
Fragment::sequence_id_t sequence_id
The sequence ID being requested in Request mode.
RoutingRequest(int r, RequestMode m=RequestMode::Connect)
Create a request using the given rank and mode.
Multiple sources sending to a single destination. Table updates are triggered by senders requesting r...
RoutingRequest()
Default constructor.
unsigned run_number
The Run with which this token should be associated.
RequestMode
The mode of this request, whether Request or Connect/Disconnect control messages. ...
int32_t destination_rank
The destination rank for this sequence ID.
int32_t rank
The rank of the request sender.
static std::string routingManagerModeToString(RoutingManagerMode mode)
Convert RoutingManagerMode to string.
Represents a request sent to the RoutingManager for routing information.
One source sending to one destination (i.e. moving around completed events). Uses request-based routi...
uint32_t header
Magic bytes for identifying message type on wire.
RoutingPacketEntry()
Default Constructor.
RoutingRequest(int r, Fragment::sequence_id_t seq)
Create a RoutingRequest using the given rank and sequence ID.
uint32_t header
The magic bytes that help validate the RoutingToken.