RTI Connext Modern C++ API  Version 5.2.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::domain::DomainParticipant Class Reference

<<reference-type>> Container for all dds::core::Entity objects. More...

#include <dds/domain/DomainParticipant.hpp>

Inheritance diagram for dds::domain::DomainParticipant:
dds::core::Entity

Public Types

typedef DomainParticipantListener Listener
 The Listener type that DomainParticipants use.
 

Public Member Functions

 DomainParticipant (int32_t domain_id)
 Create a new DomainParticipant with default Qos.
 
 DomainParticipant (int32_t domain_id, const dds::domain::qos::DomainParticipantQos &qos, dds::domain::DomainParticipantListener *listener=NULL, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::all())
 Create a new DomainParticipant.=.
 
void listener (Listener *l, const dds::core::status::StatusMask &mask)
 Register a listener with the DomainParticipant.
 
Listenerlistener () const
 Get the DomainParticipant listener.
 
dds::domain::qos::DomainParticipantQos qos () const
 Gets the current QoS policies of this DomainParticipant.
 
void qos (const dds::domain::qos::DomainParticipantQos &the_qos)
 Set the DomainParticipantQos setting for this DomainParticipant instance.
 
DomainParticipantoperator<< (const dds::domain::qos::DomainParticipantQos &the_qos)
 
const DomainParticipantoperator>> (dds::domain::qos::DomainParticipantQos &the_qos) const
 
int32_t domain_id () const
 Get the unique domain identifier.
 
void assert_liveliness ()
 Manually assert the liveliness of the DomainParticipant.
 
bool contains_entity (const dds::core::InstanceHandle &a_handle)
 Check whether or not the given handle represents an Entity that was created from the DomainParticipant.
 
dds::core::Time current_time ()
 Get the current time.
 
dds::pub::qos::PublisherQos default_publisher_qos () const
 Get the current default dds::pub::qos::PublisherQos.
 
DomainParticipantdefault_publisher_qos (const dds::pub::qos::PublisherQos &qos)
 Set the default dds::pub::qos::PublisherQos for this DomainParticipant.
 
dds::sub::qos::SubscriberQos default_subscriber_qos () const
 Get the current default dds::sub::qos::SubscriberQos.
 
DomainParticipantdefault_subscriber_qos (const dds::sub::qos::SubscriberQos &qos)
 Set the default dds::sub::qos::SubscriberQos for this DomainParticipant.
 
dds::topic::qos::TopicQos default_topic_qos () const
 Get the current default dds::topic::qos::TopicQos.
 
DomainParticipantdefault_topic_qos (const dds::topic::qos::TopicQos &qos)
 Set the default dds::topic::qos::TopicQos for this DomainParticipant.
 
dds::pub::qos::DataWriterQos default_datawriter_qos () const
 <<extension>> Get the current default dds::pub::qos::DataWriterQos.
 
void default_datawriter_qos (const ::dds::pub::qos::DataWriterQos &qos)
 <<extension>> Set the default dds::pub::qos::DataWriterQos for this DomainParticipant.
 
dds::sub::qos::DataReaderQos default_datareader_qos () const
 <<extension>> Get the current default dds::sub::qos::DataReaderQos.
 
void default_datareader_qos (const ::dds::sub::qos::DataReaderQos &qos)
 <<extension>> Set the default dds::sub::qos::DataReaderQos for this DomainParticipant.
 
void register_contentfilter (const rti::topic::CustomFilter< rti::topic::ContentFilterBase > &custom_filter, const std::string &filter_name)
 <<extension>> Register a content filter which can be used to create a dds::topic::ContentFilteredTopic.
 
void unregister_contentfilter (const std::string &filter_name)
 <<extension>> Unregister a content filter previously registered with dds::domain::DomainParticipant::register_contentfilter( const rti::topic::CustomFilter<rti::topic::ContentFilterBase>& custom_filter, const std::string& filter_name).
 
void unregister_type (const std::string &name)
 <<extension>> Unregister a type that has previously been registered to this dds::domain::DomainParticipant.
 
bool is_type_registered (const std::string &name) const
 <<extension>> Check if a type has previously been registered to this dds::domain::DomainParticipant.
 
void add_peer (const std::string &peer_descr_string)
 <<extension>> Attempt to contact one or more additional peer participants.
 
void remove_peer (const std::string &peer_descr_string)
 <<extension>> Remove one or more peer participants from the list of peers with which this dds::domain::DomainParticipant will try to communicate.
 
void resume_endpoint_discovery (const dds::core::InstanceHandle &remote_participant_handle)
 <<extension>> Initiates endpoint discovery with the remote dds::domain::DomainParticipant identified by its InstanceHandle.
 
