RTI Connext Modern C++ API  Version 5.3.0
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
dds::pub Namespace Reference

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.
 

Detailed Description

Contains the type and functions to support publishing topics.

Function Documentation

template<typename T >
DataWriter< T > get ( const AnyDataWriter &  any_writer)
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.

There is no way to reverse this operation.

Parameters
participantThe DomainParticipant where the publication will be ignored
handle<<in>> Handle of the dds::pub::DataWriter to be ignored.
Exceptions
Oneof the Standard Exceptions, dds::core::OutOfResourcesError or dds::core::NotEnabledError
See Also
dds::topic::PublicationBuiltinTopicData
dds::topic::PUBLICATION_TOPIC_NAME
dds::sub::builtin_subscriber
template<typename FwdIterator >
void ignore ( dds::domain::DomainParticipant participant,
FwdIterator  begin,
FwdIterator  end 
)

Instructs RTI Connext to locally ignore several publications.

Template Parameters
FwdIteratorA forward iterator whose value type is dds::core::InstanceHandle
See Also
ignore(dds::domain::DomainParticipant&, const dds::core::InstanceHandle&);
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.

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. .

Exceptions
Oneof the Standard Exceptions, or dds::core::NotEnabledError
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.

This operation is similar to matched_subscriptions(const dds::pub::DataWriter<T>&) but it copies the instance handles into an iterator range.

Template Parameters
FwdIteratorA forward iterator whose value type is dds::core::InstanceHandle
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.

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.

Note: This operation does not retrieve the following information in dds::topic::SubscriptionBuiltinTopicData:

The above information is available through dds::sub::DataReaderListener::on_data_available() (if a reader listener is installed on the SubscriptionBuiltinTopicDataDataReader).

Parameters
writerThe 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.
Exceptions
Oneof the Standard Exceptions, or dds::core::NotEnabledError
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.

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.

MT Safety:
UNSAFE. It is not safe to lookup a dds::pub::DataWriter in one thread while another thread is simultaneously creating or destroying that dds::pub::DataWriter. This function retrieves a previously-created DataWriter belonging to the dds::pub::Publisher that is attached to a dds::topic::Topic with a matching topic name. If no such DataWriter exists, the operation will return an empty container. The use of this operation on the built-in Publisher allows access to the built-in DataWriter entities for the built-in topics
Template Parameters
WRITERThe typed-DataWriter type to look up
FwdIteratorThe type of forward iterator passed to this function
Parameters
publisherThe dds::pub::Publisher the DataWriter belongs to
topic_nameName of the dds::topic::Topic associated with the DataWriter that is to be looked up.
beginA forward iterator to the position in the destination container to insert the found DataWriter in
max_sizeOnly 1 DataWriter will be returned from this function
Returns
The number of DataWriters that were found (either 0 or 1)
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.

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.

MT Safety:
UNSAFE. It is not safe to lookup a dds::pub::DataWriter in one thread while another thread is simultaneously creating or destroying that dds::pub::DataWriter. This function retrieves a previously created DataWriter belonging to the dds::pub::Publisher that is attached to a dds::topic::Topic with a matching topic name. If no such DataWriter exists, the operation will return an empty container. The use of this operation on the built-in Publisher allows access to the built-in DataWriter entities for the built-in topics
Template Parameters
WRITERThe Typed DataWriter that is being looked up
BinIteratorBinIterator The type of back-inserting iterator passed to this function
Parameters
publisherThe dds::pub::Publisher the DataWriter belongs to
topic_nameName of the dds::topic::Topic associated with the DataWriter that is to be looked up.
beginA back-inserting iterator to the position in the destination container to insert the found DataWriter into
Returns
The number of DataWriters that were found (either 0 or 1)

RTI Connext Modern C++ API Version 5.3.0 Copyright © Sun Jun 25 2017 Real-Time Innovations, Inc