RTI Connext Modern C++ API
Version 6.0.0
|
Contains the type and functions to support publishing topics. More...
Namespaces | |
namespace | qos |
Contains PublisherQos and DataWriterQos. | |
Classes | |
class | AnyDataWriter |
<<reference-type>> This class provides an non-template holder for representing a DataWriter of any type More... | |
class | AnyDataWriterListener |
The listener to notify status changes for a dds::pub::DataWriter of a generic type. More... | |
class | DataWriterListener |
The Listener to notify status changes for a dds::pub::DataWriter. More... | |
class | NoOpDataWriterListener |
A convenience implementation of DataWriterListener where all methods are overridden to do nothing. More... | |
class | PublisherListener |
The listener to notify status changes for a dds::pub::Publisher. More... | |
class | CoherentSet |
<<value-type>> A publishing application can request that a set of DDS data-sample changes be propagated in such a way that they are interpreted at the receivers' side as a cohesive set of modifications. More... | |
class | DataWriter |
<<reference-type>> Allows an application to publish data for a dds::topic::Topic More... | |
class | Publisher |
<<reference-type>> A publisher is the object responsible for the actual dissemination of publications. More... | |
class | SuspendedPublication |
<<value-type>> Indicates that the application is about to make multiple modifications using several dds::pub::DataWriter's belonging to the same dds::pub::Publisher More... | |
Functions | |
template<typename T > | |
DataWriter< T > | get (const AnyDataWriter &any_writer) |
Same as AnyDataWriter::get() | |
void | ignore (dds::domain::DomainParticipant &participant, const dds::core::InstanceHandle &handle) |
Instructs RTI Connext to locally ignore a publication. | |
template<typename FwdIterator > | |
void | ignore (dds::domain::DomainParticipant &participant, FwdIterator begin, FwdIterator end) |
Instructs RTI Connext to locally ignore several publications. | |
template<typename T > | |
dds::core::InstanceHandleSeq | matched_subscriptions (const dds::pub::DataWriter< T > &writer) |
Retrieve the list of subscriptions currently associated with a dds::pub::DataWriter. | |
template<typename T , typename FwdIterator > | |
FwdIterator | matched_subscriptions (const dds::pub::DataWriter< T > &writer, FwdIterator begin, FwdIterator end) |
Retrieve the list of subscriptions currently associated with a dds::pub::DataWriter. | |
template<typename T > | |
const dds::topic::SubscriptionBuiltinTopicData | matched_subscription_data (const dds::pub::DataWriter< T > &writer, const dds::core::InstanceHandle &subscription_handle) |
Retrieves information on a subscription that is currently associated with a dds::pub::DataWriter. | |
template<typename WRITER , typename FwdIterator > | |
uint32_t | find (const dds::pub::Publisher &publisher, const std::string &topic_name, FwdIterator begin, uint32_t max_size) |
Retrieves the dds::pub::DataWriter for a specific topic name. | |
template<typename WRITER , typename BinIterator > | |
uint32_t | find (const dds::pub::Publisher &publisher, const std::string &topic_name, BinIterator begin) |
Retrieves the dds::pub::DataWriter for a specific topic name. | |
Contains the type and functions to support publishing topics.
DataWriter< T > get | ( | const AnyDataWriter & | any_writer | ) |
Same as AnyDataWriter::get()
void ignore | ( | dds::domain::DomainParticipant & | participant, |
const dds::core::InstanceHandle & | handle | ||
) |
Instructs RTI Connext to locally ignore a publication.
A publication is defined by the association of a topic name, user data, and partition set on the dds::pub::Publisher (see dds::topic::PublicationBuiltinTopicData). After this call, any data written by that publication's dds::pub::DataWriter will be ignored.
This operation can be used to ignore local and remote DataWriters.
The publication (DataWriter) to ignore is identified by the handle
argument.
handle
can be obtained from the dds::sub::SampleInfo retrieved when reading data samples from the built-in dds::sub::DataReader for the publication topic. handle
can be obtained by calling dds::core::Entity::instance_handle() for the local DataWriter. There is no way to reverse this operation.
participant | The DomainParticipant where the publication will be ignored |
handle | <<in>> Handle of the dds::pub::DataWriter to be ignored. |
One | of the Standard Exceptions, dds::core::OutOfResourcesError or dds::core::NotEnabledError |
void ignore | ( | dds::domain::DomainParticipant & | participant, |
FwdIterator | begin, | ||
FwdIterator | end | ||
) |
Instructs RTI Connext to locally ignore several publications.
FwdIterator | A forward iterator whose value type is dds::core::InstanceHandle |
dds::core::InstanceHandleSeq matched_subscriptions | ( | const dds::pub::DataWriter< T > & | writer | ) |
Retrieve the list of subscriptions currently associated with a dds::pub::DataWriter.
Matched subscriptions include all those in the same domain that have a matching dds::topic::Topic, compatible QoS and common partition that the dds::domain::DomainParticipant has not indicated should be "ignored" by means of the dds::sub::ignore operation.
The handles returned list are the ones that RTI Connext uses to locally identify the corresponding matched dds::sub::DataReader entities. These handles match the ones that appear in the dds::sub::SampleInfo::instance_handle field of the dds::sub::SampleInfo when reading the dds::topic::subscription_topic_name() builtin topic.
The maximum number of matches possible is configured with rti::core::policy::DomainParticipantResourceLimits. .
One | of the Standard Exceptions, or dds::core::NotEnabledError |
FwdIterator matched_subscriptions | ( | const dds::pub::DataWriter< T > & | writer, |
FwdIterator | begin, | ||
FwdIterator | end | ||
) |
Retrieve the list of subscriptions currently associated with a dds::pub::DataWriter.
This operation is similar to matched_subscriptions(const dds::pub::DataWriter<T>&) but it copies the instance handles into an iterator range.
FwdIterator | A forward iterator whose value type is dds::core::InstanceHandle |
const dds::topic::SubscriptionBuiltinTopicData matched_subscription_data | ( | const dds::pub::DataWriter< T > & | writer, |
const dds::core::InstanceHandle & | subscription_handle | ||
) |
Retrieves information on a subscription that is currently associated with a dds::pub::DataWriter.
The subscription_handle
must correspond to a subscription currently associated with the dds::pub::DataWriter. Otherwise, the operation will fail and fail with dds::core::InvalidArgumentError. Use dds::pub::matched_subscriptions() to find the subscriptions that are currently matched with the dds::pub::DataWriter.
The above information is available through dds::sub::DataReaderListener::on_data_available() (if a reader listener is installed on the dds::sub::DataReader<dds::topic::SubscriptionBuiltinTopicData>).
writer | The DataWriter to which the subscription is associated |
subscription_handle | <<in>>. Handle to a specific subscription associated with the dds::sub::DataReader. . Must correspond to a subscription currently associated with the dds::pub::DataWriter. |
One | of the Standard Exceptions, or dds::core::NotEnabledError |
uint32_t find | ( | const dds::pub::Publisher & | publisher, |
const std::string & | topic_name, | ||
FwdIterator | begin, | ||
uint32_t | max_size | ||
) |
Retrieves the dds::pub::DataWriter for a specific topic name.
This returned dds::pub::DataWriter is either enabled or disabled.
If more than one dds::pub::DataWriter is attached to the dds::pub::Publisher with the same topic_name
, then this operation may return any one of them.
Writer | The type of the writer. It can be dds::pub::AnyDataWriter, or an instantiation of dds::pub::DataWriter<T> (if T is not the correct type, this function throws dds::core::InvalidDowncastError) |
FwdIterator | The type of forward iterator passed to this function |
publisher | The dds::pub::Publisher the DataWriter belongs to |
topic_name | Name of the dds::topic::Topic associated with the DataWriter that is to be looked up. |
begin | A forward iterator to the position in the destination container to insert the found DataWriter in |
max_size | Only 1 DataWriter will be returned from this function |
uint32_t find | ( | const dds::pub::Publisher & | publisher, |
const std::string & | topic_name, | ||
BinIterator | begin | ||
) |
Retrieves the dds::pub::DataWriter for a specific topic name.
This returned dds::pub::DataWriter is either enabled or disabled.
If more than one dds::pub::DataWriter is attached to the dds::pub::Publisher with the same topic_name
, then this operation may return any one of them.
Writer | The type of the writer. It can be dds::pub::AnyDataWriter, or an instantiation of dds::pub::DataWriter<T> (if T is not the correct type, this function throws dds::core::InvalidDowncastError) |
BinIterator | BinIterator The type of back-inserting iterator passed to this function |
publisher | The dds::pub::Publisher the DataWriter belongs to |
topic_name | Name of the dds::topic::Topic associated with the DataWriter that is to be looked up. |
begin | A back-inserting iterator to the position in the destination container to insert the found DataWriter into |