RTI Distributed Logger API  Version 6.0.1
 All Classes Functions Typedefs Groups
RTI_DLOptions Class Reference

This class contains RTI Distributed Logger configurable options. More...

Public Member Functions

 RTI_DLOptions ()
 Default constructor.
 
 ~RTI_DLOptions ()
 Default destructor.
 
DDS_DomainParticipant * getCDomainParticipantI ()
 Gets current C DomainParticipant.
 
DDS_ReturnCode_t setDomainParticipant (DDSDomainParticipant *domainParticipant)
 Sets current DomainParticipant.
 
bool isRemoteAdministrationEnabled ()
 Sets current DomainParticipant.
 
DDS_ReturnCode_t setRemoteAdministrationEnabled (bool enabled)
 Enables or disables remote administration.
 
int getFilterLevel ()
 Gets the log filter level.
 
DDS_ReturnCode_t setFilterLevel (int filterLevel)
 Sets the log filter level.
 
int getDomainId ()
 Gets the current Domain ID.
 
DDS_ReturnCode_t setDomainId (int domainId)
 Sets the current Domain ID.
 
char * getQosLibrary ()
 Gets the Qos Library that will be used to create to RTI Distributed Logger.
 
DDS_ReturnCode_t setQosLibrary (const char *qosLibrary)
 Sets the Qos Library that will be used to create to RTI Distributed Logger.
 
char * getQosProfile ()
 Gets the Qos Profile that will be used to create to RTI Distributed Logger.
 
DDS_ReturnCode_t setQosProfile (const char *qosProfile)
 Sets the Qos Profile that will be used to create to RTI Distributed Logger.
 
int getQueueSize ()
 Gets the maximum queue size that will be assigned to RTI Distributed Logger.
 
DDS_ReturnCode_t setQueueSize (int queueSize)
 Sets the maximum queue size that will be assigned to RTI Distributed Logger.
 
struct DDS_ThreadSettings_t * getThreadSettings ()
 Get the thread settings of the publishing threadthat will be created by RTI Distributed Logger.
 
DDS_ReturnCode_t setThreadSettings (const struct DDS_ThreadSettings_t *threadSettings)
 Sets the settings of the publishing thread that will be created by RTI Distributed Logger.
 
char * getApplicationKind ()
 Gets the application kind that will be associated with RTI Distributed Logger.
 
DDS_ReturnCode_t setApplicationKind (const char *applicationKind)
 Sets the application kind that will be associated with RTI Distributed Logger.
 
bool getEchoToStdout ()
 Gets the current value of echoToStdout.
 
DDS_ReturnCode_t setEchoToStdout (bool echoToStdout)
 Sets the value of echoToStdout.
 
bool getLogInfrastructureMessages ()
 Indicates whether Distributed Logger should also log all messages produced by infrastructure code automatically.
 
DDS_ReturnCode_t setLogInfrastructureMessages (bool log)
 Enables or disables automatic logging of infrastructure messages.
 

Friends

class RTI_DLDistLogger
 

Detailed Description

This class contains RTI Distributed Logger configurable options.

Use this API to customize RTI Distributed Logger to adapt it to your needs. Assign the newly created RTI_DLOptions object to RTI Distributed Logger singleton before calling to RTI_DLDistLogger::getInstance.

Constructor & Destructor Documentation

RTI_DLOptions::RTI_DLOptions ( )

Default constructor.

Allocates memory for a RTI_DLOptions class and sets the default values needed to create the DL.

See Also
~RTI_DLOptions()
RTI_DLOptions::~RTI_DLOptions ( )

Default destructor.

Frees RTI_DLOptions class. Checks whether the pointer exists or not. If domainParticipant was assigned, its memory is not released.

Member Function Documentation

DDS_DomainParticipant* RTI_DLOptions::getCDomainParticipantI ( )

Gets current C DomainParticipant.

If a customized DomainParticipant have been set, this function returns a pointer to the internal C DomainParticipant that will be used to create DDS entities (Topics, Publishers, Subscribers, DataWriters, and DataReaders) needed by RTI Distributed Logger. The default value is NULL.

Returns
Pointer to the DDS_DomainParticipant contained in the class. Otherwise, NULL.
DDS_ReturnCode_t RTI_DLOptions::setDomainParticipant ( DDSDomainParticipant *  domainParticipant)

Sets current DomainParticipant.

