RTI Connext C API  Version 5.2.0
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
Configuration Utilities

Utility API's independent of the DDS standard. More...

Data Structures

struct  NDDS_Config_LibraryVersion_t
 The version of a single library shipped as part of an RTI Connext distribution. More...
 
struct  NDDS_Config_Version_t
 <<interface>> The version of an RTI Connext distribution. More...
 
struct  NDDS_Config_Logger
 <<interface>> The singleton type used to configure RTI Connext logging. More...
 
struct  NDDS_Config_LogMessage
 Log message. More...
 
struct  NDDS_Config_LoggerDevice
 <<interface>> Logging device interface. Use for user-defined logging devices. More...
 

Typedefs

typedef void(* NDDS_Config_LoggerDeviceWriteFnc )(struct NDDS_Config_LoggerDevice *device, const struct NDDS_Config_LogMessage *message)
 Prototype of a NDDS_Config_LoggerDevice write function.
 
typedef void(* NDDS_Config_LoggerDeviceCloseFnc )(struct NDDS_Config_LoggerDevice *device)
 Prototype of a NDDS_Config_LoggerDevice close function.
 

Enumerations

enum  NDDS_Config_LogVerbosity {
  NDDS_CONFIG_LOG_VERBOSITY_SILENT,
  NDDS_CONFIG_LOG_VERBOSITY_ERROR,
  NDDS_CONFIG_LOG_VERBOSITY_WARNING,
  NDDS_CONFIG_LOG_VERBOSITY_STATUS_LOCAL,
  NDDS_CONFIG_LOG_VERBOSITY_STATUS_REMOTE,
  NDDS_CONFIG_LOG_VERBOSITY_STATUS_ALL
}
 The verbosities at which RTI Connext diagnostic information is logged. More...
 
enum  NDDS_Config_LogLevel {
  NDDS_CONFIG_LOG_LEVEL_ERROR,
  NDDS_CONFIG_LOG_LEVEL_WARNING,
  NDDS_CONFIG_LOG_LEVEL_STATUS_LOCAL,
  NDDS_CONFIG_LOG_LEVEL_STATUS_REMOTE,
  NDDS_CONFIG_LOG_LEVEL_DEBUG
}
 Level category assigned to RTI Connext log messages returned to an output device. More...
 
enum  NDDS_Config_LogCategory {
  NDDS_CONFIG_LOG_CATEGORY_PLATFORM,
  NDDS_CONFIG_LOG_CATEGORY_COMMUNICATION,
  NDDS_CONFIG_LOG_CATEGORY_DATABASE,
  NDDS_CONFIG_LOG_CATEGORY_ENTITIES,
  NDDS_CONFIG_LOG_CATEGORY_API
}
 Categories of logged messages. More...
 
enum  NDDS_Config_LogPrintFormat { ,
  NDDS_CONFIG_LOG_PRINT_FORMAT_DEFAULT,
  NDDS_CONFIG_LOG_PRINT_FORMAT_TIMESTAMPED,
  NDDS_CONFIG_LOG_PRINT_FORMAT_VERBOSE,
  NDDS_CONFIG_LOG_PRINT_FORMAT_VERBOSE_TIMESTAMPED,
  NDDS_CONFIG_LOG_PRINT_FORMAT_DEBUG,
  NDDS_CONFIG_LOG_PRINT_FORMAT_MINIMAL,
  NDDS_CONFIG_LOG_PRINT_FORMAT_MAXIMAL
}
 The format used to output RTI Connext diagnostic information. More...
 

Functions

struct DDS_ProductVersion_tNDDS_Config_Version_get_product_version (void)
 Get the RTI Connext product version.
 
struct
NDDS_Config_LibraryVersion_t
NDDS_Config_Version_get_api_version (void)
 Get the version of the C API library.
 
struct
NDDS_Config_LibraryVersion_t
NDDS_Config_Version_get_core_version (void)
 Get the version of the core library.
 
const char * NDDS_Config_Version_to_string (void)
 Get this version in string form.
 
NDDS_Config_LoggerNDDS_Config_Logger_get_instance (void)
 Get the singleton instance of this type.
 