void delete_durable_subscription (const rti::core::EndpointGroup &group)
 <<extension>> Deletes an existing Durable Subscription on all Persistence Services.
 
void register_durable_subscription (const rti::core::EndpointGroup &group, const std::string &topic_name)
 <<extension>> Registers a Durable Subscription on the specified dds::topic::Topic on all Persistence Services.
 
- Public Member Functions inherited from dds::core::Entity
void enable ()
 Enables this entity (if it was created disabled)
 
const dds::core::status::StatusMask status_changes ()
 Retrieves the list of communication statuses that are triggered.
 
const dds::core::InstanceHandle instance_handle () const
 Get the instance handle that represents this entity.
 
void close ()
 Forces the destruction of this entity.
 
void retain ()
 Disables the automatic destruction of this entity.
 

Static Public Member Functions

static void participant_factory_qos (const dds::domain::qos::DomainParticipantFactoryQos &qos)
 Set the dds::domain::qos::DomainParticipantFactoryQos.
 
static
dds::domain::qos::DomainParticipantFactoryQos 
participant_factory_qos ()
 Get the current dds::domain::qos::DomainParticipantFactoryQos.
 
static void finalize_participant_factory ()
 Finalize the DomainParticipantFactory.
 
static
dds::domain::qos::DomainParticipantQos 
default_participant_qos ()
 Get the current DomainParticipantQos for this instance.
 
static void default_participant_qos (const dds::domain::qos::DomainParticipantQos &qos)
 Set the DomainParticipantQos.
 

Related Functions

(Note that these are not member functions.)

void ignore (const dds::domain::DomainParticipant &participant, const dds::core::InstanceHandle &handle)
 Instructs RTI Connext to locally ignore a remote dds::domain::DomainParticipant.
 
template<typename FwdIterator >
void ignore (const dds::domain::DomainParticipant &participant, FwdIterator begin, FwdIterator end)
 Instructs RTI Connext to locally ignore a group of remote dds::domain::DomainParticipant.
 
DomainParticipant find (int32_t domain_id)
 Locates an existing dds::domain::DomainParticipant.
 
dds::domain::DomainParticipant find_participant_by_name (const std::string &participant_name)
 <<extension>> Locates an existing dds::domain::DomainParticipant by name.
 
template<typename ParticipantFwdIterator >
uint32_t find_participants (ParticipantFwdIterator begin, uint32_t max_size)
 <<extension>> Retrieves all the participants created by the application up to a maximum number
 
template<typename ParticipantFwdIterator >
uint32_t find_participants (ParticipantFwdIterator begin)
 <<extension>> Retrieves all the participants created by the application
 
void register_type (dds::domain::DomainParticipant &participant, const std::string &name, const dds::core::xtypes::DynamicType &type, const rti::core::xtypes::DynamicDataTypeSerializationProperty &serialization_property=rti::core::xtypes::DynamicDataTypeSerializationProperty::DEFAULT)
 <<extension>> Registers a DynamicType with specific serialization properties
 
template<typename T >
void register_type (const std::string &registered_type_name=dds::topic::topic_type_name< T >::value())
 <<extension>> Registers a User-Generated Type with RTI Connext. This function is used along with XML Application Creation.
 

Detailed Description

<<reference-type>> Container for all dds::core::Entity objects.

  • It represents the participation of the application on a communication plane that isolates applications running on the same set of physical computers from each other. A domain establishes a virtual network linking all applications that share the same domainId and isolating them from applications running on different domains. In this way, several independent distributed applications can coexist in the same physical network without interfering, or even being aware of each other.

The following operations may be called even if the dds::domain::DomainParticipant is not enabled. Operations NOT in this list will fail with dds::core::NotEnabledError \ if called on a disabled DomainParticipant.

QoS:
dds::domain::qos::DomainParticipantQos
Status:
Status Kinds
Listener:
DomainParticipantListener
See Also
Operations Allowed in Listener Callbacks
Other operations related to a DomainParticipant in other namespaces: A DomainParticipant can also be created from an XML definition, see dds::core::QosProvider::create_participant_from_config.
Participant Use Cases
Entity Use Cases
Examples:
Foo.hpp, Foo_publisher.cxx, and Foo_subscriber.cxx.

Member Typedef Documentation

typedef DomainParticipantListener dds::domain::DomainParticipant::Listener

The Listener type that DomainParticipants use.

Constructor & Destructor Documentation

dds::domain::DomainParticipant::DomainParticipant ( int32_t  domain_id)
inlineexplicit
dds::domain::DomainParticipant::DomainParticipant ( int32_t  domain_id,
const dds::domain::qos::DomainParticipantQos qos,
dds::domain::DomainParticipantListener listener = NULL,
const dds::core::status::StatusMask mask = dds::core::status::StatusMask::all() 
)
inline

