Skip to content

Source · fairmq/devices/

runSink.cxxsource

fairmq/devices/runSink.cxx27 lines · C++GitHub ↗
1/********************************************************************************2 * Copyright (C) 2014-2021 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH  *3 *                                                                              *4 *              This software is distributed under the terms of the             *5 *              GNU Lesser General Public Licence (LGPL) version 3,             *6 *                  copied verbatim in the file "LICENSE"                       *7 ********************************************************************************/8 9#include <fairmq/devices/Sink.h>10#include <fairmq/runDevice.h>11 12namespace bpo = boost::program_options;13 14void addCustomOptions(bpo::options_description& options)15{16    options.add_options()17        ("in-channel", bpo::value<std::string>()->default_value("data"), "Name of the input channel")18        ("out-filename", bpo::value<std::string>()->default_value(""), "Write incoming message buffers to the specified file")19        ("max-file-size", bpo::value<uint64_t>()->default_value(2000000000), "Maximum file size for the file output (0 - unlimited)")20        ("max-iterations", bpo::value<uint64_t>()->default_value(0), "Number of run iterations (0 - infinite)")21        ("multipart", bpo::value<bool>()->default_value(false), "Handle multipart payloads");22}23 24std::unique_ptr<fair::mq::Device> getDevice(fair::mq::ProgOptions& /*config*/)25{26    return std::make_unique<fair::mq::Sink>();27}