Skip to content

Commit

Permalink
Add documentation for DomainParticipantExtendedQos (#805)
Browse files Browse the repository at this point in the history
* Add documentation for DomainParticipantExtendedQos

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>

* Refs #20896 Include API for ExtendedQos

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>

* Refs #20896 Apply suggested changes

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>

* Refs #20896 Apply suggested changes

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>

---------

Signed-off-by: Lucia Echevarria <luciaechevarria@eprosima.com>
  • Loading branch information
LuciaEchevarria99 authored Jun 24, 2024
1 parent de12490 commit d5dd448
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 0 deletions.
17 changes: 17 additions & 0 deletions code/DDSCodeTester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions docs/03-exports/aliases-api.include
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
.. |DomainParticipantFactory::get_default_participant_qos-api| replace:: :cpp:func:`get_default_participant_qos()<eprosima::fastdds::dds::DomainParticipantFactory::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()<eprosima::fastdds::dds::DomainParticipantFactory::get_dynamic_type_builder_from_xml_by_name>`
.. |DomainParticipantFactory::get_instance-api| replace:: :cpp:func:`get_instance()<eprosima::fastdds::dds::DomainParticipantFactory::get_instance>`
.. |DomainParticipantFactory::get_participant_extended_qos_from_profile-api| replace:: :cpp:func:`get_participant_extended_qos_from_profile()<eprosima::fastdds::dds::DomainParticipantFactory::get_participant_extended_qos_from_profile>`
.. |DomainParticipantFactory::load_XML_profiles_file-api| replace:: :cpp:func:`load_XML_profiles_file()<eprosima::fastdds::dds::DomainParticipantFactory::load_XML_profiles_file>`
.. |DomainParticipantFactory::load_XML_profiles_string-api| replace:: :cpp:func:`load_XML_profiles_string()<eprosima::fastdds::dds::DomainParticipantFactory::load_XML_profiles_string>`
.. |DomainParticipantFactory::set_default_participant_qos-api| replace:: :cpp:func:`set_default_participant_qos()<eprosima::fastdds::dds::DomainParticipantFactory::set_default_participant_qos>`
Expand Down Expand Up @@ -192,6 +193,7 @@
.. |DomainParticipantQos::typelookup_service_threads-api| replace:: :cpp:func:`typelookup_service_thread()<eprosima::fastdds::dds::DomainParticipantQos::typelookup_service_thread>`
.. |DomainParticipantQos::security_log_thread-api| replace:: :cpp:func:`security_log_thread()<eprosima::fastdds::dds::DomainParticipantQos::security_log_thread>`
.. |DomainParticipantQoS::setup_transports-api| replace:: :cpp:func:`setup_transports()<eprosima::fastdds::dds::DomainParticipantQos::setup_transports>`
.. |DomainParticipantExtendedQos-api| replace:: :cpp:class:`DomainParticipantExtendedQos<eprosima::fastdds::dds::DomainParticipantExtendedQos>`
.. |DomainParticipants-api| replace:: :cpp:class:`DomainParticipants <eprosima::fastdds::dds::DomainParticipant>`

.. |FlowControllerDescriptor-api| replace:: :cpp:class:`FlowControllerDescriptor<eprosima::fastdds::rtps::FlowControllerDescriptor>`
Expand Down
1 change: 1 addition & 0 deletions docs/fastdds/api_reference/dds_pim/domain/domain.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. _api_pim_domainparticipantextendedqos:

.. rst-class:: api-ref

DomainParticipantExtendedQos
----------------------------

.. doxygenclass:: eprosima::fastdds::dds::DomainParticipantExtendedQos
:project: FastDDS
:members:
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit d5dd448

Please sign in to comment.