Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[20869] Add documentation for DomainParticipantExtendedQos #805

Merged
merged 4 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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:
elianalf marked this conversation as resolved.
Show resolved Hide resolved
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
elianalf marked this conversation as resolved.
Show resolved Hide resolved
the |DomainParticipant-api| from |DomainParticipantQos-api|.

.. literalinclude:: /../code/DDSCodeTester.cpp
:language: c++
:start-after: //DDS_CHANGE_DOMAINPARTICIPANTEXTENDEDQOS
:end-before: //!
:dedent: 8