RTI Routing Service  Version 6.0.0
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
RTI Routing Service API

Prototype of the function that gets called upon reception of the shutdown command. More...

Data Structures

struct  RTI_RoutingService
 RTI Routing Service. More...
 
struct  RTI_RoutingServiceTransportConfig
 Association between a transport alias and its create function pointer. More...
 
struct  RTI_RoutingServiceProperty
 Configuration of RTI Routing Service. More...
 

Macros

#define RTI_RoutingServiceProperty_INITIALIZER
 The initial values for an RTI_RoutingServiceProperty instance.
 

Functions

struct RTI_RoutingServiceRTI_RoutingService_new (const struct RTI_RoutingServiceProperty *property)
 Create a new RTI Routing Service instance.
 
void RTI_RoutingService_delete (struct RTI_RoutingService *self)
 Stop and delete an RTI Routing Service instance.
 
DDS_Boolean RTI_RoutingService_start (struct RTI_RoutingService *self)
 Start RTI Routing Service.
 
DDS_Boolean RTI_RoutingService_stop (struct RTI_RoutingService *self)
 Stop RTI Routing Service.
 
DDS_Boolean RTI_RoutingService_attach_adapter_plugin (struct RTI_RoutingService *self, void *adapter, const char *plugin_name)
 Attach an adapter to be used by routing service when it is started.
 
DDS_Boolean RTI_RoutingService_attach_transformation_plugin (struct RTI_RoutingService *self, struct RTI_RoutingServiceTransformationPlugin *transformation_plugin, const char *plugin_name)
 Attach a transformation plugin to be used by Routing Service when it is started.
 
DDS_Boolean RTI_RoutingService_set_remote_shutdown_hook (struct RTI_RoutingService *self, const struct RTI_RoutingServiceRemoteShutdownHook *shutdown_hook)
 Set the remote shutdown hook in this Routing Service instance.
 
DDS_Boolean RTI_RoutingService_finalize_globals ()
 Finalize global resources that Routing Service requires to operate.
 
const char * RTI_RoutingService_get_build_number_string ()
 Return the build ID of this library.
 
DDS_Boolean RTI_RoutingService_is_started (struct RTI_RoutingService *self)
 Query whether this Routing Service is currently started.
 

Variables

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_DEBUG
 Verbosity level: exceptions + warnings + info + periodic + content.
 
const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_ALL
 Verbosity level: exceptions + warnings + info + periodic.
 
const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_INFO
 Verbosity level: exceptions + warnings + info.
 
const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_WARNINGS
 Verbosity level: exceptions + warnings.
 
const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_EXCEPTIONS
 Verbosity level: exceptions.
 
const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_SILENT
 Verbosity level: silent.
 

Detailed Description

Prototype of the function that gets called upon reception of the shutdown command.

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

Definition of the interface that handles the remote shutdown.

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

The following code shows the typical use of the API:

struct RTI_RoutingService * service = NULL;
property.cfg_file = "my_routing_service_cfg.xml";
property.service_name = "my_routing_service";
...
service = RTI_RoutingService_new(&property);
if(service == NULL) {
printf("Error...");
return -1;
}
if(!RTI_RoutingService_start(service)) {
printf("Error...");
return -1;
}
while(keep_running) {
sleep();
...
}
return 0;

Instead of a file, you can use XML strings to configure RTI Routing Service. See RTI_RoutingServiceProperty for more information.

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

If you are using the C API on a Windows, Linux, MAC or INTEGRITY platform: See the example in <RTI Routing Service home>/example/wrapperApp Example makefiles and project files for several architecures are provided. Also see the README.txt file in the wrapperApp/src directory.

Macro Definition Documentation

#define RTI_RoutingServiceProperty_INITIALIZER

The initial values for an RTI_RoutingServiceProperty instance.

Function Documentation

struct RTI_RoutingService* RTI_RoutingService_new ( const struct RTI_RoutingServiceProperty property)
read

