5.3.1. General Discovery Settings

Some discovery settings are shared across the different discovery mechanisms. These settings are defined under the builtin public data member of the WireProtocolConfigQos class. These are:

Name

Description

Type

Default

Discovery Protocol

The discovery protocol to use
(see Discovery mechanisms).

DiscoveryProtocol

SIMPLE

Ignore Participant flags

Filter discovery traffic for
DomainParticipants in the
same process, in different
processes, or in different hosts.

ParticipantFilteringFlags

NO_FILTER

Lease Duration

Indicates for how much time
should a remote DomainParticipant
consider the local DomainParticipant
to be alive.

Duration_t

20 s

Announcement Period

The period for the DomainParticipant
to send PDP announcements.

Duration_t

3 s

5.3.1.1. Discovery Protocol

Specifies the discovery protocol to use (see Discovery mechanisms). The possible values are:

Discovery Mechanism

Possible values

Description

Simple

SIMPLE

Simple discovery protocol as specified in the RTPS standard.

Discovery Server

SERVER

The DomainParticipant acts as a hub for discovery traffic, receiving
and distributing discovery information.

CLIENT

The DomainParticipant acts as a client for discovery traffic.
It sends its discovery information to the server, and it receives
only the information that is relevant to it.

SUPER_CLIENT

The DomainParticipant acts as a client for discovery traffic.
It sends its discovery information to the server, and it receives
all other discovery information from the server.

BACKUP

Creates a SERVER DomainParticipant which has a persistent sqlite
database. A BACKUP server can load the a database on start.
This type of sever makes the Discovery Server architecture
resilient to server destruction.

Manual

NONE

Disables PDP phase, therefore there is no EDP phase.
All matching must be done manually through the
addReaderLocator, addReaderProxy, addWriterProxy
RTPS layer methods.

DomainParticipantQos pqos;

pqos.wire_protocol().builtin.discovery_config.discoveryProtocol =
        DiscoveryProtocol::SIMPLE;

5.3.1.2. Ignore Participant flags

Defines a filter to ignore some discovery traffic when received. This is useful to add an extra level of DomainParticipant isolation. The possible values are:

Possible values

Description

NO_FILTER

All Discovery traffic is processed.

FILTER_DIFFERENT_HOST

Discovery traffic from another host is discarded.

FILTER_DIFFERENT_PROCESS

Discovery traffic from another process on the same host is discarded.

FILTER_SAME_PROCESS

Discovery traffic from DomainParticipant’s own process is discarded.

FILTER_DIFFERENT_PROCESS | FILTER_SAME_PROCESS

Discovery traffic from DomainParticipant’s own host is discarded.

DomainParticipantQos pqos;

pqos.wire_protocol().builtin.discovery_config.ignoreParticipantFlags =
        static_cast<eprosima::fastdds::rtps::ParticipantFilteringFlags>(
    ParticipantFilteringFlags::FILTER_DIFFERENT_PROCESS |
    ParticipantFilteringFlags::FILTER_SAME_PROCESS);

Note

To configure a DomainParticipant to not receive data from its own DataWriters, please refer to Ignore Local Endpoints.

5.3.1.3. Lease Duration

Indicates for how much time should a remote DomainParticipant consider the local DomainParticipant to be alive. If the liveliness of the local DomainParticipant has not being asserted within this time, the remote DomainParticipant considers the local DomainParticipant dead and destroys all the information regarding the local DomainParticipant and all its endpoints.

The local DomainParticipant’s liveliness is asserted on the remote DomainParticipant any time the remote DomainParticipant receives any kind of traffic from the local DomainParticipant.

The lease duration is specified as a time expressed in seconds and nanosecond using a Duration_t.

DomainParticipantQos pqos;

pqos.wire_protocol().builtin.discovery_config.leaseDuration = Duration_t(10, 20);

5.3.1.4. Announcement Period

It specifies the periodicity of the DomainParticipant’s PDP announcements. For liveliness’ sake it is recommend that the announcement period is shorter than the lease duration, so that the DomainParticipant’s liveliness is asserted even when there is no data traffic. It is important to note that there is a trade-off involved in the setting of the announcement period, i.e. too frequent announcements will bloat the network with meta traffic, but too scarce ones will delay the discovery of late joiners.

DomainParticipant’s announcement period is specified as a time expressed in seconds and nanosecond using a Duration_t.

DomainParticipantQos pqos;

pqos.wire_protocol().builtin.discovery_config.leaseDuration_announcementperiod = Duration_t(1, 2);