NDDS_Config_LogVerbosity NDDS_Config_Logger_get_verbosity (const NDDS_Config_Logger *self)
 Get the verbosity at which RTI Connext is currently logging diagnostic information.
 
NDDS_Config_LogVerbosity NDDS_Config_Logger_get_verbosity_by_category (const NDDS_Config_Logger *self, NDDS_Config_LogCategory category)
 Get the verbosity at which RTI Connext is currently logging diagnostic information in the given category.
 
void NDDS_Config_Logger_set_verbosity (NDDS_Config_Logger *self, NDDS_Config_LogVerbosity verbosity)
 Set the verbosity at which RTI Connext will log diagnostic information.
 
void NDDS_Config_Logger_set_verbosity_by_category (NDDS_Config_Logger *self, NDDS_Config_LogCategory category, NDDS_Config_LogVerbosity verbosity)
 Set the verbosity at which RTI Connext will log diagnostic information in the given category.
 
FILE * NDDS_Config_Logger_get_output_file (NDDS_Config_Logger *self)
 Get the file to which the logged output is redirected.
 
DDS_Boolean NDDS_Config_Logger_set_output_file (NDDS_Config_Logger *self, FILE *out)
 Set the file to which the logged output is redirected.
 
NDDS_Config_LogPrintFormat NDDS_Config_Logger_get_print_format (const NDDS_Config_Logger *self)
 Get the current message format that RTI Connext is using to log diagnostic information.
 
DDS_Boolean NDDS_Config_Logger_set_print_format (NDDS_Config_Logger *self, NDDS_Config_LogPrintFormat print_format)
 Set the message format that RTI Connext will use to log diagnostic information.
 
struct NDDS_Config_LoggerDeviceNDDS_Config_Logger_get_output_device (NDDS_Config_Logger *self)
 Return the user device registered with the logger.
 
DDS_Boolean NDDS_Config_Logger_set_output_device (NDDS_Config_Logger *self, struct NDDS_Config_LoggerDevice *device)
 Register a NDDS_Config_LoggerDevice.
 

Variables

NDDS_Config_LoggerDeviceWriteFnc NDDS_Config_LoggerDevice::write
 Write a log message to a specified logging device.
 
NDDS_Config_LoggerDeviceCloseFnc NDDS_Config_LoggerDevice::close
 Close the logging device.
 

Detailed Description

Utility API's independent of the DDS standard.

Typedef Documentation

typedef void(* NDDS_Config_LoggerDeviceWriteFnc)(struct NDDS_Config_LoggerDevice *device, const struct NDDS_Config_LogMessage *message)

Prototype of a NDDS_Config_LoggerDevice write function.

Write a log message to the input device.

Note: It is not safe to make any calls to the RTI Connext core library, including calls to DDS_DomainParticipant_get_current_time, from any of the logging device operations.

Parameters
device<<in>> Logging device.
message<<in>> Message to log.
typedef void(* NDDS_Config_LoggerDeviceCloseFnc)(struct NDDS_Config_LoggerDevice *device)

Prototype of a NDDS_Config_LoggerDevice close function.

Close the input device.

Note: It is not safe to make any calls to the RTI Connext core library, including calls to DDS_DomainParticipant_get_current_time, from any of the logging device operations.

Parameters
device<<in>> Logging device.

Enumeration Type Documentation

The verbosities at which RTI Connext diagnostic information is logged.

Enumerator:
NDDS_CONFIG_LOG_VERBOSITY_SILENT 

No further output will be logged.

NDDS_CONFIG_LOG_VERBOSITY_ERROR 

Only error messages will be logged.

An error indicates something wrong in the functioning of RTI Connext. The most common cause of errors is incorrect configuration.

NDDS_CONFIG_LOG_VERBOSITY_WARNING 

Both error and warning messages will be logged.

A warning indicates that RTI Connext is taking an action that may or may not be what you intended. Some configuration information is also logged at this verbosity to aid in debugging.

NDDS_CONFIG_LOG_VERBOSITY_STATUS_LOCAL 

Errors, warnings, and verbose information about the lifecycles of local RTI Connext objects will be logged.

NDDS_CONFIG_LOG_VERBOSITY_STATUS_REMOTE 

Errors, warnings, and verbose information about the lifecycles of remote RTI Connext objects will be logged.

