RTI Persistence Service Version 7.1.0
Library API

This API allows you to embed RTI Persistence Service in your application. More...

Modules

 Version API
 

Data Structures

struct  RTI_PersistenceService
 RTI Persistence Service. More...
 
struct  RTI_PersistenceServiceProperty
 Configuration of RTI Persistence Service. More...
 

Functions

struct RTI_PersistenceServiceRTI_PersistenceService_new (struct RTI_PersistenceServiceProperty *property)
 Create a new RTI Persistence Service instance. More...
 
void RTI_PersistenceService_delete (struct RTI_PersistenceService *self)
 Stop and delete RTI Persistence Service instance. More...
 
DDS_Boolean RTI_PersistenceService_start (struct RTI_PersistenceService *self)
 Start RTI Persistence Service. More...
 
DDS_Boolean RTI_PersistenceService_stop (struct RTI_PersistenceService *self)
 Stop RTI Persistence Service. More...
 
DDS_Boolean RTI_PersistenceService_initialize_globals (void)
 Initialize the RTI Persistence Service globals. More...
 
void RTI_PersistenceService_finalize_globals (void)
 Finalize the RTI Persistence Service globals. More...
 

Variables

const struct RTI_PersistenceServiceProperty RTI_PersistenceServiceProperty_INITIALIZER
 The initial values for an RTI_PersistenceServiceProperty instance. More...
 
const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_INFO
 Verbosity level: exceptions + warnings + info. More...
 
const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_WARNINGS
 Verbosity level: exceptions + warnings. More...
 
const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_EXCEPTIONS
 Verbosity level: exceptions. More...
 
const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_SILENT
 Verbosity level: silent. More...
 
const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_IGNORE
 Verbosity level: ignore. More...
 

Detailed Description

This API allows you to embed RTI Persistence Service in your application.

The API allows you to create, configure and start RTI Persistence Service instances from your application. The following code shows the typical use of the API:

struct RTI_PersistenceService * service = NULL;
property.cfg_file = "my_persistence_service_cfg.xml";
property.cfg_name = "default";
...
printf("Error ... \n");
return -1;
}
service = RTI_PersistenceService_new(&property);
if (service == NULL) {
printf("Error ... \n");
return -1;
}
printf("Error ... \n");
return -1;
}
while(keep_running) {
sleep();
...
}
return 0;
void RTI_PersistenceService_delete(struct RTI_PersistenceService *self)
Stop and delete RTI Persistence Service instance.
const struct RTI_PersistenceServiceProperty RTI_PersistenceServiceProperty_INITIALIZER
The initial values for an RTI_PersistenceServiceProperty instance.
Definition: service.ifc:339
struct RTI_PersistenceService * RTI_PersistenceService_new(struct RTI_PersistenceServiceProperty *property)
Create a new RTI Persistence Service instance.
void RTI_PersistenceService_finalize_globals(void)
Finalize the RTI Persistence Service globals.
DDS_Boolean RTI_PersistenceService_start(struct RTI_PersistenceService *self)
Start RTI Persistence Service.
DDS_Boolean RTI_PersistenceService_initialize_globals(void)
Initialize the RTI Persistence Service globals.
Configuration of RTI Persistence Service.
Definition: service.ifc:125
RTI Persistence Service.
Definition: service.ifc:110

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

To build your application you need to link with the RTI Persistence Service library in $NDDSHOME/lib/<architecture>/

An example is provided in https://github.com/rticommunity/rticonnextdds-examples/tree/release/7.1.0/examples/persistence_service/library_api .

Development Requirements

Linux Systems Windows Systems
Shared Libraries librtipersistenceservice.so rtipersistenceservice.dll
librtidlc.so rtidlc.dll
libnddsmetp.so nddsmetp.dll
libnddsc.so nddsc.dll
libnddscore.so nddscore.dll
Static Libraries librtipersistenceservicez.a rtipersistenceservicez.lib
Headers persistence/persistence_service.h

NOTE: If you are using debug libraries, remember to add the 'd' suffix to the library name. For shared libraries on macOS systems, the library name is the same as that for Linux with the extension being replaced by '.dylib' instead of '.so'.

Function Documentation

◆ RTI_PersistenceService_new()

struct RTI_PersistenceService * RTI_PersistenceService_new ( struct RTI_PersistenceServiceProperty property)

Create a new RTI Persistence Service instance.

Parameters
propertyThe properties to configure RTI Persistence Service

This parameter is copied internally, so the user is responsible for releasing any memory allocated inside this structure.

◆ RTI_PersistenceService_delete()

void RTI_PersistenceService_delete ( struct RTI_PersistenceService self)

Stop and delete RTI Persistence Service instance.

See also
RTI_PersistenceService_stop
Parameters
selfAn RTI_PersistenceService instance created with RTI_PersistenceService_new

◆ RTI_PersistenceService_start()

DDS_Boolean RTI_PersistenceService_start ( struct RTI_PersistenceService self)

Start RTI Persistence Service.

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

Parameters
selfAn RTI_PersistenceService instance created with RTI_PersistenceService_new

◆ RTI_PersistenceService_stop()

DDS_Boolean RTI_PersistenceService_stop ( struct RTI_PersistenceService self)

Stop RTI Persistence Service.

This function will not return execution control until the instance is fully stopped.

Parameters
selfAn RTI_PersistenceService instance created with RTI_PersistenceService_new

◆ RTI_PersistenceService_initialize_globals()

DDS_Boolean RTI_PersistenceService_initialize_globals ( void  )

Initialize the RTI Persistence Service globals.

This function will initialize RTI Persistence Service globals. This function must be called before creating any RTI Persistence Service instance.

◆ RTI_PersistenceService_finalize_globals()

void RTI_PersistenceService_finalize_globals ( void  )

Finalize the RTI Persistence Service globals.

This function will finalize RTI Persistence Service globals. This function must be called after all the instances of RTI Persistence Service have been deleted.

Variable Documentation

◆ RTI_PersistenceServiceProperty_INITIALIZER

const struct RTI_PersistenceServiceProperty RTI_PersistenceServiceProperty_INITIALIZER

The initial values for an RTI_PersistenceServiceProperty instance.

◆ RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_INFO

const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_INFO

Verbosity level: exceptions + warnings + info.

◆ RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_WARNINGS

const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_WARNINGS

Verbosity level: exceptions + warnings.

◆ RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_EXCEPTIONS

const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_EXCEPTIONS

Verbosity level: exceptions.

◆ RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_SILENT

const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_SILENT

Verbosity level: silent.

◆ RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_IGNORE

const int RTI_PERSISTENCE_SERVICE_LOG_VERBOSITY_IGNORE

Verbosity level: ignore.

This value is meant to be used only with the dds_verbosity field. It instructs RTI Persistence Service to use the existing value set for DDS_DomainParticipantFactory logging verbosity.