11 #include "runFairMQDevice.h"
13 namespace bpo = boost::program_options;
19 (
"in-channel", bpo::value<std::string>()->default_value(
"data1"),
"Name of the input channel")
20 (
"out-channel", bpo::value<std::string>()->default_value(
"data2"),
"Name of the output channel")
21 (
"data-format", bpo::value<std::string>()->default_value(
"binary"),
"Data format (binary|boost|flatbuffers|msgpack|protobuf|tmessage)");
25 FairMQDevicePtr
getDevice(
const FairMQProgOptions& config)
27 std::string dataFormat = config.GetValue<std::string>(
"data-format");
29 if (dataFormat ==
"binary") {
34 }
else if (dataFormat ==
"boost") {
36 void(boost::archive::binary_iarchive&,
37 const unsigned int)>::value
39 LOG(error) <<
"Boost serialization for Input Payload requested, but the input type does not support it. "
40 "Check the TIn parameter. Aborting.";
44 void(boost::archive::binary_oarchive&,
45 const unsigned int)>::value
47 LOG(error) <<
"Boost serialization for Output Payload requested, but the output type does not support it. "
48 "Check the TOut parameter. Aborting.";
53 boost::archive::binary_iarchive,
54 boost::archive::binary_oarchive>>;
55 }
else if (dataFormat ==
"tmessage") {
60 else if (dataFormat ==
"flatbuffers") {
63 TestDetectorFlat::DigiPayload,
64 TestDetectorFlat::HitPayload>>;
68 else if (dataFormat ==
"msgpack") {
74 else if (dataFormat ==
"protobuf") {
77 TestDetectorProto::DigiPayload,
78 TestDetectorProto::HitPayload>>;
83 <<
"No valid data format provided. (--data-format binary|boost|flatbuffers|msgpack|protobuf|tmessage). ";
void addCustomOptions(bpo::options_description &options)
FairMQDevicePtr getDevice(const FairMQProgOptions &config)