Create a new RTI Routing Service instance.

Parameters
propertyThe properties to configure RTI Routing Service. This parameter is copied internally, so the user is responsible for releasing any memory allocated inside this structure.
void RTI_RoutingService_delete ( struct RTI_RoutingService self)

Stop and delete an RTI Routing Service instance.

See Also
RTI_RoutingService_stop
Parameters
selfAn RTI_RoutingService instance created with RTI_RoutingService_new
DDS_Boolean RTI_RoutingService_start ( struct RTI_RoutingService self)

Start RTI Routing Service.

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

Parameters
selfAn RTI_RoutingService instance created with RTI_RoutingService_new
DDS_Boolean RTI_RoutingService_stop ( struct RTI_RoutingService self)

Stop RTI Routing Service.

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

Parameters
selfAn RTI_RoutingService instance created with RTI_RoutingService_new
DDS_Boolean RTI_RoutingService_attach_adapter_plugin ( struct RTI_RoutingService self,
void *  adapter,
const char *  plugin_name 
)

Attach an adapter to be used by routing service when it is started.

By using this function, an adapter can be statically compiled, created in your application and have routing service load it, instead of registering a shared library and a create function in the configuration. The name passed into this function is the name that has to be used in the configuration to instantiate connections from the plugin.

Example:

service = RTI_RoutingService_new(&property);
myAdapter = MyAdapter_create();
RTI_RoutingService_attach_adapter_plugin(service, myAdapter, "MyAdapter");
...

And our configuration would look like this:

<dds>
<!-- No need to register the plugin in
<adapter_library><adpater_plugin>
-->
<routing_service name="example">
<domain_route name="myadapter_to_dds">
<connection name="MyConnection" plugin_name="MyAdapter">
...
</connection>
...
</domain_route>
</routing_service>
</dds>

This function can be called as many times as desired to attach several plugins.

Note: The RTI Routing Service Adapter SDK is required.

Precondition
Routing Service must not be started.
Parameters
selfAn RTI_RoutingService instance not started yet (or stopped)
adapterThe adapter plugin to be attached
plugin_nameThe name used for this plugin in the <connection> tags in the configuration
DDS_Boolean RTI_RoutingService_attach_transformation_plugin ( struct RTI_RoutingService self,
struct RTI_RoutingServiceTransformationPlugin transformation_plugin,
const char *  plugin_name 
)

Attach a transformation plugin to be used by Routing Service when it is started.

See Also
RTI_RoutingService_attach_adapter_plugin
DDS_Boolean RTI_RoutingService_set_remote_shutdown_hook ( struct RTI_RoutingService self,
const struct RTI_RoutingServiceRemoteShutdownHook *  shutdown_hook 
)

Set the remote shutdown hook in this Routing Service instance.

The shutdown hook will be notified upon reception of a remote shutdown command.

The operation will fail if the RS is already started.

DDS_Boolean RTI_RoutingService_finalize_globals ( )

Finalize global resources that Routing Service requires to operate.

This operation releases resources specific to Routing 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; otherwise false.
const char* RTI_RoutingService_get_build_number_string ( )

Return the build ID of this library.

The build ID uniquely identifies a specific build of the Routing Service library.

DDS_Boolean RTI_RoutingService_is_started ( struct RTI_RoutingService self)

Query whether this Routing Service is currently started.

Variable Documentation

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_DEBUG

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

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_ALL

Verbosity level: exceptions + warnings + info + periodic.

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_INFO

Verbosity level: exceptions + warnings + info.

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_WARNINGS

Verbosity level: exceptions + warnings.

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_EXCEPTIONS

Verbosity level: exceptions.

const int RTI_ROUTING_SERVICE_LOG_VERBOSITY_SILENT

Verbosity level: silent.


RTI Routing Service Version 6.0.0 Copyright © Sun Mar 3 2019 Real-Time Innovations, Inc