Create a new DomainParticipant.=.

The DomainParticipant signifies that the application intends to join the Domain identified by the domain_id argument.

Parameters
domain_idthe id of the domain joined by this DomainParticipant. [range] [>=0], and does not violate guidelines stated in rti::core::RtpsWellKnownPorts.
qosThe QoS settings for this DomainParticipant. See also set_qos().
listenerThe listener (NULL by default)
maskChanges of communication status to be invoked on the listener (all by default)
Precondition
The specified QoS policies must be consistent or the operation will fail and no dds::domain::DomainParticipant will be created.

If you want to create multiple participants on a given host in the same domain, make sure each one has a different participant index (set in the rti::core::policy::WireProtocol). This in turn will ensure each participant uses a different port number (since the unicast port numbers are calculated from the participant index and the domain ID).

Note that if there is a single participant per host in a given domain, the participant index can be left at the default value (-1).

Returns
domain participant or NULL on failure
See Also
Specifying QoS on entities for information on setting QoS before entity creation
dds::domain::qos::DomainParticipantQos for rules on consistency among QoS
NDDS_DISCOVERY_PEERS
dds::core::QosProvider
dds::domain::DomainParticipant::default_participant_qos()
dds::domain::DomainParticipant::listener(Listener*, const dds::core::status::StatusMask&)

Member Function Documentation

void dds::domain::DomainParticipant::listener ( Listener l,
const dds::core::status::StatusMask mask 
)
inline

Register a listener with the DomainParticipant.

Parameters
l<<in>> Listener to be installed on the entity.
mask<<in>> Changes of communication status to be invoked on the listener. See dds::core::status::StatusMask.
MT Safety:
Unsafe. This method is not synchronized with the listener callbacks, so it is possible to set a new listener on a participant when the old listener is in a callback.

Care should therefore be taken not to delete any listener that has been set on an enabled participant unless some application-specific means are available of ensuring that the old listener cannot still be in use.

Exceptions
Oneof the Standard Exceptions
See Also
set_listener (abstract)
rti::core::ListenerBinder for an alternative way of setting the listener.
Listener* dds::domain::DomainParticipant::listener ( ) const
inline

Get the DomainParticipant listener.

Returns
The existing listener attached to the DomainParticipant or NULL if no listener has been set.
dds::domain::qos::DomainParticipantQos dds::domain::DomainParticipant::qos ( ) const
inline

Gets the current QoS policies of this DomainParticipant.

Returns
The current QoS policies.
void dds::domain::DomainParticipant::qos ( const dds::domain::qos::DomainParticipantQos the_qos)
inline

Set the DomainParticipantQos setting for this DomainParticipant instance.

Parameters
the_qosSet of policies to be applied to the DomainParticipant. Immutable policies cannot be changed after this entity has been enabled.
Exceptions
dds::core::ImmutablePolicyErrorif the_qos contains a different value for an immutable policy.
dds::core::InconsistentPolicyErrorif some policies are inconsistent.
See Also
dds::domain::qos::DomainParticipantQos for rules on consistency among QoS policies
set_qos (abstract)
default_participant_qos()
dds::core::QosProvider::participant_qos()
DomainParticipant& dds::domain::DomainParticipant::operator<< ( const dds::domain::qos::DomainParticipantQos the_qos)
inline

Get the DomainParticipant QoS.

const DomainParticipant& dds::domain::DomainParticipant::operator>> ( dds::domain::qos::DomainParticipantQos the_qos) const
inline

Set the DomainParticipant QoS.

Parameters
the_qosthe new qos for this DomainParticipant.
int32_t dds::domain::DomainParticipant::domain_id ( ) const
inline

Get the unique domain identifier.

This operation retrieves the domain id used to create the dds::domain::DomainParticipant. The domain id identifies the DDS domain to which the dds::domain::DomainParticipant belongs. Each DDS domain represents a separate data 'communication plane' isolated from other domains.

Returns
the domain id
void dds::domain::DomainParticipant::assert_liveliness ( )
inline

Manually assert the liveliness of the DomainParticipant.

This is used in combination with the dds::core::policy::Liveliness to indicate to RTI Connext that the entity remains active.

You need to use this operation if the dds::domain::DomainParticipant conatins dds::pub::DataWriter entities with the dds::core::policy::Liveliness::kind set to dds::core::policy::LivelinessKind::MANUAL_BY_PARTICIPANT and it only affects the liveliness of those dds::pub::DataWriter entities. Otherwise, it has no effect.

