$treeview $search $mathjax $extrastylesheet
artdaq
v3_04_01
$projectbrief
|
$projectbrief
|
$searchbox |
TransferInterface implementation plugin that sends data using TCP sockets. More...
#include <artdaq/TransferPlugins/TCPSocketTransfer.hh>
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 | transfer_fragment_min_blocking_mode (Fragment const &frag, size_t timeout_usec) override |
Transfer a Fragment to the destination. May not necessarily be reliable, but will not block longer than send_timeout_usec. | |
CopyStatus | transfer_fragment_reliable_mode (Fragment &&frag) override |
Transfer a Fragment to the destination. This should be reliable, if the underlying transport mechanism supports reliable sending. | |
bool | isRunning () override |
Determine whether the TransferInterface plugin is able to send/receive data. | |
void | flush_buffers () override |
Flush any in-flight data. This should be used by the receiver after the receive loop has ended. |
TransferInterface implementation plugin that sends data using TCP sockets.
Definition at line 40 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 * "send_retry_timeout_us" (Default: 1000000): Microseconds between send retries (infinite retries for moveFragment, up to send_timeout_us for copyFragment) * "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 41 of file TCPSocket_transfer.cc.
bool artdaq::TCPSocketTransfer::isRunning | ( | ) | [override, virtual] |
Determine whether the TransferInterface plugin is able to send/receive data.
Reimplemented from artdaq::TransferInterface.
Definition at line 571 of file TCPSocket_transfer.cc.
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 381 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 122 of file TCPSocket_transfer.cc.
CopyStatus artdaq::TCPSocketTransfer::transfer_fragment_min_blocking_mode | ( | Fragment const & | frag, | |
size_t | timeout_usec | |||
) | [inline, override] |
Transfer a Fragment to the destination. May not necessarily be reliable, but will not block longer than send_timeout_usec.
frag | Fragment to transfer | |
timeout_usec | Timeout for send, in microseconds |
Definition at line 87 of file TCPSocketTransfer.hh.
CopyStatus artdaq::TCPSocketTransfer::transfer_fragment_reliable_mode | ( | Fragment && | frag | ) | [inline, override] |
Transfer a Fragment to the destination. This should be reliable, if the underlying transport mechanism supports reliable sending.
frag | Fragment to transfer |
Definition at line 94 of file TCPSocketTransfer.hh.