RTI Cloud Discovery Service  Version . [build ]
Service API

RTI Cloud Discovery Service can be deployed as a C library linked into your application on select architectures. More...

Data Structures

struct  RTI_CDS_Service
 RTI Cloud Discovery Service. More...
 

Functions

struct RTI_CDS_ServiceRTI_CDS_Service_new (const struct RTI_CDS_Property *property)
 Create a new RTI Cloud Discovery Service instance. More...
 
void RTI_CDS_Service_delete (struct RTI_CDS_Service *self)
 Stop and delete an RTI Cloud Discovery Service instance. More...
 
DDS_Boolean RTI_CDS_Service_start (struct RTI_CDS_Service *self)
 Start RTI Cloud Discovery Service. More...
 
DDS_Boolean RTI_CDS_Service_stop (struct RTI_CDS_Service *self)
 Stop RTI Cloud Discovery Service. More...
 
DDS_Boolean RTI_CDS_Service_finalize_globals ()
 Finalize global resources that RTI Cloud Discovery Service requires to operate. More...
 
DDS_Boolean RTI_CDS_Service_is_started (struct RTI_CDS_Service *self)
 Query whether this RTI Cloud Discovery Service is currently started. More...
 
void RTI_CDS_Logger_log (NDDS_Config_LogLevel log_level, const char *format,...)
 Logs a message with the specified level. More...
 

Variables

const int RTI_CDS_LOG_VERBOSITY_DEBUG
 Verbosity level: exceptions + warnings + info + periodic + content. More...
 
const int RTI_CDS_LOG_VERBOSITY_ALL
 Verbosity level: exceptions + warnings + info + periodic. More...
 
const int RTI_CDS_LOG_VERBOSITY_INFO
 Verbosity level: exceptions + warnings + info. More...
 
const int RTI_CDS_LOG_VERBOSITY_WARNINGS
 Verbosity level: exceptions + warnings. More...
 
const int RTI_CDS_LOG_VERBOSITY_EXCEPTIONS
 Verbosity level: exceptions. More...
 
const int RTI_CDS_LOG_VERBOSITY_SILENT
 Verbosity level: silent. More...
 

Detailed Description

RTI Cloud Discovery Service can be deployed as a C library linked into your application on select architectures.

This API allows you to create, configure and start RTI Cloud Discovery Service instances from your application.

The following code shows the typical use of the API:

struct RTI_CDS_Property property = RTI_CDS_Property_INITIALIZER;
struct RTI_CDS_Service *service = NULL;
property.cfg_file = "my_cloud_discovery_service_cfg.xml";
property.service_name = "my_cloud_discovery_service";
...
service = RTI_CDS_Service_new(&property);
if (service == NULL) {
printf("Error ...");
return -1;
}
if (!RTI_CDS_Service_start(service)) {
printf("Error ...");
return -1;
}
while (keep_running) {
sleep();
...
}
return 0;

Instead of a file, you can use XML strings to configure RTI Cloud Discovery Service. See RTI_CDS_Property for more information.

To build your application you need to link with the RTI Cloud Discovery Service library in <RTI Connext home>/bin/<architecture>/

Development Requirements

Linux/macOS Systems Windows Systems
Shared Librarieslibrticlouddiscoveryservice.so rticlouddiscoveryservice.dll
^ librtiroutingservice.so rtiroutingservice.dll
^ librtirsinfrastructure.so rtirsinfrastructure.dll
^ librtidlc.so rtidlc.dll
^ libnddsmetp.so nddsmetp.dll
^ libnddsc.so nddsc.dll
^ librtixml2.so rtixml2.dll
^ libnddscore.so nddscore.dll
Headers clouddiscoveryservice/clouddiscoveryservice_service.h

Function Documentation

◆ RTI_CDS_Service_new()

struct RTI_CDS_Service* RTI_CDS_Service_new ( const struct RTI_CDS_Property *  property)

Create a new RTI Cloud Discovery Service instance.

