.. include:: ../../03-exports/aliases.include .. include:: ../../03-exports/aliases-api.include .. include:: ../../03-exports/roles.include .. _publisherprofiles: DataWriter profiles ------------------- The DataWriter profiles allow for configuring |DataWriters| from an XML file. These profiles are defined within the ```` XML tags. DataWriter XML attributes ^^^^^^^^^^^^^^^^^^^^^^^^^ The ```` element has two attributes defined: ``profile_name`` and ``is_default_profile``. .. list-table:: :header-rows: 1 :align: left * - Name - Description - Use * - ``profile_name`` - Sets the name under which the ```` profile is registered in the DDS Domain, |br| so that it can be loaded later by the |DomainParticipant|, as shown in |br| :ref:`loadingapplyingprofiles`. - Mandatory * - ``is_default_profile`` - Sets the ```` profile as the default profile. Thus, if a default profile |br| exists, it will be used when no other DataWriter profile is specified at the |br| DataWriter's creation. - Optional DataWriter configuration ^^^^^^^^^^^^^^^^^^^^^^^^ The DataWriter configuration is performed through the XML elements listed in the following table. .. list-table:: :header-rows: 1 :align: left * - Name - Description - Values - Default * - ```` - :ref:`TopicType` configuration of the DataWriter. - :ref:`TopicType` - * - ```` - DataWriter :ref:`CommonQOS` configuration. - :ref:`CommonQOS` - * - ```` - It configures some time related parameters |br| of the DataWriter. - :ref:`WriterTimes ` - * - ```` - List of input unicast locators. |br| It expects a :ref:`LocatorListType`. - ```` - * - ```` - List of input multicast locators. |br| It expects a :ref:`LocatorListType`. - ```` - * - ```` - List of :ref:`external_locators` |br| to announce for the communication |br| with this DataWriter. - :ref:`externalLocatorListType` - * - ```` - Whether to ignore locators received on |br| announcements from other entities when |br| they don't match with any of the locators |br| announced by this DataWriter. - ``bool`` - false * - ```` - Memory allocation kind for DataWriter's |br| history. See :ref:`historyqospolicykind`. - :ref:`historymemorypoliciesXML` - |PREALLOCATED-xml-api| * - ```` - Additional configuration properties. - :ref:`PropertiesPolicyType` - * - ```` - Used for |EDPStatic|. - ``int16_t`` - -1 * - ```` - Sets the |RTPSEndpointQos::entity_id-api| of the |RTPSEndpointQos| |br| class. - ``int16_t`` - -1 * - ```` - Sets the limits of the collection of matched |br| DataReaders. See |br| :ref:`participantresourcelimitsqos`. - :ref:`CommonAlloc` - **Example** .. literalinclude:: /../code/XMLTester.xml :language: xml :start-after: XML-DATAWRITER<--> :end-before: <--> :lines: 2-4, 6-86, 88-89 .. note:: - :class:`LOCATOR_LIST` means a :ref:`LocatorListType` is expected. - :class:`EXTERNAL_LOCATOR_LIST` means a :ref:`externalLocatorListType` is expected. - :class:`PROPERTIES_POLICY` means that the label is a :ref:`PropertiesPolicyType` block. - For :class:`QOS` details, please refer to :ref:`CommonQOS`. - :class:`TOPIC_TYPE` is detailed in section :ref:`TopicType`. .. _pubtimes: WriterTimes """"""""""" These parameters are included within :ref:`rtpsreliablewriterqos` in the :ref:`writertimes` structure. +------------------------------+-------------------------------------------------------+---------------------+---------+ | Name | Description | Values | Default | +==============================+=======================================================+=====================+=========+ | ```` | Initial heartbeat delay. | :ref:`DurationType` | 12 ms | +------------------------------+-------------------------------------------------------+---------------------+---------+ | ```` | Periodic heartbeat period. | :ref:`DurationType` | 3 s | +------------------------------+-------------------------------------------------------+---------------------+---------+ | ```` | Delay to apply to the response of an ACKNACK message. | :ref:`DurationType` | 5 ms | +------------------------------+-------------------------------------------------------+---------------------+---------+ | ```` | This time allows the DataWriter to ignore NACK |br| | :ref:`DurationType` | 0 ms | | | messages for a given period of time right after |br| | | | | | the data has been sent. | | | +------------------------------+-------------------------------------------------------+---------------------+---------+