mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 17:41:45 +00:00
Add config plugin class.
This commit is contained in:
committed by
Dennis Klein
parent
bf8ec968e7
commit
cba6d19781
@@ -11,7 +11,7 @@
|
||||
|
||||
#include <FairMQDevice.h>
|
||||
#include <FairMQLogger.h>
|
||||
#include <options/FairMQProgOptions.h>
|
||||
#include <fairmq/ProgOptions.h>
|
||||
#include <thread>
|
||||
|
||||
namespace fair
|
||||
@@ -33,7 +33,7 @@ class PollIn : public FairMQDevice
|
||||
protected:
|
||||
auto InitTask() -> void override
|
||||
{
|
||||
fPollType = fConfig->GetValue<int>("poll-type");
|
||||
fPollType = fConfig->GetProperty<int>("poll-type");
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||
}
|
||||
|
||||
|
@@ -36,12 +36,12 @@ auto addCustomOptions(bpo::options_description& options) -> void
|
||||
("poll-type", bpo::value<int>()->default_value(0), "Poll type switch(0 - vector of (sub-)channels, 1 - vector of channel names)");
|
||||
}
|
||||
|
||||
auto getDevice(const FairMQProgOptions& config) -> FairMQDevicePtr
|
||||
auto getDevice(const fair::mq::ProgOptions& config) -> FairMQDevicePtr
|
||||
{
|
||||
using namespace std;
|
||||
using namespace fair::mq::test;
|
||||
|
||||
auto id = config.GetValue<std::string>("id");
|
||||
auto id = config.GetProperty<std::string>("id");
|
||||
|
||||
if (0 == id.find("pull_")) {
|
||||
return new Pull;
|
||||
|
Reference in New Issue
Block a user