RTI Distributed Logger API  Version 5.3.0
 All Data Structures Functions Variables Groups
RTI Distributed Logger Options API

Customize RTI Distributed Logger using this API. More...

Data Structures

struct  RTI_DL_Options
 This struct contains all RTI Distributed Logger's configurable options. More...
 

Functions

RTI_DL_OptionsRTI_DL_Options_createDefault ()
 Allocates memory for a RTI_DL_Options struct and sets the default values needed to create the Distributed Logger.
 
RTIBool RTI_DL_Options_copy (RTI_DL_Options *self, const RTI_DL_Options *other)
 Create a copy of a RTI Distributed Logger options instance.
 
DDS_DomainParticipant * RTI_DL_Options_getDomainParticipant (RTI_DL_Options *self)
 Gets the current DomainParticipant that will be used to create the RTI Distributed Logger's internal entities.
 
DDS_ReturnCode_t RTI_DL_Options_setDomainParticipant (RTI_DL_Options *self, DDS_DomainParticipant *domainParticipant)
 Sets the DomainParticipant to be used to create RTI Distributed Logger internal entities.
 
RTIBool RTI_DL_Options_getLogInfrastructureMessages (RTI_DL_Options *self)
 Indicates whether Distributed Logger should also log all messages produced by infrastructure code automatically.
 
DDS_ReturnCode_t RTI_DL_Options_setLogInfrastructureMessages (RTI_DL_Options *self, RTIBool log)
 Enables or disables automatic logging of infrastructure messages.
 
RTIBool RTI_DL_Options_isRemoteAdministrationEnabled (RTI_DL_Options *self)
 Indicates whether remote administration is enabled or not.
 
DDS_ReturnCode_t RTI_DL_Options_setRemoteAdministrationEnabled (RTI_DL_Options *self, RTIBool enabled)
 Enables or disables remote administration.
 
int RTI_DL_Options_getFilterLevel (RTI_DL_Options *self)
 Gets the log filter level.
 
DDS_ReturnCode_t RTI_DL_Options_setFilterLevel (RTI_DL_Options *self, int filterLevel)
 Sets the log filter level.
 
int RTI_DL_Options_getDomainId (RTI_DL_Options *self)
 Gets the current Domain ID.
 
DDS_ReturnCode_t RTI_DL_Options_setDomainId (RTI_DL_Options *self, int domainId)
 Sets the current Domain ID.
 
char * RTI_DL_Options_getQosLibrary (RTI_DL_Options *self)
 Gets the Qos Library that will be used to create to RTI Distributed Logger.
 
DDS_ReturnCode_t RTI_DL_Options_setQosLibrary (RTI_DL_Options *self, const char *qosLibrary)
 Sets the Qos Library that will be used to create to RTI Distributed Logger.
 
char * RTI_DL_Options_getQosProfile (RTI_DL_Options *self)
 Gets the Qos Profile that will be used to create to RTI Distributed Logger.
 
DDS_ReturnCode_t RTI_DL_Options_setQosProfile (RTI_DL_Options *self, const char *qosProfile)
 Sets the Qos Profile that will be used to create to RTI Distributed Logger.
 
int RTI_DL_Options_getQueueSize (RTI_DL_Options *self)
 Gets the maximum queue size that will be assigned to RTI Distributed Logger.
 
DDS_ReturnCode_t RTI_DL_Options_setQueueSize (RTI_DL_Options *self, int queueSize)
 Sets the maximum queue size that will be assigned to RTI Distributed Logger.
 
struct DDS_ThreadSettings_t * RTI_DL_Options_getThreadSettings (RTI_DL_Options *self)
 Gets the thread settings of the publishing thread that will be created by RTI Distributed Logger.
 
DDS_ReturnCode_t RTI_DL_Options_setThreadSettings (RTI_DL_Options *self, const struct DDS_ThreadSettings_t *threadSettings)
 Sets the settings of the publishing thread that will be created by RTI Distributed Logger.
 
char * RTI_DL_Options_getApplicationKind (RTI_DL_Options *self)
 Gets the application kind that will be associated with RTI Distributed Logger.
 
DDS_ReturnCode_t RTI_DL_Options_setApplicationKind (RTI_DL_Options *self, const char *applicationKind)
 Sets the application kind that will be associated with RTI Distributed Logger.
 
RTIBool RTI_DL_Options_getEchoToStdout (RTI_DL_Options *self)
 Gets the current value of echoToStdout option.
 