NDDS_CONFIG_LOG_VERBOSITY_STATUS_ALL 

Errors, warnings, verbose information about the lifecycles of local and remote RTI Connext objects, and periodic information about RTI Connext threads will be logged.

Level category assigned to RTI Connext log messages returned to an output device.

Enumerator:
NDDS_CONFIG_LOG_LEVEL_ERROR 

The message describes an error.

An error indicates something wrong in the functioning of RTI Connext. The most common cause of errors is incorrect configuration.

NDDS_CONFIG_LOG_LEVEL_WARNING 

The message describes a warning.

A warning indicates that RTI Connext is taking an action that may or may not be what you intended. Some configuration information is also logged at this verbosity to aid in debugging.

NDDS_CONFIG_LOG_LEVEL_STATUS_LOCAL 

The message contains info about the lifecycles of local RTI Connext objects will be logged.

NDDS_CONFIG_LOG_LEVEL_STATUS_REMOTE 

The message contains info about the lifecycles of remote RTI Connext objects will be logged.

NDDS_CONFIG_LOG_LEVEL_DEBUG 

The message contains debug info that might be relevant to your application.

Categories of logged messages.

The NDDS_Config_Logger_get_verbosity_by_category and NDDS_Config_Logger_set_verbosity_by_category can be used to specify different verbosities for different categories of messages.

Enumerator:
NDDS_CONFIG_LOG_CATEGORY_PLATFORM 

Log messages pertaining to the underlying platform (hardware and OS) on which RTI Connext is running are in this category.

NDDS_CONFIG_LOG_CATEGORY_COMMUNICATION 

Log messages pertaining to data serialization and deserialization and network traffic are in this category.

NDDS_CONFIG_LOG_CATEGORY_DATABASE 

Log messages pertaining to the internal database in which RTI Connext objects are stored are in this category.

NDDS_CONFIG_LOG_CATEGORY_ENTITIES 

Log messages pertaining to local and remote entities and to the discovery process are in this category.

NDDS_CONFIG_LOG_CATEGORY_API 

Log messages pertaining to the API layer of RTI Connext (such as function argument validation) are in this category.

The format used to output RTI Connext diagnostic information.

Enumerator:
NDDS_CONFIG_LOG_PRINT_FORMAT_DEFAULT 

Print message, method name, and activity context (default).

NDDS_CONFIG_LOG_PRINT_FORMAT_TIMESTAMPED 

Print message, method name, activity context, and timestamp.

NDDS_CONFIG_LOG_PRINT_FORMAT_VERBOSE 

Print message with all available context information (includes thread identifier, activity context).

NDDS_CONFIG_LOG_PRINT_FORMAT_VERBOSE_TIMESTAMPED 

Print message with all available context information, and timestamp.

NDDS_CONFIG_LOG_PRINT_FORMAT_DEBUG 

Print a set of field that may be useful for internal debug.

NDDS_CONFIG_LOG_PRINT_FORMAT_MINIMAL 

Print only message number and method name.

NDDS_CONFIG_LOG_PRINT_FORMAT_MAXIMAL 

Print all available fields.

Function Documentation

struct DDS_ProductVersion_t* NDDS_Config_Version_get_product_version ( void  )
read

Get the RTI Connext product version.

struct NDDS_Config_LibraryVersion_t* NDDS_Config_Version_get_api_version ( void  )
read

Get the version of the C API library.

struct NDDS_Config_LibraryVersion_t* NDDS_Config_Version_get_core_version ( void  )
read

Get the version of the core library.

const char* NDDS_Config_Version_to_string ( void  )

Get this version in string form.

Combine all of the constituent library versions into a single string.

The memory in which the string is stored in internal to this NDDS_Config_Version_t. The caller should not modify it.

NDDS_Config_Logger* NDDS_Config_Logger_get_instance ( void  )

Get the singleton instance of this type.

NDDS_Config_LogVerbosity NDDS_Config_Logger_get_verbosity ( const NDDS_Config_Logger self)

Get the verbosity at which RTI Connext is currently logging diagnostic information.

The default verbosity if NDDS_Config_Logger_set_verbosity is never called is ::DDS_NDDS_CONFIG_LOG_VERBOSITY_ERROR.