There are several use cases in which you may want to use your own DomainParticipant to create RTI Distributed Logger internal DDS entities. By calling this function, you will have control of the DomainParticipant used by RTI Distributed Logger. Once assigned, domainParticipant will be used to create the DDS entities (Topics, Publishers, Subscribers, DataWriters, & DataReaders) needed by RTI Distributed Logger.

When the DomainParticipant is set to a non-NULL value it is the user's responsibility to handle the memory associated with it.

Parameters
[in]domainParticipantPointer to a valid DDS_DomainParticipant
Postcondition
Memory must be released by the user after finalizing RTI Distributed Logger using RTI_DLDistLogger::finalizeInstance.
bool RTI_DLOptions::isRemoteAdministrationEnabled ( )

Sets current DomainParticipant.

If true, remote administration Topics will be created and used. If false, they will not be created. The default value is true.

Returns
true if the Remote Administration is enabled. Otherwise false.
DDS_ReturnCode_t RTI_DLOptions::setRemoteAdministrationEnabled ( bool  enabled)

Enables or disables remote administration.

Sets remote administration of the Topics to the value passed as parameter.

Parameters
[in]enabledBoolean indicating new remote administration value.
int RTI_DLOptions::getFilterLevel ( )

Gets the log filter level.

Supported Filter Levels: See the IDL file provided with RTI Distributed Logger (<RTI Connext Installation Folder>/resource/idl/distlog.idl)

The default value is RTI_DL_INFO_LEVEL. See setFilterLevel() for more information on filter levels.

Returns
integer containing the log filter level of the options.
See Also
RTI_DLDistLogger::setFilterLevel
DDS_ReturnCode_t RTI_DLOptions::setFilterLevel ( int  filterLevel)

Sets the log filter level.

Filtering controls what type of log messages are sent. This enables filtering on the sending side (in the application using RTI Distributed Logger). You can also enable filtering on the receiving side (such as in a tool that receives log messages, like RTI Admin Console or RTI Monitor).

Supported Filter Levels: See the IDL file provided with RTI Distributed Logger (<RTI Connext Installation Folder>/resource/idl/distlog.idl). The default value is RTI_DL_INFO_LEVEL.

Parameters
[in]filterLevelThe log filter level of the options (see above).
Returns
Error code. DDS_RETCODE_OK if everything goes as planned.
See Also
RTI_DLDistLogger::setFilterLevel
int RTI_DLOptions::getDomainId ( )

Gets the current Domain ID.

Returns the Domain ID to be used by RTI Distributed Logger. This value is only used if setDomainParticipant has NOT been called. Otherwise, the Domain ID used is the one of the DomainParticipant assigned.

The default value is 0.

Returns
Integer containing the DDS Domain ID where RTI Distributed Logger instance will be created.
DDS_ReturnCode_t RTI_DLOptions::setDomainId ( int  domainId)

Sets the current Domain ID.

Updated the Domain ID to be used by RTI Distributed Logger. This value is only used if setDomainParticipant has NOT been called. Otherwise, the Domain ID used is the one of the DomainParticipant assigned.

The default value is 0.

Parameters
[in]domainIdInt representing a DDS Domain ID. Max value: 250
Returns
DDS_RETCODE_OK if the operation was a success.
char* RTI_DLOptions::getQosLibrary ( )

Gets the Qos Library that will be used to create to RTI Distributed Logger.

The QoS library name to use when creating DDS entities. It is up to the application to ensure that this library is available at run time for RTI Distributed Logger to use. The default value is "".

Returns
String containing the current Qos Library. Do not modify the content of this pointer directly nor delete it.
DDS_ReturnCode_t RTI_DLOptions::setQosLibrary ( const char *  qosLibrary)

Sets the Qos Library that will be used to create to RTI Distributed Logger.

The QoS library name to use when creating DDS entities. It is up to the application to ensure that this library is available at run time for the Distributed Logger to use.

Parameters
[in]qosLibraryString containing the new Qos Library. A copy of the string is made.
Returns
DDS_RETCODE_OK if the operation was a success.
char* RTI_DLOptions::getQosProfile ( )

Gets the Qos Profile that will be used to create to RTI Distributed Logger.

The QoS profile name to use when creating DDS entities. It is up to the application to ensure that this profile is available at run time for the Distributed Logger to use. The default value is "".

