DDS Python API - Send data periodically

4 posts / 0 new
Last post
Offline
Last seen: 8 months 3 weeks ago
Joined: 11/23/2021
Posts: 32
DDS Python API - Send data periodically

Hello @all,

Is there any possibility to configurate a data writer in the qos configurations to send data periodically over the DDS bus?
If yes, how can I configurate this in the xml qos settings?

Thanks in advance and regards,

Marc

Howard's picture
Offline
Last seen: 1 day 9 hours ago
Joined: 11/29/2012
Posts: 565

Sorry, no.  That's not possible with how DDS works.  User application logic is in sole control of when new data values are provided to DDS to send, i.e. DataWriter::write() is called.  There is no automated mechanism, and thus no QoS configuration, to have DDS periodically get data from a variable and send it.

Offline
Last seen: 8 months 3 weeks ago
Joined: 11/23/2021
Posts: 32

Hello Howard,

Does that mean that if I want to send data periodically, I have to call the DataWriter::write() method in a loop? Or is there another way? Because I want to have the write processes running in the backround and not inside a loop.
Whats about the period configuration inside deadline settings (see below). Wouldn't it be possible to send data periodically by configurating this tag?

<deadline>
         <period>
            <sec>DURATION_INFINITE_SEC</sec>
            <nanosec>DURATION_INFINITE_NSEC</nanosec>
         </period>
</deadline>

Regards,

Marc

Howard's picture
Offline
Last seen: 1 day 9 hours ago
Joined: 11/29/2012
Posts: 565

Yes, you have to call DataWriter::write() in a loop.

The Deadline.period QoS does not control when DDS sends data.  It is offered as a way for DDS to tell user applications when applications are not sending or receiving data for a Topic at an expected rate.