Robot Raconteur Core C++ Library
NodeSetup.h
Go to the documentation of this file.
1 
24 #ifndef SWIG
30 
31 #include <boost/assign/list_of.hpp>
32 #include <boost/program_options.hpp>
33 
34 #endif
35 
36 #pragma once
37 
38 namespace RobotRaconteur
39 {
40 
61 {
96 
105 
110 
115 
120 
123 
126  /*RobotRaconteurNodeSetupFlags_ENABLE_LOCAL_TRANSPORT
127  | RobotRaconteurNodeSetupFlags_ENABLE_TCP_TRANSPORT
128  | RobotRaconteurNodeSetupFlags_ENABLE_HARDWARE_TRANSPORT,
129  | RobotRaconteurNodeSetupFlags_ENABLE_INTRA_TRANSPORT*/
130 
133  /*RobotRaconteurNodeSetupFlags_ENABLE_TCP_TRANSPORT
134  | RobotRaconteurNodeSetupFlags_ENABLE_LOCAL_TRANSPORT
135  | RobotRaconteurNodeSetupFlags_ENABLE_INTRA_TRANSPORT
136  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING
137  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY
138  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_CLIENT,*/
139 
140  RobotRaconteurNodeSetupFlags_CLIENT_DEFAULT_ALLOWED_OVERRIDE = 0x7D33E5D,
141  /*RobotRaconteurNodeSetupFlags_ENABLE_ALL_TRANSPORTS
142  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING
143  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY
144  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV4_DISCOVERY
145  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_CLIENT
146  | RobotRaconteurNodeSetupFlags_DISABLE_MESSAGE4
147  | RobotRaconteurNodeSetupFlags_DISABLE_STRINGTABLE
148  | RobotRaconteurNodeSetupFlags_DISABLE_TIMEOUTS
149  | RobotRaconteurNodeSetupFlags_LOAD_TLS_CERT
150  | RobotRaconteurNodeSetupFlags_REQUIRE_TLS
151  | RobotRaconteurNodeSetupFlags_NODENAME_OVERRIDE,
152  | RobotRaconteurNodeSetupFlags_NODEID_OVERRIDE
153  | RobotRaconteurNodeSetupFlags_JUMBO_MESSAGE */
154 
157  /*RobotRaconteurNodeSetupFlags_ENABLE_TCP_TRANSPORT
158  | RobotRaconteurNodeSetupFlags_ENABLE_LOCAL_TRANSPORT
159  | RobotRaconteurNodeSetupFlags_ENABLE_INTRA_TRANSPORT
160  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_SERVER
161  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER
162  | RobotRaconteurNodeSetupFlags_INTRA_TRANSPORT_START_SERVER
163  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_ANNOUNCE
164  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING,
165  | RobotRaconteurNodeSetupFlags_DISABLE_STRINGTABLE
166  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY */
167 
170  /*RobotRaconteurNodeSetupFlags_ENABLE_ALL_TRANSPORTS
171  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY
172  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV4_DISCOVERY
173  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_SERVER
174  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER
175  | RobotRaconteurNodeSetupFlags_INTRA_TRANSPORT_START_SERVER
176  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_ANNOUNCE
177  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING
178  | RobotRaconteurNodeSetupFlags_DISABLE_MESSAGE4
179  | RobotRaconteurNodeSetupFlags_DISABLE_STRINGTABLE
180  | RobotRaconteurNodeSetupFlags_DISABLE_TIMEOUTS
181  | RobotRaconteurNodeSetupFlags_LOAD_TLS_CERT
182  | RobotRaconteurNodeSetupFlags_REQUIRE_TLS
183  | RobotRaconteurNodeSetupFlags_NODENAME_OVERRIDE
184  | RobotRaconteurNodeSetupFlags_NODEID_OVERRIDE
185  | RobotRaconteurNodeSetupFlags_TCP_PORT_OVERRIDE
186  | RobotRaconteurNodeSetupFlags_TCP_PORT_OVERRIDE
187  | RobotRaconteurNodeSetupFlags_TCP_WEBSOCKET_ORIGIN_OVERRIDE
188  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_SERVER_PUBLIC
189  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER_PORT_SHARER
190  | RobotRaconteurNodeSetupFlags_JUMBO_MESSAGE
191  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_LISTEN_LOCALHOST */
192 
195  /*RobotRaconteurNodeSetupFlags_ENABLE_TCP_TRANSPORT
196  | RobotRaconteurNodeSetupFlags_ENABLE_LOCAL_TRANSPORT
197  | RobotRaconteurNodeSetupFlags_ENABLE_INTRA_TRANSPORT
198  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_SERVER
199  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER
200  | RobotRaconteurNodeSetupFlags_INTRA_TRANSPORT_START_SERVER
201  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_ANNOUNCE
202  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING
203  | RobotRaconteurNodeSetupFlags_LOAD_TLS_CERT
204  | RobotRaconteurNodeSetupFlags_REQUIRE_TLS
205  | RobotRaconteurNodeSetupFlags_DISABLE_STRINGTABLE
206  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY */
207 
210  /*RobotRaconteurNodeSetupFlags_ENABLE_ALL_TRANSPORTS
211  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_SERVER
212  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER
213  | RobotRaconteurNodeSetupFlags_INTRA_TRANSPORT_START_SERVER
214  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_ANNOUNCE
215  | RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING
216  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY
217  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV4_DISCOVERY
218  | RobotRaconteurNodeSetupFlags_DISABLE_MESSAGE4
219  | RobotRaconteurNodeSetupFlags_DISABLE_STRINGTABLE
220  | RobotRaconteurNodeSetupFlags_DISABLE_TIMEOUTS
221  | RobotRaconteurNodeSetupFlags_NODENAME_OVERRIDE
222  | RobotRaconteurNodeSetupFlags_NODEID_OVERRIDE
223  | RobotRaconteurNodeSetupFlags_TCP_PORT_OVERRIDE
224  | RobotRaconteurNodeSetupFlags_TCP_PORT_OVERRIDE
225  | RobotRaconteurNodeSetupFlags_TCP_WEBSOCKET_ORIGIN_OVERRIDE
226  | RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_SERVER_PUBLIC
227  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER_PORT_SHARER
228  | RobotRaconteurNodeSetupFlags_JUMBO_MESSAGE
229  | RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_LISTEN_LOCALHOST
230  */
231 };
232 
233 #ifndef SWIG
234 
263 class ROBOTRACONTEUR_CORE_API CommandLineConfigParser
264 {
265  boost::program_options::options_description desc;
266  boost::program_options::variables_map vm;
267  std::string prefix;
268 
269  std::string default_node_name;
270  uint16_t default_tcp_port;
271  uint32_t default_flags;
272 
273  public:
281  static void FillOptionsDescription(boost::program_options::options_description& desc, uint32_t allowed_overrides,
282  const std::string& prefix = "robotraconteur-");
283 
292  CommandLineConfigParser(uint32_t allowed_overrides, const std::string& prefix = "robotraconteur-");
293 
304  void SetDefaults(const std::string& node_name, uint16_t tcp_port, uint32_t default_flags);
305 
312  void AddStringOption(const std::string& name, const std::string& descr);
313 
320  void AddBoolOption(const std::string& name, const std::string& descr);
321 
328  void AddIntOption(const std::string& name, const std::string& descr);
329 
340  void ParseCommandLine(int argc, char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
341 
349  void ParseCommandLine(const std::vector<std::string>& args);
350 
358  void AcceptParsedResult(const boost::program_options::variables_map& vm);
359 
368  std::string GetOptionOrDefaultAsString(const std::string& option);
369 
379  std::string GetOptionOrDefaultAsString(const std::string& option, const std::string& default_value);
380 
389  bool GetOptionOrDefaultAsBool(const std::string& option);
390 
400  bool GetOptionOrDefaultAsBool(const std::string& option, bool default_value);
401 
410  int32_t GetOptionOrDefaultAsInt(const std::string& option);
411 
421  int32_t GetOptionOrDefaultAsInt(const std::string& option, int32_t default_value);
422 };
423 
458 class ROBOTRACONTEUR_CORE_API RobotRaconteurNodeSetup : boost::noncopyable
459 {
460  RR_SHARED_PTR<TcpTransport> tcp_transport;
461  RR_SHARED_PTR<LocalTransport> local_transport;
462  RR_SHARED_PTR<HardwareTransport> hardware_transport;
463  RR_SHARED_PTR<IntraTransport> intra_transport;
464  RR_SHARED_PTR<RobotRaconteurNode> node;
465  RR_SHARED_PTR<CommandLineConfigParser> config;
466 
467  bool release_node;
468 
469  void DoSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
470  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
471  const RR_SHARED_PTR<CommandLineConfigParser>& config);
472 
473  public:
490  RobotRaconteurNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
491  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
492  const std::string& node_name, uint16_t tcp_port, uint32_t flags);
493 
514  RobotRaconteurNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
515  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
516  const std::string& node_name, uint16_t tcp_port, uint32_t flags, uint32_t allowed_overrides,
517  int argc, char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
518 
538  RobotRaconteurNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
539  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
540  const std::string& node_name, uint16_t tcp_port, uint32_t flags, uint32_t allowed_overrides,
541  const std::vector<std::string>& args);
542 
563  RobotRaconteurNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
564  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
565  const RR_SHARED_PTR<CommandLineConfigParser>& config);
566 
574  RR_SHARED_PTR<LocalTransport> GetLocalTransport();
575 
583  RR_SHARED_PTR<TcpTransport> GetTcpTransport();
584 
594  RR_SHARED_PTR<HardwareTransport> GetHardwareTransport();
595 
603  RR_SHARED_PTR<IntraTransport> GetIntraTransport();
604 
610  RR_SHARED_PTR<CommandLineConfigParser> GetCommandLineConfig();
611 
619  void ReleaseNode();
620 
621  virtual ~RobotRaconteurNodeSetup();
622 };
623 
665 class ROBOTRACONTEUR_CORE_API ClientNodeSetup : public RobotRaconteurNodeSetup
666 {
667  public:
678  ClientNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
679  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name = "",
680  uint32_t flags = RobotRaconteurNodeSetupFlags_CLIENT_DEFAULT);
681 
694  ClientNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name = "",
695  uint32_t flags = RobotRaconteurNodeSetupFlags_CLIENT_DEFAULT);
696 
709  ClientNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
710  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, int argc,
711  char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
712 
726  ClientNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, int argc,
727  char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
728 
740  ClientNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
741  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
742  const std::vector<std::string>& args);
743 
756  ClientNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
757  const std::vector<std::string>& args);
758 };
759 
810 class ROBOTRACONTEUR_CORE_API ServerNodeSetup : public RobotRaconteurNodeSetup
811 {
812  public:
824  ServerNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
825  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name,
826  uint16_t tcp_port = 0, uint32_t flags = RobotRaconteurNodeSetupFlags_SERVER_DEFAULT);
827 
841  ServerNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name,
842  uint16_t tcp_port = 0, uint32_t flags = RobotRaconteurNodeSetupFlags_SERVER_DEFAULT);
843 
858  ServerNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
859  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name,
860  uint16_t tcp_port, int argc, char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
861 
875  ServerNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name,
876  uint16_t tcp_port, int argc, char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
877 
891  ServerNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
892  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name,
893  uint16_t tcp_port, const std::vector<std::string>& args);
894 
907  ServerNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types, const std::string& node_name,
908  uint16_t tcp_port, const std::vector<std::string>& args);
909 };
910 
962 class ROBOTRACONTEUR_CORE_API SecureServerNodeSetup : public RobotRaconteurNodeSetup
963 {
964  public:
977  SecureServerNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
978  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
979  const std::string& node_name, uint16_t tcp_port = 0,
980  uint32_t flags = RobotRaconteurNodeSetupFlags_SECURE_SERVER_DEFAULT);
981 
995  SecureServerNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
996  const std::string& node_name, uint16_t tcp_port = 0,
997  uint32_t flags = RobotRaconteurNodeSetupFlags_SECURE_SERVER_DEFAULT);
998 
1014  SecureServerNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
1015  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
1016  const std::string& node_name, uint16_t tcp_port, int argc,
1017  char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
1018 
1033  SecureServerNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
1034  const std::string& node_name, uint16_t tcp_port, int argc,
1035  char* argv[]); // NOLINT(cppcoreguidelines-avoid-c-arrays)
1036 
1051  SecureServerNodeSetup(const RR_SHARED_PTR<RobotRaconteurNode>& node,
1052  const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
1053  const std::string& node_name, uint16_t tcp_port, const std::vector<std::string>& args);
1054 
1068  SecureServerNodeSetup(const std::vector<RR_SHARED_PTR<ServiceFactory> >& service_types,
1069  const std::string& node_name, uint16_t tcp_port, const std::vector<std::string>& args);
1070 };
1071 #endif
1072 
1073 } // namespace RobotRaconteur
RobotRaconteurNodeSetupFlags
Setup option flags.
Definition: NodeSetup.h:61
@ RobotRaconteurNodeSetupFlags_LOCAL_TAP_NAME
Allow the user to set the LocalTap name.
Definition: NodeSetup.h:119
@ RobotRaconteurNodeSetupFlags_NODEID_OVERRIDE
Allow NodeID to be configured using command line options.
Definition: NodeSetup.h:100
@ RobotRaconteurNodeSetupFlags_NONE
No options enabled.
Definition: NodeSetup.h:63
@ RobotRaconteurNodeSetupFlags_JUMBO_MESSAGE
Enable jumbo messages (up to 100 MB per message)
Definition: NodeSetup.h:122
@ RobotRaconteurNodeSetupFlags_SERVER_DEFAULT
Default configuration for server nodes.
Definition: NodeSetup.h:156
@ RobotRaconteurNodeSetupFlags_ENABLE_TCP_TRANSPORT
Enable TcpTransport.
Definition: NodeSetup.h:71
@ RobotRaconteurNodeSetupFlags_DISABLE_MESSAGE4
Disable Message Format Version 4 on all transports.
Definition: NodeSetup.h:83
@ RobotRaconteurNodeSetupFlags_CLIENT_DEFAULT
Default configuration for client nodes (See ClientNodeSetup)
Definition: NodeSetup.h:132
@ RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV4_DISCOVERY
Enable TcpTransport IPv4 discovery.
Definition: NodeSetup.h:112
@ RobotRaconteurNodeSetupFlags_SECURE_SERVER_DEFAULT_ALLOWED_OVERRIDE
Default allowed overrides for server nodes requiring TLS network transports.
Definition: NodeSetup.h:209
@ RobotRaconteurNodeSetupFlags_ENABLE_NODE_ANNOUNCE
Enable node announce on all transports.
Definition: NodeSetup.h:67
@ RobotRaconteurNodeSetupFlags_SERVER_DEFAULT_ALLOWED_OVERRIDE
Default allowed overrides for server nodes.
Definition: NodeSetup.h:169
@ RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER_PORT_SHARER
Start the TcpTransport server to incoming for incoming clients using the port sharer.
Definition: NodeSetup.h:81
@ RobotRaconteurNodeSetupFlags_ENABLE_LOCAL_TRANSPORT
Enable LocalTransport.
Definition: NodeSetup.h:69
@ RobotRaconteurNodeSetupFlags_LOCAL_TAP_ENABLE
Enable the LocalTap debug logging system.
Definition: NodeSetup.h:117
@ RobotRaconteurNodeSetupFlags_ENABLE_INTRA_TRANSPORT
Enable IntraTransport.
Definition: NodeSetup.h:107
@ RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_CLIENT
Start the LocalTransport client with specified node name.
Definition: NodeSetup.h:77
@ RobotRaconteurNodeSetupFlags_ENABLE_ALL_TRANSPORTS
Convenience flag to enable all transports.
Definition: NodeSetup.h:125
@ RobotRaconteurNodeSetupFlags_DISABLE_TIMEOUTS
Disable all timeouts (useful for debugging)
Definition: NodeSetup.h:87
@ RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_LISTEN_LOCALHOST
Only listen on localhost connections for TcpTransport.
Definition: NodeSetup.h:95
@ RobotRaconteurNodeSetupFlags_TCP_WEBSOCKET_ORIGIN_OVERRIDE
Allow TCP WebSocket origin control to be configured using command line options.
Definition: NodeSetup.h:104
@ RobotRaconteurNodeSetupFlags_LOAD_TLS_CERT
Load the TLS certificate for TcpTransport.
Definition: NodeSetup.h:89
@ RobotRaconteurNodeSetupFlags_ENABLE_NODE_DISCOVERY_LISTENING
Enable node discovery listening on all transports.
Definition: NodeSetup.h:65
@ RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_SERVER
Start the LocalTransport server to listen for incoming clients.
Definition: NodeSetup.h:75
@ RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_START_SERVER
Start the TcpTransport server to listen for incoming clients on the specified port.
Definition: NodeSetup.h:79
@ RobotRaconteurNodeSetupFlags_ENABLE_HARDWARE_TRANSPORT
Enable HardwareTransport.
Definition: NodeSetup.h:73
@ RobotRaconteurNodeSetupFlags_NODENAME_OVERRIDE
Allow NodeName to be configured using command line options.
Definition: NodeSetup.h:98
@ RobotRaconteurNodeSetupFlags_TCP_TRANSPORT_IPV6_DISCOVERY
Enable TcpTransport IPv6 discovery.
Definition: NodeSetup.h:114
@ RobotRaconteurNodeSetupFlags_DISABLE_STRINGTABLE
Disable Message Format Version 4 string table on all transports.
Definition: NodeSetup.h:85
@ RobotRaconteurNodeSetupFlags_INTRA_TRANSPORT_START_SERVER
Start the IntraTransport server to listen for incoming clients.
Definition: NodeSetup.h:109
@ RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_SERVER_PUBLIC
Make LocalTransport server listen for incoming clients from all users.
Definition: NodeSetup.h:93
@ RobotRaconteurNodeSetupFlags_TCP_PORT_OVERRIDE
Allow TCP port to be configured using command line options.
Definition: NodeSetup.h:102
@ RobotRaconteurNodeSetupFlags_REQUIRE_TLS
Require TLS for all clients on TcpTransport.
Definition: NodeSetup.h:91
@ RobotRaconteurNodeSetupFlags_SECURE_SERVER_DEFAULT
Default configuration for server nodes requiring TLS network transports.
Definition: NodeSetup.h:194
Initializes a RobotRaconteurNode instance to default configuration for a client only node.
Definition: NodeSetup.h:666
ClientNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::vector< std::string > &args)
Construct a new ClientNodeSetup and initialize specified RobotRaconteurNode with command line options...
ClientNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name="", uint32_t flags=RobotRaconteurNodeSetupFlags_CLIENT_DEFAULT)
Construct a new ClientNodeSetup and initialize the singleton RobotRaconteurNode without command line ...
ClientNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name="", uint32_t flags=RobotRaconteurNodeSetupFlags_CLIENT_DEFAULT)
Construct a new ClientNodeSetup and initialize specified RobotRaconteurNode without command line opti...
ClientNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, int argc, char *argv[])
Construct a new ClientNodeSetup and initialize the singleton RobotRaconteurNode with command line opt...
ClientNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, int argc, char *argv[])
Construct a new ClientNodeSetup and initialize specified RobotRaconteurNode with command line options...
ClientNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::vector< std::string > &args)
Construct a new ClientNodeSetup and initialize the singleton RobotRaconteurNode with command line opt...
Command line parser for node setup classes.
Definition: NodeSetup.h:264
void SetDefaults(const std::string &node_name, uint16_t tcp_port, uint32_t default_flags)
Set the default NodeName, TCP port, and flags.
std::string GetOptionOrDefaultAsString(const std::string &option)
Get the option value as a string.
bool GetOptionOrDefaultAsBool(const std::string &option)
Get the option value as a bool.
int32_t GetOptionOrDefaultAsInt(const std::string &option)
Get the option value as an int32_t.
void AddIntOption(const std::string &name, const std::string &descr)
Add a new int32_t option.
static void FillOptionsDescription(boost::program_options::options_description &desc, uint32_t allowed_overrides, const std::string &prefix="robotraconteur-")
Fill the specified options_description with standard node command line options.
void AddStringOption(const std::string &name, const std::string &descr)
Add a new string option.
CommandLineConfigParser(uint32_t allowed_overrides, const std::string &prefix="robotraconteur-")
Construct a new CommandLineConfigParser.
void ParseCommandLine(int argc, char *argv[])
Parse a specified argc and argv
std::string GetOptionOrDefaultAsString(const std::string &option, const std::string &default_value)
Get the option value as a string.
void ParseCommandLine(const std::vector< std::string > &args)
Parse a specified string vector containing the options.
int32_t GetOptionOrDefaultAsInt(const std::string &option, int32_t default_value)
Get the option value as an int32_t.
void AcceptParsedResult(const boost::program_options::variables_map &vm)
Accept options from a boost::program_options::variables_map.
void AddBoolOption(const std::string &name, const std::string &descr)
Add a new bool option.
bool GetOptionOrDefaultAsBool(const std::string &option, bool default_value)
Get the option value as a bool.
Setup a node using specified options and manage node lifecycle.
Definition: NodeSetup.h:459
boost::shared_ptr< TcpTransport > GetTcpTransport()
Get the TcpTransport.
RobotRaconteurNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, uint32_t flags)
Construct a new RobotRaconteurNodeSetup with node, NodeName TCP port, and flags.
boost::shared_ptr< IntraTransport > GetIntraTransport()
Get the IntraTransport.
RobotRaconteurNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, uint32_t flags, uint32_t allowed_overrides, int argc, char *argv[])
Construct a new RobotRaconteurNodeSetup with node, NodeName TCP port, flags, and command line options...
boost::shared_ptr< CommandLineConfigParser > GetCommandLineConfig()
Get the command line config parser object used to configure node.
RobotRaconteurNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const boost::shared_ptr< CommandLineConfigParser > &config)
Construct a new RobotRaconteurNodeSetup with node, NodeName TCP port, and command line parser object.
boost::shared_ptr< HardwareTransport > GetHardwareTransport()
Get the HardwareTransport.
boost::shared_ptr< LocalTransport > GetLocalTransport()
Get the LocalTransport.
RobotRaconteurNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, uint32_t flags, uint32_t allowed_overrides, const std::vector< std::string > &args)
Construct a new RobotRaconteurNodeSetup with node, NodeName TCP port, flags, and command line options...
void ReleaseNode()
Release the node from lifecycle management.
Initializes a RobotRaconteurNode instance to default configuration for a secure server and client nod...
Definition: NodeSetup.h:963
SecureServerNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, int argc, char *argv[])
Construct a new SecureServerNodeSetup and initialize the singleton RobotRaconteurNode with command li...
SecureServerNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, int argc, char *argv[])
Construct a new SecureServerNodeSetup and initialize specified RobotRaconteurNode with command line o...
SecureServerNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port=0, uint32_t flags=RobotRaconteurNodeSetupFlags_SECURE_SERVER_DEFAULT)
Construct a new SecureServerNodeSetup and initialize the singleton RobotRaconteurNode without command...
SecureServerNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, const std::vector< std::string > &args)
Construct a new SecureServerNodeSetup and initialize specified RobotRaconteurNode with command line o...
SecureServerNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port=0, uint32_t flags=RobotRaconteurNodeSetupFlags_SECURE_SERVER_DEFAULT)
Construct a new SecureServerNodeSetup and initialize specified RobotRaconteurNode without command lin...
SecureServerNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, const std::vector< std::string > &args)
Construct a new SecureServerNodeSetup and initialize the singleton RobotRaconteurNode with command li...
Initializes a RobotRaconteurNode instance to default configuration for a server and client node.
Definition: NodeSetup.h:811
ServerNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, const std::vector< std::string > &args)
Construct a new ServerNodeSetup and initialize specified RobotRaconteurNode with command line options...
ServerNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port=0, uint32_t flags=RobotRaconteurNodeSetupFlags_SERVER_DEFAULT)
Construct a new ServerNodeSetup and initialize specified RobotRaconteurNode without command line opti...
ServerNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port=0, uint32_t flags=RobotRaconteurNodeSetupFlags_SERVER_DEFAULT)
Construct a new ServerNodeSetup and initialize the singleton RobotRaconteurNode without command line ...
ServerNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, const std::vector< std::string > &args)
Construct a new ServerNodeSetup and initialize the singleton RobotRaconteurNode with command line opt...
ServerNodeSetup(const boost::shared_ptr< RobotRaconteurNode > &node, const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, int argc, char *argv[])
Construct a new ServerNodeSetup and initialize specified RobotRaconteurNode with command line options...
ServerNodeSetup(const std::vector< boost::shared_ptr< ServiceFactory > > &service_types, const std::string &node_name, uint16_t tcp_port, int argc, char *argv[])
Construct a new ServerNodeSetup and initialize the singleton RobotRaconteurNode with command line opt...