RTC Toolkit  1.0.0
Public Member Functions | Static Public Attributes | List of all members
rtctk::componentFramework::ServiceDiscovery Class Reference

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

#include <serviceDiscovery.hpp>

Public Member Functions

 ServiceDiscovery (const elt::mal::Uri &endpoint, const std::string &comp_name="")
 Create a new ServiceDiscovery object. More...
 
 ~ServiceDiscovery ()
 
elt::mal::Uri Get (const std::string &service_name)
 Get endpoint of specific service. More...
 
elt::mal::Uri Get (const std::string &service_name, const std::string &comp_name)
 Get endpoint of specific service. More...
 

Static Public Attributes

static const DataPointPath REQ_REP_ENDPOINT = "req_rep_endpoint"_dppath
 There is a fixed set of supported service types. More...
 
static const DataPointPath PUB_SUB_ENDPOINT = "pub_sub_endpoint"_dppath
 
static const DataPointPath RUNTIME_REPO_ENDPOINT = "runtime_repo_endpoint"_dppath
 
static const DataPointPath PERSIST_REPO_ENDPOINT = "persist_repo_endpoint"_dppath
 
static const DataPointPath OLDB_ENDPOINT = "oldb_endpoint"_dppath
 

Detailed Description

Class that implements a very basic service discovery mechanism.

Constructor & Destructor Documentation

◆ ServiceDiscovery()

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

Create a new ServiceDiscovery object.

Parameters
endpointlocation of the service registry
comp_nameoptional: component name if used from within RTC component

◆ ~ServiceDiscovery()

rtctk::componentFramework::ServiceDiscovery::~ServiceDiscovery ( )
default

Member Function Documentation

◆ Get() [1/2]

elt::mal::Uri rtctk::componentFramework::ServiceDiscovery::Get ( const std::string &  service_name)

Get endpoint of specific service.

Use this method to retrieve endpoints for the current component

Parameters
service_namename of the service
Returns
service endpoint URI
Exceptions
rtctk::componentFramework::RtctkExceptionif service_name invalid or comp_name not set

◆ Get() [2/2]

elt::mal::Uri rtctk::componentFramework::ServiceDiscovery::Get ( const std::string &  service_name,
const std::string &  comp_name 
)

Get endpoint of specific service.

Use this method if you need to retrieve endpoints to access other components

Parameters
service_namename of the service
comp_namename of the component instance
Returns
service endpoint URI
Exceptions
rtctk::componentFramework::RtctkExceptionif service_name or comp_name invalid

Member Data Documentation

◆ OLDB_ENDPOINT

const DataPointPath rtctk::componentFramework::ServiceDiscovery::OLDB_ENDPOINT = "oldb_endpoint"_dppath
static

◆ PERSIST_REPO_ENDPOINT

const DataPointPath rtctk::componentFramework::ServiceDiscovery::PERSIST_REPO_ENDPOINT = "persist_repo_endpoint"_dppath
static

◆ PUB_SUB_ENDPOINT

const DataPointPath rtctk::componentFramework::ServiceDiscovery::PUB_SUB_ENDPOINT = "pub_sub_endpoint"_dppath
static

◆ REQ_REP_ENDPOINT

const DataPointPath rtctk::componentFramework::ServiceDiscovery::REQ_REP_ENDPOINT = "req_rep_endpoint"_dppath
static

There is a fixed set of supported service types.

◆ RUNTIME_REPO_ENDPOINT

const DataPointPath rtctk::componentFramework::ServiceDiscovery::RUNTIME_REPO_ENDPOINT = "runtime_repo_endpoint"_dppath
static

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