RTC Toolkit  2.0.0
Public Types | Public Member Functions | List of all members
rtctk::componentFramework::ServiceDiscovery Class Reference

Class that implements a very basic service discovery mechanism. More...

#include <serviceDiscovery.hpp>

Public Types

using ServiceEndpoint = ServiceRegistryIf::ServiceEndpoint
 

Public Member Functions

 ServiceDiscovery (std::unique_ptr< ServiceRegistryIf > &&adapter, const std::string &comp_name="")
 Create a new ServiceDiscovery object. More...
 
 ServiceDiscovery (const elt::mal::Uri &registry, const std::string &comp_name="")
 Create a new ServiceDiscovery object. More...
 
std::vector< std::string > ListComponents ()
 Get known components. More...
 
ServiceEndpoint GetOldbEndpoint ()
 Get the Oldb Endpoint from the ServiceDiscovery. More...
 
ServiceEndpoint GetRuntimeRepoEndpoint ()
 Get the Runtime Repository Endpoint from the ServiceDiscovery. More...
 
ServiceEndpoint GetPersistentRepoEndpoint ()
 Get the Persistent Repository Endpoint from the ServiceDiscovery. More...
 
ServiceEndpoint GetReqRepEndpoint (const std::string &component_name="")
 Get the Request/Reply Endpoint of a component. More...
 
ServiceEndpoint GetPubSubEndpoint (const std::string &component_name="")
 Get the PubSub Endpoint of a component. More...
 

Detailed Description

Class that implements a very basic service discovery mechanism.

Member Typedef Documentation

◆ ServiceEndpoint

Constructor & Destructor Documentation

◆ ServiceDiscovery() [1/2]

rtctk::componentFramework::ServiceDiscovery::ServiceDiscovery ( std::unique_ptr< ServiceRegistryIf > &&  adapter,
const std::string &  comp_name = "" 
)
explicit

Create a new ServiceDiscovery object.

Parameters
adapterunique_ptr to Service Registry to use for service discovery
comp_nameoptional: component name if used from within RTC component

◆ ServiceDiscovery() [2/2]

rtctk::componentFramework::ServiceDiscovery::ServiceDiscovery ( const elt::mal::Uri &  registry,
const std::string &  comp_name = "" 
)
explicit

Create a new ServiceDiscovery object.

Parameters
registryURI to the Service Registry, currently only file:// URIs are supported
comp_nameoptional: component name if used from within RTC component

Member Function Documentation

◆ GetOldbEndpoint()

ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetOldbEndpoint ( )

Get the Oldb Endpoint from the ServiceDiscovery.

◆ GetPersistentRepoEndpoint()

ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetPersistentRepoEndpoint ( )

Get the Persistent Repository Endpoint from the ServiceDiscovery.

◆ GetPubSubEndpoint()

ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetPubSubEndpoint ( const std::string &  component_name = "")

Get the PubSub Endpoint of a component.

Parameters
comp_nameoptional: component name, otherwise component name during construction is used.

◆ GetReqRepEndpoint()

ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetReqRepEndpoint ( const std::string &  component_name = "")

Get the Request/Reply Endpoint of a component.

Parameters
comp_nameoptional: component name, otherwise component name during construction is used.

◆ GetRuntimeRepoEndpoint()

ServiceDiscovery::ServiceEndpoint rtctk::componentFramework::ServiceDiscovery::GetRuntimeRepoEndpoint ( )

Get the Runtime Repository Endpoint from the ServiceDiscovery.

◆ ListComponents()

std::vector< std::string > rtctk::componentFramework::ServiceDiscovery::ListComponents ( )

Get known components.

Use this method to retrieve all components known to the service discovery

Returns
vector of strings containing the component names

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