FairMQ  1.3.8
C++ Message Passing Framework
FairMQSuboptParser.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public License (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 
13 
14 #ifndef FAIRMQPARSER_SUBOPT_H
15 #define FAIRMQPARSER_SUBOPT_H
16 
17 #include "FairMQParser.h" // for FairMQChannelMap
18 #include <boost/program_options.hpp>
19 #include <cstring>
20 #include <vector>
21 #include <string>
22 
23 namespace fair
24 {
25 namespace mq
26 {
27 namespace parser
28 {
29 
46 struct SUBOPT
47 {
48  enum channelOptionKeyIds
49  {
50  NAME = 0, // name of the channel
51  TYPE, // push, pull, publish, subscribe, etc
52  METHOD, // bind or connect
53  ADDRESS, // host, protocol and port address
54  TRANSPORT, //
55  SNDBUFSIZE, // size of the send queue
56  RCVBUFSIZE, // size of the receive queue
57  SNDKERNELSIZE,
58  RCVKERNELSIZE,
59  LINGER,
60  RATELOGGING, // logging rate
61  PORTRANGEMIN,
62  PORTRANGEMAX,
63  AUTOBIND,
64  NUMSOCKETS,
65  lastsocketkey
66  };
67 
68  constexpr static const char *channelOptionKeys[] = {
69  /*[NAME] = */ "name",
70  /*[TYPE] = */ "type",
71  /*[METHOD] = */ "method",
72  /*[ADDRESS] = */ "address",
73  /*[TRANSPORT] = */ "transport",
74  /*[SNDBUFSIZE] = */ "sndBufSize",
75  /*[RCVBUFSIZE] = */ "rcvBufSize",
76  /*[SNDKERNELSIZE] = */ "sndKernelSize",
77  /*[RCVKERNELSIZE] = */ "rcvKernelSize",
78  /*[LINGER] = */ "linger",
79  /*[RATELOGGING] = */ "rateLogging",
80  /*[PORTRANGEMIN] = */ "portRangeMin",
81  /*[PORTRANGEMAX] = */ "portRangeMax",
82  /*[AUTOBIND] = */ "autoBind",
83  /*[NUMSOCKETS] = */ "numSockets",
84  nullptr
85  };
86 
87  FairMQChannelMap UserParser(const std::vector<std::string>& channelConfig, const std::string& deviceId, const std::string& rootNode = "fairMQOptions");
88 };
89 
90 }
91 }
92 }
93 
94 #endif /* FAIRMQPARSER_SUBOPT_H */
Definition: FairMQSuboptParser.h:46
Tools for interfacing containers to the transport via polymorphic allocators.
Definition: DeviceRunner.h:23

privacy