Note: writing data via the dds::pub::DataWriter::write() or dds::pub::DataWriter::write(const T&,const dds::core::Time&) operation asserts liveliness on the dds::pub::DataWriter itself and its dds::domain::DomainParticipant. Consequently the use of assert_liveliness() is only needed if the application is not writing data regularly.

bool dds::domain::DomainParticipant::contains_entity ( const dds::core::InstanceHandle a_handle)
inline

Check whether or not the given handle represents an Entity that was created from the DomainParticipant.

This operation checks whether or not the given a_handle represents an dds::core::Entity that was created from the dds::domain::DomainParticipant. The containment applies recursively. That is, it applies both to entities (TopicDescription, dds::pub::Publisher, or dds::sub::Subscriber) created directly using the dds::domain::DomainParticipant as well as entities created using a contained dds::pub::Publisher, or dds::sub::Subscriber as the factory, and so forth.

The instance handle for an dds::core::Entity may be obtained from built-in topic data, from various statuses, or from the operation dds::core::Entity::instance_handle().

Parameters
a_handle<<in>> dds::core::InstanceHandle of the dds::core::Entity to be checked.
Returns
true if dds::core::Entity is contained by the dds::domain::DomainParticipant, or false otherwise.
dds::core::Time dds::domain::DomainParticipant::current_time ( )
inline

Get the current time.

The current value of the time that RTI Connext uses to time-stamp dds::pub::DataWriter and to set the reception-timestamp for the data updates that it receives.

Exceptions
Oneof the Standard Exceptions
Returns
The current time
static void dds::domain::DomainParticipant::participant_factory_qos ( const dds::domain::qos::DomainParticipantFactoryQos qos)
inlinestatic

Set the dds::domain::qos::DomainParticipantFactoryQos.

Parameters
qosThe DomainParticipantFactoryQos to set.
static dds::domain::qos::DomainParticipantFactoryQos dds::domain::DomainParticipant::participant_factory_qos ( )
inlinestatic

Get the current dds::domain::qos::DomainParticipantFactoryQos.

Returns
The current DomainParticipantFactoryQos
static void dds::domain::DomainParticipant::finalize_participant_factory ( )
inlinestatic

Finalize the DomainParticipantFactory.

The DomainParticipantFactory is a singleton that the C++ API uses implicitly to create participants. RTI Connext provides this operation for users who want to release memory used by the participant factory.

Warning
This method uses a static variable. To avoid undefined behavior in the order of destruction it shouldn't be called in the destructor of a type that for which other global or static variables exist.
static dds::domain::qos::DomainParticipantQos dds::domain::DomainParticipant::default_participant_qos ( )
inlinestatic

Get the current DomainParticipantQos for this instance.

Returns
The current DomainParticipantQos
See Also
Default QoS
static void dds::domain::DomainParticipant::default_participant_qos ( const dds::domain::qos::DomainParticipantQos qos)
inlinestatic

Set the DomainParticipantQos.

The UserData and EntityFactory policies can be changed. The other policies are immutable.

Parameters
qosThe DomainParticipantQos to set.
See Also
Default QoS
dds::pub::qos::PublisherQos dds::domain::DomainParticipant::default_publisher_qos ( ) const
inline

Get the current default dds::pub::qos::PublisherQos.

The retrieved qos will match the set of values specified on the last successful call to default_publisher_qos(const dds::pub::qos::PublisherQos& qos), or else, if the call was never made, the RTI Connext default values for the dds::pub::qos::PublisherQos.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

If no PublisherQos is specified when a dds::pub::Publisher is constructed, the default value of the QoS set in the factory, equivalent to the value obtained by calling this method, will be used to create the Publisher.

MT Safety:
UNSAFE. It is not safe to retrieve the default publisher QoS from a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_publisher_qos
Returns
The current default PublisherQos
DomainParticipant& dds::domain::DomainParticipant::default_publisher_qos ( const dds::pub::qos::PublisherQos qos)
inline

Set the default dds::pub::qos::PublisherQos for this DomainParticipant.

This set of default values will be used for a newly created dds::pub::Publisher if no dds::pub::qos::PublisherQos is specified when constructing the Publisher.

Precondition
The specified QoS policies must be consistent, or else the operation will have no effect and fail with dds::core::InconsistentPolicyError
MT Safety:
UNSAFE. It is not safe to set the default publisher QoS for a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_publisher_qos, dds::domain::DomainParticipant::default_publisher_qos() or creating a Publisher with default QoS values.
Parameters
qosThe PublisherQos to set.
Returns
This DomainParticipant instance
Exceptions
Oneof the standard Exceptions, or dds::core::InconsistentPolicyError
dds::sub::qos::SubscriberQos dds::domain::DomainParticipant::default_subscriber_qos ( ) const
inline

Get the current default dds::sub::qos::SubscriberQos.

The retrieved qos will match the set of values specified on the last successful call to dds::domain::DomainParticipant::default_subscriber_qos(const dds::sub::qos::SubscriberQos & qos ), or dds::domain::DomainParticipant::set_default_subscriber_qos_with_profile, or else, if the call was never made, the default values listed in dds::sub::qos::SubscriberQos.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

If no SubscriberQos is specified when a dds::sub::Subscriber is constructed, the default value of the QoS set in the factory, equivalent to the value obtained by calling this method, will be used to create the Subscriber.

MT Safety:
UNSAFE. It is not safe to retrieve the default Subscriber QoS from a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_subscriber_qos(const dds::sub::qos::SubscriberQos & qos ).

One of the Standard Exceptions

See Also
SUBSCRIBER_QOS_DEFAULT
dds::sub::Subscriber::Subscriber
Returns
The current default SubscriberQos
DomainParticipant& dds::domain::DomainParticipant::default_subscriber_qos ( const dds::sub::qos::SubscriberQos qos)
inline

Set the default dds::sub::qos::SubscriberQos for this DomainParticipant.

This set of default values will be used for a newly created dds::sub::Subscriber if SUBSCRIBER_QOS_DEFAULT is specified as the qos parameter when dds::sub::Subscriber::Subscriber is called.

Precondition
The specified QoS policies must be consistent, or else the operation will have no effect and fail with dds::core::InconsistentPolicyError
MT Safety:
UNSAFE. It is not safe to set the default Subscriber QoS for a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_subscriber_qos(const dds::sub::qos::SubscriberQos & qos ), dds::domain::DomainParticipant::default_subscriber_qos or calling dds::sub::Subscriber::Subscriber with SUBSCRIBER_QOS_DEFAULT as the qos parameter.
Parameters
qos<<in>> Default qos to be set. The special value SUBSCRIBER_QOS_DEFAULT may be passed as qos to indicate that the default QoS should be reset back to the initial values the factory would used if dds::domain::DomainParticipant::default_subscriber_qos(const dds::sub::qos::SubscriberQos & qos ) had never been called.

One of the Standard Exceptions, or dds::core::InconsistentPolicyError

Parameters
qosThe SubscriberQos to set.
Exceptions
Oneof the standard Exceptions, or dds::core::InconsistentPolicyError
dds::topic::qos::TopicQos dds::domain::DomainParticipant::default_topic_qos ( ) const
inline

Get the current default dds::topic::qos::TopicQos.

The retrieve d qos will match the set of values specified on the last successful call to default_topic_qos(const dds::topic::qos::TopicQos& qos), or else, if the call was never made, the RTI Connext default values for the dds::topic::qos::TopicQos.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

If no TopicQos is specified when a dds::topic::Topic is constructed, the default value of the QoS set in the factory, equivalent to the value obtained by calling this method, will be used to create the Topic.

MT Safety:
UNSAFE. It is not safe to retrieve the default Topic QoS from a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_topic_qos
Returns
The current default TopicQos
DomainParticipant& dds::domain::DomainParticipant::default_topic_qos ( const dds::topic::qos::TopicQos qos)
inline

Set the default dds::topic::qos::TopicQos for this DomainParticipant.

This set of default values will be used for a newly created dds::topic::Topic if no dds::topic::qos::TopicQos is specified when constructing the Topic.

Precondition
The specified QoS policies must be consistent, or else the operation will have no effect and fail with dds::core::InconsistentPolicyError
MT Safety:
UNSAFE. It is not safe to set the default topic QoS for a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_topic_qos, dds::domain::DomainParticipant::default_topic_qos() or creating a Topic with default QoS values.
Parameters
qosThe TopicQos to set.
Returns
This DomainParticipant instance
Exceptions
Oneof the standard Exceptions, or dds::core::InconsistentPolicyError
dds::pub::qos::DataWriterQos default_datawriter_qos ( ) const

<<extension>> Get the current default dds::pub::qos::DataWriterQos.

The retrieved qos will match the set of values specified on the last successful call to default_datawriter_qos(const ::dds::pub::qos::DataWriterQos& qos), or else, if the call was never made, the RTI Connext default values for the dds::pub::qos::DataWriterQos.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

If no DataWriterQos is specified when a dds::pub::DataWriter is constructed, the default value of the QoS set in the factory, equivalent to the value obtained by calling this method, will be used to create the DataWriter.

MT Safety:
UNSAFE. It is not safe to retrieve the default DataWriterQoS from a DomainPartipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_datawriter_qos.
Returns
The current default DataWriterQos
void default_datawriter_qos ( const ::dds::pub::qos::DataWriterQos qos)

<<extension>> Set the default dds::pub::qos::DataWriterQos for this DomainParticipant.

This set of default values will be used for a newly created dds::pub::DataWriter if no dds::pub::qos::DataWriterQos is specified when constructing the DataWriter.

Precondition
The specified QoS policies must be consistent, or else the operation will have no effect and fail with dds::core::InconsistentPolicyError
MT Safety:
UNSAFE. It is not safe to set the default DataWriter QoS for a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_datawriter_qos or dds::domain::DomainParticipant::default_datawriter_qos() or creating a DataWriter with default QoS values.
Parameters
qosThe DataWriterQos to set.
Exceptions
Oneof the standard Exceptions, or dds::core::InconsistentPolicyError
dds::sub::qos::DataReaderQos default_datareader_qos ( ) const

<<extension>> Get the current default dds::sub::qos::DataReaderQos.

The retrieved qos will match the set of values specified on the last successful call to default_datareader_qos(const ::dds::sub::qos::DataReaderQos& qos), or else, if the call was never made, the RTI Connext default values for the dds::sub::qos::DataReaderQos.

This method may potentially allocate memory depending on the sequences contained in some QoS policies.

If no DataReaderQos is specified when a dds::sub::DataReader is constructed, the default value of the QoS set in the factory, equivalent to the value obtained by calling this method, will be used to create the DataReader.

MT Safety:
UNSAFE. It is not safe to retrieve the default DataReader QoS from a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_datareader_qos.
Returns
The current default DataReaderQos
void default_datareader_qos ( const ::dds::sub::qos::DataReaderQos qos)

<<extension>> Set the default dds::sub::qos::DataReaderQos for this DomainParticipant.

This set of default values will be used for a newly created dds::sub::DataReader if no dds::sub::qos::DataReaderQos is specified when constructing the DataReader.

Precondition
The specified QoS policies must be consistent, or else the operation will have no effect and fail with dds::core::InconsistentPolicyError
MT Safety:
UNSAFE. It is not safe to set the default DataReader QoS for a DomainParticipant while another thread may be simultaneously calling dds::domain::DomainParticipant::default_datareader_qos or dds::domain::DomainParticipant::default_datareader_qos(). or creating a DataReader with default QoS values.
Parameters
qosThe DataReaderQos to set.
Exceptions
Oneof the standard Exceptions, or dds::core::InconsistentPolicyError
void register_contentfilter ( const rti::topic::CustomFilter< rti::topic::ContentFilterBase > &  custom_filter,
const std::string &  filter_name 
)

<<extension>> Register a content filter which can be used to create a dds::topic::ContentFilteredTopic.

DDS specifies a SQL-like content filter for use by content filtered topics. If this filter does not meet your filtering requirements, you can register a custom filter.

To use a custom filter, it must be registered in the following places:

For example, suppose Application A on the subscription side creates a Topic named X and a ContentFilteredTopic named filteredX (and a corresponding DataReader), using a previously registered content filter, myFilter. With only that, you will have filtering at the subscription side. If you also want to perform filtering in any application that publishes Topic X, then you also need to register the same definition of the ContentFilter myFilter in that application.

Each filter_name can only be used to registered a content filter once with a dds::domain::DomainParticipant.

One of the Standard Exceptions

See Also
dds::domain::DomainParticipant::unregister_contentfilter(const std::string & filter_name)
Parameters
custom_filterA custom filter
filter_nameName of the filter. The name must be unique within the DomainParticipant and must not exceed 255 characters.
Exceptions
Oneof the standard Exceptions
void unregister_contentfilter ( const std::string &  filter_name)

<<extension>> Unregister a content filter previously registered with dds::domain::DomainParticipant::register_contentfilter( const rti::topic::CustomFilter<rti::topic::ContentFilterBase>& custom_filter, const std::string& filter_name).

A filter_name can be unregistered only if it has been previously registered to the dds::domain::DomainParticipant with dds::domain::DomainParticipant::register_contentfilter(const rti::topic::CustomFilter < rti::topic::ContentFilterBase > & custom_filter, const std::string & filter_name).

The unregistration of filter is not allowed if there are any existing dds::topic::ContentFilteredTopic objects that are using the filter. If the operation is called on a filter with existing dds::topic::ContentFilteredTopic objects attached to it, this operation will fail with dds::core::PreconditionNotMetError.

