RTI Distributed Logger API
Version 6.1.2
|
This class contains RTI Distributed Logger configurable options. More...
Public Member Functions | |
RTI_DLOptions () | |
Default constructor. More... | |
~RTI_DLOptions () | |
Default destructor. More... | |
DDS_DomainParticipant * | getCDomainParticipantI () |
Gets current C DomainParticipant. More... | |
DDS_ReturnCode_t | setDomainParticipant (DDSDomainParticipant *domainParticipant) |
Sets current DomainParticipant. More... | |
bool | isRemoteAdministrationEnabled () |
Sets current DomainParticipant. More... | |
DDS_ReturnCode_t | setRemoteAdministrationEnabled (bool enabled) |
Enables or disables remote administration. More... | |
int | getFilterLevel () |
Gets the log filter level. More... | |
DDS_ReturnCode_t | setFilterLevel (int filterLevel) |
Sets the log filter level. More... | |
int | getDomainId () |
Gets the current Domain ID. More... | |
DDS_ReturnCode_t | setDomainId (int domainId) |
Sets the current Domain ID. More... | |
char * | getQosLibrary () |
Gets the Qos Library that will be used to create to RTI Distributed Logger. More... | |
DDS_ReturnCode_t | setQosLibrary (const char *qosLibrary) |
Sets the Qos Library that will be used to create to RTI Distributed Logger. More... | |
char * | getQosProfile () |
Gets the Qos Profile that will be used to create to RTI Distributed Logger. More... | |
DDS_ReturnCode_t | setQosProfile (const char *qosProfile) |
Sets the Qos Profile that will be used to create to RTI Distributed Logger. More... | |
int | getQueueSize () |
Gets the maximum queue size that will be assigned to RTI Distributed Logger. More... | |
DDS_ReturnCode_t | setQueueSize (int queueSize) |
Sets the maximum queue size that will be assigned to RTI Distributed Logger. More... | |
struct DDS_ThreadSettings_t * | getThreadSettings () |
Get the thread settings of the publishing threadthat will be created by RTI Distributed Logger. More... | |
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. More... | |
char * | getApplicationKind () |
Gets the application kind that will be associated with RTI Distributed Logger. More... | |
DDS_ReturnCode_t | setApplicationKind (const char *applicationKind) |
Sets the application kind that will be associated with RTI Distributed Logger. More... | |
bool | getEchoToStdout () |
Gets the current value of echoToStdout. More... | |
DDS_ReturnCode_t | setEchoToStdout (bool echoToStdout) |
Sets the value of echoToStdout. More... | |
bool | getLogInfrastructureMessages () |
Indicates whether Distributed Logger should also log all messages produced by infrastructure code automatically. More... | |
DDS_ReturnCode_t | setLogInfrastructureMessages (bool log) |
Enables or disables automatic logging of infrastructure messages. More... | |
Friends | |
class | RTI_DLDistLogger |
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.
RTI_DLOptions::RTI_DLOptions | ( | ) |
Default constructor.
Allocates memory for a RTI_DLOptions class and sets the default values needed to create the DL.
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.
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.
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.
[in] | domainParticipant | Pointer to a valid DDS_DomainParticipant |
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.
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.
[in] | enabled | Boolean 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.
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.
[in] | filterLevel | The log filter level of the options (see above). |
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.
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.
[in] | domainId | Int representing a DDS Domain ID. Max value: 250 |
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 "".
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.
[in] | qosLibrary | String containing the new Qos Library. A copy of the string is made. |
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 "".
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.
[in] | qosProfile | String containing the new Qos Profile. A copy of the string is made. |
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.
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.
[in] | queueSize | Integer containing the new maximum queue size. |
struct DDS_ThreadSettings_t* RTI_DLOptions::getThreadSettings | ( | ) |
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.
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.
[in] | threadSettings | A valid DDS_ThreadSettings_t struct with the settings for Distributed Logger's write thread. |
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 "".
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 "".
[in] | applicationKind | String 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.
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.
[in] | echoToStdout | New 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.
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.
[in] | log | Boolean indicating whether to enable this feature. |