File: README.md

package info (click to toggle)
fastdds 2.9.1%2Bds-1%2Bdeb12u2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 31,412 kB
  • sloc: cpp: 378,073; xml: 7,623; ansic: 4,596; python: 2,545; sh: 189; makefile: 36
file content (21 lines) | stat: -rw-r--r-- 2,179 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Disable Positive ACKs QoS example

This example illustrates how to use the Disable Positive ACKs QoS extension in a Fast DDS application. When using this QoS, Acknack messages are only sent by the reader if it is missing any samples. In this way, strict reliability is no longer maintained but the writer keeps samples in its history for a sufficient duration (or keep duration) so that readers can negatively acknowledge it. After this duration, the sample is considered to be acknowledged by all readers and is removed from the writer history.

To launch this test open two different consoles:

In the first one launch: ./DDSDisablePositiveACKsQoS publisher --disable  
In the second one launch: ./DDSDisablePositiveACKsQoS subscriber --disable

The above will launch publisher and subscriber using this QoS, i.e. positive acks will not be sent.

## Application behaviour

In this application, the publisher sends a number of samples and periodic heartbeats to the subscriber, and the subscriber expects to receive a number of samples from the publisher. The best way to test this example is to analyze the network traffic. When this QoS is enabled no ack messages will be exchanged (unless samples are not received by the subscriber). When this QoS is disabled, ack messages will be sent in response to heartbeats.

By default the QoS is disabled, the publisher sends 20 samples every 1000 milliseconds and the keep duration is set to 5000 milliseconds. The subscriber waits until 20 samples are received. You can change these defaults by executing:

./DDSDisablePositiveACKsQoS publisher [--disable] [--keep_duration <keep_duration_ms>] [--sleep <writer_sleep_ms>] [--samples <samples>]  
./DDSDisablePositiveACKsQoS subscriber [--disable] [--samples <samples>]

for publisher and subscriber respectively, where the option <enable_QoS> will enable the QoS (i.e. positive akcs will not be sent), <keep_duration_ms> will set the duration for which to keep the samples, <sleep_ms> determines the amount of time to wait before the publisher sends a new sample, and <samples> sets the total number of samples to be sent/received.