DUNE-DAQ
DUNE Trigger and Data Acquisition software
Loading...
Searching...
No Matches
Receiver.hpp File Reference
#include "cetlib/BasicPluginFactory.h"
#include "cetlib/compiler_macros.h"
#include "ers/Issue.hpp"
#include "logging/Logging.hpp"
#include "nlohmann/json.hpp"
#include "opmonlib/MonitorableObject.hpp"
#include <atomic>
#include <memory>
#include <string>
#include <vector>
Include dependency graph for Receiver.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  dunedaq::ipm::Receiver
 
struct  dunedaq::ipm::Receiver::Response
 

Namespaces

namespace  dunedaq
 Including Qt Headers.
 
namespace  dunedaq::ipm
 An ERS Error indicating that an exception was thrown from ZMQ while performing an operation.
 

Macros

#define EXTERN_C_FUNC_DECLARE_START
 
#define DEFINE_DUNE_IPM_RECEIVER(klass)
 Declare the function that will be called by the plugin loader.
 

Functions

 dunedaq::ERS_DECLARE_ISSUE (ipm, UnexpectedNumberOfBytes, "Expected "<< bytes1<< " bytes in message but received "<< bytes2,((int) bytes1)((int) bytes2)) ERS_DECLARE_ISSUE(ipm
 
Unable to receive within timeout dunedaq::period (timeout period was " << timeout << " milliseconds)"
 
std::shared_ptr< Receiverdunedaq::ipm::make_ipm_receiver (std::string const &plugin_name)
 

Variables

 dunedaq::ReceiveTimeoutExpired
 

Detailed Description

Receiver Class Interface

Receiver defines the interface of objects which can receive messages between processes

Implementor of this interface is required to:

  • Implement the protected virtual receive_ function, called by public non-virtual receive
  • Implement the public virtual can_receive function
  • Implement the public virtual connect_for_receives function

And is encouraged to:

  • Meaningfully implement the timeout feature in receive_, and have it throw the ReceiveTimeoutExpired exception if it occurs

This is part of the DUNE DAQ Application Framework, copyright 2020. Licensing/copyright details are in the COPYING file that you should have received with this code.

Definition in file Receiver.hpp.

Macro Definition Documentation

◆ DEFINE_DUNE_IPM_RECEIVER

#define DEFINE_DUNE_IPM_RECEIVER ( klass)
Value:
EXTERN_C_FUNC_DECLARE_START \
std::shared_ptr<dunedaq::ipm::Receiver> make() { return std::shared_ptr<dunedaq::ipm::Receiver>(new klass()); } \
}

Declare the function that will be called by the plugin loader.

Parameters
klassClass to be defined as a DUNE IPM Receiver

Definition at line 64 of file Receiver.hpp.

64#define DEFINE_DUNE_IPM_RECEIVER(klass) \
65 EXTERN_C_FUNC_DECLARE_START \
66 std::shared_ptr<dunedaq::ipm::Receiver> make() { return std::shared_ptr<dunedaq::ipm::Receiver>(new klass()); } \
67 }

◆ EXTERN_C_FUNC_DECLARE_START

#define EXTERN_C_FUNC_DECLARE_START
Value:
extern "C" \
{

Definition at line 54 of file Receiver.hpp.

54#define EXTERN_C_FUNC_DECLARE_START \
55 extern "C" \
56 {