If NDDS_Config_Logger_set_verbosity_by_category has been used to set different verbosities for different categories of messages, this function will return the maximum verbosity of all categories.

NDDS_Config_LogVerbosity NDDS_Config_Logger_get_verbosity_by_category ( const NDDS_Config_Logger self,
NDDS_Config_LogCategory  category 
)

Get the verbosity at which RTI Connext is currently logging diagnostic information in the given category.

The default verbosity if NDDS_Config_Logger_set_verbosity and NDDS_Config_Logger_set_verbosity_by_category are never called is ::DDS_NDDS_CONFIG_LOG_VERBOSITY_ERROR.

void NDDS_Config_Logger_set_verbosity ( NDDS_Config_Logger self,
NDDS_Config_LogVerbosity  verbosity 
)

Set the verbosity at which RTI Connext will log diagnostic information.

Note: Logging at high verbosities will be detrimental to your application's performance. Your default setting should typically remain at ::DDS_NDDS_CONFIG_LOG_VERBOSITY_WARNING or below. (The default verbosity if you never set it is ::DDS_NDDS_CONFIG_LOG_VERBOSITY_ERROR.)

void NDDS_Config_Logger_set_verbosity_by_category ( NDDS_Config_Logger self,
NDDS_Config_LogCategory  category,
NDDS_Config_LogVerbosity  verbosity 
)

Set the verbosity at which RTI Connext will log diagnostic information in the given category.

FILE* NDDS_Config_Logger_get_output_file ( NDDS_Config_Logger self)

Get the file to which the logged output is redirected.

If no output file has been registered through NDDS_Config_Logger_set_output_file, this function will return NULL. In this case, logged output will on most platforms go to standard out as if through printf.

DDS_Boolean NDDS_Config_Logger_set_output_file ( NDDS_Config_Logger self,
FILE *  out 
)

Set the file to which the logged output is redirected.

The file passed may be NULL, in which case further logged output will be redirected to the platform-specific default output location (standard out on most platforms).

NDDS_Config_LogPrintFormat NDDS_Config_Logger_get_print_format ( const NDDS_Config_Logger self)

Get the current message format that RTI Connext is using to log diagnostic information.

If NDDS_Config_Logger_set_print_format is never called, the default format is ::DDS_NDDS_CONFIG_LOG_PRINT_FORMAT_DEFAULT.

DDS_Boolean NDDS_Config_Logger_set_print_format ( NDDS_Config_Logger self,
NDDS_Config_LogPrintFormat  print_format 
)

Set the message format that RTI Connext will use to log diagnostic information.

struct NDDS_Config_LoggerDevice* NDDS_Config_Logger_get_output_device ( NDDS_Config_Logger self)
read

Return the user device registered with the logger.

Parameters
self<<in>> Cannot be NULL.
Returns
Registered user device or NULL if no user device is registered.
DDS_Boolean NDDS_Config_Logger_set_output_device ( NDDS_Config_Logger self,
struct NDDS_Config_LoggerDevice device 
)

Register a NDDS_Config_LoggerDevice.

Register the specified logging device with the logger.

There can be at most only one device registered with the logger at any given time.

When a device is installed, the logger will stop sending the log messages to the standard output and to the file set with NDDS_Config_Logger_set_output_file.

To remove an existing device, use this function with NULL as the device parameter. After a device is removed the logger will continue sending log messages to the standard output and to the output file.

To replace an existing device with a new device, use this function providing the new device as the device parameter.

When a device is unregistered (by setting it to NULL), NDDS_Config_LoggerDevice calls the function ::NDDS_Config_LoggerDevice_close.

Parameters
self<<in>> Cannot be NULL.
device<<in>> Logging device.

Variable Documentation

NDDS_Config_LoggerDeviceWriteFnc NDDS_Config_LoggerDevice::write

Write a log message to a specified logging device.

Note: It is not safe to make any calls to the RTI Connext core library, including calls to DDS_DomainParticipant_get_current_time, from any of the logging device operations.

NDDS_Config_LoggerDeviceCloseFnc NDDS_Config_LoggerDevice::close

Close the logging device.

Note: It is not safe to make any calls to the RTI Connext core library, including calls to DDS_DomainParticipant_get_current_time, from any of the logging device operations.


RTI Connext C API Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc