ZBLOG

The authentication phase starts when discovery information is received from the remote DomainParticipants. At this moment, the participant sends a handshake request until a handshake response is received from the remote participant. Some parameter...

该段文字描述了在DDS(Data Distribution Service)中与身份验证握手相关的参数设置,尤其是对于dds.sec.auth.builtin.PKI-DH插件的配置。这些设置影响参与者之间的身份验证过程。以下是对各个部分的详细解释:

握手阶段

  • 握手阶段开始:当接收到来自远程DomainParticipants的发现信息时,身份验证阶段开始。在这一刻,参与者会发送握手请求,直到接收到来自远程参与者的握手响应。

  • 相关参数

    • max_handshake_requests:控制要发送的最大握手请求数量。
    • initial_handshake_resend_period:首次重发握手请求之前的初始等待时间(以毫秒为单位)。
    • handshake_resend_period_gain:用于计算两个握手请求之间等待时间增长的增益。

握手请求周期计算

  • 在每次迭代中,发送新握手请求前的等待时间根据最后两次握手请求之间的时间乘以增益值进行计算,以便让等待时间逐渐增加。

配置表格

下面是配置身份验证握手机制行为所需属性及其默认值:

属性名称 数据类型 范围 默认值
max_handshake_requests [1, max) 10
initial_handshake_resend_period [1, max) 125
handshake_resend_period_gain (1.0, max) 1.5

注意事项

所有列出的属性都有前缀 dds.sec.auth.builtin.PKI-DH.。例如:dds.sec.auth.builtin.PKI-DH.max_handshake_requests

示例代码

提供了如何在C++和XML中设置这些属性的方法。

C++ 示例

DomainParticipantQos pqos;

pqos.properties().properties().emplace_back(
    "dds.sec.auth.builtin.PKI-DH.max_handshake_requests",
    "5");
pqos.properties().properties().emplace_back(
    "dds.sec.auth.builtin.PKI-DH.initial_handshake_resend_period",
    "250");
pqos.properties().properties().emplace_back(
    "dds.sec.auth.builtin.PKI-DH.handshake_resend_period_gain",
    "1.5");

这段代码示例展示了如何使用C++编程语言设置DomainParticipantQoS中的安全参数。

XML 示例

<participant profile_name="secure_domainparticipant_conf_auth_handshake_props_xml_profile">
    <rtps>
        <propertiesPolicy>
            <properties>
                <property>
                    <name>dds.sec.auth.builtin.PKI-DH.max_handshake_requests</name>
                    <value>5</value>
                </property>
                <property>
                    <name>dds.sec.auth.builtin.PKI-DH.initial_handshake_resend_period</name>
                    <value>250</value>
                </property>
                <property>
                    <name>dds.sec.auth.builtin.PKI-DH.handshake_resend_period_gain</name>
                    <value>1.5</value>
                </property>
            </properties>
        </propertiesPolicy>
    </rtps>
</participant>

这段XML示例展示了如何在XML配置文件中定义相同的属性设置。

总之,这段文字提供了关于如何配置DDS中身份验证握手机制的重要信息,包括参数定义、默认值以及具体实现示例。通过正确设置这些属性,可以优化参与者之间身份验证过程中的效率和可靠性。


内容由零声教学AI助手提供,问题来源于学员提问

本站部分文章来源于网络,版权归原作者所有,如有侵权请联系站长删除。
转载请注明出处:http://sdn.0voice.com/?id=7457

分享:
扫描分享到社交APP
上一篇
下一篇
发表列表
游客 游客
此处应有掌声~
评论列表

还没有评论,快来说点什么吧~

联系我们

在线咨询: 点击这里给我发消息

微信号:3007537140

上班时间: 10:30-22:30

关注我们
x

注册

已经有帐号?