If there are still existing discovered dds::sub::DataReader s with the same filter_name and the filter's compile method of the filter have previously been called on the discovered dds::sub::DataReader s, finalize method of the filter will be called on those discovered dds::sub::DataReader s before the content filter is unregistered. This means filtering will now be performed on the application that is creating the dds::sub::DataReader.

Parameters
filter_nameName of the filter to unregister.
Exceptions
Oneof the standard Exceptions, or dds::core::PreconditionNotMetError
void unregister_type ( const std::string &  name)

<<extension>> Unregister a type that has previously been registered to this dds::domain::DomainParticipant.

Parameters
nameThe name of the type to unregister
bool is_type_registered ( const std::string &  name) const

<<extension>> Check if a type has previously been registered to this dds::domain::DomainParticipant.

Parameters
nameThe name of the type to check
Returns
bool true if it is registered, false otherwise
void add_peer ( const std::string &  peer_descr_string)

<<extension>> Attempt to contact one or more additional peer participants.

Add the given peer description to the list of peers with which this dds::domain::DomainParticipant will try to communicate.

This method may be called at any time after this dds::domain::DomainParticipant has been created (before or after it has been enabled).

If this method is called after dds::core::Entity::enable, an attempt will be made to contact the new peer(s) immediately.

If this method is called before the DomainParticipant is enabled, the peer description will simply be added to the list that was populated by rti::core::policy::Discovery::initial_peers(const dds::core::StringSeq & the_initial_peers); the first attempted contact will take place after this dds::domain::DomainParticipant is enabled.

Adding a peer description with this method does not guarantee that any peer(s) discovered as a result will exactly correspond to those described:

  • This dds::domain::DomainParticipant will attempt to discover peer participants at the given locations but may not succeed if no such participants are available. In this case, this method will not wait for contact attempt(s) to be made and it will not report an error.

To be informed of the exact remote participants that are discovered, regardless of which peers this dds::domain::DomainParticipant attempts to discover, use the built-in participant topic: dds::topic::PARTICIPANT_TOPIC_NAME.

To remove specific peer locators, you may use dds::domain::DomainParticipant::remove_peer(const std::string & peer_descr_string). If a peer is removed, the add_peer operation will add it back to the list of peers.

To stop communicating with a peer dds::domain::DomainParticipant that has been discovered, use dds::domain::DomainParticipant::ignore(const dds::domain::DomainParticipant & participant, const dds::core::InstanceHandle & handle).

Adding a peer description with this method has no effect on the rti::core::policy::Discovery::initial_peers(const dds::core::StringSeq & the_initial_peers) that may be subsequently retrieved with dds::domain::DomainParticipant::qos() const() (because rti::core::policy::Discovery is immutable).

Parameters
peer_descr_stringNew peer descriptor to be added. The format is specified in Peer Descriptor Format.
Exceptions
Oneof the standard Exceptions
void remove_peer ( const std::string &  peer_descr_string)

<<extension>> Remove one or more peer participants from the list of peers with which this dds::domain::DomainParticipant will try to communicate.

This method may be called any time after this dds::domain::DomainParticipant has been enabled

Calling this method has the following effects:

If remote participants located on a peer that was previously removed are discovered, they will be ignored untill the related peer is added back by using dds::domain::DomainParticipant::add_peer(const std::string & peer_descr_string).

Removing a peer description with this method has no effect on the rti::core::policy::Discovery::initial_peers(const dds::core::StringSeq & the_initial_peers) that may be subsequently retrieved with dds::domain::DomainParticipant::qos() const() (because rti::core::policy::Discovery is immutable).

Parameters
peer_descr_stringPeer descriptor to be removed. The format is specified in Peer Descriptor Format.
Exceptions
Oneof the standard Exceptions
void resume_endpoint_discovery ( const dds::core::InstanceHandle remote_participant_handle)

<<extension>> Initiates endpoint discovery with the remote dds::domain::DomainParticipant identified by its InstanceHandle.

void delete_durable_subscription ( const rti::core::EndpointGroup group)

<<extension>> Deletes an existing Durable Subscription on all Persistence Services.

void register_durable_subscription ( const rti::core::EndpointGroup group,
const std::string &  topic_name 
)

<<extension>> Registers a Durable Subscription on the specified dds::topic::Topic on all Persistence Services.

Friends And Related Function Documentation

void ignore ( const dds::domain::DomainParticipant participant,
const dds::core::InstanceHandle handle 
)
related

Instructs RTI Connext to locally ignore a remote dds::domain::DomainParticipant.

From the time of this call onwards, RTI Connext will locally behave as if the remote participant did not exist. This means it will ignore any topic, publication, or subscription that originates on that dds::domain::DomainParticipant.

There is no way to reverse this operation.

