1 #ifndef artdaq_TransferPlugins_ShmemTransfer_hh
2 #define artdaq_TransferPlugins_ShemmTransfer_hh
4 #include "fhiclcpp/fwd.h"
6 #include "artdaq/TransferPlugins/TransferInterface.hh"
7 #include "artdaq-core/Core/SharedMemoryFragmentManager.hh"
43 size_t receiveTimeout)
override;
68 size_t send_timeout_usec = std::numeric_limits<size_t>::max())
override;
77 size_t send_timeout_usec = std::numeric_limits<size_t>::max())
override;
81 size_t send_timeout_usec,
bool reliable =
false);
83 size_t send_timeout_usec_;
84 std::unique_ptr<SharedMemoryFragmentManager> shm_manager_;
90 #endif // artdaq_TransferPlugins/ShmemTransfer_hh
Role role() const
Get the TransferInterface::Role of this TransferInterface.
CopyStatus moveFragment(Fragment &&fragment, size_t send_timeout_usec=std::numeric_limits< size_t >::max()) override
Move a Fragment to the destination.
int receiveFragmentHeader(detail::RawFragmentHeader &header, size_t receiveTimeout) override
Receive a Fragment Header from the transport mechanism.
CopyStatus copyFragment(Fragment &fragment, size_t send_timeout_usec=std::numeric_limits< size_t >::max()) override
Copy a Fragment to the destination. May be unreliable.
ShmemTransfer(fhicl::ParameterSet const &pset, Role role)
ShmemTransfer Constructor.
int receiveFragmentData(RawDataType *destination, size_t wordCount) override
Receive the body of a Fragment to the given destination pointer.
virtual ~ShmemTransfer() noexcept
ShmemTransfer Destructor.
Role
Used to determine if a TransferInterface is a Sender or Receiver.
A TransferInterface implementation plugin that transfers data using Shared Memory.
This interface defines the functions used to transfer data between artdaq applications.
int receiveFragment(Fragment &fragment, size_t receiveTimeout) override
Receive a Fragment from Shared Memory.
CopyStatus
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.