Fast-DDS
Fast-DDS copied to clipboard
How to set the time period of PDP
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?
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!
Thanks!