Returns
String containing the current Qos Profile. Do not modify the content of this pointer directly nor delete it.
DDS_ReturnCode_t RTI_DLOptions::setQosProfile ( const char *  qosProfile)

Sets the Qos Profile that will be used to create to RTI Distributed Logger.

The QoS profile name to use when creating DDS entities. It is up to the application to ensure that this profile is available at run time for the Distributed Logger to use.

Parameters
[in]qosProfileString containing the new Qos Profile. A copy of the string is made.
Returns
DDS_RETCODE_OK if the operation was a success.
int RTI_DLOptions::getQueueSize ( )

Gets the maximum queue size that will be assigned to RTI Distributed Logger.

This field controls the size of the queue used to temporarily store log messages from the application until they can be written out to DDS. The default value is RTI_DL_DEFAULT_QUEUE_SIZE.

Returns
Integer containing the current maximum queue size.
DDS_ReturnCode_t RTI_DLOptions::setQueueSize ( int  queueSize)

Sets the maximum queue size that will be assigned to RTI Distributed Logger.

This field controls the size of the queue used to temporarily store log messages from the application until they can be written out to DDS.

Parameters
[in]queueSizeInteger containing the new maximum queue size.
Returns
DDS_RETCODE_OK if the operation was a success.
struct DDS_ThreadSettings_t* RTI_DLOptions::getThreadSettings ( )
read

Get the thread settings of the publishing threadthat will be created by RTI Distributed Logger.

This field contains general settings of the publishing thread in Distributed Logger, like the thread priority, stack size, and other settings.

Returns
threadPriority Integer containing the current thread priority.
DDS_ReturnCode_t RTI_DLOptions::setThreadSettings ( const struct DDS_ThreadSettings_t *  threadSettings)

Sets the settings of the publishing thread that will be created by RTI Distributed Logger.

This parameter is used to control thread parameters such as priority, stack size, and other settings. These settings will only affect the publishing thread created by RTI Distributed Logger.

Parameters
[in]threadSettingsA valid DDS_ThreadSettings_t struct with the settings for Distributed Logger's write thread.
Returns
DDS_RETCODE_OK if the operation was a success.
char* RTI_DLOptions::getApplicationKind ( )

Gets the application kind that will be associated with RTI Distributed Logger.

This char pointer is sent along on the state Topic and can help identify different applications within a system. You can use this field however you think it will help you most. The default value is "".

Returns
String containing the current application kind.
DDS_ReturnCode_t RTI_DLOptions::setApplicationKind ( const char *  applicationKind)

Sets the application kind that will be associated with RTI Distributed Logger.

This string is sent along on the state Topic and can help identify different applications within a system. You can use this field however you think it will help you most. The default value is "".

Parameters
[in]applicationKindString containing the new application kind.
bool RTI_DLOptions::getEchoToStdout ( )

Gets the current value of echoToStdout.

If true, Distributed Logger prints the log messages received to the stdout. The default value is TRUE.

Returns
Boolean to the current echoToStdout value
DDS_ReturnCode_t RTI_DLOptions::setEchoToStdout ( bool  echoToStdout)

Sets the value of echoToStdout.

If true, Distributed Logger prints the log messages received to the stdout. The default value is TRUE.

Parameters
[in]echoToStdoutNew value of set self.echoToStdout.
bool RTI_DLOptions::getLogInfrastructureMessages ( )

Indicates whether Distributed Logger should also log all messages produced by infrastructure code automatically.

If true, messages produced by either the middleware or the tools will be forwarded to Distributed Logger.

Returns
Boolean to the current LogInfrastructureMessages value.
DDS_ReturnCode_t RTI_DLOptions::setLogInfrastructureMessages ( bool  log)

Enables or disables automatic logging of infrastructure messages.

If true, messages produced by either the middleware or the tools will be forwarded to Distributed Logger. In this mode Distributed Logger uses NDDS_Config_Logger_set_output_device() API to receive messages from the middleware. Hence any device previously registered with NDDSConfigLogger's set_output_device() API will be unregistered. Similarly Distributed Logger will stop logging infrastructure messages if the set_output_device() API is used to register a new device after the creation of the Distributed Logger instance.

Parameters
[in]logBoolean indicating whether to enable this feature.
Returns
DDS_RETCODE_OK if the operation was a success.

RTI Distributed Logger API Version 6.0.1 Copyright © Sat Nov 23 2019 Real-Time Innovations, Inc