1 #ifndef artdaq_TransferPlugins_ShmemTransfer_hh
2 #define artdaq_TransferPlugins_ShmemTransfer_hh
4 #include "fhiclcpp/fwd.h"
6 #include "artdaq/TransferPlugins/TransferInterface.hh"
7 #include "artdaq-core/Core/SharedMemoryFragmentManager.hh"
46 size_t receiveTimeout)
override;
86 size_t send_timeout_usec,
bool reliable =
false);
88 std::unique_ptr<SharedMemoryFragmentManager> shm_manager_;
93 #endif // artdaq_TransferPlugins/ShmemTransfer_hh
Role role() const
Get the TransferInterface::Role of this TransferInterface.
CopyStatus copyFragment(Fragment &fragment, size_t send_timeout_usec) override
Copy a Fragment to the destination. May be unreliable.
int receiveFragmentHeader(detail::RawFragmentHeader &header, size_t receiveTimeout) override
Receive a Fragment Header from the transport mechanism.
ShmemTransfer(fhicl::ParameterSet const &pset, Role role)
ShmemTransfer Constructor.
CopyStatus moveFragment(Fragment &&fragment) override
Move a Fragment to the destination.
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.
bool isRunning() override
Determine whether the TransferInterface plugin is able to send/receive data.
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.