DDS_ReturnCode_t RTI_DL_Options_setEchoToStdout (RTI_DL_Options *self, RTIBool echoToStdout)
 Sets the value of echoToStdout flag.
 
RTI_DL_OptionsRTI_DL_Options_delete (RTI_DL_Options *self)
 Releases memory for a RTI_DL_Options. Checks whether the pointer exists or not.
 

Detailed Description

Customize RTI Distributed Logger using this API.

Function Documentation

RTI_DL_Options* RTI_DL_Options_createDefault ( )

Allocates memory for a RTI_DL_Options struct and sets the default values needed to create the Distributed Logger.

Returns
Pointer to a working RTI_DL_Options struct
Postcondition
Memory must be release using RTI_DL_Options_delete
See Also
RTI_DL_Options_delete()
RTIBool RTI_DL_Options_copy ( RTI_DL_Options self,
const RTI_DL_Options other 
)

Create a copy of a RTI Distributed Logger options instance.

This method creates a deep copy of a RTI Distributed Logger options object.

Precondition
The self options instance is not null and has been initialized with the default values.
Parameters
[out]selfAlready created RTI_DL_Options struct where we want to copy the values in.
[in]otherRTI_DL_Options containing the values to be copied in self.
Returns
If the copy process was successful then returns true. Otherwise it returns false.
DDS_DomainParticipant* RTI_DL_Options_getDomainParticipant ( RTI_DL_Options self)

Gets the current DomainParticipant that will be used to create the RTI Distributed Logger's internal entities.

If a customized DomainParticipant has been set, this function returns a pointer to it. If this field is not null, this is the DomainParticipant. Otherwise, it returns the default value, NULL.

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
Pointer to the DDS_DomainParticipant contained in the struct.
See Also
RTI_DL_Options_getDomainParticipant
DDS_ReturnCode_t RTI_DL_Options_setDomainParticipant ( RTI_DL_Options self,
DDS_DomainParticipant *  domainParticipant 
)

