1 #ifndef artdaq_TransferPlugins_ShmemTransfer_hh
2 #define artdaq_TransferPlugins_ShmemTransfer_hh
4 #include "fhiclcpp/fwd.h"
6 #include "artdaq-core/Core/SharedMemoryFragmentManager.hh"
7 #include "artdaq/TransferPlugins/TransferInterface.hh"
44 size_t receiveTimeout)
override;
96 size_t send_timeout_usec,
bool reliable =
false);
98 std::unique_ptr<SharedMemoryFragmentManager> shm_manager_;
102 #endif // artdaq_TransferPlugins/ShmemTransfer_hh
CopyStatus transfer_fragment_reliable_mode(Fragment &&fragment) override
Transfer a Fragment to the destination. This should be reliable, if the underlying transport mechanis...
Role role() const
Get the TransferInterface::Role of this TransferInterface.
CopyStatus transfer_fragment_min_blocking_mode(Fragment const &fragment, size_t send_timeout_usec) override
Transfer a Fragment to the destination. May not necessarily be reliable, but will not block longer th...
int receiveFragmentHeader(detail::RawFragmentHeader &header, size_t receiveTimeout) override
Receive a Fragment Header from the transport mechanism.
void flush_buffers() override
Flush any in-flight data. This should be used by the receiver after the receive loop has ended...
ShmemTransfer(fhicl::ParameterSet const &pset, Role role)
ShmemTransfer Constructor.
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.
int receiveFragmentData(RawDataType *destination, size_t word_count) override
Receive the body of a Fragment to the given destination pointer.