Distributed Logger API  Version 1.6b [build 01]
RTI_DLOptions Class Reference

This class contains DL's 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 The QoS library name to use when creating DDS entities. It is up to the application to ensure that this library is available at runtime for the Distributed Logger to use. The default value is "".
 
DDS_ReturnCode_t setQosLibrary (const char *qosLibrary)
 Sets the Qos Library The QoS library name to use when creating DDS entities. It is up to the application to ensure that this library is available at runtime for the Distributed Logger to use. The default value is "".
 
char * getQosProfile ()
 Gets the Qos Profile.
 
DDS_ReturnCode_t setQosProfile (const char *qosProfile)
 Sets the Qos Profile The QoS profile name to use when creating DDS entities. It is up to the application to ensure that this profile is available at runtime for the Distributed Logger to use.
 
int getQueueSize ()
 Gets the maximum queue size.
 
DDS_ReturnCode_t setQueueSize (int queueSize)
 Sets the maximum queue size.
 
struct DDS_ThreadSettings_t * getThreadSettings ()
 Get the thread settings of the publishing thread.
 
DDS_ReturnCode_t setThreadSettings (const struct DDS_ThreadSettings_t *threadSettings)
 Set the thread settings of the publishing thread.
 
char * getApplicationKind ()
 Gets the application kind.
 
DDS_ReturnCode_t setApplicationKind (const char *applicationKind)
 Sets the application kind.
 
bool getEchoToStdout ()
 Gets the current value of echoToStdout.
 
DDS_ReturnCode_t setEchoToStdout (bool echoToStdout)
 Sets the value of echoToStdout.
 

Friends

class RTI_DLDistLogger
 

Detailed Description

This class contains DL's configurable options.

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.

Member Function Documentation

DDS_DomainParticipant* RTI_DLOptions::getCDomainParticipantI ( )

Gets current C DomainParticipant.

If this field is not null, then this is the internal C DomainParticipant that will be used to create DDS entities (Topics, Publishers, Subscribers, DataWriters, & DataReaders) needed by the Distributed Logger. The default value is NULL.

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

Sets current DomainParticipant.

Parameters
[in]domainParticipantPointer to a valid DDS_DomainParticipant
Postcondition
Memory must be released by the user after finalizing DL.
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 Distributed Logger (ndds.<version>/resource/rtidistlogger/idl/rtidistlog.idl)

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

Returns
integer containing the log filter level of the options.
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 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 Distributed Logger (file: ndds.<version>/resource/rtidistlogger/idl/rtidistlog.idl). The default value is RTI_DL_TRACE_LEVEL. In the IDL file, there are language-specific bindings. Prepend the appropriate binding to the filter level shown in the IDL. For example, one of the filter levels in the IDL is INFO_LEVEL. To refer to this filter level in C++, use RTI_DL_INFO_LEVEL.

Log messages, up to and including the specified filter level, will pass through the filter and be sent on the network. For example, the WARNING level allows log messages up to and including the WARNING level (FATAL, SEVERE, ERROR, and WARNING) to be sent; any other log messages with numerically higher filter levels (INFO, DEBUG, and TRACE) will be filtered out and not sent.

Parameters
[in]filterLevelThe log filter level of the options (see above).
Returns
Error code. DDS_RETCODE_OK if everything goes as planned.

The following table shows how Connext log levels map to Distributed Logger log filter levels. Not all Distributed Logger levels appear in this table because there is not a one-to-one mapping between Connext and Distributed Logger levels (there are more levels in Distributed Logger).

Filter Levels
Connext Distributed Logger
NDDS_CONFIG_LOG_LEVEL_ERROR RTI_DL_ERROR_LEVEL
NDDS_CONFIG_LOG_LEVEL_WARNING RTI_DL_WARNING_LEVEL
NDDS_CONFIG_LOG_LEVEL_STATUS_LOCAL RTI_DL_NOTICE_LEVEL
NDDS_CONFIG_LOG_LEVEL_STATUS_REMOTE RTI_DL_INFO_LEVEL
NDDS_CONFIG_LOG_LEVEL_DEBUG RTI_DL_DEBUG_LEVEL
int RTI_DLOptions::getDomainId ( )

Gets the current domain id.

The DDS domain id to be used. This value is only used if domainParticipant is NULL. The default value is 0.

Returns
Integer containing the current DDS domain id.
DDS_ReturnCode_t RTI_DLOptions::setDomainId ( int  domainId)

Sets the current domain id.

The DDS domain id to be used only if domainParticipant is NULL.

Parameters
[in]domainIdInt representing a DDS domain id. Max value 250
char* RTI_DLOptions::getQosLibrary ( )

Gets the Qos Library The QoS library name to use when creating DDS entities. It is up to the application to ensure that this library is available at runtime for the Distributed Logger to use. The default value is "".

Returns
String containing the current Qos Library.
DDS_ReturnCode_t RTI_DLOptions::setQosLibrary ( const char *  qosLibrary)

Sets the Qos Library The QoS library name to use when creating DDS entities. It is up to the application to ensure that this library is available at runtime for the Distributed Logger to use. The default value is "".

Parameters
[in]qosLibraryString containing the new Qos Library.
char* RTI_DLOptions::getQosProfile ( )

Gets the Qos Profile.

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

Returns
String containing the current Qos Profile.
DDS_ReturnCode_t RTI_DLOptions::setQosProfile ( const char *  qosProfile)

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

Parameters
[in]qosProfileString containing the new Qos Profile.
int RTI_DLOptions::getQueueSize ( )

Gets the maximum queue size.

This field controls the size of the queue used to temporarily store log messages written 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.

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

Parameters
[in]queueSizeInteger containing the new maximum queue size.
struct DDS_ThreadSettings_t* RTI_DLOptions::getThreadSettings ( )
read

Get the thread settings of the publishing thread.

This field contains general settings of the publishing thread in Distributed Logger, like the thread priority, the 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)

Set the thread settings of the publishing thread.

This parameter is used to control thread parameters, like priority, stack size and other settings.

Parameters
[in]threadSettingsA valid DDS_ThreadSettings_t struct with the settings for Distributed Logger's write thread.
char* RTI_DLOptions::getApplicationKind ( )

Gets the application kind.

This char *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.

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.

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 recieved to the stdout. The default value is FALSE.

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 FALSE.

Parameters
[in]echoToStdoutNew value of set self.echoToStdout.

Distributed Logger API Version 1.6b [build 01] Copyright © Tue Feb 4 2014 Real-Time Innovations, Inc