fastdds配置文件详解

https://zhuanlan.zhihu.com/p/1921591083026061007

https://fast-dds.docs.eprosima.com/en/stable/fastdds/xml_configuration/common.html#locatorlisttype

https://fast-dds.docs.eprosima.com/en/stable/fastdds/xml_configuration/example.html

<?xml version="1.0" encoding="UTF-8" ?>
<dds xmlns="http://www.eprosima.com">
    <profiles>
        <transport_descriptors>
            <!-- TCP sample transport descriptor -->
            <transport_descriptor>
                <transport_id>ExampleTransportId1</transport_id>
                <type>TCPv4</type>
                <sendBufferSize>8192</sendBufferSize>
                <receiveBufferSize>8192</receiveBufferSize>
                <maxMessageSize>16384</maxMessageSize>
                <maxInitialPeersRange>100</maxInitialPeersRange>
                <netmask_filter>AUTO</netmask_filter>
                <interfaces>
                    <allowlist>
                        <interface name="wlp59s0" netmask_filter="ON"/>
                    </allowlist>
                    <blocklist>
                        <interface name="127.0.0.1"/>
                        <interface name="docker0"/>
                    </blocklist>
                </interfaces>
                <interfaceWhiteList>
                    <address>192.168.1.41</address>
                    <interface>lo</interface>
                </interfaceWhiteList>
                <wan_addr>80.80.55.44</wan_addr>
                <keep_alive_frequency_ms>5000</keep_alive_frequency_ms>
                <keep_alive_timeout_ms>25000</keep_alive_timeout_ms>
                <max_logical_port>200</max_logical_port>
                <logical_port_range>20</logical_port_range>
                <logical_port_increment>2</logical_port_increment>
                <listening_ports>
                    <port>5100</port>
                    <port>5200</port>
                </listening_ports>
                <tls>
                    <password>Password</password>
                    <private_key_file>Key_file.pem</private_key_file>
                    <rsa_private_key_file>RSA_file.pem</rsa_private_key_file>
                    <cert_chain_file>Chain.pem</cert_chain_file>
                    <tmp_dh_file>DH.pem</tmp_dh_file>
                    <verify_file>verify.pem</verify_file>
                    <verify_mode>
                        <verify>VERIFY_PEER</verify>
                    </verify_mode>
                    <options>
                        <option>NO_TLSV1</option>
                        <option>NO_TLSV1_1</option>
                    </options>
                    <verify_paths>
                        <verify_path>Path1</verify_path>
                        <verify_path>Path2</verify_path>
                        <verify_path>Path3</verify_path>
                    </verify_paths>
                    <verify_depth>55</verify_depth>
                    <default_verify_path>true</default_verify_path>
                    <handshake_role>SERVER</handshake_role>
                    <server_name>my_server.com</server_name>
                </tls>
                <calculate_crc>false</calculate_crc>
                <check_crc>false</check_crc>
                <enable_tcp_nodelay>false</enable_tcp_nodelay>
                <default_reception_threads>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </default_reception_threads>
                <reception_threads>
                    <reception_thread port="12345">
                        <scheduling_policy>-1</scheduling_policy>
                        <priority>0</priority>
                        <affinity>0</affinity>
                        <stack_size>-1</stack_size>
                    </reception_thread>
                </reception_threads>
            </transport_descriptor>
            <!-- UDP sample transport descriptor. Several options are common with TCP -->
            <transport_descriptor>
                <transport_id>ExampleTransportId2</transport_id>
                <type>UDPv6</type>
                <TTL>250</TTL>
                <non_blocking_send>false</non_blocking_send>
                <output_port>5101</output_port>
                <default_reception_threads>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </default_reception_threads>
                <reception_threads>
                    <reception_thread port="12345">
                        <scheduling_policy>-1</scheduling_policy>
                        <priority>0</priority>
                        <affinity>0</affinity>
                        <stack_size>-1</stack_size>
                    </reception_thread>
                </reception_threads>
            </transport_descriptor>
            <!-- SHM sample transport descriptor -->
            <transport_descriptor>
                <transport_id>SHM_SAMPLE_DESCRIPTOR</transport_id>
                <type>SHM</type> <!-- REQUIRED -->
                <maxMessageSize>524288</maxMessageSize> <!-- OPTIONAL uint32 valid of all transports-->
                <segment_size>1048576</segment_size> <!-- OPTIONAL uint32 SHM only-->
                <port_queue_capacity>1024</port_queue_capacity> <!-- OPTIONAL uint32 SHM only-->
                <healthy_check_timeout_ms>250</healthy_check_timeout_ms> <!-- OPTIONAL uint32 SHM only-->
                <rtps_dump_file>test_file.dump</rtps_dump_file> <!-- OPTIONAL string SHM only-->
                <default_reception_threads> <!-- OPTIONAL -->
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </default_reception_threads>
                <reception_threads> <!-- OPTIONAL -->
                    <reception_thread port="12345">
                        <scheduling_policy>-1</scheduling_policy>
                        <priority>0</priority>
                        <affinity>0</affinity>
                        <stack_size>-1</stack_size>
                    </reception_thread>
                </reception_threads>
                <dump_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </dump_thread>
            </transport_descriptor>
        </transport_descriptors>

        <domainparticipant_factory profile_name="domainparticipant_factory_profile_name">
            <qos>
                <entity_factory>
                    <autoenable_created_entities>true</autoenable_created_entities>
                </entity_factory>
                <shm_watchdog_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </shm_watchdog_thread>
                <file_watch_threads>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </file_watch_threads>
            </qos>
        </domainparticipant_factory>

        <participant profile_name="participant_profile_example">
            <domainId>4</domainId>
            <rtps>
                <name>Participant Name</name> <!-- String -->

                <defaultUnicastLocatorList>
                    <locator>
                        <udpv4>
                            <!-- Access as physical, like UDP -->
                            <port>7400</port>
                            <address>localhost</address>
                        </udpv4>
                    </locator>
                    <locator>
                        <tcpv4>
                            <!-- Both physical and logical (port), like TCP -->
                            <physical_port>5100</physical_port>
                            <port>7400</port>
                            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                            <wan_address>80.80.99.45</wan_address>
                            <address>192.168.1.55</address>
                        </tcpv4>
                    </locator>
                    <locator>
                        <udpv6>
                            <port>8844</port>
                            <address>::1</address>
                        </udpv6>
                    </locator>
                </defaultUnicastLocatorList>

                <defaultMulticastLocatorList>
                    <locator>
                        <udpv4>
                            <!-- Access as physical, like UDP -->
                            <port>7400</port>
                            <address>192.168.1.41</address>
                        </udpv4>
                    </locator>
                    <locator>
                        <tcpv4>
                            <!-- Both physical and logical (port), like TCP -->
                            <physical_port>5100</physical_port>
                            <port>7400</port>
                            <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                            <wan_address>80.80.99.45</wan_address>
                            <address>192.168.1.55</address>
                        </tcpv4>
                    </locator>
                    <locator>
                        <udpv6>
                            <port>8844</port>
                            <address>::1</address>
                        </udpv6>
                    </locator>
                </defaultMulticastLocatorList>

                <default_external_unicast_locators>
                    <!-- EXTERNAL_LOCATOR_LIST -->
                    <udpv4 externality="1" cost="0" mask="24">
                        <address>100.100.100.10</address>
                        <port>23456</port>
                    </udpv4>
                    <udpv6 externality="1" cost="1" mask="48">
                        <address>::1</address>
                        <port>1234</port>
                    </udpv6>
                </default_external_unicast_locators>

                <ignore_non_matching_locators>true</ignore_non_matching_locators>
                <sendSocketBufferSize>8192</sendSocketBufferSize>
                <listenSocketBufferSize>8192</listenSocketBufferSize>
                <netmask_filter>AUTO</netmask_filter>

                <builtin>
                    <discovery_config>
                        <discoveryProtocol>NONE</discoveryProtocol>
                        <discoveryServersList>
                            <locator>
                                <udpv4>
                                    <address>192.168.10.57</address>
                                    <port>56542</port>
                                </udpv4>
                            </locator>
                            <locator>
                                <udpv4>
                                    <address>192.168.10.58</address>
                                    <port>24565</port>
                                </udpv4>
                            </locator>
                            <locator>
                                <udpv4>
                                    <address>192.168.10.59</address>
                                    <port>56543</port>
                                </udpv4>
                            </locator>
                            <locator>
                                <udpv4>
                                    <address>192.168.10.60</address>
                                    <port>34565</port>
                                </udpv4>
                            </locator>
                        </discoveryServersList>
                        <ignoreParticipantFlags>FILTER_DIFFERENT_PROCESS|FILTER_SAME_PROCESS</ignoreParticipantFlags>
                        <EDP>SIMPLE</EDP>
                        <simpleEDP>
                            <PUBWRITER_SUBREADER>true</PUBWRITER_SUBREADER>
                            <PUBREADER_SUBWRITER>true</PUBREADER_SUBWRITER>
                        </simpleEDP>
                        <leaseDuration>
                            <sec>DURATION_INFINITY</sec>
                        </leaseDuration>
                        <leaseAnnouncement>
                            <sec>1</sec>
                            <nanosec>856000</nanosec>
                        </leaseAnnouncement>
                        <initialAnnouncements>
                            <count>10</count>
                            <period>
                                <nanosec>50</nanosec>
                            </period>
                        </initialAnnouncements>
                        <clientAnnouncementPeriod>
                            <nanosec>250000000</nanosec>
                        </clientAnnouncementPeriod>
                        <static_edp_xml_config>filename1.xml</static_edp_xml_config>
                        <static_edp_xml_config>filename2.xml</static_edp_xml_config>
                        <static_edp_xml_config>filename3.xml</static_edp_xml_config>
                    </discovery_config>

                    <avoid_builtin_multicast>true</avoid_builtin_multicast>
                    <use_WriterLivelinessProtocol>false</use_WriterLivelinessProtocol>

                    <metatrafficUnicastLocatorList>
                        <locator>
                            <udpv4>
                                <!-- Access as physical, like UDP -->
                                <port>7400</port>
                                <address>192.168.1.41</address>
                            </udpv4>
                        </locator>
                        <locator>
                            <tcpv4>
                                <!-- Both physical and logical (port), like TCP -->
                                <physical_port>5100</physical_port>
                                <port>7400</port>
                                <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                                <wan_address>80.80.99.45</wan_address>
                                <address>192.168.1.55</address>
                            </tcpv4>
                        </locator>
                        <locator>
                            <udpv6>
                                <port>8844</port>
                                <address>::1</address>
                            </udpv6>
                        </locator>
                    </metatrafficUnicastLocatorList>

                    <metatrafficMulticastLocatorList>
                        <locator>
                            <udpv4>
                                <!-- Access as physical, like UDP -->
                                <port>7400</port>
                                <address>192.168.1.41</address>
                            </udpv4>
                        </locator>
                        <locator>
                            <tcpv4>
                                <!-- Both physical and logical (port), like TCP -->
                                <physical_port>5100</physical_port>
                                <port>7400</port>
                                <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                                <wan_address>80.80.99.45</wan_address>
                                <address>192.168.1.55</address>
                            </tcpv4>
                        </locator>
                        <locator>
                            <udpv6>
                                <port>8844</port>
                                <address>::1</address>
                            </udpv6>
                        </locator>
                    </metatrafficMulticastLocatorList>

                    <initialPeersList>
                        <locator>
                            <udpv4>
                                <!-- Access as physical, like UDP -->
                                <port>7400</port>
                                <address>192.168.1.41</address>
                            </udpv4>
                        </locator>
                        <locator>
                            <tcpv4>
                                <!-- Both physical and logical (port), like TCP -->
                                <physical_port>5100</physical_port>
                                <port>7400</port>
                                <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                                <wan_address>80.80.99.45</wan_address>
                                <address>192.168.1.55</address>
                            </tcpv4>
                        </locator>
                        <locator>
                            <udpv6>
                                <port>8844</port>
                                <address>::1</address>
                            </udpv6>
                        </locator>
                    </initialPeersList>

                    <metatraffic_external_unicast_locators>
                        <udpv4 externality="1" cost="0" mask="24">
                            <address>100.100.100.10</address>
                            <port>34567</port>
                        </udpv4>
                    </metatraffic_external_unicast_locators>

                    <readerHistoryMemoryPolicy>PREALLOCATED_WITH_REALLOC</readerHistoryMemoryPolicy>
                    <writerHistoryMemoryPolicy>PREALLOCATED</writerHistoryMemoryPolicy>
                    <readerPayloadSize>512</readerPayloadSize>
                    <writerPayloadSize>512</writerPayloadSize>
                    <mutation_tries>55</mutation_tries>
                    <flow_controller_name>example_flow_controller</flow_controller_name>
                </builtin>

                <port>
                    <portBase>7400</portBase>
                    <domainIDGain>200</domainIDGain>
                    <participantIDGain>10</participantIDGain>
                    <offsetd0>0</offsetd0>
                    <offsetd1>1</offsetd1>
                    <offsetd2>2</offsetd2>
                    <offsetd3>3</offsetd3>
                </port>

                <participantID>99</participantID>

                <userTransports>
                    <transport_id>ExampleTransportId1</transport_id>
                    <transport_id>ExampleTransportId2</transport_id>
                </userTransports>

                <useBuiltinTransports>false</useBuiltinTransports>

                <builtinTransports max_msg_size="50KB" sockets_size="50KB" non_blocking="false">DEFAULT</builtinTransports>

                <propertiesPolicy>
                    <properties>
                        <property>
                            <name>Property1Name</name>
                            <value>Property1Value</value>
                            <propagate>false</propagate>
                        </property>
                        <property>
                            <name>Property2Name</name>
                            <value>Property2Value</value>
                            <propagate>false</propagate>
                        </property>
                    </properties>
                </propertiesPolicy>

                <allocation>
                    <remote_locators>
                        <max_unicast_locators>4</max_unicast_locators> <!-- uint32 -->
                        <max_multicast_locators>1</max_multicast_locators> <!-- uint32 -->
                    </remote_locators>
                    <total_participants>
                        <initial>0</initial>
                        <maximum>0</maximum>
                        <increment>1</increment>
                    </total_participants>
                    <total_readers>
                        <initial>0</initial>
                        <maximum>0</maximum>
                        <increment>1</increment>
                    </total_readers>
                    <total_writers>
                        <initial>0</initial>
                        <maximum>0</maximum>
                        <increment>1</increment>
                    </total_writers>
                    <max_partitions>256</max_partitions>
                    <max_user_data>256</max_user_data>
                    <max_properties>512</max_properties>
                    <send_buffers>
                        <preallocated_number>127</preallocated_number>
                        <dynamic>true</dynamic>
                        <network_buffers_config>
                            <initial>16</initial>
                            <maximum>0</maximum>
                            <increment>16</increment>
                        </network_buffers_config>
                    </send_buffers>
                </allocation>

                <builtin_controllers_sender_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </builtin_controllers_sender_thread>

                <timed_events_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </timed_events_thread>

                <discovery_server_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </discovery_server_thread>

                <typelookup_service_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </typelookup_service_thread>

                <builtin_transports_reception_threads>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </builtin_transports_reception_threads>

                <security_log_thread>
                    <scheduling_policy>-1</scheduling_policy>
                    <priority>0</priority>
                    <affinity>0</affinity>
                    <stack_size>-1</stack_size>
                </security_log_thread>

                <flow_controller_descriptor_list>
                    <flow_controller_descriptor>
                        <name>example_flow_controller</name>
                        <scheduler>FIFO</scheduler>
                        <max_bytes_per_period>4096</max_bytes_per_period>
                        <period_ms>500</period_ms>
                        <sender_thread>
                            <scheduling_policy>-1</scheduling_policy>
                            <priority>0</priority>
                            <affinity>0</affinity>
                            <stack_size>-1</stack_size>
                        </sender_thread>
                    </flow_controller_descriptor>
                </flow_controller_descriptor_list>
            </rtps>
        </participant>

        <data_writer profile_name="datawriter_profile_example">
            <topic>
                <historyQos>
                    <kind>KEEP_LAST</kind>
                    <depth>20</depth>
                </historyQos>
                <resourceLimitsQos>
                    <max_samples>5</max_samples>
                    <max_instances>2</max_instances>
                    <max_samples_per_instance>1</max_samples_per_instance>
                    <allocated_samples>20</allocated_samples>
                    <extra_samples>10</extra_samples>
                </resourceLimitsQos>
            </topic>
            <qos> <!-- dataWriterQosPoliciesType -->
                <data_sharing>
                    <kind>AUTOMATIC</kind>
                    <shared_dir>/home</shared_dir>
                    <max_domains>10</max_domains>
                    <domain_ids>
                        <domainId>0</domainId>
                        <domainId>11</domainId>
                    </domain_ids>
                </data_sharing>
                <deadline>
                    <period>
                        <sec>1</sec>
                    </period>
                </deadline>
                <disable_heartbeat_piggyback>true</disable_heartbeat_piggyback>
                <disablePositiveAcks>
                    <enabled>true</enabled>
                    <duration>
                        <sec>1</sec>
                    </duration>
                </disablePositiveAcks>
                <durability>
                    <kind>VOLATILE</kind>
                </durability>
                <!-- QoS policy pending implementation -->
                <latencyBudget>
                    <duration>
                        <sec>1</sec>
                    </duration>
                </latencyBudget>
                <lifespan>
                    <duration>
                        <sec>5</sec>
                    </duration>
                </lifespan>
                <liveliness>
                    <kind>AUTOMATIC</kind>
                    <lease_duration>
                        <sec>1</sec>
                        <nanosec>856000</nanosec>
                    </lease_duration>
                    <announcement_period>
                        <sec>1</sec>
                        <nanosec>856000</nanosec>
                    </announcement_period>
                </liveliness>
                <ownership>
                    <kind>EXCLUSIVE</kind>
                </ownership>
                <ownershipStrength>
                    <value>50</value>
                </ownershipStrength>
                <partition>
                    <names>
                        <name>part1</name>
                        <name>part2</name>
                    </names>
                </partition>
                <publishMode>
                    <kind>ASYNCHRONOUS</kind>
                    <flow_controller_name>example_flow_controller</flow_controller_name>
                </publishMode>
                <reliability>
                    <kind>BEST_EFFORT</kind>
                    <max_blocking_time>
                        <sec>1</sec>
                        <nanosec>856000</nanosec>
                    </max_blocking_time>
                </reliability>
            </qos>

            <times>
                <initial_heartbeat_delay>
                    <sec>1</sec>
                    <nanosec>856000</nanosec>
                </initial_heartbeat_delay>
                <heartbeat_period>
                    <sec>1</sec>
                    <nanosec>856000</nanosec>
                </heartbeat_period>
                <nack_response_delay>
                    <sec>1</sec>
                    <nanosec>856000</nanosec>
                </nack_response_delay>
                <nack_supression_duration>
                    <sec>1</sec>
                    <nanosec>856000</nanosec>
                </nack_supression_duration>
            </times>

            <unicastLocatorList>
                <locator>
                    <udpv4>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </udpv4>
                </locator>
                <locator>
                    <tcpv4>
                        <!-- Both physical and logical (port), like TCP -->
                        <physical_port>5100</physical_port>
                        <port>7400</port>
                        <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                        <wan_address>80.80.99.45</wan_address>
                        <address>192.168.1.55</address>
                    </tcpv4>
                </locator>
                <locator>
                    <udpv6>
                        <port>8844</port>
                        <address>::1</address>
                    </udpv6>
                </locator>
            </unicastLocatorList>

            <multicastLocatorList>
                <locator>
                    <udpv4>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </udpv4>
                </locator>
                <locator>
                    <tcpv4>
                        <!-- Both physical and logical (port), like TCP -->
                        <physical_port>5100</physical_port>
                        <port>7400</port>
                        <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                        <wan_address>80.80.99.45</wan_address>
                        <address>192.168.1.55</address>
                    </tcpv4>
                </locator>
                <locator>
                    <udpv6>
                        <port>8844</port>
                        <address>::1</address>
                    </udpv6>
                </locator>
            </multicastLocatorList>

            <external_unicast_locators>
                <udpv4 externality="1" cost="0" mask="24">
                    <address>100.100.100.10</address>
                    <port>12345</port>
                </udpv4>
            </external_unicast_locators>

            <ignore_non_matching_locators>true</ignore_non_matching_locators>
            <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

            <propertiesPolicy>
                <properties>
                    <property>
                        <name>Property1Name</name>
                        <value>Property1Value</value>
                        <propagate>false</propagate>
                    </property>
                    <property>
                        <name>Property2Name</name>
                        <value>Property2Value</value>
                        <propagate>false</propagate>
                    </property>
                </properties>
            </propertiesPolicy>

            <userDefinedID>45</userDefinedID>
            <entityID>76</entityID>

            <matchedSubscribersAllocation>
                <initial>3</initial>
                <maximum>3</maximum>
                <increment>0</increment>
            </matchedSubscribersAllocation>
        </data_writer>

        <data_reader profile_name="datareader_profile_example">
            <topic>
                <historyQos>
                    <kind>KEEP_LAST</kind>
                    <depth>20</depth>
                </historyQos>
                <resourceLimitsQos>
                    <max_samples>5</max_samples>
                    <max_instances>2</max_instances>
                    <max_samples_per_instance>1</max_samples_per_instance>
                    <allocated_samples>20</allocated_samples>
                    <extra_samples>10</extra_samples>
                </resourceLimitsQos>
            </topic>
            <qos> <!-- dataReaderQosPoliciesType -->
                <data_sharing>
                    <kind>AUTOMATIC</kind>
                    <shared_dir>/home</shared_dir>
                    <max_domains>10</max_domains>
                    <domain_ids>
                        <domainId>0</domainId>
                        <domainId>11</domainId>
                    </domain_ids>
                    <data_sharing_listener_thread>
                        <scheduling_policy>-1</scheduling_policy>
                        <priority>0</priority>
                        <affinity>0</affinity>
                        <stack_size>-1</stack_size>
                    </data_sharing_listener_thread>
                </data_sharing>
                <deadline>
                    <period>
                        <sec>1</sec>
                    </period>
                </deadline>
                <disablePositiveAcks>
                    <enabled>true</enabled>
                    <duration>
                        <sec>1</sec>
                    </duration>
                </disablePositiveAcks>
                <durability>
                    <kind>PERSISTENT</kind>
                </durability>
                <!-- QoS policy pending implementation -->
                <latencyBudget>
                    <duration>
                        <sec>1</sec>
                    </duration>
                </latencyBudget>
                <lifespan>
                    <duration>
                        <sec>5</sec>
                    </duration>
                </lifespan>
                <liveliness>
                    <kind>MANUAL_BY_PARTICIPANT</kind>
                    <lease_duration>
                        <sec>1</sec>
                        <nanosec>856000</nanosec>
                    </lease_duration>
                    <announcement_period>
                        <sec>1</sec>
                        <nanosec>856000</nanosec>
                    </announcement_period>
                </liveliness>
                <ownership>
                    <kind>EXCLUSIVE</kind>
                </ownership>
                <partition>
                    <names>
                        <name>part1</name>
                        <name>part2</name>
                    </names>
                </partition>
                <reliability>
                    <kind>BEST_EFFORT</kind>
                    <max_blocking_time>
                        <sec>1</sec>
                        <nanosec>856000</nanosec>
                    </max_blocking_time>
                </reliability>
            </qos>

            <times>
                <initial_acknack_delay>
                    <sec>1</sec>
                    <nanosec>856000</nanosec>
                </initial_acknack_delay>
                <heartbeat_response_delay>
                    <sec>1</sec>
                    <nanosec>856000</nanosec>
                </heartbeat_response_delay>
            </times>

            <unicastLocatorList>
                <locator>
                    <udpv4>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </udpv4>
                </locator>
                <locator>
                    <tcpv4>
                        <!-- Both physical and logical (port), like TCP -->
                        <physical_port>5100</physical_port>
                        <port>7400</port>
                        <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                        <wan_address>80.80.99.45</wan_address>
                        <address>192.168.1.55</address>
                    </tcpv4>
                </locator>
                <locator>
                    <udpv6>
                        <port>8844</port>
                        <address>::1</address>
                    </udpv6>
                </locator>
            </unicastLocatorList>

            <multicastLocatorList>
                <locator>
                    <udpv4>
                        <!-- Access as physical, like UDP -->
                        <port>7400</port>
                        <address>192.168.1.41</address>
                    </udpv4>
                </locator>
                <locator>
                    <tcpv4>
                        <!-- Both physical and logical (port), like TCP -->
                        <physical_port>5100</physical_port>
                        <port>7400</port>
                        <unique_lan_id>192.168.1.1.1.1.2.55</unique_lan_id>
                        <wan_address>80.80.99.45</wan_address>
                        <address>192.168.1.55</address>
                    </tcpv4>
                </locator>
                <locator>
                    <udpv6>
                        <port>8844</port>
                        <address>::1</address>
                    </udpv6>
                </locator>
            </multicastLocatorList>

            <external_unicast_locators>
                <udpv4 externality="1" cost="0" mask="24">
                    <address>100.100.100.10</address>
                    <port>12345</port>
                </udpv4>
            </external_unicast_locators>

            <ignore_non_matching_locators>true</ignore_non_matching_locators>
            <expects_inline_qos>true</expects_inline_qos>
            <historyMemoryPolicy>DYNAMIC</historyMemoryPolicy>

            <propertiesPolicy>
                <properties>
                    <property>
                        <name>Property1Name</name>
                        <value>Property1Value</value>
                        <propagate>false</propagate>
                    </property>
                    <property>
                        <name>Property2Name</name>
                        <value>Property2Value</value>
                        <propagate>false</propagate>
                    </property>
                </properties>
            </propertiesPolicy>

            <userDefinedID>55</userDefinedID>
            <entityID>66</entityID>

            <matchedPublishersAllocation>
                <initial>1</initial>
                <maximum>1</maximum>
                <increment>0</increment>
            </matchedPublishersAllocation>
        </data_reader>

        <topic profile_name="topic_profile_example">
            <historyQos>
                <kind>KEEP_LAST</kind>
                <depth>20</depth>
            </historyQos>
            <resourceLimitsQos>
                <max_samples>5</max_samples>
                <max_instances>2</max_instances>
                <max_samples_per_instance>1</max_samples_per_instance>
                <allocated_samples>20</allocated_samples>
                <extra_samples>10</extra_samples>
            </resourceLimitsQos>
        </topic>
    </profiles>

    <library_settings>
        <intraprocess_delivery>USER_DATA_ONLY</intraprocess_delivery>
    </library_settings>

    <log>
        <use_default>false</use_default>

        <consumer>
            <class>StdoutConsumer</class>
        </consumer>

        <consumer>
            <class>StdoutErrConsumer</class>
            <property>
                <name>stderr_threshold</name>
                <value>Log::Kind::Warning</value>
            </property>
        </consumer>

        <consumer>
            <class>FileConsumer</class>
            <property>
                <name>filename</name>
                <value>execution.log</value>
            </property>
            <property>
                <name>append</name>
                <value>TRUE</value>
            </property>
        </consumer>

        <thread_settings>
            <scheduling_policy>-1</scheduling_policy>
            <priority>0</priority>
            <affinity>0</affinity>
            <stack_size>-1</stack_size>
        </thread_settings>
    </log>

    <types>
        <type> <!-- Types can be defined in its own type of tag or sharing the same tag -->
            <enum name="MyAloneEnumType">
                <enumerator name="A" value="0"/>
                <enumerator name="B" value="1"/>
                <enumerator name="C"/>
            </enum>
        </type>
        <type>
            <!-- All possible members struct type -->
            <struct name="MyFullStruct">
                <!-- Primitives & basic -->
                <member name="my_bool" type="boolean"/>
                <member name="my_char" type="char8"/>
                <member name="my_wchar" type="char16"/>
                <member name="my_byte" type="byte"/>
                <member name="my_octet" type="octet"/>
                <member name="my_uint8" type="uint8"/>
                <member name="my_short" type="int16"/>
                <member name="my_long" type="int32"/>
                <member name="my_unsignedshort" type="uint16"/>
                <member name="my_unsignedlong" type="uint32"/>
                <member name="my_longlong" type="int64"/>
                <member name="my_unsignedlonglong" type="uint64"/>
                <member name="my_float" type="float32"/>
                <member name="my_double" type="float64"/>
                <member name="my_longdouble" type="float128"/>
                <member name="my_string" type="string"/>
                <member name="my_wstring" type="wstring"/>

                <!-- string my_boundedString[41925] -->
                <member name="my_boundedString" type="string" stringMaxLength="41925"/>
                <!-- wstring my_boundedWString[41925] -->
                <member name="my_boundedWString" type="wstring" stringMaxLength="41925"/>

                <!-- short short_sequence[5]; -->
                <member name="short_sequence" sequenceMaxLength="5" type="int16"/>

                <!-- long long_array[2][3][4]; -->
                <member name="long_array" arrayDimensions="2,3,4" type="int32"/>

                <!-- map<long,long,2> my_map_inner -->
                <member name="my_map" type="int32" key_type="int32" mapMaxLength="2"/>
            </struct>

            <typedef name="inner_map" type="char8" key_type="int16"/>
            <struct name="MyComplexStruct">
                <!-- Complex types -->
                <member name="my_other_struct" type="nonBasic" nonBasicTypeName="MyFullStruct"/>
                <!-- map<long,map<long,long,2>,2> my_map_map; -->
                <member name="my_map_map" type="nonBasic" nonBasicTypeName="inner_map" key_type="int32" mapMaxLength="2"/>
            </struct>

            <enum name="MyEnum">
                <enumerator name="A" value="0"/>
                <enumerator name="B" value="1"/>
                <enumerator name="C"/>
            </enum>

            <typedef name="MyAlias1" type="nonBasic" nonBasicTypeName="MyEnum"/>
            <typedef name="MyAlias2" type="int32" arrayDimensions="2,2"/>

            <struct name="MyStruct">
                <member name="first" type="int32"/>
                <member name="second" type="int64"/>
            </struct>

            <!-- TODO(XTypes: Fix inheritance loading from XML profile) Fast DDS#4626 -->
            <!-- <struct name="OtherInheritedStruct" baseType="MyStruct">
                <member name="my_enum" type="nonBasic" nonBasicTypeName="MyEnum"/>
                <member name="my_struct" type="nonBasic" nonBasicTypeName="MyFullStruct" arrayDimensions="5"/>
            </struct> -->

            <union name="MyUnion1">
                <discriminator type="byte"/>
                <case>
                    <caseDiscriminator value="0"/>
                    <caseDiscriminator value="1"/>
                    <member name="first" type="int32"/>
                </case>
                <case>
                    <caseDiscriminator value="2"/>
                    <member name="second" type="nonBasic" nonBasicTypeName="MyStruct"/>
                </case>
                <case>
                    <caseDiscriminator value="default"/>
                    <member name="third" type="int64"/>
                </case>
            </union>

            <bitset name="MyBitSet">
                <bitfield name="a" bit_bound="3"/>
                <bitfield name="b" bit_bound="10"/>
                <bitfield name="c" bit_bound="12" type="int16"/>
            </bitset>

            <!-- TODO(XTypes: Fix inheritance loading from XML profile) Fast DDS#4626 -->
            <!-- <bitset name="OtherInheritedBitSet" baseType="MyBitSet">
                <bitfield bit_bound="8"/>
                <bitfield bit_bound="15" type="byte"/>
            </bitset> -->

            <bitmask name="MyBitMask" bit_bound="8">
                <bit_value name="flag0" position="0"/>
                <bit_value name="flag1"/>
            </bitmask>
        </type>
    </types>
</dds>
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值