diff --git a/code/DDSCodeTester.cpp b/code/DDSCodeTester.cpp index f8dc5a74a..fa943445f 100644 --- a/code/DDSCodeTester.cpp +++ b/code/DDSCodeTester.cpp @@ -418,6 +418,23 @@ void dds_domain_examples() //!-- } + { + //DDS_CHANGE_DOMAINPARTICIPANTEXTENDEDQOS + // Create a DomainParticipant with DomainParticipantExtendedQos from profile + DomainParticipantExtendedQos profile_extended_qos; + DomainParticipantFactory::get_instance()->get_participant_extended_qos_from_profile("participant_profile", + profile_extended_qos); + + DomainParticipant* participant = + DomainParticipantFactory::get_instance()->create_participant(profile_extended_qos); + if (nullptr == participant) + { + // Error + return; + } + //!-- + } + { //DDS_CHANGE_DOMAINPARTICIPANTQOS_TO_DEFAULT // Create a custom DomainParticipantQos diff --git a/docs/03-exports/aliases-api.include b/docs/03-exports/aliases-api.include index 203a290e5..a20c10ad7 100644 --- a/docs/03-exports/aliases-api.include +++ b/docs/03-exports/aliases-api.include @@ -161,6 +161,7 @@ .. |DomainParticipantFactory::get_default_participant_qos-api| replace:: :cpp:func:`get_default_participant_qos()` .. |DomainParticipantFactory::get_dynamic_type_builder_from_xml_by_name-api| replace:: :cpp:func:`DomainParticipantFactory::get_dynamic_type_builder_from_xml_by_name()` .. |DomainParticipantFactory::get_instance-api| replace:: :cpp:func:`get_instance()` +.. |DomainParticipantFactory::get_participant_extended_qos_from_profile-api| replace:: :cpp:func:`get_participant_extended_qos_from_profile()` .. |DomainParticipantFactory::load_XML_profiles_file-api| replace:: :cpp:func:`load_XML_profiles_file()` .. |DomainParticipantFactory::load_XML_profiles_string-api| replace:: :cpp:func:`load_XML_profiles_string()` .. |DomainParticipantFactory::set_default_participant_qos-api| replace:: :cpp:func:`set_default_participant_qos()` @@ -192,6 +193,7 @@ .. |DomainParticipantQos::typelookup_service_threads-api| replace:: :cpp:func:`typelookup_service_thread()` .. |DomainParticipantQos::security_log_thread-api| replace:: :cpp:func:`security_log_thread()` .. |DomainParticipantQoS::setup_transports-api| replace:: :cpp:func:`setup_transports()` +.. |DomainParticipantExtendedQos-api| replace:: :cpp:class:`DomainParticipantExtendedQos` .. |DomainParticipants-api| replace:: :cpp:class:`DomainParticipants ` .. |FlowControllerDescriptor-api| replace:: :cpp:class:`FlowControllerDescriptor` diff --git a/docs/fastdds/api_reference/dds_pim/domain/domain.rst b/docs/fastdds/api_reference/dds_pim/domain/domain.rst index 818a7151c..e1d382a24 100644 --- a/docs/fastdds/api_reference/dds_pim/domain/domain.rst +++ b/docs/fastdds/api_reference/dds_pim/domain/domain.rst @@ -9,3 +9,4 @@ Domain /fastdds/api_reference/dds_pim/domain/domainparticipantfactoryqos.rst /fastdds/api_reference/dds_pim/domain/domainparticipantlistener.rst /fastdds/api_reference/dds_pim/domain/domainparticipantqos.rst + /fastdds/api_reference/dds_pim/domain/domainparticipantextendedqos.rst diff --git a/docs/fastdds/api_reference/dds_pim/domain/domainparticipantextendedqos.rst b/docs/fastdds/api_reference/dds_pim/domain/domainparticipantextendedqos.rst new file mode 100644 index 000000000..4cb0b6576 --- /dev/null +++ b/docs/fastdds/api_reference/dds_pim/domain/domainparticipantextendedqos.rst @@ -0,0 +1,10 @@ +.. _api_pim_domainparticipantextendedqos: + +.. rst-class:: api-ref + +DomainParticipantExtendedQos +---------------------------- + +.. doxygenclass:: eprosima::fastdds::dds::DomainParticipantExtendedQos + :project: FastDDS + :members: diff --git a/docs/fastdds/dds_layer/domain/domainParticipant/createDomainParticipant.rst b/docs/fastdds/dds_layer/domain/domainParticipant/createDomainParticipant.rst index 7b51d058e..d41a2fb1d 100644 --- a/docs/fastdds/dds_layer/domain/domainParticipant/createDomainParticipant.rst +++ b/docs/fastdds/dds_layer/domain/domainParticipant/createDomainParticipant.rst @@ -20,6 +20,11 @@ Mandatory arguments are: * The :ref:`dds_layer_domainParticipantQos` describing the behavior of the DomainParticipant. If the provided value is :class:`TOPIC_QOS_DEFAULT`, the value of the DomainParticipantQos is used. +Alternatively, instead of the two mandatory arguments above, you can use: + + * The :ref:`dds_layer_domainParticipantExtendedQos` which encompasses both the |DomainId-api| and + the :ref:`dds_layer_domainParticipantQos`. + Optional arguments are: * A Listener derived from :ref:`dds_layer_domainParticipantListener`, implementing the callbacks diff --git a/docs/fastdds/dds_layer/domain/domainParticipant/domainParticipant.rst b/docs/fastdds/dds_layer/domain/domainParticipant/domainParticipant.rst index 34e199efa..c8afb420f 100644 --- a/docs/fastdds/dds_layer/domain/domainParticipant/domainParticipant.rst +++ b/docs/fastdds/dds_layer/domain/domainParticipant/domainParticipant.rst @@ -156,3 +156,25 @@ This will reset the current default DomainParticipantQos to the default construc * On |DomainParticipantFactory::set_default_participant_qos-api| it refers to the default constructed |DomainParticipantQoS::DomainParticipantQoS-api|. + +.. _dds_layer_domainParticipantExtendedQos: + +DomainParticipantExtendedQos +---------------------------- + +|DomainParticipantExtendedQos-api| is an extension of |DomainParticipantQos-api| that includes both +the |DomainId-api| and the |DomainParticipantQos-api| objects of a DomainParticipant. +This class is useful for simplifying the creation and configuration of a DomainParticipant, +as it allows specifying all necessary settings in a single object. + +This |DomainParticipantExtendedQos-api| can be obtained from the loaded profiles with +|DomainParticipantFactory::get_participant_extended_qos_from_profile-api| and then create |DomainParticipant-api| +with those |DomainParticipantExtendedQos-api|. +The QoS value of a previously created DomainParticipant can be modified similarly as when creating +the |DomainParticipant-api| from |DomainParticipantQos-api|. + +.. literalinclude:: /../code/DDSCodeTester.cpp + :language: c++ + :start-after: //DDS_CHANGE_DOMAINPARTICIPANTEXTENDEDQOS + :end-before: //! + :dedent: 8