Fast-DDS icon indicating copy to clipboard operation
Fast-DDS copied to clipboard

How to set the time period of PDP

Open huyan666 opened this issue 7 years ago • 2 comments

In version 1.5.0 ,i use the initial peer list . But it sends PDP data every 250s. How can i set the time period?

huyan666 avatar May 28 '19 03:05 huyan666

Hi @huyan666

You must set leaseDuration_announcementperiod attribute. The time is specified by seconds and fraction of seconds (a fraction is 1/(2^32) seconds).

It may be done by code, when creating a participant.

ParticipantAttributes participant_attributes;
participant_attributes.rtps.builtin.leaseDuration_announcementperiod.seconds = SECONDS;
participant_attributes.rtps.builtin.leaseDuration_announcementperiod.fraction = FRACTION;

It can also be done in XML configuration.

<participant profile_name="participant_xml_conf_profile">
    <rtps>
        <builtin>
            <leaseAnnouncement>
                <durationbyval>
                    <seconds>SECONDS</seconds>
                    <fraction>FRACTION</fraction>
                </durationbyval>
            </leaseAnnouncement>
        </builtin>
    </rtps>
</participant>

I hope this solves your question. Regards!

AlvaroMolinillo avatar Jun 17 '19 07:06 AlvaroMolinillo

Thanks!

huyan666 avatar Jun 17 '19 09:06 huyan666