.. _dds_layers_domain_participant: DomainParticipant ================== A ``DomainParticipant`` is the entry point of the application to a domain. Every DomainParticipant is linked to a single domain from its creation, and contains all the Entities related to that domain. It also acts as a factory for :ref:`dds_layers_publication_publisher`, :ref:`dds_layers_subscription_subscriber` and :ref:`dds_layers_topic` entities. The behavior of the DomainParticipant can be modified with the QoS values specified on :ref:`dds_layers_domain_participant_qos`. The QoS values can be set at the creation of the DomainParticipant. As an Entity, DomainParticipant accepts a :ref:`dds_layers_domain_participant_listener` that will be notified of status changes on the DomainParticipant instance. .. _dds_layers_domain_participant_qos: DomainParticipantQos -------------------- ``DomainParticipantQos`` controls the behavior of the DomainParticipant. Internally it contains the following :ref:`dds_layers_infrastructure_policies` objects: * ``participant_name`` as ``memory::container::StaticString256`` The name of the DomainParticipant. * ``entity_factory_qos`` as :ref:`entityfactoryqospolicy` Defines if the DomainParticipant will automatically enable created subentities or not. * ``wire_protocol_qos`` as :ref:`dds_layers_infrastructure_safedds_policies_domainparticipantwireprotocolconfigqospolicy` The configuration of the wire protocol. * ``allocations`` as :ref:`dds_layers_infrastructure_safedds_policies_domainparticipantallocationsqospolicy` Defines the memory configuration of the DomainParticipant. .. note:: Check :ref:`architecture_platform_memory_management` to understand how memory is managed in Safe DDS. Example ^^^^^^^ .. literalinclude:: ../../../code/policies_examples/main.cpp :language: c++ :dedent: 8 :start-after: // DDS_DOMAINPARTICIPANT_QOS :end-before: //! DDS_DOMAINPARTICIPANT_QOS