Robot Raconteur Core C++ Library
Loading...
Searching...
No Matches
RobotRaconteur::ClientNodeSetup Class Reference

Initializes a RobotRaconteurNode instance to default configuration for a client only node. More...

#include <NodeSetup.h>

Inheritance diagram for RobotRaconteur::ClientNodeSetup:
RobotRaconteur::RobotRaconteurNodeSetup

Public Member Functions

 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 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 options.
 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, int argc, char *argv[])
 Construct a new ClientNodeSetup and initialize the singleton RobotRaconteurNode with command line options.
 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::vector< std::string > &args)
 Construct a new ClientNodeSetup and initialize the singleton RobotRaconteurNode with command line options.
boost::shared_ptr< LocalTransportGetLocalTransport ()
 Get the LocalTransport.
boost::shared_ptr< TcpTransportGetTcpTransport ()
 Get the TcpTransport.
boost::shared_ptr< HardwareTransportGetHardwareTransport ()
 Get the HardwareTransport.
boost::shared_ptr< IntraTransportGetIntraTransport ()
 Get the IntraTransport.
boost::shared_ptr< CommandLineConfigParserGetCommandLineConfig ()
 Get the command line config parser object used to configure node.
void ReleaseNode ()
 Release the node from lifecycle management.

Detailed Description

Initializes a RobotRaconteurNode instance to default configuration for a client only node.

ClientNodeSetup is a subclass of RobotRaconteurNodeSetup providing default configuration for a RobotRaconteurNode instance that is used only to create outgoing client connections.

See Command Line Options for more information on available command line options.

Note: String table and HardwareTransport are disabled by default. They can be enabled using command line options.

By default, the configuration will do the following:

  1. Configure logging level from environmental variable or command line options. Defaults to INFO if not specified
  2. Configure tap if specified in command line options
  3. Register service types passed to service_types
  4. Start LocalTransport (default enabled)
    1. If RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_CLIENT flag is specified, call LocalTransport::StartServerAsNodeName() with the specified node_name
    2. Start LocalTransport discovery listening if specified in flags or on command line (default enabled)
    3. Disable Message Format Version 4 (default enabled) and/or String Table (default disabled) if specified on command line
  5. Start TcpTransport (default enabled)
    1. Disable Message Format Version 4 (default enabled) and/or String Table (default disabled) if specified in flags or command line
    2. Start TcpTranport discovery listening (default enabled)
    3. Load TLS certificate and set if TLS is specified on command line (default disabled)
    4. Process WebSocket origin command line options
  6. Start HardwareTransport (default disabled)
    1. Disable Message Format Version 4 (default enabled) and/or String Table (default disabled) if specified in flags or command line
  7. Start IntraTransport (default disabled)
    1. Disable Message Format Version 4 (default enabled) and/or String Table (default disabled) if specified in flags or command line
  8. Disable timeouts if specified in flags or command line (default timeouts normal)

Most users will not need to be concerned with these details, and can simply use the default configuration.

Constructor & Destructor Documentation

◆ ClientNodeSetup() [1/6]

RobotRaconteur::ClientNodeSetup::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 options.

service_types may be ROBOTRACONTEUR_SERVICE_TYPES if "robotraconteur_generated.h" is included.

Parameters
nodeThe node to configure and manage lifecycle
service_typesThe service types to register
node_nameNode name to use if RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_CLIENT flag is set
flagsThe node configuration flags

◆ ClientNodeSetup() [2/6]

RobotRaconteur::ClientNodeSetup::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 options.

Configures RobotRaconteurNode::s() and manages its lifecycle

service_types may be ROBOTRACONTEUR_SERVICE_TYPES if "robotraconteur_generated.h" is included.

Parameters
service_typesThe service types to register
node_nameNode name to use if RobotRaconteurNodeSetupFlags_LOCAL_TRANSPORT_START_CLIENT flag is set
flagsThe node configuration flags

◆ ClientNodeSetup() [3/6]

RobotRaconteur::ClientNodeSetup::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.

service_types may be ROBOTRACONTEUR_SERVICE_TYPES if "robotraconteur_generated.h" is included.

See Command Line Options for more information on available command line options.

Parameters
nodeThe node to configure and manage lifecycle
service_typesThe service types to register
argcThe number of command line arguments in argv vector
argvThe command line argument vector

◆ ClientNodeSetup() [4/6]

RobotRaconteur::ClientNodeSetup::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 options.

Configures RobotRaconteurNode::s() and manages its lifecycle

service_types may be ROBOTRACONTEUR_SERVICE_TYPES if "robotraconteur_generated.h" is included.

See Command Line Options for more information on available command line options.

Parameters
service_typesThe service types to register
argcThe number of command line arguments in argv vector
argvThe command line argument vector

◆ ClientNodeSetup() [5/6]

RobotRaconteur::ClientNodeSetup::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.

service_types may be ROBOTRACONTEUR_SERVICE_TYPES if "robotraconteur_generated.h" is included.

See Command Line Options for more information on available command line options.

Parameters
nodeThe node to configure and manage lifecycle
service_typesThe service types to register
argsThe command line options as a string vector

◆ ClientNodeSetup() [6/6]

RobotRaconteur::ClientNodeSetup::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 options.

Configures RobotRaconteurNode::s() and manages its lifecycle

service_types may be ROBOTRACONTEUR_SERVICE_TYPES if "robotraconteur_generated.h" is included.

See Command Line Options for more information on available command line options.

Parameters
service_typesThe service types to register
argsThe command line options as a string vector

Member Function Documentation

◆ GetCommandLineConfig()

boost::shared_ptr< CommandLineConfigParser > RobotRaconteur::RobotRaconteurNodeSetup::GetCommandLineConfig ( )
inherited

Get the command line config parser object used to configure node.

Returns
RR_SHARED_PTR<CommandLineConfigParser> The command line config parser

◆ GetHardwareTransport()

boost::shared_ptr< HardwareTransport > RobotRaconteur::RobotRaconteurNodeSetup::GetHardwareTransport ( )
inherited

Get the HardwareTransport.

Will be null if HardwareTransport is not specified in flags

Note: Hardware transport is not enabled by default

Returns
RR_SHARED_PTR<HardwareTransport> The HardwareTransport object

◆ GetIntraTransport()

boost::shared_ptr< IntraTransport > RobotRaconteur::RobotRaconteurNodeSetup::GetIntraTransport ( )
inherited

Get the IntraTransport.

Will be null if IntraTransport is not specified in flags

Returns
RR_SHARED_PTR<IntraTransport> The IntraTransport object

◆ GetLocalTransport()

boost::shared_ptr< LocalTransport > RobotRaconteur::RobotRaconteurNodeSetup::GetLocalTransport ( )
inherited

Get the LocalTransport.

Will be null if LocalTransport is not specified in flags

Returns
RR_SHARED_PTR<LocalTransport> The LocalTransport object

◆ GetTcpTransport()

boost::shared_ptr< TcpTransport > RobotRaconteur::RobotRaconteurNodeSetup::GetTcpTransport ( )
inherited

Get the TcpTransport.

Will be null if TcpTransport is not specified in flags

Returns
RR_SHARED_PTR<TcpTransport> The TcpTransport object

◆ ReleaseNode()

void RobotRaconteur::RobotRaconteurNodeSetup::ReleaseNode ( )
inherited

Release the node from lifecycle management.

If called, RobotRaconteurNode::Shutdown() will not be called when the node setup instance is destroyed


The documentation for this class was generated from the following file: