RTI Distributed Logger Modern C++ API Version 7.2.0
|
This class contains RTI Distributed Logger configurable options. More...
#include <rti/distlogger/DistLoggerOptions.hpp>
Public Member Functions | |
dds::domain::DomainParticipant | domain_participant () const |
Gets currently set Domain Participant. More... | |
void | domain_participant (const dds::domain::DomainParticipant &domain_participant) |
Sets current Domain Participant. More... | |
bool | remote_administration_enabled () const |
Indicates whether or not remote administration is enabled. More... | |
void | remote_administration_enabled (bool enabled) |
Enables or disables remote administration. More... | |
int | filter_level () const |
Gets the log filter level. More... | |
void | filter_level (int filter_level) |
Sets the log filter level. More... | |
int | domain_id () const |
Gets the current Domain ID. More... | |
void | domain_id (int domain_id) |
Sets the current Domain ID. More... | |
rti::core::optional_value< std::string > | qos_library () const |
Gets the Qos Library that will be used to create to RTI Distributed Logger. More... | |
void | qos_library (const rti::core::optional_value< std::string > &qos_library) |
Sets the Qos Library that will be used to create to RTI Distributed Logger. More... | |
rti::core::optional_value< std::string > | qos_profile () const |
Gets the Qos Profile that will be used to create to RTI Distributed Logger. More... | |
void | qos_profile (const rti::core::optional_value< std::string > &qos_profile) |
Sets the Qos Profile that will be used to create to RTI Distributed Logger. More... | |
int | queue_size () const |
Gets the maximum queue size that will be assigned to RTI Distributed Logger. More... | |
void | queue_size (int queue_size) |
Sets the maximum queue size that will be assigned to RTI Distributed Logger. More... | |
rti::core::ThreadSettings | thread_settings () const |
Get the thread settings of the publishing thread that will be created by RTI Distributed Logger. More... | |
void | thread_settings (const rti::core::ThreadSettings &thread_settings) |
Sets the settings of the publishing thread that will be created by RTI Distributed Logger. More... | |
rti::core::optional_value< std::string > | application_kind () const |
Gets the application kind that will be associated with RTI Distributed Logger. More... | |
void | application_kind (const rti::core::optional_value< std::string > &application_kind) |
Sets the application kind that will be associated with RTI Distributed Logger. More... | |
bool | echo_to_stdout () const |
Indicates whether this feature is enabled. More... | |
void | echo_to_stdout (bool echo_to_stdout) |
Enables or disables this feature. More... | |
bool | log_infrastructure_messages () const |
Indicates whether Distributed Logger should also log all messages produced by infrastructure code automatically. More... | |
void | log_infrastructure_messages (bool log) |
Enables or disables automatic logging of infrastructure messages. More... | |
bool | operator== (const DistLoggerOptions &other) const |
Compares two objects for equality. More... | |
bool | operator!= (const DistLoggerOptions &other) const |
Compares two objects for inequality. More... | |
Friends | |
void | swap (DistLoggerOptions &left, DistLoggerOptions &right) noexcept |
Swaps two objects. More... | |
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 DistLoggerOptions object to the RTI Distributed Logger singleton before calling to DistLogger::get_instance().
dds::domain::DomainParticipant rti::dist_logger::DistLoggerOptions::domain_participant | ( | ) | const |
Gets currently set Domain Participant.
void rti::dist_logger::DistLoggerOptions::domain_participant | ( | const dds::domain::DomainParticipant & | domain_participant | ) |
Sets current Domain Participant.
There are several use cases in which you may want to use your own Domain Participant to create RTI Distributed Logger internal DDS entities. By calling this function, you will have control of the Domain Participant used by RTI Distributed Logger. Once assigned, domain_participant
will be used to create the DDS entities (Topics, Publishers, Subscribers, DataWriters, & DataReaders) needed by RTI Distributed Logger. If domain_participant
is set, the associated Distributed Logger instance must be finalized before finalizing the Domain Participant Factory.
domain_participant | The dds::domain::DomainParticipant to use. |
bool rti::dist_logger::DistLoggerOptions::remote_administration_enabled | ( | ) | const |
Indicates whether or not remote administration is enabled.
If true, remote administration Topics will be created and used. If false, they will not be created. The default value is true.
void rti::dist_logger::DistLoggerOptions::remote_administration_enabled | ( | bool | enabled | ) |
Enables or disables remote administration.
Sets remote administration of the Topics to the value passed as parameter.
enabled | A bool indicating whether or not to enable remote administration. |
int rti::dist_logger::DistLoggerOptions::filter_level | ( | ) | const |
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.
void rti::dist_logger::DistLoggerOptions::filter_level | ( | int | filter_level | ) |
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.
filter_level | The log filter level of the options (see above). |
int rti::dist_logger::DistLoggerOptions::domain_id | ( | ) | const |
Gets the current Domain ID.
Returns the Domain ID to be used by RTI Distributed Logger. This value is only used if a Domain Participant has not been set. Otherwise, the Domain ID used is the one of the set Domain Participant
The default value is 0.
void rti::dist_logger::DistLoggerOptions::domain_id | ( | int | domain_id | ) |
Sets the current Domain ID.
Update the Domain ID to be used by RTI Distributed Logger. This value is only used if a Domain Participant has not been set. Otherwise, the Domain ID used is the one of the set Domain Participant.
The default value is 0.
domain_id | Int representing a DDS Domain ID. Max value: 250 |
rti::core::optional_value< std::string > rti::dist_logger::DistLoggerOptions::qos_library | ( | ) | const |
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 the Distributed Logger to use.
void rti::dist_logger::DistLoggerOptions::qos_library | ( | const rti::core::optional_value< std::string > & | qos_library | ) |
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.
qos_library | rti::core::optional_value<std::string> containing the Qos Library to set. |
rti::core::optional_value< std::string > rti::dist_logger::DistLoggerOptions::qos_profile | ( | ) | const |
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.
void rti::dist_logger::DistLoggerOptions::qos_profile | ( | const rti::core::optional_value< std::string > & | qos_profile | ) |
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.
qos_profile | rti::core::optional_value<std::string> containing the Qos Profile to set. |
int rti::dist_logger::DistLoggerOptions::queue_size | ( | ) | const |
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.
void rti::dist_logger::DistLoggerOptions::queue_size | ( | int | queue_size | ) |
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.
queue_size | Integer containing the new maximum queue size. |
rti::core::ThreadSettings rti::dist_logger::DistLoggerOptions::thread_settings | ( | ) | const |
Get the thread settings of the publishing thread that 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.
void rti::dist_logger::DistLoggerOptions::thread_settings | ( | const rti::core::ThreadSettings & | thread_settings | ) |
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.
thread_settings | A valid rti::core::ThreadSettings object with the settings for Distributed Logger's write thread. |
rti::core::optional_value< std::string > rti::dist_logger::DistLoggerOptions::application_kind | ( | ) | const |
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.
void rti::dist_logger::DistLoggerOptions::application_kind | ( | const rti::core::optional_value< std::string > & | application_kind | ) |
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.
application_kind | rti::core::optional_value<std::string> containing the new application kind. |
bool rti::dist_logger::DistLoggerOptions::echo_to_stdout | ( | ) | const |
Indicates whether this feature is enabled.
If true, Distributed Logger prints the log messages received to the stdout. The default value is true.
void rti::dist_logger::DistLoggerOptions::echo_to_stdout | ( | bool | echo_to_stdout | ) |
Enables or disables this feature.
If true, Distributed Logger prints the log messages received to the stdout. The default value is true.
echo_to_stdout | A bool indicating whether or not to enable this feature. |
bool rti::dist_logger::DistLoggerOptions::log_infrastructure_messages | ( | ) | const |
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.
void rti::dist_logger::DistLoggerOptions::log_infrastructure_messages | ( | 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 the rti::config::Logger::set_device() API will be unregistered. Similarly Distributed Logger will stop logging infrastructure messages if the set_device() API is used to register a new device after the creation of the Distributed Logger instance.
log | bool indicating whether or not to enable this feature. |
bool rti::dist_logger::DistLoggerOptions::operator== | ( | const DistLoggerOptions & | other | ) | const |
Compares two objects for equality.
other | The other object to compare. |
bool rti::dist_logger::DistLoggerOptions::operator!= | ( | const DistLoggerOptions & | other | ) | const |
Compares two objects for inequality.
other | The other object to compare. |
|
friend |
Swaps two objects.
left | One of the objects to swap. |
right | The other object to swap. |