artdaq
v2_03_00
|
MulticastTransfer is a TransferInterface implementation plugin that transfers data using Multicast. More...
Public Types | |
using | byte_t = artdaq::Fragment::byte_t |
Copy Fragment::byte_t into local scope. | |
![]() | |
enum | Role { Role::kSend, Role::kReceive } |
Used to determine if a TransferInterface is a Sender or Receiver. More... | |
enum | CopyStatus { CopyStatus::kSuccess, CopyStatus::kTimeout, CopyStatus::kErrorNotRequiringException } |
Returned from the send functions, this enumeration describes the possible return codes. If an exception occurs, it will be thrown and should be handled normally. More... | |
Public Member Functions | |
virtual | ~MulticastTransfer ()=default |
Default destructor. | |
MulticastTransfer (fhicl::ParameterSet const &ps, Role role) | |
MulticastTransfer Constructor. More... | |
int | receiveFragment (artdaq::Fragment &fragment, size_t receiveTimeout) override |
Receive a Fragment using Multicast. More... | |
CopyStatus | copyFragment (artdaq::Fragment &fragment, size_t send_timeout_usec=std::numeric_limits< size_t >::max()) override |
Copy a Fragment to the destination. Multicast is always unreliable. More... | |
CopyStatus | moveFragment (artdaq::Fragment &&fragment, size_t send_timeout_usec=std::numeric_limits< size_t >::max()) override |
Move a Fragment to the destination. Multicast is always unreliable. More... | |
![]() | |
TransferInterface (const fhicl::ParameterSet &ps, Role role) | |
TransferInterface Constructor. More... | |
TransferInterface (const TransferInterface &)=delete | |
Copy Constructor is deleted. | |
TransferInterface & | operator= (const TransferInterface &)=delete |
Copy Assignment operator is deleted. More... | |
virtual | ~TransferInterface ()=default |
Default virtual Destructor. | |
std::string | uniqueLabel () const |
Get the unique label of this TransferInterface instance. More... | |
virtual int | source_rank () const |
Get the source rank for this TransferInterface instance. More... | |
virtual int | destination_rank () const |
Get the destination rank for this TransferInterface instance. More... | |
Additional Inherited Members | |
![]() | |
static const int | RECV_TIMEOUT = 0xfedcba98 |
Value to be returned upon receive timeout. Because receivers otherwise return rank, this is also the limit on the number of ranks that artdaq currently supports. | |
![]() | |
Role | role () const |
Get the TransferInterface::Role of this TransferInterface. More... | |
![]() | |
size_t | buffer_count_ |
The number of Fragment transfers the TransferInterface can handle simultaneously. | |
const size_t | max_fragment_size_words_ |
The maximum size of the transferred Fragment objects, in artdaq::Fragment::RawDataType words. | |
MulticastTransfer is a TransferInterface implementation plugin that transfers data using Multicast.
Definition at line 27 of file Multicast_transfer.cc.
artdaq::MulticastTransfer::MulticastTransfer | ( | fhicl::ParameterSet const & | ps, |
Role | role | ||
) |
MulticastTransfer Constructor.
ps | ParameterSet used to configure MulticastTransfer |
role | Role of this MulticastTransfer instance (kSend or kReceive) |
* MulticastTransfer accepts the following Parameters: * "subfragment_size" (REQUIRED): Size of the sub-Fragments * "subfragments_per_send" (REQUIRED): How many sub-Fragments to send in each batch * "pause_on_copy_usecs" (Default: 0): Pause after sending a batch of sub-Fragments for this many microseconds * "multicast_port" (REQUIRED): Port number to connect to * "multicast_address" (REQUIRED): Multicast address to send to/receive from * "local_address" (REQUIRED): Local origination address for multicast * "receive_buffer_size" (Default: 0): The UDP receive buffer size. 0 uses automatic size. *
MulticastTransfer also requires all Parameters for configuring a TransferInterface
Definition at line 138 of file Multicast_transfer.cc.
|
overridevirtual |
Copy a Fragment to the destination. Multicast is always unreliable.
fragment | Fragment to copy |
send_timeout_usec | Timeout for send, in microseconds |
Implements artdaq::TransferInterface.
Definition at line 369 of file Multicast_transfer.cc.
|
overridevirtual |
Move a Fragment to the destination. Multicast is always unreliable.
fragment | Fragment to move |
send_timeout_usec | Timeout for send, in microseconds |
Implements artdaq::TransferInterface.
Definition at line 363 of file Multicast_transfer.cc.
|
overridevirtual |
Receive a Fragment using Multicast.
[out] | fragment | Received Fragment |
receiveTimeout | Timeout for receive, in microseconds |
Implements artdaq::TransferInterface.
Definition at line 221 of file Multicast_transfer.cc.