TransferInterface implementation plugin that sends data using TCP sockets. More...
#include <artdaq/TransferPlugins/TCPSocketTransfer.hh>
Classes | |
struct | DestinationInfo |
Public Member Functions | |
TCPSocketTransfer (fhicl::ParameterSet const &ps, Role role) | |
TCPSocketTransfer Constructor. | |
int | receiveFragmentHeader (detail::RawFragmentHeader &header, size_t receiveTimeout) override |
Receive a Fragment Header from the transport mechanism. | |
int | receiveFragmentData (RawDataType *destination, size_t wordCount) override |
Receive the body of a Fragment to the given destination pointer. | |
CopyStatus | copyFragment (Fragment &frag, size_t timeout_usec) override |
Copy a Fragment to the destination. Same implementation as moveFragment, as TCP is always reliable. | |
CopyStatus | moveFragment (Fragment &&frag, size_t timeout_usec) override |
Move a Fragment to the destination. |
TransferInterface implementation plugin that sends data using TCP sockets.
Definition at line 34 of file TCPSocketTransfer.hh.
artdaq::TCPSocketTransfer::TCPSocketTransfer | ( | fhicl::ParameterSet const & | ps, | |
TransferInterface::Role | role | |||
) |
TCPSocketTransfer Constructor.
ps | ParameterSet used to configure TCPSocketTransfer | |
role | Role of this TCPSocketTransfer instance (kSend or kReceive) |
* TCPSocketTransfer accepts the following Parameters: * "tcp_receive_buffer_size" (Default: 0): The TCP buffer size on the receive socket * "host_map" (REQUIRED): List of FHiCL tables containing information about other hosts in the system. * Each table should contain: * "rank" (Default: RECV_TIMEOUT): Rank of this host * "host" (Default: "localhost"): Hostname of this host * "portOffset" (Default: 5500): To avoid collisions, each destination should specify its own port offset. * All TCPSocketTransfers sending to that destination will add their own rank to make a unique port number. *
TCPSocketTransfer also requires all Parameters for configuring a TransferInterface
Definition at line 35 of file TCPSocket_transfer.cc.
CopyStatus artdaq::TCPSocketTransfer::copyFragment | ( | Fragment & | frag, | |
size_t | timeout_usec | |||
) | [inline, override] |
Copy a Fragment to the destination. Same implementation as moveFragment, as TCP is always reliable.
frag | Fragment to copy | |
timeout_usec | Timeout for send, in microseconds |
Definition at line 80 of file TCPSocketTransfer.hh.
CopyStatus artdaq::TCPSocketTransfer::moveFragment | ( | Fragment && | frag, | |
size_t | timeout_usec | |||
) | [inline, override] |
Move a Fragment to the destination.
frag | Fragment to move | |
timeout_usec | Timeout for send, in microseconds |
Definition at line 88 of file TCPSocketTransfer.hh.
int artdaq::TCPSocketTransfer::receiveFragmentData | ( | RawDataType * | destination, | |
size_t | wordCount | |||
) | [override, virtual] |
Receive the body of a Fragment to the given destination pointer.
destination | Pointer to memory region where Fragment data should be stored | |
wordCount | Number of RawDataType words to receive |
Implements artdaq::TransferInterface.
Definition at line 218 of file TCPSocket_transfer.cc.
int artdaq::TCPSocketTransfer::receiveFragmentHeader | ( | detail::RawFragmentHeader & | header, | |
size_t | receiveTimeout | |||
) | [override, virtual] |
Receive a Fragment Header from the transport mechanism.
[out] | header | Received Fragment Header |
receiveTimeout | Timeout for receive |
Implements artdaq::TransferInterface.
Definition at line 104 of file TCPSocket_transfer.cc.