e

Parameters
propertyThe properties to configure RTI Cloud Discovery Service. This parameter is copied internally, so the user is responsible for releasing any memory allocated inside this structure.

◆ RTI_CDS_Service_delete()

void RTI_CDS_Service_delete ( struct RTI_CDS_Service self)

Stop and delete an RTI Cloud Discovery Service instance.

e

See also
RTI_CDS_Service_stop
Parameters
selfAn RTI_CDS_Service instance created with RTI_CDS_Service_new

◆ RTI_CDS_Service_start()

DDS_Boolean RTI_CDS_Service_start ( struct RTI_CDS_Service self)

Start RTI Cloud Discovery Service.

e

This is a non-blocking operation. RTI Cloud Discovery Service will create its own set of threads to perform its tasks.

Parameters
selfAn RTI_CDS_Service instance created with RTI_CDS_Service_new
Returns
True on success; False otherwise

◆ RTI_CDS_Service_stop()

DDS_Boolean RTI_CDS_Service_stop ( struct RTI_CDS_Service self)

Stop RTI Cloud Discovery Service.

e

This function won't return the execution control until the instance is fully stopped.

Parameters
selfAn RTI_CDS_Service instance created with RTI_CDS_Service_new
Returns
True on success; False otherwise

◆ RTI_CDS_Service_finalize_globals()

DDS_Boolean RTI_CDS_Service_finalize_globals ( )

Finalize global resources that RTI Cloud Discovery Service requires to operate.

e

This operation releases resources specific to RTI Cloud Discovery Service only. RTI Connext DDS global state shall be released separately through the DomainParticipantFactory's finalize_instance().

This operation should be called by your application only upon exit, after all service instances have been deleted. Calling it at a different time may cause the application to crash.

MT Safety:
Unsafe. Applications are not allowed to call this operation concurrently.
Returns
True on success; False otherwise.

◆ RTI_CDS_Service_is_started()

DDS_Boolean RTI_CDS_Service_is_started ( struct RTI_CDS_Service self)

Query whether this RTI Cloud Discovery Service is currently started.

e

◆ RTI_CDS_Logger_log()

void RTI_CDS_Logger_log ( NDDS_Config_LogLevel  log_level,
const char *  format,
  ... 
)

Logs a message with the specified level.

The message is specified with a format and a format parameter, in a similar fashion to the standard C printf() operation.

The generated log will be part of logging stream of the running RTI Cloud Discovery Service, if the log_level is part of the configured verbosity. The result log message may include additional information according to the Connext logging configuration, such as Advlog Context, thread ID, line number, etc. Additionally, the result log message will contain a newline character at the end, so the format does not need to contain it.

Parameters
[in]log_levelLog level associated to the message
[in]formatmessage format specification
[in]...variablelength argument (stdarg)

Variable Documentation

◆ RTI_CDS_LOG_VERBOSITY_DEBUG

const int RTI_CDS_LOG_VERBOSITY_DEBUG

Verbosity level: exceptions + warnings + info + periodic + content.

◆ RTI_CDS_LOG_VERBOSITY_ALL

const int RTI_CDS_LOG_VERBOSITY_ALL

Verbosity level: exceptions + warnings + info + periodic.

◆ RTI_CDS_LOG_VERBOSITY_INFO

const int RTI_CDS_LOG_VERBOSITY_INFO

Verbosity level: exceptions + warnings + info.

◆ RTI_CDS_LOG_VERBOSITY_WARNINGS

const int RTI_CDS_LOG_VERBOSITY_WARNINGS

Verbosity level: exceptions + warnings.

◆ RTI_CDS_LOG_VERBOSITY_EXCEPTIONS

const int RTI_CDS_LOG_VERBOSITY_EXCEPTIONS

Verbosity level: exceptions.

◆ RTI_CDS_LOG_VERBOSITY_SILENT

const int RTI_CDS_LOG_VERBOSITY_SILENT

Verbosity level: silent.