Continues migration with DDS, Common

This commit is contained in:
torsten committed 2026-07-17 12:41:42 +02:00
1 parent 9b15cee841
commit fa48db111e
668 files changed
+111841 -2

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
#
# $Id$
# $HeadURL$
# $Author$
#
SET(SRCS
DDS_DefaultQos.h
DDS_DefaultQos.cpp
)
IF(TABLET_MODE)
NGL_INSTALL(WS AAR HLA SV FILES "default_profile_tablet.xml" DESTINATION "./share/Lts/DDS" RENAME "default_profile.xml")
NGL_INSTALL(WS AAR HLA SV FILES "default_profile.xml" DESTINATION "./share/Lts/DDS" RENAME "default_profile_ws.xml")
ELSE()
INSTALL_SHARED_FILES(SRCS
FILES "default_profile.xml"
DESTINATION "DDS"
SV WS AAR HLA
)
ENDIF()
NGL_ADD_LIBRARY2(AAR SV HLA WS ddsQoS SHARED ${SRCS})
NGL_TARGET_INCLUDE_DIRECTORIES(ddsQoS
INTERFACE
${CMAKE_CURRENT_SOURCE_DIR}/../../
)
NGL_TARGET_LINK_LIBRARIES(ddsQoS
PRIVATE
RTI::nddsc
RTI::nddscpp2
NGLLogger
ngltools
PUBLIC
Qt5::Core
)
+254
View File
@@ -0,0 +1,254 @@
#include "DDS_DefaultQos.h"
#include <QUrl>
#include <ngltools/ngltools_filesystem.h>
#include <NGLLogger/NGLLoggerBootstrap.h>
namespace DDS
{
namespace QosProfile
{
static void printPolicyMap(const std::map<std::string, std::string> &policyMap, NGL::INGLLogger &logger);
QString defaultProfileXml()
{
return NGL::findFile(NGL::FileType::ConfigFile, QStringLiteral("default_profile.xml"));
}
bool setDefault(const QStringList &qosFileList)
{
NGL::INGLLogger &logger = NGL::NGLLoggerBootstrap::getNGLRootLogger().getNGLLogger("DDS.DefaultQos");
const QStringList qosStr = qosFileList.isEmpty() ?
QStringList(defaultProfileXml()) :
qosFileList;
if (logger.isDebugEnabled())
{
DEBUG_LOG(logger) << "findFile - m_qosFileList = ";
for (const QString &file : qosStr)
DEBUG_LOG(logger) << "# profile: " << file;
}
try
{
dds::core::StringSeq urls;
urls.reserve(qosStr.size());
for (const QString &file : qosStr)
{
const QString url = QUrl::fromLocalFile(file).toString();
DEBUG_LOG(logger) << "Using qosFile: " << file << " - " << url;
urls.emplace_back(url.toStdString());
}
dds::core::QosProvider defaultProvider = dds::core::QosProvider::Default();
rti::core::QosProviderParams qosProviderParams = defaultProvider->default_provider_params();
qosProviderParams.url_profile(urls);
defaultProvider->default_provider_params(qosProviderParams);
print(defaultProvider, logger);
}
catch (const dds::core::Exception &ex)
{
ERROR_LOG(logger) << ex.what();
return false;
}
return true;
}
static QString fixupSchemeName(const QUrl &url)
{
QString str = url.toString();
str = str.replace(QLatin1String("tcpv4lan"), QLatin1String("tcpv4_lan"));
return QStringLiteral("0@") + str;
}
dds::domain::qos::DomainParticipantQos domainParticipantShmUdp()
{
return domainParticipantDefault(ConnectionType::ShmUdp, QUrl());
}
dds::domain::qos::DomainParticipantQos domainParticipantShmUdpLocalhost()
{
return domainParticipantDefault(ConnectionType::ShmUdpLocalhost, QUrl());
}
dds::domain::qos::DomainParticipantQos domainParticipantShm()
{
return domainParticipantDefault(ConnectionType::Shm, QUrl());
}
dds::domain::qos::DomainParticipantQos domainParticipantShmTcp(const QUrl &tcpConnectionUrl)
{
return domainParticipantDefault(ConnectionType::Tcp, tcpConnectionUrl);
}
dds::domain::qos::DomainParticipantQos domainParticipantDefault(ConnectionType type, const QUrl &tcpConnectionUrl)
{
dds::core::QosProvider defaultProvider = dds::core::QosProvider::Default();
dds::domain::qos::DomainParticipantQos dpQos = defaultProvider.participant_qos();
switch (type)
{
case ConnectionType::Tcp:
{
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.Tcp");
if (tcpConnectionUrl.scheme() == QLatin1String("tcpv4lan"))
{
rti::core::policy::Discovery discovery;
dpQos >> discovery;
const dds::core::StringSeq seq({fixupSchemeName(tcpConnectionUrl).toStdString()});
discovery.initial_peers(seq);
dpQos << discovery;
}
else
{
rti::core::policy::Property props;
dpQos >> props;
props.set({"dds.transport.TCPv4.tcp1.server_bind_port", std::to_string(tcpConnectionUrl.port(7400))});
dpQos << props;
}
break;
}
case ConnectionType::Shm:
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.Shm");
break;
case ConnectionType::ShmUdp:
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.ShmUdp");
break;
case ConnectionType::ShmUdpLocalhost:
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.ShmUdpLocalhost");
break;
case ConnectionType::Server:
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.Server");
break;
case ConnectionType::Client:
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.Client");
break;
case ConnectionType::Tablet:
dpQos = defaultProvider.participant_qos("LtsProfiles::DomainParticipant.Tablet");
break;
}
return dpQos;
}
dds::pub::qos::DataWriterQos dataWriterDefault(TopicType type)
{
dds::core::QosProvider defaultProvider = dds::core::QosProvider::Default();
dds::pub::qos::DataWriterQos dwQos = defaultProvider.datawriter_qos();
switch (type)
{
case TopicType::DataTopic:
break;
case TopicType::FunctionTopic:
dwQos = defaultProvider.datawriter_qos("LtsProfiles::DataReaderWriter.FT");
break;
}
return dwQos;
}
dds::sub::qos::DataReaderQos dataReaderDefault(TopicType type)
{
dds::core::QosProvider defaultProvider = dds::core::QosProvider::Default();
dds::sub::qos::DataReaderQos drQos = defaultProvider.datareader_qos();
switch (type)
{
case TopicType::DataTopic:
break;
case TopicType::FunctionTopic:
drQos = defaultProvider.datareader_qos("LtsProfiles::DataReaderWriter.FT");
break;
}
return drQos;
}
dds::sub::qos::DataReaderQos dataReaderDefault( ConnectionType conType)
{
dds::core::QosProvider defaultProvider = dds::core::QosProvider::Default();
dds::sub::qos::DataReaderQos drQos = defaultProvider.datareader_qos();
switch (conType)
{
case ConnectionType::Shm:
drQos = defaultProvider.datareader_qos("LtsProfiles::DomainParticipant.Shm");
break;
case ConnectionType::ShmUdp:
drQos = defaultProvider.datareader_qos("LtsProfiles::DomainParticipant.ShmUdp");
break;
case ConnectionType::ShmUdpLocalhost:
drQos = defaultProvider.datareader_qos("LtsProfiles::DomainParticipant.ShmUdpLocalhost");
break;
case ConnectionType::Server:
drQos = defaultProvider.datareader_qos("LtsProfiles::DomainParticipant.Server");
break;
case ConnectionType::Client:
drQos = defaultProvider.datareader_qos("LtsProfiles::DomainParticipant.Client");
break;
case ConnectionType::Tablet:
drQos = defaultProvider.datareader_qos("LtsProfiles::DomainParticipant.Tablet");
break;
default:
break;
}
return drQos;
}
void print(dds::core::QosProvider provider, NGL::INGLLogger &logger)
{
print(provider.participant_qos(), logger);
print(provider.datawriter_qos(), logger);
print(provider.datareader_qos(), logger);
}
void print(const dds::domain::qos::DomainParticipantQos &qos, NGL::INGLLogger &logger)
{
DEBUG_LOG(logger) << "Qos for DomainParticipant: ";
printPolicyMap(qos->property.get_all(), logger);
}
void print(const dds::sub::qos::DataReaderQos &readerQos, NGL::INGLLogger &logger)
{
DEBUG_LOG(logger) << "Qos for dataReader: ";
DEBUG_LOG(logger) << "resourceLimit.max_samples " << readerQos->resource_limits.max_samples();
printPolicyMap(readerQos->property.get_all(), logger);
}
void print(const dds::pub::qos::DataWriterQos &writerQos, NGL::INGLLogger &logger)
{
DEBUG_LOG(logger) << "Default Qos for dataWriter: ";
DEBUG_LOG(logger) << "ReliabilityKind: " << writerQos->reliability->kind();
DEBUG_LOG(logger) << "Publish mode: " << writerQos->publish_mode.kind();
printPolicyMap(writerQos->property.get_all(), logger);
}
void printPolicyMap(const std::map<std::string, std::string> &policyMap, NGL::INGLLogger &logger)
{
for (const auto &it : policyMap)
{
const std::string &policyName = it.first;
const std::string &policyContent = it.second;
DEBUG_LOG(logger) << "policy " << policyName << ": " << policyContent ;
}
}
}
}
+56
View File
@@ -0,0 +1,56 @@
#pragma once
#include <QStringList>
#include <QUrl>
#include <dds/core/QosProvider.hpp>
#include <QosProfile/ddsqos_export.h>
namespace NGL
{
class INGLLogger;
}
namespace DDS
{
namespace QosProfile
{
enum class ConnectionType
{
ShmUdp,
ShmUdpLocalhost,
Shm,
Tcp,
Server,
Client,
Tablet
};
enum class TopicType
{
DataTopic,
FunctionTopic
};
DDSQOS_EXPORT QString defaultProfileXml();
DDSQOS_EXPORT bool setDefault(const QStringList &qosFileList = QStringList());
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantDefault(ConnectionType type, const QUrl &tcpConnectionUrl);
DDSQOS_EXPORT dds::pub::qos::DataWriterQos dataWriterDefault(TopicType type);
DDSQOS_EXPORT dds::sub::qos::DataReaderQos dataReaderDefault(TopicType type);
DDSQOS_EXPORT dds::sub::qos::DataReaderQos dataReaderDefault(ConnectionType conType);
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShmUdp();
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShmUdpLocalhost();
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShm();
DDSQOS_EXPORT dds::domain::qos::DomainParticipantQos domainParticipantShmTcp(const QUrl &tcpConnectionUrl);
DDSQOS_EXPORT void print(dds::core::QosProvider provider, NGL::INGLLogger &logger);
DDSQOS_EXPORT void print(const dds::domain::qos::DomainParticipantQos &qos, NGL::INGLLogger &logger);
DDSQOS_EXPORT void print(const dds::sub::qos::DataReaderQos &readerQos, NGL::INGLLogger &logger);
DDSQOS_EXPORT void print(const dds::pub::qos::DataWriterQos &writerQos, NGL::INGLLogger &logger);
}
}
+571
View File
@@ -0,0 +1,571 @@
<?xml version="1.0"?>
<!--
Description
XML QoS Profile for a project with DDS
For more information about XML QoS Profiles see Chapter 15 in the
RTI Connext user manual.
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/RTI/resource/qos_profiles_5.1.0/schema/rti_dds_qos_profiles.xsd">
<!-- QoS Library containing the default QoS profile for the project
A QoS library is a named set of QoS profiles.
-->
<qos_library name="LtsProfiles">
<!-- QoS profile used to configure reliable communication between the DataWriter and DataReader
A QoS profile groups a set of related QoS.
-->
<qos_profile name="Base" base_name="BuiltinQosLibExp::Generic.StrictReliable" is_default_qos="true">
<!-- Participent QoS -->
<participant_qos>
<property>
<value>
<element>
<name>dds.transport.shmem.builtin.receive_buffer_size</name>
<value>20971520</value> <!-- 20MB -->
</element>
</value>
<!--FRAN: allow IP fragmentation (30jun2020)-->
<value>
<element>
<name>dds.transport.UDPv4.builtin.parent.message_size_max</name>
<value>1450</value>
</element>
</value>
<value>
<element>
<name>dds.transport.UDPv4.builtin.multicast_ttl</name>
<value>5</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.period.sec</name>
<value>0</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.period.nanosec</name>
<value>100000000</value>
</element>
<!-- UDP MTU -->
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.bytes_per_token</name>
<value>3072</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.tokens_leaked_per_period</name>
<value>0</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.tokens_added_per_period</name>
<value>1</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.max_tokens</name>
<value>1</value>
</element>
</value>
</property>
<resource_limits>
<!-- type_code is not needed for RTI 5.x and above-->
<type_code_max_serialized_length>0</type_code_max_serialized_length>
<!-- type_object is only needed if someone wants to dynamically decode the structures
without haveing this info otherwise (e.g. programatically) which is not the case
in our system-->
<type_object_max_serialized_length>0</type_object_max_serialized_length>
</resource_limits>
<discovery_config>
<!--FRAN: disable sending DATA(p) packets to domain 0, RTPX (30jun2020)-->
<default_domain_announcement_period>
<sec>DURATION_INFINITE_SEC</sec>
<nanosec>DURATION_INFINITE_NSEC</nanosec>
</default_domain_announcement_period>
<publication_writer_publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
<!-- <flow_controller_name>dds.flow_controller.token_bucket.my_2_5Mbps_fc</flow_controller_name> -->
</publication_writer_publish_mode>
<subscription_writer_publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
<!-- <flow_controller_name>dds.flow_controller.token_bucket.my_2_5Mbps_fc</flow_controller_name> -->
</subscription_writer_publish_mode>
<participant_liveliness_assert_period>
<sec>5</sec>
<nanosec>0</nanosec>
</participant_liveliness_assert_period>
<participant_liveliness_lease_duration>
<sec>20</sec>
<nanosec>0</nanosec>
</participant_liveliness_lease_duration>
<max_liveliness_loss_detection_period>
<sec>10</sec>
<nanosec>0</nanosec>
</max_liveliness_loss_detection_period>
<publication_writer>
<enable_multicast_periodic_heartbeat>1</enable_multicast_periodic_heartbeat>
<!--FRAN: why these values?-->
<min_send_window_size>20</min_send_window_size>
<max_send_window_size>400</max_send_window_size>
<heartbeats_per_max_samples>50</heartbeats_per_max_samples>
<!--FRAN: set to 500ms instead of 50ms (30jun2020)-->
<fast_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</fast_heartbeat_period>
<late_joiner_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</late_joiner_heartbeat_period>
<max_nack_response_delay>
<sec>0</sec>
<nanosec>500000000</nanosec>
</max_nack_response_delay>
</publication_writer>
<subscription_writer>
<enable_multicast_periodic_heartbeat>1</enable_multicast_periodic_heartbeat>
<!--FRAN: set to 500ms instead of 50ms (30jun2020)-->
<min_send_window_size>20</min_send_window_size>
<max_send_window_size>400</max_send_window_size>
<heartbeats_per_max_samples>50</heartbeats_per_max_samples>
<fast_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</fast_heartbeat_period>
<late_joiner_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</late_joiner_heartbeat_period>
<max_nack_response_delay>
<sec>0</sec>
<nanosec>500000000</nanosec>
</max_nack_response_delay>
</subscription_writer>
</discovery_config>
</participant_qos>
<!-- Publisher QOS -->
<!--Patric: we enabled coherent sets -->
<!-- QoS used to configure the data writer -->
<!--
<publisher_qos>
<presentation>
<access_scope>TOPIC_PRESENTATION_QOS</access_scope>
<coherent_access>true</coherent_access>
</presentation>
</publisher_qos>
<subscriber_qos>
<presentation>
<access_scope>TOPIC_PRESENTATION_QOS</access_scope>
<coherent_access>true</coherent_access>
</presentation>
</subscriber_qos>
-->
<!-- QoS used to configure the data writer -->
<datawriter_qos>
<publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
</publish_mode>
<property>
<value>
<!-- The next setting is used to force dynamic memory
allocation for samples with a serialized size of
larger than 2K. Without setting
pool_buffer_max_size, all memory would be obtained
from a pre-allocated pool, which would greatly
increase the memory usage in an application which
sends large data.
-->
<element>
<name>dds.data_writer.history.memory_manager.fast_pool.pool_buffer_max_size</name>
<value>2048</value>
</element>
</value>
</property>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
<!--FRAN: why 60 seconds?-->
<max_blocking_time>
<sec>60</sec>
</max_blocking_time>
</reliability>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>1</depth>
</history>
<resource_limits>
<!--<max_samples_per_instance>1</max_samples_per_instance>-->
<max_samples>8000</max_samples>
</resource_limits>
<protocol>
<rtps_reliable_writer>
<!--FRAN: why these values?-->
<min_send_window_size>20</min_send_window_size>
<max_send_window_size>400</max_send_window_size>
<heartbeats_per_max_samples>50</heartbeats_per_max_samples>
</rtps_reliable_writer>
</protocol>
<writer_resource_limits>
<autoregister_instances>true</autoregister_instances>
</writer_resource_limits>
</datawriter_qos>
<datareader_qos>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
</reliability>
<reader_data_lifecycle>
<autopurge_nowriter_samples_delay>
<sec>5</sec>
<nanosec>DURATION_ZERO_NSEC</nanosec>
</autopurge_nowriter_samples_delay>
<autopurge_disposed_samples_delay>
<sec>5</sec>
<nanosec>DURATION_ZERO_NSEC</nanosec>
</autopurge_disposed_samples_delay>
</reader_data_lifecycle>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
<!-- Set this field to 0 if you want brokered communication (all communication
passes through the persistence service before being received by the datareader;
i.e. datawriter and datareader cannot 'see' each other directly)
-->
<direct_communication>true</direct_communication>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>1</depth>
</history>
<resource_limits>
<!--<initial_samples>200</initial_samples> -->
<!--<max_samples_per_instance>1</max_samples_per_instance> -->
<!-- We limit max_samples on the reader so that if the
writer is publishing samples faster than the reader is
taking them then the reader will start sending NACKs
for samples received after the number of samples in
its queue reaches max_samples. This behavior will put
pressure on the writer to throttle back its publishing
speed.
-->
<max_samples>8000</max_samples>
</resource_limits>
<reader_resource_limits>
<!-- Determines whether the DataReader pre-allocates
storage for storing fragmented samples. This setting
can be used to limit upfront memory allocation costs
in applications which are dealing with large data
-->
<dynamically_allocate_fragmented_samples>true</dynamically_allocate_fragmented_samples>
<max_samples_per_read>8000</max_samples_per_read>
</reader_resource_limits>
<property>
<value>
<!-- The next setting is used to force dynamic memory
allocation for samples with a serialized size of
larger than 2K. Without setting
pool_buffer_max_size, all memory would be obtained
from a pre-allocated pool, which would greatly
increase the memory usage in an application which
sends large data.
-->
<element>
<name>dds.data_reader.history.memory_manager.fast_pool.pool_buffer_max_size</name>
<value>2048</value>
</element>
</value>
</property>
</datareader_qos>
</qos_profile>
<!--FRAN: who uses this profile?-->
<!--Function topic. tablets->server-->
<qos_profile name="DataReaderWriter.FT" base_name="LtsProfiles::Base">
<datareader_qos>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_ALL_HISTORY_QOS</kind>
</history>
</datareader_qos>
<datawriter_qos>
<publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
</publish_mode>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>1</depth>
</history>
</datawriter_qos>
</qos_profile>
<!--Mostly used by the tablets as a special mode-->
<qos_profile name="DomainParticipant.Shm" base_name="LtsProfiles::Base">
<participant_qos>
<transport_builtin>
<mask>SHMEM</mask>
</transport_builtin>
<discovery>
<multicast_receive_addresses/>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>30@builtin.shmem://</element>
</initial_peers>
</discovery>
</participant_qos>
</qos_profile>
<!--Used by both tablets and server-->
<qos_profile name="DomainParticipant.ShmUdp" base_name="LtsProfiles::Base">
<participant_qos>
<transport_builtin>
<mask>UDPv4 | SHMEM</mask>
</transport_builtin>
</participant_qos>
</qos_profile>
<!-- Both server and clients. Maybe not used-->
<qos_profile name="DomainParticipant.ShmUdpLocalhost" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<discovery>
<multicast_receive_addresses/>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>builtin.shmem://</element>
<element>builtin.udpv4://127.0.0.1</element>
</initial_peers>
</discovery>
<property>
<value>
<element>
<name>dds.transport.UDPv4.builtin.multicast_enabled</name>
<value>0</value>
</element>
<element>
<name>dds.transport.UDPv4.builtin.parent.allow_interfaces</name>
<value>127.0.0.1</value>
</element>
</value>
</property>
</participant_qos>
</qos_profile>
<!-- configured for tcp client -> listenport = -1 -->
<qos_profile name="DomainParticipant.Tcp" base_name="LtsProfiles::Base">
<participant_qos>
<transport_builtin>
<mask>MASK_NONE</mask>
</transport_builtin>
<property>
<value>
<element>
<name>dds.transport.load_plugins</name>
<value>dds.transport.TCPv4.tcp1</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.library</name>
<value>nddstransporttcp</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.create_function</name>
<value>NDDS_Transport_TCPv4_create</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.parent.classid</name>
<value>NDDS_TRANSPORT_CLASSID_TCPV4_LAN</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.server_bind_port</name>
<value>-1</value>
</element>
<!--
<element>
<name>dds.transport.TCPv4.tcp1.logging_verbosity_bitmap</name>
<value>159</value>
</element>
-->
<element>
<name>dds.transport.TCPv4.tcp1.disable_nagle</name>
<value>1</value>
</element>
<!--
<element>
<name>dds.transport.TCPv4.tcp1.send_max_wait_sec</name>
<value>-1</value>
</element>
-->
<element>
<name>dds.transport.TCPv4.tcp1.max_packet_size</name>
<value>63020</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.parent.message_size_max</name>
<value>63020</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.recv_socket_buffer_size</name>
<value>8388608</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.send_socket_buffer_size</name>
<value>8388608</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.connection_liveliness.enable</name>
<value>1</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.connection_liveliness.lease_duration</name>
<value>5</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.connection_liveliness.assertions_per_lease_duration</name>
<value>2</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.outstanding_connection_cookies</name>
<value>100</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.outstanding_connection_cookies_life_span</name>
<value>5</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.force_asynchronous_send</name>
<value>1</value>
</element>
</value>
</property>
<discovery_config>
<participant_liveliness_assert_period>
<sec>2</sec>
<nanosec>0</nanosec>
</participant_liveliness_assert_period>
<participant_liveliness_lease_duration>
<sec>5</sec>
<nanosec>0</nanosec>
</participant_liveliness_lease_duration>
<max_liveliness_loss_detection_period>
<sec>2</sec>
<nanosec>0</nanosec>
</max_liveliness_loss_detection_period>
</discovery_config>
</participant_qos>
</qos_profile>
<!--FRAN: 3 new profiles for each kind of host (30jun2020)-->
<!--This implements asymmetric discovery-->
<qos_profile name="DomainParticipant.Client" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<discovery>
<initial_peers>
<element>239.255.0.2</element>
</initial_peers>
<multicast_receive_addresses>
<element>239.255.0.3</element>
</multicast_receive_addresses>
</discovery>
</participant_qos>
<!-- QoS used to configure the data reader -->
<!--Patric: reader want all our LTS Topics via multicast now -->
<datareader_qos>
<multicast>
<value>
<element>
<receive_address>239.255.1.7</receive_address>
</element>
</value>
</multicast>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
</reliability>
<reader_data_lifecycle>
<autopurge_nowriter_samples_delay>
<sec>5</sec>
<nanosec>DURATION_ZERO_NSEC</nanosec>
</autopurge_nowriter_samples_delay>
<autopurge_disposed_samples_delay>
<sec>5</sec>
<nanosec>DURATION_ZERO_NSEC</nanosec>
</autopurge_disposed_samples_delay>
</reader_data_lifecycle>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
<!-- Set this field to 0 if you want brokered communication (all communication
passes through the persistence service before being received by the datareader;
i.e. datawriter and datareader cannot 'see' each other directly)
-->
<direct_communication>true</direct_communication>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>1</depth>
</history>
<resource_limits>
<!--<initial_samples>200</initial_samples> -->
<!--<max_samples_per_instance>1</max_samples_per_instance> -->
<!-- We limit max_samples on the reader so that if the
writer is publishing samples faster than the reader is
taking them then the reader will start sending NACKs
for samples received after the number of samples in
its queue reaches max_samples. This behavior will put
pressure on the writer to throttle back its publishing
speed.
-->
<max_samples>8000</max_samples>
</resource_limits>
<reader_resource_limits>
<!-- Determines whether the DataReader pre-allocates
storage for storing fragmented samples. This setting
can be used to limit upfront memory allocation costs
in applications which are dealing with large data
-->
<dynamically_allocate_fragmented_samples>true</dynamically_allocate_fragmented_samples>
<max_samples_per_read>8000</max_samples_per_read>
</reader_resource_limits>
</datareader_qos>
</qos_profile>
<!--FRAN: 3 new profiles for each kind of host (30jun2020)-->
<!--This implements asymmetric discovery-->
<qos_profile name="DomainParticipant.Server" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<discovery>
<initial_peers>
<element>239.255.0.1</element>
<element>239.255.0.3</element>
<element>127.0.0.1</element>
</initial_peers>
<multicast_receive_addresses>
<element>239.255.0.2</element>
</multicast_receive_addresses>
</discovery>
</participant_qos>
</qos_profile>
<!--FRAN: 3 new profiles for each kind of host (30jun2020)-->
<!--This implements asymmetric discovery-->
<qos_profile name="DomainParticipant.Tablet" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<discovery>
<initial_peers>
<element>239.255.0.2</element>
</initial_peers>
<multicast_receive_addresses>
<element>239.255.0.1</element>
</multicast_receive_addresses>
</discovery>
</participant_qos>
</qos_profile>
</qos_library>
</dds>
+544
View File
@@ -0,0 +1,544 @@
<?xml version="1.0"?>
<!--
Description
XML QoS Profile for a project with DDS
For more information about XML QoS Profiles see Chapter 15 in the
RTI Connext user manual.
-->
<dds xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="/opt/RTI/resource/qos_profiles_5.1.0/schema/rti_dds_qos_profiles.xsd">
<!-- QoS Library containing the default QoS profile for the project
A QoS library is a named set of QoS profiles.
-->
<qos_library name="LtsProfiles">
<!-- QoS profile used to configure reliable communication between the DataWriter and DataReader
A QoS profile groups a set of related QoS.
-->
<qos_profile name="Base" base_name="BuiltinQosLibExp::Generic.StrictReliable" is_default_qos="true">
<!-- Participent QoS -->
<participant_qos>
<property>
<value>
<element>
<name>dds.transport.shmem.builtin.receive_buffer_size</name>
<value>20971520</value> <!-- 20MB -->
</element>
</value>
<!--FRAN: allow IP fragmentation (30jun2020)-->
<value>
<element>
<name>dds.transport.UDPv4.builtin.parent.message_size_max</name>
<value>1450</value>
</element>
</value>
<value>
<element>
<name>dds.transport.UDPv4.builtin.multicast_ttl</name>
<value>5</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.period.sec</name>
<value>0</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.period.nanosec</name>
<value>100000000</value>
</element>
<!-- UDP MTU -->
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.bytes_per_token</name>
<value>3072</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.tokens_leaked_per_period</name>
<value>0</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.tokens_added_per_period</name>
<value>1</value>
</element>
<element>
<name>dds.flow_controller.token_bucket.my_2_5Mbps_fc.token_bucket.max_tokens</name>
<value>1</value>
</element>
</value>
</property>
<resource_limits>
<!-- type_code is not needed for RTI 5.x and above-->
<type_code_max_serialized_length>0</type_code_max_serialized_length>
<!-- type_object is only needed if someone wants to dynamically decode the structures
without haveing this info otherwise (e.g. programatically) which is not the case
in our system-->
<type_object_max_serialized_length>0</type_object_max_serialized_length>
</resource_limits>
<discovery_config>
<!--FRAN: disable sending DATA(p) packets to domain 0, RTPX (30jun2020)-->
<default_domain_announcement_period>
<sec>DURATION_INFINITE_SEC</sec>
<nanosec>DURATION_INFINITE_NSEC</nanosec>
</default_domain_announcement_period>
<publication_writer_publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
<!-- <flow_controller_name>dds.flow_controller.token_bucket.my_2_5Mbps_fc</flow_controller_name> -->
</publication_writer_publish_mode>
<subscription_writer_publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
<!-- <flow_controller_name>dds.flow_controller.token_bucket.my_2_5Mbps_fc</flow_controller_name> -->
</subscription_writer_publish_mode>
<participant_liveliness_assert_period>
<sec>5</sec>
<nanosec>0</nanosec>
</participant_liveliness_assert_period>
<participant_liveliness_lease_duration>
<sec>20</sec>
<nanosec>0</nanosec>
</participant_liveliness_lease_duration>
<max_liveliness_loss_detection_period>
<sec>10</sec>
<nanosec>0</nanosec>
</max_liveliness_loss_detection_period>
<publication_writer>
<enable_multicast_periodic_heartbeat>1</enable_multicast_periodic_heartbeat>
<!--FRAN: why these values?-->
<min_send_window_size>20</min_send_window_size>
<max_send_window_size>400</max_send_window_size>
<heartbeats_per_max_samples>50</heartbeats_per_max_samples>
<!--FRAN: set to 500ms instead of 50ms (30jun2020)-->
<fast_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</fast_heartbeat_period>
<late_joiner_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</late_joiner_heartbeat_period>
<max_nack_response_delay>
<sec>0</sec>
<nanosec>500000000</nanosec>
</max_nack_response_delay>
</publication_writer>
<subscription_writer>
<enable_multicast_periodic_heartbeat>1</enable_multicast_periodic_heartbeat>
<!--FRAN: set to 500ms instead of 50ms (30jun2020)-->
<min_send_window_size>20</min_send_window_size>
<max_send_window_size>400</max_send_window_size>
<heartbeats_per_max_samples>50</heartbeats_per_max_samples>
<fast_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</fast_heartbeat_period>
<late_joiner_heartbeat_period>
<sec>0</sec>
<nanosec>500000000</nanosec>
</late_joiner_heartbeat_period>
<max_nack_response_delay>
<sec>0</sec>
<nanosec>500000000</nanosec>
</max_nack_response_delay>
</subscription_writer>
</discovery_config>
</participant_qos>
<!-- Publisher QOS -->
<!--Patric: we enabled coherent sets -->
<!-- QoS used to configure the data writer -->
<!--
<publisher_qos>
<presentation>
<access_scope>TOPIC_PRESENTATION_QOS</access_scope>
<coherent_access>true</coherent_access>
</presentation>
</publisher_qos>
<subscriber_qos>
<presentation>
<access_scope>TOPIC_PRESENTATION_QOS</access_scope>
<coherent_access>true</coherent_access>
</presentation>
</subscriber_qos>
-->
<!-- QoS used to configure the data writer -->
<datawriter_qos>
<publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
</publish_mode>
<property>
<value>
<!-- The next setting is used to force dynamic memory
allocation for samples with a serialized size of
larger than 2K. Without setting
pool_buffer_max_size, all memory would be obtained
from a pre-allocated pool, which would greatly
increase the memory usage in an application which
sends large data.
-->
<element>
<name>dds.data_writer.history.memory_manager.fast_pool.pool_buffer_max_size</name>
<value>2048</value>
</element>
</value>
</property>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
<!--FRAN: why 60 seconds?-->
<max_blocking_time>
<sec>60</sec>
</max_blocking_time>
</reliability>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>1</depth>
</history>
<resource_limits>
<!--<max_samples_per_instance>1</max_samples_per_instance>-->
<max_samples>8000</max_samples>
</resource_limits>
<protocol>
<rtps_reliable_writer>
<!--FRAN: why these values?-->
<min_send_window_size>20</min_send_window_size>
<max_send_window_size>400</max_send_window_size>
<heartbeats_per_max_samples>50</heartbeats_per_max_samples>
</rtps_reliable_writer>
</protocol>
<writer_resource_limits>
<autoregister_instances>true</autoregister_instances>
</writer_resource_limits>
</datawriter_qos>
<!-- QoS used to configure the data reader -->
<!--Patric: reader want all our LTS Topics via multicast now -->
<datareader_qos>
<reliability>
<kind>RELIABLE_RELIABILITY_QOS</kind>
</reliability>
<reader_data_lifecycle>
<autopurge_nowriter_samples_delay>
<sec>5</sec>
<nanosec>DURATION_ZERO_NSEC</nanosec>
</autopurge_nowriter_samples_delay>
<autopurge_disposed_samples_delay>
<sec>5</sec>
<nanosec>DURATION_ZERO_NSEC</nanosec>
</autopurge_disposed_samples_delay>
</reader_data_lifecycle>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
<!-- Set this field to 0 if you want brokered communication (all communication
passes through the persistence service before being received by the datareader;
i.e. datawriter and datareader cannot 'see' each other directly)
-->
<direct_communication>true</direct_communication>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>1</depth>
</history>
<resource_limits>
<!--<initial_samples>200</initial_samples> -->
<!--<max_samples_per_instance>1</max_samples_per_instance> -->
<!-- We limit max_samples on the reader so that if the
writer is publishing samples faster than the reader is
taking them then the reader will start sending NACKs
for samples received after the number of samples in
its queue reaches max_samples. This behavior will put
pressure on the writer to throttle back its publishing
speed.
-->
<max_samples>8000</max_samples>
</resource_limits>
<reader_resource_limits>
<!-- Determines whether the DataReader pre-allocates
storage for storing fragmented samples. This setting
can be used to limit upfront memory allocation costs
in applications which are dealing with large data
-->
<dynamically_allocate_fragmented_samples>true</dynamically_allocate_fragmented_samples>
<max_samples_per_read>8000</max_samples_per_read>
</reader_resource_limits>
<property>
<value>
<!-- The next setting is used to force dynamic memory
allocation for samples with a serialized size of
larger than 2K. Without setting
pool_buffer_max_size, all memory would be obtained
from a pre-allocated pool, which would greatly
increase the memory usage in an application which
sends large data.
-->
<element>
<name>dds.data_reader.history.memory_manager.fast_pool.pool_buffer_max_size</name>
<value>2048</value>
</element>
</value>
</property>
</datareader_qos>
</qos_profile>
<!--FRAN: who uses this profile?-->
<!--Function topic. tablets->server-->
<qos_profile name="DataReaderWriter.FT" base_name="LtsProfiles::Base">
<datareader_qos>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_ALL_HISTORY_QOS</kind>
</history>
</datareader_qos>
<datawriter_qos>
<publish_mode>
<kind>ASYNCHRONOUS_PUBLISH_MODE_QOS</kind>
</publish_mode>
<durability>
<kind>TRANSIENT_LOCAL_DURABILITY_QOS</kind>
</durability>
<history>
<kind>KEEP_LAST_HISTORY_QOS</kind>
<depth>10</depth>
</history>
</datawriter_qos>
</qos_profile>
<!--Mostly used by the tablets as a special mode-->
<qos_profile name="DomainParticipant.Shm" base_name="LtsProfiles::Base">
<participant_qos>
<transport_builtin>
<mask>SHMEM</mask>
</transport_builtin>
<discovery>
<multicast_receive_addresses/>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>60@builtin.shmem://</element>
</initial_peers>
</discovery>
<property>
<value>
<element>
<name>dds.transport.shmem.builtin.host_id</name>
<value>1</value>
</element>
</value>
</property>
</participant_qos>
</qos_profile>
<!--Used by both tablets and server-->
<qos_profile name="DomainParticipant.ShmUdp" base_name="LtsProfiles::Base">
<participant_qos>
<transport_builtin>
<mask>UDPv4 | SHMEM</mask>
</transport_builtin>
</participant_qos>
</qos_profile>
<!-- Both server and clients. Maybe not used-->
<qos_profile name="DomainParticipant.ShmUdpLocalhost" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<discovery>
<multicast_receive_addresses/>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>builtin.shmem://</element>
<element>builtin.udpv4://127.0.0.1</element>
</initial_peers>
</discovery>
<property>
<value>
<element>
<name>dds.transport.UDPv4.builtin.multicast_enabled</name>
<value>0</value>
</element>
<element>
<name>dds.transport.UDPv4.builtin.parent.allow_interfaces</name>
<value>127.0.0.1</value>
</element>
</value>
</property>
</participant_qos>
</qos_profile>
<!-- configured for tcp client -> listenport = -1 -->
<qos_profile name="DomainParticipant.Tcp" base_name="LtsProfiles::Base">
<participant_qos>
<transport_builtin>
<mask>MASK_NONE</mask>
</transport_builtin>
<property>
<value>
<element>
<name>dds.transport.load_plugins</name>
<value>dds.transport.TCPv4.tcp1</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.library</name>
<value>nddstransporttcp</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.create_function</name>
<value>NDDS_Transport_TCPv4_create</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.parent.classid</name>
<value>NDDS_TRANSPORT_CLASSID_TCPV4_LAN</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.server_bind_port</name>
<value>-1</value>
</element>
<!--
<element>
<name>dds.transport.TCPv4.tcp1.logging_verbosity_bitmap</name>
<value>159</value>
</element>
-->
<element>
<name>dds.transport.TCPv4.tcp1.disable_nagle</name>
<value>1</value>
</element>
<!--
<element>
<name>dds.transport.TCPv4.tcp1.send_max_wait_sec</name>
<value>-1</value>
</element>
-->
<element>
<name>dds.transport.TCPv4.tcp1.max_packet_size</name>
<value>63020</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.parent.message_size_max</name>
<value>63020</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.recv_socket_buffer_size</name>
<value>8388608</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.send_socket_buffer_size</name>
<value>8388608</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.connection_liveliness.enable</name>
<value>1</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.connection_liveliness.lease_duration</name>
<value>5</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.connection_liveliness.assertions_per_lease_duration</name>
<value>2</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.outstanding_connection_cookies</name>
<value>100</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.outstanding_connection_cookies_life_span</name>
<value>5</value>
</element>
<element>
<name>dds.transport.TCPv4.tcp1.force_asynchronous_send</name>
<value>1</value>
</element>
</value>
</property>
<discovery_config>
<participant_liveliness_assert_period>
<sec>2</sec>
<nanosec>0</nanosec>
</participant_liveliness_assert_period>
<participant_liveliness_lease_duration>
<sec>5</sec>
<nanosec>0</nanosec>
</participant_liveliness_lease_duration>
<max_liveliness_loss_detection_period>
<sec>2</sec>
<nanosec>0</nanosec>
</max_liveliness_loss_detection_period>
</discovery_config>
</participant_qos>
</qos_profile>
<!--FRAN: 3 new profiles for each kind of host (30jun2020)-->
<!--This implements asymmetric discovery-->
<qos_profile name="DomainParticipant.Client" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<transport_builtin>
<mask>SHMEM</mask>
</transport_builtin>
<discovery>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>60@builtin.shmem://</element>
</initial_peers>
</discovery>
<property>
<value>
<element>
<name>dds.transport.shmem.builtin.host_id</name>
<value>1</value>
</element>
</value>
</property>
</participant_qos>
</qos_profile>
<!--FRAN: 3 new profiles for each kind of host (30jun2020)-->
<!--This implements asymmetric discovery-->
<qos_profile name="DomainParticipant.Server" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<transport_builtin>
<mask>SHMEM</mask>
</transport_builtin>
<discovery>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>60@builtin.shmem://</element>
</initial_peers>
</discovery>
<property>
<value>
<element>
<name>dds.transport.shmem.builtin.host_id</name>
<value>1</value>
</element>
</value>
</property>
</participant_qos>
</qos_profile>
<!--FRAN: 3 new profiles for each kind of host (30jun2020)-->
<!--This implements asymmetric discovery-->
<qos_profile name="DomainParticipant.Tablet" base_name="DomainParticipant.ShmUdp">
<participant_qos>
<transport_builtin>
<mask>SHMEM</mask>
</transport_builtin>
<discovery>
<accept_unknown_peers>false</accept_unknown_peers>
<initial_peers>
<element>60@builtin.shmem://</element>
</initial_peers>
</discovery>
<property>
<value>
<element>
<name>dds.transport.shmem.builtin.host_id</name>
<value>1</value>
</element>
</value>
</property>
</participant_qos>
</qos_profile>
</qos_library>
</dds>