• 数据分发服务 (DDS) 内置主题


    传送门 ==>> AutoSAR实战系列300讲「糖果Autosar」总目录

    1 数据分发服务 (DDS) 内置主题

    DDS 内置主题是数据分发服务用来帮助应用程序相互发现的一种特殊主题。中间件自动处理这些主题。应用程序还可以访问它们以获取有关域的信息。

    DDS 中间件在运行过程中需要跟踪大量数据。DDS 应用程序及其实体可以在 DDS 域中出现和消失。这些实体可以是 DomainPartiticpantsDataWritersDataReadersTopics。DDS 中间件需要能够跟踪这一点。使用 DDS 的应用程序可能想了解这些更改。这使他们能够采取适当的行动。

    DDS 规范定义了一些内置于 DDS 实现的主题。DDS 使用这些内置主题来帮助应用程序相互发现。订阅内置主题使应用程序可以访问有关域的信息。这些信息包括:

    • 在域中注册的主题
    • 哪些数据读取器和写入器建立了连接或断开或连接
    • 域中实体的 QoS 设置

    The build-in topics do not communicate all the QoS policy settings, only the ones that determine connectivity(例如,具有 RxO 功能)。
    在这里插入图片描述
    在这里插入图片描述

    2 什么是内置主题?

    不同的 DDS 实体位于不同的内置主题中,如下所示,内置主题包含:

    • DCPSParticipant
    • DCPSTopic
    • DCPSPublication
    • DCPSSubscription
    1. DCPSParticipant 主题用于描述域参与者的每个实例。

    2. Each Topic entity is described by an instance of the DCPSTopic topic.

    3. Information about Publishers and DataWriters comes in a joint built-in topic called DCPSPublication。This contains one instance for each DataWriter which embeds the relevant information from the Publisher that contains it.。要获取有关系统中writers 的信息,您应该订阅 DCPSPublication 主题。

    4. 订阅者和数据读取者也来自一个名为 DCPSSubscription 的联合内置主题。 This contains one instance for each DataReader which also contains the information from the Subscriber that contains it.

    3 内置主题中包含哪些信息?

    3.1 DCPSParticipant

    DCPSParticipant 主题使用 ParticipantBuiltinTopicData 数据类型来跟踪域中的 DomainParticipants。每个 ParticipantBuiltinTopic 数据样本代表一个 DomainParticipant。
    如果创建了一个新的 DomainParticipant,那么就会创建一个新的 ParticipantBuiltinTopicData 实例。如果 DomainParticipant 被删除,则 ParticipantBuiltinTopicData 实例被释放。如果 DomainParticipant 修改其 UserDataQosPolicy,an updated ParticipantBuiltinTopicData sample is written。

    3.1.1 ParticipantBuiltinTopicData 成员表

    下表显示了 DCPSParticipant 主题中包含的信息。

    姓名类型描述
    key内置TopicKey_tGlobally unique identifier of the participant
    user_dataUserDataQosPolicy通过 QosPolicy 附加到 participant 的用户定义数据

    3.2 DCPSTopic

    DCPSTopic 主题通过使用 TopicBuiltinTopicData 数据类型来传达主题的存在。域中的 TopicBuiltinTopicData 样本是该域中主题的表示。当一个新的主题被添加到域中时,一个新的 TopicBuiltinTopic 数据实例被创建。

    当主题被参与者删除时,该实例不会被释放,因为主题生命周期与域的生命周期相关联,而不是与参与者的生命周期相关联。由于 DDS 的性质,主题(及其样本)的生命周期与发布者和订阅者无关。主题(和内置主题)在 DDS 中是永存的,因为使用它们的应用程序可以随时加入或离开。即使所有引入主题的应用程序都消失了,主题仍将保留在系统中。如果整个域消失,它们就会消失。

    如果一个 Topic 修改了它的一个或多个 QoSPolicy 值,一个新的 TopicBuiltinTopicData 样本将被写入。

    DCPSTopicTopic 中发布的信息对数据分发服务至关重要,因此无法通过配置文件中的 Domain/BuiltinTopics 元素禁用它。

    3.2.1 TopicBuiltinTopicData 成员表

    下表显示了 TopicBuiltinTopicData 主题中包含的信息。

    keyBuiltinTopicKey_tGlobal unique identifier of the Topic
    nameStringName of the Topic
    type_nameStringType name of the Topic (i.e. the fully scoped IDL name)
    durabilityDurabilityQosPolicyQosPolicy attached to the Topic
    durability_serviceDurabilityServiceQosPolicyQosPolicy attached to the Topic
    deadlineDeadlineQosPolicyQosPolicy attached to the Topic
    latency_budgetLatencyBudgetQosPolicyQosPolicy attached to the Topic
    livelinessLivelinessQosPolicyQosPolicy attached to the Topic
    reliabilityReliabilityQosPolicyQosPolicy attached to the Topic
    transport_priorityTransportPriorityQosPolicyQosPolicy attached to the Topic
    lifespanLifespanQosPolicyQosPolicy attached to the Topic
    destination_orderDestinationOrderQosPolicyQosPolicy attached to the Topic
    historyHistoryQosPolicyQosPolicy attached to the Topic
    resource_limitsResourceLimitsQosPolicyQosPolicy attached to the Topic
    ownershipOwnershipQosPolicyQosPolicy attached to the Topic
    topic_dataTopicDataQosPolicyQosPolicy attached to the Topic

    3.3 DCPSPublication

    DCPSPublication 主题跟踪数据写入者的存在。它使用 PublicationBuiltinTopicData 数据类型执行此操作。Every PublicationBuiltinTopicData sample in a Domain is a representation of a DataWriter.

    如果您创建一个新的 DataWriter,您将创建一个新的 PublicationBuiltinTopicData 实例。如果您删除 DataWriter,则会释放 PublicationBuiltinTopicData 实例。如果 DataWriter(或它所属的发布者)修改了应用于与其连接的实体的 QoSPolicy,则会写入更新的 PublicationBuiltinTopicData 样本。PublicationBuiltinTopicData 也会在writer 失去或恢复liveliness时更新。

    当您在 DataReader 上调用 get_matched_publication_data 操作时,您实际上获得了 PublicationBuiltinTopicData samples ,这些samples 描述了 DataReader 已连接到的 Writer。

    3.3.1 PublicationBuiltinTopicData 成员表

    NameTypeDescription
    keyBuiltinTopicKey_tGlobal unique identifier of the DataWriter
    participant_keyBuiltinTopicKey_tGlobal unique identifier of the Participant to which the DataWriter belongs
    topic_nameStringName of the Topic used by the DataWriter
    type_nameStringType name of the Topic used by the DataWriter
    durabilityDurabilityQosPolicyQosPolicy attached to the DataWriter
    deadlineDeadlineQosPolicyQosPolicy attached to the DataWriter
    latency_budgetLatencyBudgetQosPolicyQosPolicy attached to the DataWriter
    livelinessLivelinessQosPolicyQosPolicy attached to the DataWriter
    reliabilityReliabilityQosPolicyQosPolicy attached to the DataWriter
    lifespanLifespanQosPolicyQosPolicy attached to the DataWriter
    destination_orderDestinationOrderQosPolicyQosPolicy attached to the DataWriter
    user_dataUserDataQosPolicyQosPolicy attached to the DataWriter
    ownershipOwnershipQosPolicyQosPolicy attached to the DataWriter
    ownership_strengthOwnershipStrengthQosPolicyQosPolicy attached to the DataWriter
    presentationPresentationQosPolicyQosPolicy attached to the Publisher to which the DataWriter belongs
    partitionPartitionQosPolicyQosPolicy attached to the Publisher to which the DataWriter belongs
    topic_dataTopicDataQosPolicyQosPolicy attached to the Topic used by the DataWriter
    group_dataGroupDataQosPolicyQosPolicy attached to the Topic used by the DataWriter

    3.4 DCPSSubscription

    DCPSSubscription 主题使用 SubscriptionBuiltinTopicData 数据类型来传达数据读取器的存在。域中的每个 SubscriptionBuiltinTopicData 样本represents 该域中的数据读取器。

    当启用新的 DataReader 时,会创建一个新的 SubscriptionBuiltinTopicData 实例。当 DataReader 被删除时,SubscriptionBuiltinTopicData 被释放。如果 DataReader(或其所属的 Subscriber)修改了应用于与其连接的条目的 QoSPolicy,则更新 SubscriptionBuiltinTopicData 样本。

    3.4.1 SubscriptionBuiltinTopicData 成员表

    NameTypeDescription
    keyBuiltinTopicKey_tGlobal unique identifier of the DataReader
    participant_keyBuiltinTopicKey_tGlobal unique identifier of the Participant to which the DataReader belongs
    topic_nameStringName of the Topic used by the DataReader
    type_nameStringType name of the Topic used by the DataReader
    durabilityDurabilityQosPolicyQosPolicy attached to the DataReader
    deadlineDeadlineQosPolicyQosPolicy attached to the DataReader
    latency_budgetLatencyBudgetQosPolicyQosPolicy attached to the DataReader
    livelinessLivelinessQosPolicyQosPolicy attached to the DataReader
    reliabilityReliabilityQosPolicyQosPolicy attached to the DataReader
    ownershipLifespanQosPolicyQosPolicy attached to the DataReader
    destination_orderDestinationOrderQosPolicyQosPolicy attached to the DataReader
    user_dataUserDataQosPolicyQosPolicy attached to the DataReader
    time_based_filterTimeBasedFilterQosPolicyQosPolicy attached to the DataReader
    presentationPresentationQosPolicyQosPolicy attached to the Subscriber to which the DataReader belongs
    partitionPartitionQosPolicyQosPolicy attached to the Subscriber to which the DataReader belongs
    topic_dataTopicDataQosPolicyQosPolicy attached to the Topic used by the DataReader
    group_dataGroupDataQosPolicyQosPolicy attached to the Subscriber to which the DataReader belongs
  • 相关阅读:
    centos7安装Nginx
    前端原生socket封装
    java毕业设计房屋中介管理Mybatis+系统+数据库+调试部署
    Mybatis 动态SQL – 使用trim标签替代where,set标签
    Linux:非root、普通用户安装fontconfig、fc-cache命令、中文字体
    linux 终端美化教程
    【CSAPP+电流+梯度下降法】九阳神功-速览1
    使用Node.js与Strve.js@4.3.0实战一款全新的群聊应用
    【hexo】butterfly主题魔改之天气插件
    ubuntu 手动清理内存cache
  • 原文地址:https://blog.csdn.net/huihuige092/article/details/126055002