This operation can be used in conjunction with the discovery of remote participants offered by means of the dds::topic::ParticipantBuiltinTopicData to provide access control.

Application data can be associated with a dds::domain::DomainParticipant by means of the USER_DATA policy. This application data is propagated as a field in the built-in topic and can be used by an application to implement its own access control policy.

The dds::domain::DomainParticipant to ignore is identified by the handle argument. This handle is the one that appears in the dds::sub::SampleInfo retrieved when reading the data-samples available for the built-in dds::sub::DataReader to the dds::domain::DomainParticipant topic. The built-in dds::sub::DataReader is read with the same dds::sub::DataReader::read and dds::sub::DataReader::take operations used for any dds::sub::DataReader.

Parameters
participantThe DomainParticipant for which the remote entity will be ignored.
handleThe dds::core::InstanceHandle of the remote entity that will be ignored.
template<typename FwdIterator >
void ignore ( const dds::domain::DomainParticipant participant,
FwdIterator  begin,
FwdIterator  end 
)
related

Instructs RTI Connext to locally ignore a group of remote dds::domain::DomainParticipant.

The series of entities whose instance handles are made available via the provided iterators will be ignored.

Parameters
participantThe DomainParticipant for which the remote entity will be ignored
beginThe begin iterator for the series of InstanceHandles to ignore
endThe end iterator for the series of InstanceHandles to ignore
See Also
ignore(const dds::domain::DomainParticipant& participant, const dds::core::InstanceHandle& handle)
DomainParticipant find ( int32_t  domain_id)
related

Locates an existing dds::domain::DomainParticipant.

If no such DomainParticipant exists, the operation will return dds::core::null.

If multiple DomainParticipants belonging to that domain id exist, then the operation will return one of them. It is not specified which one.

Parameters
domain_idThe domain id of the DomainParticipant to find
dds::domain::DomainParticipant find_participant_by_name ( const std::string &  participant_name)
related

<<extension>> Locates an existing dds::domain::DomainParticipant by name.

#include <rti/domain/find.hpp>

If no such DomainParticipant exists, the operation will return dds::core::null.

template<typename ParticipantFwdIterator >
uint32_t find_participants ( ParticipantFwdIterator  begin,
uint32_t  max_size 
)
related

<<extension>> Retrieves all the participants created by the application up to a maximum number

#include <rti/domain/find.hpp>

If no such DomainParticipant exists, the operation will return dds::core::null.

Template Parameters
ParticipantFwdIteratorA forward iterator whose value type is dds::domain::DomainParticipant
Parameters
beginThe iterator where to begin adding DomainParticipants.
max_sizeThe maximum number of elements to add
Returns
The number of elements added
template<typename ParticipantFwdIterator >
uint32_t find_participants ( ParticipantFwdIterator  begin)
related

<<extension>> Retrieves all the participants created by the application

#include <rti/domain/find.hpp>

Template Parameters
ParticipantFwdIteratorA forward iterator whose value type is dds::domain::DomainParticipant
Parameters
beginThe iterator where to begin adding DomainParticipants.
Returns
The number of elements added
void register_type ( dds::domain::DomainParticipant participant,
const std::string &  name,
const dds::core::xtypes::DynamicType type,
const rti::core::xtypes::DynamicDataTypeSerializationProperty serialization_property = rti::core::xtypes::DynamicDataTypeSerializationProperty::DEFAULT 
)
related

<<extension>> Registers a DynamicType with specific serialization properties

Typically you don't need to call this function, since this topic constructor takes care of that automatically. You do need to call this function before creating the topic if you want to change the default data-serialization property.

Calling this function also allows to change the registered name of the type, which by default is type.name().

Parameters
participantThe participant where to register this type
nameThe name to use to register this type
typeThe type definition
serialization_propertyThe data-serialization property
See Also
dds::core::xtypes::DynamicType
dds::core::xtypes::DynamicData
template<typename T >
void register_type ( const std::string &  registered_type_name = dds::topic::topic_type_name<T>::value())
related

<<extension>> Registers a User-Generated Type with RTI Connext. This function is used along with XML Application Creation.

When using XML Application creation, you must use this function to register any user-generated types with RTI Connext before creating your system.

Typically you don't need to call this function, since the topic constructor takes care of that automatically.

Template Parameters
TThe user-generated type that is being registered
Parameters
registered_type_nameThe name to use when registering the type. This is the name that will be used in your XML configuration file to refer to the type.
See Also
dds::domain::DomainParticipant::create_participant_from_config
XML Application Creation

RTI Connext Modern C++ API Version 5.2.0 Copyright © Sun Jun 21 2015 Real-Time Innovations, Inc