RTI Connext Modern C++ API Version 7.2.0
|
<<extension>> Configures entity discovery More...
#include <rti/core/policy/CorePolicy.hpp>
Public Member Functions | |
Discovery () | |
Creates the default policy. More... | |
Discovery & | enabled_transports (const dds::core::StringSeq &the_enabled_transports) |
Sets the transports (by their aliases) available for the discovery mechanism. More... | |
dds::core::StringSeq | enabled_transports () const |
Getter (see setter with the same name) More... | |
Discovery & | initial_peers (const dds::core::StringSeq &the_initial_peers) |
Sets the initial list of peers that the discovery mechanism will contact to announce this DomainParticipant. More... | |
dds::core::StringSeq | initial_peers () const |
Getter (see setter with the same name) More... | |
Discovery & | multicast_receive_addresses (const dds::core::StringSeq &the_multicast_receive_addresses) |
Specifies the multicast group addresses on which discovery-related meta-traffic can be received by the DomainParticipant. More... | |
dds::core::StringSeq | multicast_receive_addresses () const |
Getter (see setter with the same name) More... | |
Discovery & | metatraffic_transport_priority (int32_t the_metatraffic_transport_priority) |
The transport priority to use for the Discovery meta-traffic. More... | |
int32_t | metatraffic_transport_priority () const |
Getter (see setter with the same name) More... | |
Discovery & | accept_unknown_peers (bool the_accept_unknown_peers) |
Whether to accept a new participant that is not in the initial peers list. More... | |
bool | accept_unknown_peers () const |
Getter (see setter with the same name) More... | |
Discovery & | enable_endpoint_discovery (bool the_enable_endpoint_discovery) |
Whether to automatically enable endpoint discovery for all the remote participants. More... | |
bool | enable_endpoint_discovery () const |
Getter (see setter with the same name) More... | |
<<extension>> Configures entity discovery
This QoS policy identifies where on the network this application can potentially discover other applications with which to communicate.
The middleware will periodically send network packets to these locations, announcing itself to any remote applications that may be present, and will listen for announcements from those applications.
This QoS policy is an extension to the DDS standard.
rti::core::policy::Discovery::Discovery | ( | ) |
Creates the default policy.
Discovery & rti::core::policy::Discovery::enabled_transports | ( | const dds::core::StringSeq & | the_enabled_transports | ) |
Sets the transports (by their aliases) available for the discovery mechanism.
Only these transports can be used by the discovery mechanism to send meta-traffic via the builtin endpoints (built-in dds::sub::DataReader and dds::pub::DataWriter).
Also determines the unicast addresses on which the Discovery mechanism will listen for meta-traffic. These along with the domain_id
and participant_id
determine the unicast locators on which the Discovery mechanism can receive meta-data.
Alias names for the builtin transports are defined in TRANSPORT_BUILTIN. These alias names are case sensitive and should be written in lowercase.
[default] Empty sequence. All the transports available to the DomainParticipant are available for use by the Discovery mechanism.
[range] Sequence of non-null,non-empty strings.
dds::core::StringSeq rti::core::policy::Discovery::enabled_transports | ( | ) | const |
Getter (see setter with the same name)
Discovery & rti::core::policy::Discovery::initial_peers | ( | const dds::core::StringSeq & | the_initial_peers | ) |
Sets the initial list of peers that the discovery mechanism will contact to announce this DomainParticipant.
As part of the participant discovery phase, the dds::domain::DomainParticipant will announce itself to the domain by sending participant DATA messages. The initial_peers specifies the initial list of peers that will be contacted. A remote dds::domain::DomainParticipant is discovered by receiving participant announcements from a remote peer. When the new remote dds::domain::DomainParticipant has been added to the participant's database, the endpoint discovery phase commences and information about the DataWriters and DataReaders is exchanged.
Each element of this list must be a peer descriptor in the proper format (see Peer Descriptor Format).
[default] builtin.udpv4://239.255.0.1, builtin.udpv4://127.0.0.1, builtin.shmem:// (See also NDDS_DISCOVERY_PEERS)
[range] Sequence of arbitrary length.
dds::core::StringSeq rti::core::policy::Discovery::initial_peers | ( | ) | const |
Getter (see setter with the same name)
Discovery & rti::core::policy::Discovery::multicast_receive_addresses | ( | const dds::core::StringSeq & | the_multicast_receive_addresses | ) |
Specifies the multicast group addresses on which discovery-related meta-traffic can be received by the DomainParticipant.
The multicast group addresses on which the Discovery mechanism will listen for meta-traffic.
Each element of this list must be a valid multicast address (IPv4 or IPv6) in the proper format (see Address Format).
The domain_id
determines the multicast port on which the Discovery mechanism can receive meta-data.
If NDDS_DISCOVERY_PEERS does not contain a multicast address, then the string sequence rti::core::policy::Discovery::multicast_receive_addresses is cleared and the RTI discovery process will not listen for discovery messages via multicast.
If NDDS_DISCOVERY_PEERS contains one or more multicast addresses, the addresses will be stored in rti::core::policy::Discovery::multicast_receive_addresses, starting at element 0. They will be stored in the order they appear NDDS_DISCOVERY_PEERS.
Note: Currently, RTI Connext will only listen for discovery traffic on the first multicast address (element 0) in rti::core::policy::Discovery::multicast_receive_addresses.
[default] builtin.udpv4://239.255.0.1 (See also NDDS_DISCOVERY_PEERS)
[range] Sequence of length [0,1], whose elements are multicast addresses. Currently only the first multicast address (if any) is used. The rest are ignored.
dds::core::StringSeq rti::core::policy::Discovery::multicast_receive_addresses | ( | ) | const |
Getter (see setter with the same name)
Discovery & rti::core::policy::Discovery::metatraffic_transport_priority | ( | int32_t | the_metatraffic_transport_priority | ) |
The transport priority to use for the Discovery meta-traffic.
The discovery metatraffic will be sent by the built-in dds::pub::DataWriter using this transport priority.
[default] 0
[range] [0, MAX_UINT]
int32_t rti::core::policy::Discovery::metatraffic_transport_priority | ( | ) | const |
Getter (see setter with the same name)
Discovery & rti::core::policy::Discovery::accept_unknown_peers | ( | bool | the_accept_unknown_peers | ) |
Whether to accept a new participant that is not in the initial peers list.
If false, the participant will only communicate with those in the initial peers list and those added via dds::domain::DomainParticipant::add_peer(const std::string & peer_descr_string)().
If true, the participant will also communicate with all discovered remote participants.
Note: If accept_unknown_peers is false and shared memory is disabled, applications on the same node will not communicate if only 'localhost' is specified in the peers list. If shared memory is disabled or 'shmem://' is not specified in the peers list, to communicate with other applications on the same node through the loopback interface, you must put the actual node address or hostname in NDDS_DISCOVERY_PEERS.
[default] true
bool rti::core::policy::Discovery::accept_unknown_peers | ( | ) | const |
Getter (see setter with the same name)
Discovery & rti::core::policy::Discovery::enable_endpoint_discovery | ( | bool | the_enable_endpoint_discovery | ) |
Whether to automatically enable endpoint discovery for all the remote participants.
If true, endpoint discovery will automatically occur for every discovered remote participant.
If false, endpoint discovery will be initially disabled and manual activation is required for each discovered participant by calling dds::domain::DomainParticipant::resume_endpoint_discovery.
[default] true
bool rti::core::policy::Discovery::enable_endpoint_discovery | ( | ) | const |
Getter (see setter with the same name)