Sets the DomainParticipant to be used to create RTI Distributed Logger internal entities.

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,out]selfPointer to a working RTI_DL_Options struct
[in]domainParticipantPointer to a valid DDS_DomainParticipant
Postcondition
Memory must be released by the user after finalizing RTI Distributed Logger using RTI_DL_DistLogger_finalizeInstance.
Returns
DDS_RETCODE_OK if the operation was a success.
RTIBool RTI_DL_Options_getLogInfrastructureMessages ( RTI_DL_Options self)

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.

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
Boolean to the current LogInfrastructureMessages value.
DDS_ReturnCode_t RTI_DL_Options_setLogInfrastructureMessages ( RTI_DL_Options self,
RTIBool  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.

Parameters
[in,out]selfPointer to a working RTI_DL_Options struct
[in]logBoolean indicating whether to enable this feature.
Returns
DDS_RETCODE_OK if the operation was a success.
RTIBool RTI_DL_Options_isRemoteAdministrationEnabled ( RTI_DL_Options self)

Indicates whether remote administration is enabled or not.

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

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
true if the Remote Administration is enabled. Otherwise false.
DDS_ReturnCode_t RTI_DL_Options_setRemoteAdministrationEnabled ( RTI_DL_Options self,
RTIBool  enabled 
)

Enables or disables remote administration.

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

Parameters
[in,out]selfPointer to a working RTI_DL_Options struct
[in]enabledBoolean indicating new remote administration value.
Returns
DDS_RETCODE_OK if the operation was a success.
int RTI_DL_Options_getFilterLevel ( RTI_DL_Options self)

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.

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
integer containing the log filter level value of the options.
See Also
RTI_DL_DistLogger_setFilterLevel
DDS_ReturnCode_t RTI_DL_Options_setFilterLevel ( RTI_DL_Options self,
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,out]selfPointer to a working RTI_DL_Options struct
[in]filterLevelInteger containing the log filter level value of the options.
Returns
DDS_RETCODE_OK if the operation was a success
See Also
RTI_DL_DistLogger_setFilter for more details.
int RTI_DL_Options_getDomainId ( RTI_DL_Options self)

Gets the current Domain ID.

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

The default value is 0.

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
Integer containing the DDS Domain ID where RTI Distributed Logger instance will be created.
DDS_ReturnCode_t RTI_DL_Options_setDomainId ( RTI_DL_Options self,
int  domainId 
)

Sets the current Domain ID.

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

The default value is 0.

Parameters
[in,out]selfPointer to a working RTI_DL_Options struct.
[in]domainIdInteger representing a DDS Domain ID. Max value 250.
Returns
DDS_RETCODE_OK if the operation was a success.
char* RTI_DL_Options_getQosLibrary ( RTI_DL_Options self)

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 runtime for RTI Distributed Logger to use. The default value is "".

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
Pointer to a string containing the current Qos Library. Do not modify the content of this pointer directly nor delete it.
DDS_ReturnCode_t RTI_DL_Options_setQosLibrary ( RTI_DL_Options self,
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,out]selfPointer to a working RTI_DL_Options struct.
[in]qosLibraryPointer to a char containing the new Qos Library. A copy of the string is made.
Returns
DDS_RETCODE_OK if the operation was a success.
char* RTI_DL_Options_getQosProfile ( RTI_DL_Options self)

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

Parameters
[in]selfPointer to a working RTI_DL_Options struct.
Returns
Pointer to a char containing the current Qos Profile. Do not modify the content of this pointer directly nor delete it.
DDS_ReturnCode_t RTI_DL_Options_setQosProfile ( RTI_DL_Options self,
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,out]selfPointer to a working RTI_DL_Options struct.
[in]qosProfilePointer to a char containing the new Qos profile. A copy of the string is made.
Returns
DDS_RETCODE_OK if the operation was a success.
int RTI_DL_Options_getQueueSize ( RTI_DL_Options self)

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.

Parameters
[in]selfPointer to a working RTI_DL_Options struct
Returns
Integer containing the current maximum queue size.
DDS_ReturnCode_t RTI_DL_Options_setQueueSize ( RTI_DL_Options self,
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,out]selfPointer to a working RTI_DL_Options struct.
[in]queueSizeInteger containing the new maximum queue size.
Returns
DDS_RETCODE_OK if the operation was a success.
struct DDS_ThreadSettings_t* RTI_DL_Options_getThreadSettings ( RTI_DL_Options self)
read

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

This fields controls the priority of the thread that sends the messages through DDS. The default values are defined in dds_c_infrastructure.h.

Parameters
[in]selfPointer to a working RTI_DL_Options struct.
Returns
The thread settings defined in the options.
DDS_ReturnCode_t RTI_DL_Options_setThreadSettings ( RTI_DL_Options self,
const struct DDS_ThreadSettings_t *  threadSettings 
)

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

This field controls the settings of the thread that sends the messages through DDS. These settings only affect the publishing thread created by RTI Distributed Logger.

Parameters
[in,out]selfPointer to a working RTI_DL_Options struct.
[in]threadSettingsThe thread settings to apply to the options. Must be a valid RTI_OSAPI_THREAD_PRIORITY value.
Returns
DDS_RETCODE_OK if the operation was a success.
char* RTI_DL_Options_getApplicationKind ( RTI_DL_Options self)

Gets 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]selfPointer to a working RTI_DL_Options struct.
Returns
Pointer to a char containing the current application kind
DDS_ReturnCode_t RTI_DL_Options_setApplicationKind ( RTI_DL_Options self,
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,out]selfPointer to a working RTI_DL_Options struct.
[in]applicationKindPointer to a string containing the new application kind.
Returns
DDS_RETCODE_OK if the operation was a success.
RTIBool RTI_DL_Options_getEchoToStdout ( RTI_DL_Options self)

Gets the current value of echoToStdout option.

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

Parameters
[in]selfPointer to a working RTI_DL_Options.
Returns
Boolean to the current echoToStdout value
DDS_ReturnCode_t RTI_DL_Options_setEchoToStdout ( RTI_DL_Options self,
RTIBool  echoToStdout 
)

Sets the value of echoToStdout flag.

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

Parameters
[in,out]selfPointer to a working RTI_DL_Options.
[in]echoToStdoutNew value of set self.echoToStdout.
Returns
DDS_RETCODE_OK if the operation was a success.
RTI_DL_Options* RTI_DL_Options_delete ( RTI_DL_Options self)

Releases memory for a RTI_DL_Options. Checks whether the pointer exists or not.

Parameters
[in]selfPointer to a working RTI_DL_Options struct. Checks whether the parameter is NULL or not.
Returns
NULL if everything goes as planned.
Postcondition
self->domainParticipant will not be deleted.

RTI Distributed Logger API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc