mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
builtin devices: Reorganize
This commit is contained in:
parent
58b440f9f5
commit
f067a076c9
|
@ -177,6 +177,12 @@ if(BUILD_FAIRMQ)
|
||||||
)
|
)
|
||||||
|
|
||||||
set(FAIRMQ_PRIVATE_HEADER_FILES
|
set(FAIRMQ_PRIVATE_HEADER_FILES
|
||||||
|
devices/BenchmarkSampler.h
|
||||||
|
devices/Merger.h
|
||||||
|
devices/Multiplier.h
|
||||||
|
devices/Proxy.h
|
||||||
|
devices/Sink.h
|
||||||
|
devices/Splitter.h
|
||||||
plugins/Builtin.h
|
plugins/Builtin.h
|
||||||
plugins/config/Config.h
|
plugins/config/Config.h
|
||||||
plugins/control/Control.h
|
plugins/control/Control.h
|
||||||
|
@ -246,7 +252,7 @@ if(BUILD_FAIRMQ)
|
||||||
# configure files #
|
# configure files #
|
||||||
###################
|
###################
|
||||||
set(FAIRMQ_BIN_DIR ${CMAKE_BINARY_DIR}/fairmq)
|
set(FAIRMQ_BIN_DIR ${CMAKE_BINARY_DIR}/fairmq)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/run/startMQBenchmark.sh.in ${CMAKE_CURRENT_BINARY_DIR}/startMQBenchmark.sh)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/devices/startMQBenchmark.sh.in ${CMAKE_CURRENT_BINARY_DIR}/startMQBenchmark.sh)
|
||||||
|
|
||||||
#################################
|
#################################
|
||||||
# define libFairMQ build target #
|
# define libFairMQ build target #
|
||||||
|
@ -350,22 +356,22 @@ if(BUILD_FAIRMQ)
|
||||||
###############
|
###############
|
||||||
# executables #
|
# executables #
|
||||||
###############
|
###############
|
||||||
add_executable(fairmq-bsampler run/runBenchmarkSampler.cxx)
|
add_executable(fairmq-bsampler devices/runBenchmarkSampler.cxx)
|
||||||
target_link_libraries(fairmq-bsampler FairMQ)
|
target_link_libraries(fairmq-bsampler FairMQ)
|
||||||
|
|
||||||
add_executable(fairmq-merger run/runMerger.cxx)
|
add_executable(fairmq-merger devices/runMerger.cxx)
|
||||||
target_link_libraries(fairmq-merger FairMQ)
|
target_link_libraries(fairmq-merger FairMQ)
|
||||||
|
|
||||||
add_executable(fairmq-multiplier run/runMultiplier.cxx)
|
add_executable(fairmq-multiplier devices/runMultiplier.cxx)
|
||||||
target_link_libraries(fairmq-multiplier FairMQ)
|
target_link_libraries(fairmq-multiplier FairMQ)
|
||||||
|
|
||||||
add_executable(fairmq-proxy run/runProxy.cxx)
|
add_executable(fairmq-proxy devices/runProxy.cxx)
|
||||||
target_link_libraries(fairmq-proxy FairMQ)
|
target_link_libraries(fairmq-proxy FairMQ)
|
||||||
|
|
||||||
add_executable(fairmq-sink run/runSink.cxx)
|
add_executable(fairmq-sink devices/runSink.cxx)
|
||||||
target_link_libraries(fairmq-sink FairMQ)
|
target_link_libraries(fairmq-sink FairMQ)
|
||||||
|
|
||||||
add_executable(fairmq-splitter run/runSplitter.cxx)
|
add_executable(fairmq-splitter devices/runSplitter.cxx)
|
||||||
target_link_libraries(fairmq-splitter FairMQ)
|
target_link_libraries(fairmq-splitter FairMQ)
|
||||||
|
|
||||||
add_executable(fairmq-shmmonitor shmem/Monitor.cxx shmem/Monitor.h shmem/runMonitor.cxx)
|
add_executable(fairmq-shmmonitor shmem/Monitor.cxx shmem/Monitor.h shmem/runMonitor.cxx)
|
||||||
|
|
|
@ -1,32 +1,35 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#ifndef FAIRMQBENCHMARKSAMPLER_H_
|
#ifndef FAIR_MQ_BENCHMARKSAMPLER_H
|
||||||
#define FAIRMQBENCHMARKSAMPLER_H_
|
#define FAIR_MQ_BENCHMARKSAMPLER_H
|
||||||
|
|
||||||
#include "FairMQLogger.h"
|
#include <fairmq/Device.h>
|
||||||
#include "FairMQDevice.h"
|
#include <fairmq/tools/RateLimit.h>
|
||||||
#include "fairmq/tools/RateLimit.h"
|
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <cstddef> // size_t
|
#include <cstddef> // size_t
|
||||||
#include <cstdint> // uint64_t
|
#include <cstdint> // uint64_t
|
||||||
#include <cstring> // memset
|
#include <cstring> // memset
|
||||||
|
#include <fairlogger/Logger.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
namespace fair::mq
|
||||||
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sampler to generate traffic for benchmarking.
|
* Sampler to generate traffic for benchmarking.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class FairMQBenchmarkSampler : public FairMQDevice
|
class BenchmarkSampler : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQBenchmarkSampler()
|
BenchmarkSampler()
|
||||||
: fMultipart(false)
|
: fMultipart(false)
|
||||||
, fMemSet(false)
|
, fMemSet(false)
|
||||||
, fNumParts(1)
|
, fNumParts(1)
|
||||||
|
@ -117,4 +120,6 @@ class FairMQBenchmarkSampler : public FairMQDevice
|
||||||
std::string fOutChannelName;
|
std::string fOutChannelName;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FAIRMQBENCHMARKSAMPLER_H_ */
|
} // namespace fair::mq
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_BENCHMARKSAMPLER_H */
|
|
@ -1,36 +1,32 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
/**
|
|
||||||
* FairMQMerger.h
|
|
||||||
*
|
|
||||||
* @since 2012-12-06
|
|
||||||
* @author D. Klein, A. Rybalchenko
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FAIRMQMERGER_H_
|
#ifndef FAIR_MQ_MERGER_H
|
||||||
#define FAIRMQMERGER_H_
|
#define FAIR_MQ_MERGER_H
|
||||||
|
|
||||||
#include "FairMQDevice.h"
|
#include <FairMQPoller.h>
|
||||||
#include "FairMQPoller.h"
|
#include <fairmq/Device.h>
|
||||||
#include "FairMQLogger.h"
|
|
||||||
|
|
||||||
|
#include <fairlogger/Logger.h>
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class FairMQMerger : public FairMQDevice
|
namespace fair::mq
|
||||||
|
{
|
||||||
|
|
||||||
|
class Merger : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQMerger()
|
Merger()
|
||||||
: fMultipart(true)
|
: fMultipart(true)
|
||||||
, fInChannelName("data-in")
|
, fInChannelName("data-in")
|
||||||
, fOutChannelName("data-out")
|
, fOutChannelName("data-out")
|
||||||
{}
|
{}
|
||||||
~FairMQMerger() {}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart;
|
bool fMultipart;
|
||||||
|
@ -112,4 +108,6 @@ class FairMQMerger : public FairMQDevice
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FAIRMQMERGER_H_ */
|
} // namespace fair::mq
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_MERGER_H */
|
|
@ -1,29 +1,31 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#ifndef FAIRMQMULTIPLIER_H_
|
#ifndef FAIR_MQ_MULTIPLIER_H
|
||||||
#define FAIRMQMULTIPLIER_H_
|
#define FAIR_MQ_MULTIPLIER_H
|
||||||
|
|
||||||
#include "FairMQDevice.h"
|
#include <fairmq/Device.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
class FairMQMultiplier : public FairMQDevice
|
namespace fair::mq
|
||||||
|
{
|
||||||
|
|
||||||
|
class Multiplier : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQMultiplier()
|
Multiplier()
|
||||||
: fMultipart(true)
|
: fMultipart(true)
|
||||||
, fNumOutputs(0)
|
, fNumOutputs(0)
|
||||||
, fInChannelName()
|
, fInChannelName()
|
||||||
, fOutChannelNames()
|
, fOutChannelNames()
|
||||||
{}
|
{}
|
||||||
~FairMQMultiplier() {}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart;
|
bool fMultipart;
|
||||||
|
@ -39,9 +41,9 @@ class FairMQMultiplier : public FairMQDevice
|
||||||
fNumOutputs = fChannels.at(fOutChannelNames.at(0)).size();
|
fNumOutputs = fChannels.at(fOutChannelNames.at(0)).size();
|
||||||
|
|
||||||
if (fMultipart) {
|
if (fMultipart) {
|
||||||
OnData(fInChannelName, &FairMQMultiplier::HandleMultipartData);
|
OnData(fInChannelName, &Multiplier::HandleMultipartData);
|
||||||
} else {
|
} else {
|
||||||
OnData(fInChannelName, &FairMQMultiplier::HandleSingleData);
|
OnData(fInChannelName, &Multiplier::HandleSingleData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -107,4 +109,6 @@ class FairMQMultiplier : public FairMQDevice
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FAIRMQMULTIPLIER_H_ */
|
} // namespace fair::mq
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_MULTIPLIER_H */
|
|
@ -1,33 +1,29 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
/**
|
|
||||||
* FairMQProxy.h
|
|
||||||
*
|
|
||||||
* @since 2013-10-02
|
|
||||||
* @author A. Rybalchenko
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FAIRMQPROXY_H_
|
#ifndef FAIR_MQ_PROXY_H
|
||||||
#define FAIRMQPROXY_H_
|
#define FAIR_MQ_PROXY_H
|
||||||
|
|
||||||
#include "FairMQDevice.h"
|
#include <fairmq/Device.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class FairMQProxy : public FairMQDevice
|
namespace fair::mq
|
||||||
|
{
|
||||||
|
|
||||||
|
class Proxy : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQProxy()
|
Proxy()
|
||||||
: fMultipart(true)
|
: fMultipart(true)
|
||||||
, fInChannelName()
|
, fInChannelName()
|
||||||
, fOutChannelName()
|
, fOutChannelName()
|
||||||
{}
|
{}
|
||||||
~FairMQProxy() {}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart;
|
bool fMultipart;
|
||||||
|
@ -73,4 +69,6 @@ class FairMQProxy : public FairMQDevice
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FAIRMQPROXY_H_ */
|
} // namespace fair::mq
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_PROXY_H */
|
|
@ -2,9 +2,9 @@
|
||||||
|
|
||||||
With FairMQ several generic devices are provided:
|
With FairMQ several generic devices are provided:
|
||||||
|
|
||||||
- **FairMQBenchmarkSampler**: generates random data of configurable size and at configurable rate and sends it out on an output channel.
|
- **BenchmarkSampler**: generates random data of configurable size and at configurable rate and sends it out on an output channel.
|
||||||
- **FairMQSink**: receives messages on the input channel and simply discards them.
|
- **Sink**: receives messages on the input channel and simply discards them.
|
||||||
- **FairMQMerger**: receives data from multiple input channels and forwards it to a single output channel.
|
- **Merger**: receives data from multiple input channels and forwards it to a single output channel.
|
||||||
- **FairMQSplitter**: receives messages on a single input channels and round-robins them among multiple output channels (which can have different socket types).
|
- **Splitter**: receives messages on a single input channels and round-robins them among multiple output channels (which can have different socket types).
|
||||||
- **FairMQMultiplier**: receives data from a single input channel and multiplies (copies) it to two or more output channels.
|
- **Multiplier**: receives data from a single input channel and multiplies (copies) it to two or more output channels.
|
||||||
- **FairMQProxy**: connects input channel to output channel, where both can have different socket types and multiple peers.
|
- **Proxy**: connects input channel to output channel, where both can have different socket types and multiple peers.
|
||||||
|
|
|
@ -1,33 +1,31 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
/**
|
|
||||||
* FairMQSink.h
|
|
||||||
*
|
|
||||||
* @since 2013-01-09
|
|
||||||
* @author D. Klein, A. Rybalchenko
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FAIRMQSINK_H_
|
#ifndef FAIR_MQ_SINK_H
|
||||||
#define FAIRMQSINK_H_
|
#define FAIR_MQ_SINK_H
|
||||||
|
|
||||||
#include "FairMQDevice.h"
|
#include <FairMQPoller.h>
|
||||||
#include "FairMQLogger.h"
|
#include <fairmq/Device.h>
|
||||||
#include <fairmq/tools/Strings.h>
|
#include <fairmq/tools/Strings.h>
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <string>
|
#include <fairlogger/Logger.h>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
#include <string>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
class FairMQSink : public FairMQDevice
|
namespace fair::mq
|
||||||
|
{
|
||||||
|
|
||||||
|
class Sink : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQSink()
|
Sink()
|
||||||
: fMultipart(false)
|
: fMultipart(false)
|
||||||
, fMaxIterations(0)
|
, fMaxIterations(0)
|
||||||
, fNumIterations(0)
|
, fNumIterations(0)
|
||||||
|
@ -37,8 +35,6 @@ class FairMQSink : public FairMQDevice
|
||||||
, fOutFilename()
|
, fOutFilename()
|
||||||
{}
|
{}
|
||||||
|
|
||||||
~FairMQSink() {}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart;
|
bool fMultipart;
|
||||||
uint64_t fMaxIterations;
|
uint64_t fMaxIterations;
|
||||||
|
@ -145,4 +141,6 @@ class FairMQSink : public FairMQDevice
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FAIRMQSINK_H_ */
|
} // namespace fair::mq
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_SINK_H */
|
|
@ -1,35 +1,31 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
/**
|
|
||||||
* FairMQSplitter.h
|
|
||||||
*
|
|
||||||
* @since 2012-12-06
|
|
||||||
* @author D. Klein, A. Rybalchenko
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef FAIRMQSPLITTER_H_
|
#ifndef FAIR_MQ_SPLITTER_H
|
||||||
#define FAIRMQSPLITTER_H_
|
#define FAIR_MQ_SPLITTER_H
|
||||||
|
|
||||||
#include "FairMQDevice.h"
|
#include <fairmq/Device.h>
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
class FairMQSplitter : public FairMQDevice
|
namespace fair::mq
|
||||||
|
{
|
||||||
|
|
||||||
|
class Splitter : public Device
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
FairMQSplitter()
|
Splitter()
|
||||||
: fMultipart(true)
|
: fMultipart(true)
|
||||||
, fNumOutputs(0)
|
, fNumOutputs(0)
|
||||||
, fDirection(0)
|
, fDirection(0)
|
||||||
, fInChannelName()
|
, fInChannelName()
|
||||||
, fOutChannelName()
|
, fOutChannelName()
|
||||||
{}
|
{}
|
||||||
~FairMQSplitter() {}
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool fMultipart;
|
bool fMultipart;
|
||||||
|
@ -47,9 +43,9 @@ class FairMQSplitter : public FairMQDevice
|
||||||
fDirection = 0;
|
fDirection = 0;
|
||||||
|
|
||||||
if (fMultipart) {
|
if (fMultipart) {
|
||||||
OnData(fInChannelName, &FairMQSplitter::HandleData<FairMQParts>);
|
OnData(fInChannelName, &Splitter::HandleData<FairMQParts>);
|
||||||
} else {
|
} else {
|
||||||
OnData(fInChannelName, &FairMQSplitter::HandleData<FairMQMessagePtr>);
|
OnData(fInChannelName, &Splitter::HandleData<FairMQMessagePtr>);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,4 +62,6 @@ class FairMQSplitter : public FairMQDevice
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* FAIRMQSPLITTER_H_ */
|
} // namespace fair::mq
|
||||||
|
|
||||||
|
#endif /* FAIR_MQ_SPLITTER_H */
|
|
@ -1,13 +1,13 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014-2018 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include <runFairMQDevice.h>
|
#include <fairmq/devices/BenchmarkSampler.h>
|
||||||
#include <fairmq/devices/FairMQBenchmarkSampler.h>
|
#include <fairmq/runDevice.h>
|
||||||
|
|
||||||
namespace bpo = boost::program_options;
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
@ -24,7 +24,7 @@ void addCustomOptions(bpo::options_description& options)
|
||||||
("msg-rate", bpo::value<float>()->default_value(0), "Msg rate limit in maximum number of messages per second");
|
("msg-rate", bpo::value<float>()->default_value(0), "Msg rate limit in maximum number of messages per second");
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const fair::mq::ProgOptions& /* config */)
|
std::unique_ptr<fair::mq::Device> getDevice(const fair::mq::ProgOptions& /* config */)
|
||||||
{
|
{
|
||||||
return new FairMQBenchmarkSampler();
|
return std::make_unique<fair::mq::BenchmarkSampler>();
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include <runFairMQDevice.h>
|
#include <fairmq/devices/Merger.h>
|
||||||
#include <fairmq/devices/FairMQMerger.h>
|
#include <fairmq/runDevice.h>
|
||||||
|
|
||||||
namespace bpo = boost::program_options;
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ void addCustomOptions(bpo::options_description& options)
|
||||||
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const fair::mq::ProgOptions& /*config*/)
|
std::unique_ptr<fair::mq::Device> getDevice(const fair::mq::ProgOptions& /*config*/)
|
||||||
{
|
{
|
||||||
return new FairMQMerger();
|
return std::make_unique<fair::mq::Merger>();
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include <runFairMQDevice.h>
|
#include <fairmq/devices/Multiplier.h>
|
||||||
#include <fairmq/devices/FairMQMultiplier.h>
|
#include <fairmq/runDevice.h>
|
||||||
|
|
||||||
namespace bpo = boost::program_options;
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ void addCustomOptions(bpo::options_description& options)
|
||||||
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const fair::mq::ProgOptions& /*config*/)
|
std::unique_ptr<fair::mq::Device> getDevice(const fair::mq::ProgOptions& /*config*/)
|
||||||
{
|
{
|
||||||
return new FairMQMultiplier();
|
return std::make_unique<fair::mq::Multiplier>();
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include <runFairMQDevice.h>
|
#include <fairmq/devices/Proxy.h>
|
||||||
#include <fairmq/devices/FairMQProxy.h>
|
#include <fairmq/runDevice.h>
|
||||||
|
|
||||||
namespace bpo = boost::program_options;
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ void addCustomOptions(bpo::options_description& options)
|
||||||
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const fair::mq::ProgOptions& /*config*/)
|
std::unique_ptr<fair::mq::Device> getDevice(const fair::mq::ProgOptions& /*config*/)
|
||||||
{
|
{
|
||||||
return new FairMQProxy();
|
return std::make_unique<fair::mq::Proxy>();
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include <runFairMQDevice.h>
|
#include <fairmq/devices/Sink.h>
|
||||||
#include <fairmq/devices/FairMQSink.h>
|
#include <fairmq/runDevice.h>
|
||||||
|
|
||||||
namespace bpo = boost::program_options;
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ void addCustomOptions(bpo::options_description& options)
|
||||||
("multipart", bpo::value<bool>()->default_value(false), "Handle multipart payloads");
|
("multipart", bpo::value<bool>()->default_value(false), "Handle multipart payloads");
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const fair::mq::ProgOptions& /*config*/)
|
std::unique_ptr<fair::mq::Device> getDevice(const fair::mq::ProgOptions& /*config*/)
|
||||||
{
|
{
|
||||||
return new FairMQSink();
|
return std::make_unique<fair::mq::Sink>();
|
||||||
}
|
}
|
|
@ -1,13 +1,13 @@
|
||||||
/********************************************************************************
|
/********************************************************************************
|
||||||
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
* Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
|
||||||
* *
|
* *
|
||||||
* This software is distributed under the terms of the *
|
* This software is distributed under the terms of the *
|
||||||
* GNU Lesser General Public Licence (LGPL) version 3, *
|
* GNU Lesser General Public Licence (LGPL) version 3, *
|
||||||
* copied verbatim in the file "LICENSE" *
|
* copied verbatim in the file "LICENSE" *
|
||||||
********************************************************************************/
|
********************************************************************************/
|
||||||
|
|
||||||
#include <runFairMQDevice.h>
|
#include <fairmq/devices/Splitter.h>
|
||||||
#include <fairmq/devices/FairMQSplitter.h>
|
#include <fairmq/runDevice.h>
|
||||||
|
|
||||||
namespace bpo = boost::program_options;
|
namespace bpo = boost::program_options;
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ void addCustomOptions(bpo::options_description& options)
|
||||||
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
("multipart", bpo::value<bool>()->default_value(true), "Handle multipart payloads");
|
||||||
}
|
}
|
||||||
|
|
||||||
FairMQDevicePtr getDevice(const fair::mq::ProgOptions& /*config*/)
|
std::unique_ptr<fair::mq::Device> getDevice(const fair::mq::ProgOptions& /*config*/)
|
||||||
{
|
{
|
||||||
return new FairMQSplitter();
|
return std::make_unique<fair::mq::Splitter>();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user