RTI Connext Modern C++ API
Version 7.0.0
|
<<reference-type>> Container for all dds::core::Entity
objects.
More...
#include <dds/domain/DomainParticipant.hpp>
Public Types | |
typedef DomainParticipantListener | Listener |
The Listener type that DomainParticipants use. More... | |
Public Member Functions | |
DomainParticipant (int32_t the_domain_id) | |
Create a new DomainParticipant with default Qos. More... | |
DomainParticipant (int32_t the_domain_id, const dds::domain::qos::DomainParticipantQos &the_qos, dds::domain::DomainParticipantListener *the_listener=NULL, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::all()) | |
Create a new DomainParticipant. More... | |
DomainParticipant (int32_t the_domain_id, const dds::domain::qos::DomainParticipantQos &the_qos, std::shared_ptr< Listener > the_listener, const dds::core::status::StatusMask &mask=dds::core::status::StatusMask::all()) | |
Create a new DomainParticipant. More... | |
void | listener (Listener *l, const dds::core::status::StatusMask &mask) |
Register a listener with the DomainParticipant. More... | |
Listener * | listener () const |
Get the DomainParticipant listener. More... | |
void | set_listener (std::shared_ptr< Listener > the_listener, const dds::core::status::StatusMask &event_mask) |
Sets the listener associated with this participant. More... | |
void | set_listener (std::shared_ptr< Listener > the_listener) |
Sets the listener associated with this participant. More... | |
std::shared_ptr< Listener > | get_listener () const |
Returns the listener currently associated with this participant. More... | |
const dds::domain::qos::DomainParticipantQos | qos () const |
Gets the current QoS policies of this DomainParticipant. More... | |
void | qos (const dds::domain::qos::DomainParticipantQos &the_qos) |
Set the DomainParticipantQos setting for this DomainParticipant instance. More... | |
DomainParticipant & | operator<< (const dds::domain::qos::DomainParticipantQos &the_qos) |
Equivalent to set_qos(the_qos) More... | |
const DomainParticipant & | operator>> (dds::domain::qos::DomainParticipantQos &the_qos) const |
Equivalent to get_qos() More... | |
int32_t | domain_id () const |
Get the unique domain identifier. More... | |
void | assert_liveliness () |
Manually assert the liveliness of the DomainParticipant. More... | |
void | property (const std::string &property_name, const std::string &value, bool propagate) |
Set the value for a property that applies to a DomainParticipant. More... | |
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. More... | |
dds::core::Time | current_time () |
Get the current time. More... | |
dds::pub::qos::PublisherQos | default_publisher_qos () const |
Get the current default dds::pub::qos::PublisherQos. More... | |
DomainParticipant & | default_publisher_qos (const dds::pub::qos::PublisherQos &the_qos) |
Set the default dds::pub::qos::PublisherQos for this DomainParticipant. More... | |
dds::sub::qos::SubscriberQos | default_subscriber_qos () const |
Get the current default dds::sub::qos::SubscriberQos. More... | |
DomainParticipant & | default_subscriber_qos (const dds::sub::qos::SubscriberQos &the_qos) |
Set the default dds::sub::qos::SubscriberQos for this DomainParticipant. More... | |
dds::topic::qos::TopicQos | default_topic_qos () const |
Get the current default dds::topic::qos::TopicQos. More... | |
DomainParticipant & | default_topic_qos (const dds::topic::qos::TopicQos &the_qos) |
Set the default dds::topic::qos::TopicQos for this DomainParticipant. More... | |
void | close_contained_entities () |
<<extension>> Closes all the entities created from this DomainParticipant More... | |
dds::pub::qos::DataWriterQos | default_datawriter_qos () const |
<<extension>> Get the current default dds::pub::qos::DataWriterQos. More... | |
void | default_datawriter_qos (const ::dds::pub::qos::DataWriterQos &qos) |
<<extension>> Set the default dds::pub::qos::DataWriterQos for this DomainParticipant. More... | |
dds::sub::qos::DataReaderQos | default_datareader_qos () const |
<<extension>> Get the current default dds::sub::qos::DataReaderQos. More... | |
void | default_datareader_qos (const ::dds::sub::qos::DataReaderQos &qos) |
<<extension>> Set the default dds::sub::qos::DataReaderQos for this DomainParticipant. More... | |
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. More... | |
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). More... | |
void | unregister_type (const std::string &name) |
<<extension>> Unregister a type that has previously been registered to this dds::domain::DomainParticipant. More... | |
bool | is_type_registered (const std::string &name) const |
<<extension>> Check if a type has previously been registered to this dds::domain::DomainParticipant. More... | |
void | add_peer (const std::string &peer_descr_string) |
<<extension>> Attempt to contact one or more additional peer participants. More... | |
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. More... | |
dds::core::Duration | dns_tracker_polling_period () const |
Retrieves the frequency used by the DNS tracker thread to query the DNS service. More... | |
void | dns_tracker_polling_period (const dds::core::Duration &polling_period) |
Configures the frequency in which the DNS tracker queries the DNS service. More... | |
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. More... | |
void | delete_durable_subscription (const rti::core::EndpointGroup &group) |
<<extension>> Deletes an existing Durable Subscription on all Persistence Services. More... | |
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. More... | |
rti::core::status::DomainParticipantProtocolStatus | participant_protocol_status () |
<<extension>> Get the protocol status for this participant More... | |
Public Member Functions inherited from dds::core::Entity | |
void | enable () |
Enables this entity (if it was created disabled) More... | |
const dds::core::status::StatusMask | status_changes () |
Retrieves the list of communication statuses that are triggered. More... | |
const dds::core::InstanceHandle | instance_handle () const |
Get the instance handle that represents this entity. More... | |
void | close () |
Forces the destruction of this entity. More... | |
void | retain () |
Disables the automatic destruction of this entity. More... | |
Static Public Member Functions | |
static void | participant_factory_qos (const dds::domain::qos::DomainParticipantFactoryQos &qos) |
Set the dds::domain::qos::DomainParticipantFactoryQos. More... | |
static dds::domain::qos::DomainParticipantFactoryQos | participant_factory_qos () |
Get the current dds::domain::qos::DomainParticipantFactoryQos. More... | |
static void | finalize_participant_factory () |
Finalize the DomainParticipantFactory. More... | |
static dds::domain::qos::DomainParticipantQos | default_participant_qos () |
Get the current DomainParticipantQos for this instance. More... | |
static void | default_participant_qos (const dds::domain::qos::DomainParticipantQos &qos) |
Set the DomainParticipantQos. More... | |
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. More... | |
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. More... | |
dds::core::InstanceHandleSeq | discovered_participants (const dds::domain::DomainParticipant &participant) |
Retrieves the list of other participants discovered by this participant. More... | |
template<typename FwdIterator > | |
FwdIterator | discovered_participants (const dds::domain::DomainParticipant &participant, FwdIterator begin, FwdIterator end) |
Retrieves the list of other participants discovered by this participant. More... | |
dds::topic::ParticipantBuiltinTopicData | discovered_participant_data (const dds::domain::DomainParticipant &participant, const dds::core::InstanceHandle &participant_handle) |
Retrieves the information about one participant discovered by this participant. More... | |
DomainParticipant | find (int32_t domain_id) |
Locates an existing dds::domain::DomainParticipant. More... | |
void | banish_ignored_participants (const dds::domain::DomainParticipant &participant) |
<<extension>> Prevents ignored remote DomainParticipants from receiving traffic from the local DomainParticipant. More... | |
rti::core::optional_value< std::string > | discovered_participant_subject_name (const dds::domain::DomainParticipant &participant, const dds::core::InstanceHandle &participant_handle) |
<<extension>> Returns rti::core::policy::EntityName::name for the specified DomainParticipant. More... | |
dds::core::InstanceHandleSeq | discovered_participants_from_subject_name (const dds::domain::DomainParticipant &participant, const rti::core::optional_value< std::string > &subject_name) |
<<extension>> Returns a list of discovered DomainParticipant entities that have the given rti::core::policy::EntityName::name. More... | |
dds::domain::DomainParticipant | find_participant_by_name (const std::string &participant_name) |
<<extension>> Locates an existing dds::domain::DomainParticipant by name. More... | |
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 More... | |
template<typename ParticipantFwdIterator > | |
uint32_t | find_participants (ParticipantFwdIterator begin) |
<<extension>> Retrieves all the participants created by the application More... | |
const dds::core::xtypes::DynamicType & | find_type (const dds::domain::DomainParticipant &participant, const std::string &type_name) |
<<extension>> Retrieves a type registered with this participant More... | |
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 More... | |
template<typename T > | |
void | register_type (const std::string ®istered_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. More... | |
Related Functions inherited from dds::core::Entity | |
template<typename TO , typename FROM > | |
TO | polymorphic_cast (const FROM &from) |
Downcasts an Entity to a subclass. More... | |
<<reference-type>> Container for all dds::core::Entity
objects.
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.
typedef DomainParticipantListener dds::domain::DomainParticipant::Listener |
The Listener type that DomainParticipants use.
|
inlineexplicit |
Create a new DomainParticipant with default Qos.
Same as DomainParticipant(int32_t, const dds::domain::qos::DomainParticipantQos&, dds::domain::DomainParticipantListener*, const dds::core::status::StatusMask&) except that it uses the default DomainParticipantQos
References dds::core::status::StatusMask::all().
|
inline |
Create a new DomainParticipant.
[DEPRECATED] When using a listener, prefer the constructor that receives a shared_ptr<Listener>
instead of a regular Listener*
pointer.
The DomainParticipant signifies that the application intends to join the Domain identified by the domain_id argument.
the_domain_id | the id of the domain joined by this DomainParticipant. [range] [>=0], and does not violate guidelines stated in rti::core::RtpsWellKnownPorts. |
the_qos | The QoS settings for this DomainParticipant. See also set_qos(). |
the_listener | The listener (NULL by default) |
mask | Changes of communication status to be invoked on the listener. |
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).
|
inline |
Create a new DomainParticipant.
The DomainParticipant signifies that the application intends to join the Domain identified by the domain_id argument.
the_domain_id | the id of the domain joined by this DomainParticipant. [range] [>=0], and does not violate guidelines stated in rti::core::RtpsWellKnownPorts. |
the_qos | The QoS settings for this DomainParticipant. See also set_qos(). |
the_listener | A shared_ptr to the listener. See set_listener() for more information. |
mask | Changes of communication status to be invoked on the listener. |
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).
|
inline |
Register a listener with the DomainParticipant.
[DEPRECATED] The use of set_listener()
is recommended. Unlike this function, set_listener
receives a shared_ptr
which simplifies the management of listener's lifecycle.
|
inline |
Get the DomainParticipant listener.
[DEPRECATED] Prefer get_listener()
instead of this function.
|
inline |
Sets the listener associated with this participant.
The DomainParticipant will hold the shared_ptr
, ensuring that the listener is not deleted at least until this DomainParticipant is deleted or the listener is reset with set_listener(nullptr)
.
the_listener | A shared pointer to the listener to receive status updates or nullptr to reset the current listener and stop receiving status updates. |
event_mask | A mask that indicates which status updates will be notified to the listener |
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.
One | of the Standard Exceptions |
|
inline |
Sets the listener associated with this participant.
If the_listener
is not nullptr
, this overload is equivalent to:
If the_listener
is nullptr
, it is equivalent to:
the_listener | A shared pointer to the listener to receive status updates or nullptr to reset the current listener and stop receiving status updates. |
|
inline |
Returns the listener currently associated with this participant.
nullptr
if there is currently no listener associated to this entity.
|
inline |
Gets the current QoS policies of this DomainParticipant.
|
inline |
Set the DomainParticipantQos setting for this DomainParticipant instance.
the_qos | Set of policies to be applied to the DomainParticipant. Immutable policies cannot be changed after this entity has been enabled. |
dds::core::ImmutablePolicyError | if the_qos contains a different value for an immutable policy. |
dds::core::InconsistentPolicyError | if some policies are inconsistent. |
|
inline |
Equivalent to set_qos(the_qos)
|
inline |
Equivalent to get_qos()
the_qos | the new qos for this DomainParticipant. |
|
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.
|
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 contains 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.
|
inline |
Set the value for a property that applies to a DomainParticipant.
property_name | <<in>>. Name of the property that you want to set. |
value | <<in>>. New value for the property. |
propagate | <<in>>. Indicates if the property will be propagated or not. |
One | of the Standard Exceptions |
|
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().
a_handle | <<in>> dds::core::InstanceHandle of the dds::core::Entity to be checked. |
|
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.
One | of the Standard Exceptions |
|
inlinestatic |
Set the dds::domain::qos::DomainParticipantFactoryQos.
qos | The DomainParticipantFactoryQos to set. |
|
inlinestatic |
Get the current dds::domain::qos::DomainParticipantFactoryQos.
|
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.
|
inlinestatic |
Get the current DomainParticipantQos for this instance.
|
inlinestatic |
Set the DomainParticipantQos.
The UserData and EntityFactory policies can be changed. The other policies are immutable.
qos | The DomainParticipantQos to set. |
|
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.
|
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.
the_qos | The PublisherQos to set. |
One | of the standard Exceptions, or dds::core::InconsistentPolicyError |
|
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.
|
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.
qos
parameter. the_qos | The SubscriberQos to set. |
One | of the standard Exceptions, or dds::core::InconsistentPolicyError |
|
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.
|
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.
the_qos | The TopicQos to set. |
One | of the standard Exceptions, or dds::core::InconsistentPolicyError |
void close_contained_entities | ( | ) |
<<extension>> Closes all the entities created from this DomainParticipant
This operation closes all contained dds::pub::Publisher (including an implicit Publisher, if one exists), dds::sub::Subscriber (including implicit Subscriber), dds::topic::Topic, dds::topic::ContentFilteredTopic, and MultiTopic objects.
Prior to closing each contained entity, this operation will recursively call the corresponding close_contained_entities()
operation on each contained entity (if applicable). This pattern is applied recursively. In this manner the operation close_contained_entities()
on the dds::domain::DomainParticipant will end up recursively closing all the entities contained in the dds::domain::DomainParticipant, including the dds::pub::DataWriter, dds::sub::DataReader, as well as the dds::sub::cond::QueryCondition, dds::sub::cond::ReadCondition, and rti::sub::TopicQuery objects belonging to the contained dds::sub::DataReader.
The operation will fail with dds::core::PreconditionNotMetError if any of the contained entities is in a state where it cannot be closed .
One | of the Standard Exceptions, or dds::core::PreconditionNotMetError. |
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.
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.
qos | The DataWriterQos to set. |
One | of 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.
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.
qos | The DataReaderQos to set. |
One | of 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.
custom_filter | A custom filter |
filter_name | Name of the filter. The name must be unique within the DomainParticipant and must not exceed 255 characters. |
One | of 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.
filter_name | Name of the filter to unregister. |
One | of 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.
name | The 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.
name | The name of the type to check |
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:
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::ignore.
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).
peer_descr_string | New peer descriptor to be added. The format is specified in Peer Descriptor Format. |
One | of 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).
peer_descr_string | Peer descriptor to be removed. The format is specified in Peer Descriptor Format. |
One | of the standard Exceptions |
dds::core::Duration dns_tracker_polling_period | ( | ) | const |
Retrieves the frequency used by the DNS tracker thread to query the DNS service.
The DNS tracker queries the DNS for hostnames specified in the initial peers of a DomainParticipant. The frequency of these queries is defined by rti::core::policy::DiscoveryConfig::dns_tracker_polling_period. If the value returned is dds::core::Duration::infinite(), the DNS tracker is disabled.
One | of the standard Exceptions |
void dns_tracker_polling_period | ( | const dds::core::Duration & | polling_period | ) |
Configures the frequency in which the DNS tracker queries the DNS service.
This API allows you to change the frequency of the polling period for the DNS tracker. The range of accepted values, in seconds, goes from 1 second to 1 year. dds::core::Duration::infinite() is also accepted as a valid value. If the duration is set to dds::core::Duration::infinite(), the DNS tracker is disabled.
Modifying the DNS tracker polling period through this has no effect on the rti::core::policy::DiscoveryConfig::dns_tracker_polling_period when it is retrieved with dds::domain::DomainParticipant::qos() const().
polling_period | Polling period to be configured. |
One | of 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.
If the operation completes successfully, the dds::domain::DomainParticipant will initiate endpoint discovery with the remote dds::domain::DomainParticipant provided as a parameter.
When rti::core::policy::Discovery::enable_endpoint_discovery is set to false, this operation allows the RTI Connext application to select for which remote DomainParticipants endpoint discovery is performed. By disabling endpoint discovery, the DomainParticipant will not store any state about remote endpoints and will not send local endpoint information to remote DomainParticipants.
If rti::core::policy::Discovery::enable_endpoint_discovery is set to true, endpoint discovery will automatically occur for every discovered dds::domain::DomainParticipant. In this case, invoking this operation will have no effect and will return successfully.
When rti::core::policy::Discovery::enable_endpoint_discovery is set to false, you have two options after a remote dds::domain::DomainParticipant is discovered:
Setting rti::core::policy::Discovery::enable_endpoint_discovery to false enables application-level authentication use cases, in which a dds::domain::DomainParticipant will initiate endpoint discovery with a remote dds::domain::DomainParticipant after successful authentication at the application level.
The remote_participant_handle
paremeter is the one that appears in the dds::sub::SampleInfo retrieved when reading the data samples available for the built-in ParticipantBuiltinTopicDataDataReader.
If the specified remote dds::domain::DomainParticipant is not in the database of discovered DomainParticipants or has been previously ignored, this operation will fail with dds::core::Error.
This operation can be called multiple times on the same remote participant. If endpoint discovery has already been resumed, successive calls will have no effect and will return successfully.
remote_participant_handle | <<in>> Handle of a discovered dds::domain::DomainParticipant for which endpoint discovery is to be resumed. |
One | of the Standard Exceptions,or dds::core::NotEnabledError |
void delete_durable_subscription | ( | const rti::core::EndpointGroup & | group | ) |
<<extension>> Deletes an existing Durable Subscription on all Persistence Services.
The Persistence Service will delete the Durable Subscription and the quorum of the existing samples will be considered satisfied.
group | <<in>> rti::core::EndpointGroup specifying the Durable Subscription name. Quorum is not required for this operation. |
One | of the Standard Exceptions |
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.
If you need to receive all samples published on a dds::topic::Topic, including the ones published while a dds::sub::DataReader is inactive or before it may be created, create a Durable Subscription using this method.
In this way, the Persistence Service will ensure that all the samples on that dds::topic::Topic are retained until they are acknowledged by at least N DataReaders belonging to the Durable Subscription where N is the quorum count.
If the same Durable Subscription is created on a different dds::topic::Topic, the Persistence Service will implicitly delete the previous Durable Subscription and create a new one on the new dds::topic::Topic.
group | <<in>> rti::core::EndpointGroup The Durable Subscription name and quorum. |
topic_name | <<in>> The topic name for which the Durable Subscription is created. |
One | of the Standard Exceptions |
rti::core::status::DomainParticipantProtocolStatus participant_protocol_status | ( | ) |
<<extension>> Get the protocol status for this participant
This also resets the status so that it is no longer considered changed.
One | of the Standard Exceptions or dds::core::NotEnabledError. |
|
related |
Instructs RTI Connext to locally ignore a remote dds::domain::DomainParticipant.
#include
<dds/domain/discovery.hpp>
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.
participant | The DomainParticipant for which the remote entity will be ignored. |
handle | The dds::core::InstanceHandle of the remote entity that will be ignored. |
|
related |
Instructs RTI Connext to locally ignore a group of remote dds::domain::DomainParticipant.
#include
<dds/domain/discovery.hpp>
The series of entities whose instance handles are made available via the provided iterators will be ignored.
participant | The DomainParticipant for which the remote entity will be ignored |
begin | The begin iterator for the series of InstanceHandles to ignore |
end | The end iterator for the series of InstanceHandles to ignore |
|
related |
Retrieves the list of other participants discovered by this participant.
#include
<dds/domain/discovery.hpp>
This operation retrieves the list of dds::domain::DomainParticipant entities that have been discovered in the domain and that the application has not indicated should be "ignored" by means of the dds::domain::ignore operation.
participant | The DomainParticipant where to look up the discovered participants |
InstanceHandles
that can be passed to dds::domain::discovered_participant_data. One | of the Standard Exceptions or dds::core::NotEnabledError |
|
related |
Retrieves the list of other participants discovered by this participant.
#include
<dds/domain/discovery.hpp>
FwdIterator | A forward iterator whose value type is dds::core::InstanceHandleSeq |
This overload copies the instance handles into an iterator range.
participant | The participant whose discovered participants are looked up |
begin | The begin iterator where to copy the instance handles |
end | One past the last position where instance handles are copied |
|
related |
Retrieves the information about one participant discovered by this participant.
#include
<dds/domain/discovery.hpp>
This operation retrieves information on a dds::domain::DomainParticipant that has been discovered on the network. The participant must be in the same domain as the participant on which this operation is invoked and must not have been "ignored" by means of the dds::domain::ignore operation.
The participant_handle
must correspond to such a DomainParticipant. Otherwise, the operation will fail with dds::core::PreconditionNotMetError.
Use the operation dds::domain::discovered_participants to find the dds::domain::DomainParticipant entities that are currently discovered.
participant | The DomainParticipant where to look up the information |
participant_handle | <<in>> dds::core::InstanceHandle of dds::domain::DomainParticipant. |
participant_handle
One | of the Standard Exceptions, dds::core::PreconditionNotMetError or dds::core::NotEnabledError |
|
related |
Locates an existing dds::domain::DomainParticipant.
#include
<dds/domain/find.hpp>
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.
domain_id | The domain id of the DomainParticipant to find |
|
related |
<<extension>> Prevents ignored remote DomainParticipants from receiving traffic from the local DomainParticipant.
#include
<rti/domain/discovery.hpp>
This method complements dds::domain::ignore: ignore_participant prevents the local dds::domain::DomainParticipant from processing traffic from the remote DomainParticipant, while this method prevents already ignored remote DomainParticipants from processing traffic from the local DomainParticipant.
Note: this method is currently only supported when enabling the RTI Security Plugins. Please refer to the RTI Security Plugins User's Manual for more information.
One | of the Standard Exceptions, dds::core::PreconditionNotMetError, dds::core::NotEnabledError |
|
related |
<<extension>> Returns rti::core::policy::EntityName::name for the specified DomainParticipant.
#include
<rti/domain/discovery.hpp>
This operation retrieves the rti::core::policy::EntityName::name of a dds::domain::DomainParticipant that has been discovered on the network. The participant must be in the same domain as the participant on which this operation is invoked and must not have been "ignored" by means of the dds::domain::ignore operation.
The participant_handle
must correspond to such a DomainParticipant. If the participant_handle
is dds::core::InstanceHandle::nil() or is not a valid dds::core::InstanceHandle for a DomainParticipant, then the operation will fail with dds::core::InvalidArgumentError. If the participant_handle
corresponds to a DomainParticipant that has not been discovered, then the operation will fail with dds::core::PreconditionNotMetError.
Use the operation dds::domain::discovered_participants to find the dds::domain::DomainParticipant entities that are currently discovered.
Note: this method has different functionality when enabling the RTI Security Plugins. Please refer to the RTI Security Plugins User's Manual for more information.
participant | The DomainParticipant that has discovered the discovered participant. |
participant_handle | <<in>> dds::core::InstanceHandle of dds::domain::DomainParticipant. |
participant_handle
One | of the Standard Exceptions, dds::core::PreconditionNotMetError or dds::core::NotEnabledError |
|
related |
<<extension>> Returns a list of discovered DomainParticipant entities that have the given rti::core::policy::EntityName::name.
#include
<rti/domain/discovery.hpp>
This operation retrieves the same list as dds::domain::discovered_participants, except this list contains only the participants that have the given rti::core::policy::EntityName::name.
Note: this method has different functionality when enabling the RTI Security Plugins. Please refer to the RTI Security Plugins User's Manual for more information.
participant | The DomainParticipant whose discovered participants this operation will look up. |
subject_name | <<in>> The rti::core::policy::EntityName::name by which to filter the list. |
InstanceHandles
corresponding to participants with the given rti::core::policy::EntityName::name. One | of the Standard Exceptions or dds::core::NotEnabledError |
|
related |
<<extension>> Locates an existing dds::domain::DomainParticipant by name.
#include
<rti/domain/find.hpp>
This function is in the rti::domain
namespaceIf no such DomainParticipant exists, the operation will return dds::core::null.
|
related |
<<extension>> Retrieves all the participants created by the application up to a maximum number
#include
<rti/domain/find.hpp>
This function is in the rti::domain
namespaceIf no such DomainParticipant exists, the operation will return dds::core::null.
ParticipantFwdIterator | A forward iterator whose value type is dds::domain::DomainParticipant |
begin | The iterator where to begin adding DomainParticipants. |
max_size | The maximum number of elements to add |
|
related |
<<extension>> Retrieves all the participants created by the application
#include
<rti/domain/find.hpp>
This function is in the rti::domain
namespace(Note: this function is in the rti::domain namespace)
ParticipantFwdIterator | A forward iterator whose value type is dds::domain::DomainParticipant |
begin | The iterator where to begin adding DomainParticipants. |
|
related |
<<extension>> Retrieves a type registered with this participant
#include
<rti/domain/find.hpp>
Every data type used in a DomainParticipant has a registered type name, which in most cases is the same as the type's name (the name used to define the type), but it can be different.
Types are registered by the creation of a dds::topic::Topic, whose constructors optionally receive a registered type name different from the type's name.
Types can also be registered when parsing an XML configuration and calling dds::core::QosProvider::create_participant_from_config().
participant | The DomainParticipant where the type is registered |
type_name | The name used to register the type in this participant |
type_name
exists in this participant
, this function returns the DynamicType describing the type. It can be cast down to dds::core::xtypes::StructType or dds::core::xtypes::UnionType, depending on whether the type is a struct or a union. dds::core::Error | If the type doesn't exist or the operation fails for any other reason |
Example:
|
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()
.
participant | The participant where to register this type |
name | The name to use to register this type |
type | The type definition |
serialization_property | The data-serialization property |
|
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.
When you don't use XML Application creation, you don't typically need to call this function, since the topic constructor takes care of that automatically.
T | The user-generated type that is being registered |
registered_type_name | The 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. |