RTI Connext Modern C++ API Version 7.3.0
rti::pub Namespace Reference

<<extension>> Extensions to dds::pub More...

Classes

class  AcknowledgmentInfo
 <<extension>> <<value-type>> Information about an application-acknowledged sample More...
 
class  FlowController
 <<extension>> <<reference-type>> A flow controller is the object responsible for shaping the network traffic by determining when attached asynchronous dds::pub::DataWriter instances are allowed to write data. More...
 
class  FlowControllerProperty
 <<extension>> <<value-type>> Configures a FlowController More...
 
struct  FlowControllerSchedulingPolicy_def
 <<extension>> Kinds of flow controller shceduling policy More...
 
class  FlowControllerTokenBucketProperty
 <<extension>> <<value-type>> Configures a FlowController based on a tocken-bucket mechanism More...
 
class  WriteParams
 <<extension>> <<value-type>> Advanced parameters for writing with a DataWriter More...
 

Typedefs

typedef dds::core::safe_enum< FlowControllerSchedulingPolicy_defFlowControllerSchedulingPolicy
 <<extension>> The safe enumeration for FlowControllerSchedulingPolicy_def::type More...
 

Functions

dds::pub::Publisher implicit_publisher (const dds::domain::DomainParticipant &dp)
 <<extension>> Get the implicit dds::pub::Publisher for a given dds::domain::DomainParticipant. More...
 
template<typename T >
dds::topic::ParticipantBuiltinTopicData matched_subscription_participant_data (const dds::pub::DataWriter< T > &writer, const dds::core::InstanceHandle &handle)
 <<extension>> This operation retrieves the information on the discovered dds::domain::DomainParticipant associated with the subscription that is currently matching with the dds::pub::DataWriter. More...
 
template<typename T >
rti::core::LocatorSeq matched_subscriptions_locators (const dds::pub::DataWriter< T > &writer)
 <<extension>> Retrieve the list of locators for subscriptions currently associated with this DataWriter. More...
 
template<typename T >
bool is_matched_subscription_active (const dds::pub::DataWriter< T > &writer, const dds::core::InstanceHandle &handle)
 <<extension>> Check if a matched subscription is active. More...
 
template<typename T >
std::vector< dds::topic::SubscriptionBuiltinTopicDatamatched_subscription_data (const dds::pub::DataWriter< T > &writer)
 <<extension>> Obtain the SubscriptionBuiltinTopicData for all of the subscriptions matched with a DataWriter. More...
 
template<typename PublisherForwardIterator >
uint32_t find_publishers (const dds::domain::DomainParticipant participant, PublisherForwardIterator begin, uint32_t max_size)
 <<extension>> Retrieve all of the dds::pub::Publisher created from this dds::domain::DomainParticipant More...
 
template<typename PublisherBackInsertIterator >
uint32_t find_publishers (const dds::domain::DomainParticipant participant, PublisherBackInsertIterator begin)
 Retrieve all the dds::pub::Publisher created from this dds::domain::DomainParticipant. More...
 
dds::pub::Publisher find_publisher (const dds::domain::DomainParticipant participant, const std::string &publisher_name)
 <<extension>> Looks up a dds::pub::Publisher by its entity name within the dds::domain::DomainParticipant. More...
 
template<typename AnyDataWriterBackInsertIterator >
uint32_t find_datawriters (dds::pub::Publisher publisher, AnyDataWriterBackInsertIterator begin)
 Retrieve all the dds::pub::DataWriter created from this dds::pub::Publisher. More...
 
template<typename AnyDataWriterForwardIterator >
uint32_t find_datawriters (dds::pub::Publisher publisher, AnyDataWriterForwardIterator begin, uint32_t max_size)
 Retrieve all the dds::pub::DataWriter created from this dds::pub::Publisher. More...
 
template<typename Writer >
Writer find_datawriter_by_topic_name (dds::pub::Publisher publisher, const std::string &topic_name)
 <<extension>> Retrieves a dds::pub::DataWriter with the given name within the dds::pub::Publisher More...
 
template<typename Writer >
Writer find_datawriter_by_name (dds::pub::Publisher publisher, const std::string &datawriter_name)
 <<extension>> Retrieves a dds::pub::DataWriter with the given name within the dds::pub::Publisher More...
 
template<typename Writer >
Writer find_datawriter_by_name (dds::domain::DomainParticipant participant, const std::string &datawriter_name)
 <<extension>> Retrieves a dds::pub::DataWriter within the dds::domain::DomainParticipant with the given name More...
 
FlowController find_flow_controller (dds::domain::DomainParticipant participant, const std::string &name)
 Retrieves an existing FlowController. More...
 

Detailed Description

<<extension>> Extensions to dds::pub

Function Documentation

◆ implicit_publisher()

dds::pub::Publisher rti::pub::implicit_publisher ( const dds::domain::DomainParticipant dp)

<<extension>> Get the implicit dds::pub::Publisher for a given dds::domain::DomainParticipant.

Note
This is a standalone function in the namespace rti::pub

If an implicit Publisher does not already exist, this creates one.

The implicit Publisher is created with default dds::pub::qos::PublisherQos and no listener. When a DomainParticipant is deleted, if there are no attached dds::pub::DataWriter that belong to the implicit Publisher, the implicit Publisher will be implicitly deleted.

MT Safety:
UNSAFE. It is not safe to create an implicit Publisher while another thread may be simultaneously calling dds::domain::DomainParticipant::default_publisher_qos.
Parameters
dpThe DomainParticipant that the implicit publisher belongs to
Returns
The implicit publisher

◆ matched_subscription_participant_data()

template<typename T >
dds::topic::ParticipantBuiltinTopicData rti::pub::matched_subscription_participant_data ( const dds::pub::DataWriter< T > &  writer,
const dds::core::InstanceHandle handle 
)

<<extension>> This operation retrieves the information on the discovered dds::domain::DomainParticipant associated with the subscription that is currently matching with the dds::pub::DataWriter.

Note
This is a standalone function in the namespace rti::pub

The subscription_handle must correspond to a subscription currently associated with the dds::pub::DataWriter. Otherwise, the operation will fail with dds::core::InvalidArgumentError. The operation may also fail with dds::core::PreconditionNotMetError if the subscription corresponds to the same dds::domain::DomainParticipant that the DataWriter belongs to. Use dds::pub::matched_subscriptions() to find the subscriptions that are currently matched with the dds::pub::DataWriter.

Exceptions
Oneof the Standard Exceptions, or dds::core::NotEnabledError
Template Parameters
TThe topic-type that the DataWriter subscribes to
Parameters
writerThe writer to lookup the matched participant data of
handleThe InstanceHandle to a specific subscription. Must correspond to a subscription currently associated with the DataWriter.
Returns
The dds::topic::ParticipantBuiltinTopicData of the DomainParticipant of a matched subscription of a dds::pub::DataWriter

◆ matched_subscriptions_locators()

template<typename T >
rti::core::LocatorSeq rti::pub::matched_subscriptions_locators ( const dds::pub::DataWriter< T > &  writer)

<<extension>> Retrieve the list of locators for subscriptions currently associated with this DataWriter.

The locators returned are the ones that are used by the DDS implementation to communicate with the corresponding matched DataReaders.

Template Parameters
TThe topic-type that the DataWriter publishes.
Parameters
writerThe DataWriter.
Returns
The list of locators

◆ is_matched_subscription_active()

template<typename T >
bool rti::pub::is_matched_subscription_active ( const dds::pub::DataWriter< T > &  writer,
const dds::core::InstanceHandle handle 
)

<<extension>> Check if a matched subscription is active.

Note
This is a standalone function in the namespace rti::pub
Template Parameters
TThe topic-type that the DataWriter publishes.
Parameters
writerThe DataWriter.
handleThe dds::core::InstanceHandle of the matched subscription.

This API is used for querying the endpoint liveliness of a matched subscription. A matched subscription will be marked as inactive when it becomes nonprogessing (e.g., not responding to a DataWriter's heartbeats, or letting its internal queue fill up without taking the available data). Note that if the participant associated with the matched subscription loses liveliness, the dds::core::InstanceHandle will become invalid and this function will fail with dds::core::InvalidArgumentError.

Returns
A boolean indicating whether or not the matched subscription is active.

◆ matched_subscription_data()

template<typename T >
std::vector< dds::topic::SubscriptionBuiltinTopicData > rti::pub::matched_subscription_data ( const dds::pub::DataWriter< T > &  writer)

<<extension>> Obtain the SubscriptionBuiltinTopicData for all of the subscriptions matched with a DataWriter.

Note
This is a standalone function in the namespace rti::pub

This API retrieves the matched publication data from all of the subscriptions currently matched a DataWriter.

Template Parameters
TThe topic-type that the DataWriter publishes.
Parameters
writerThe DataWriter.
Returns
A std::vector containing all of the matched subscription data.

◆ find_publishers() [1/2]

template<typename PublisherForwardIterator >
uint32_t rti::pub::find_publishers ( const dds::domain::DomainParticipant  participant,
PublisherForwardIterator  begin,
uint32_t  max_size 
)

<<extension>> Retrieve all of the dds::pub::Publisher created from this dds::domain::DomainParticipant

Note
This is a standalone function in the namespace rti::pub
Template Parameters
PublisherForwardIteratorA forward iterator whose value type is dds::pub::Publisher
Parameters
participantThe dds::domain::DomainParticipant the Publishers belong to
beginA forward iterator to the position in the destination container to insert the found Publishers into
max_sizeThe maximum number of Publishers to add
Returns
The number of found Publishers
See also
Looking up DataWriters

◆ find_publishers() [2/2]

template<typename PublisherBackInsertIterator >
uint32_t rti::pub::find_publishers ( const dds::domain::DomainParticipant  participant,
PublisherBackInsertIterator  begin 
)

Retrieve all the dds::pub::Publisher created from this dds::domain::DomainParticipant.

Template Parameters
PublisherBackInsertIteratorA back-inserting iterator whose value type is dds::pub::Publisher
Parameters
participantThe dds::domain::DomainParticipant the Publishers belong to
beginA back-inserting iterator to the position in the destination container to insert the found Publishers in
Returns
The number of found Publishers
See also
Looking up DataWriters

◆ find_publisher()

dds::pub::Publisher rti::pub::find_publisher ( const dds::domain::DomainParticipant  participant,
const std::string &  publisher_name 
)

<<extension>> Looks up a dds::pub::Publisher by its entity name within the dds::domain::DomainParticipant.

Note
This is a standalone function in the namespace rti::pub

Every dds::pub::Publisher in the system has an entity name which is configured and stored in the EntityName policy, ENTITY_NAME.

This operation retrieves a dds::pub::Publisher within the dds::domain::DomainParticipant given the entity's name. If there are several dds::pub::Publisher with the same name within the dds::domain::DomainParticipant, this function returns the first matching occurrence.

Parameters
participantThe dds::domain::DomainParticipant to look for the dds::pub::Publisher in.
publisher_nameEntity name of the Publisher
Returns
The first Publisher found with the specified name or dds::core::null if it is not found.
See also
Looking up DataWriters

◆ find_datawriters() [1/2]

template<typename AnyDataWriterBackInsertIterator >
uint32_t rti::pub::find_datawriters ( dds::pub::Publisher  publisher,
AnyDataWriterBackInsertIterator  begin 
)

Retrieve all the dds::pub::DataWriter created from this dds::pub::Publisher.

Note
This is a standalone function in the namespace rti::pub
Template Parameters
AnyDataWriterBackInsertIteratorAn iterator whose value_type is dds::pub::AnyDataWriter
Parameters
publisherThe dds::pub::Publisher the DataWriters belong to
beginA back-inserting iterator to the position in the destination container to insert the found DataWriters into
Returns
The number of found DataWriters
See also
Looking up DataWriters

◆ find_datawriters() [2/2]

template<typename AnyDataWriterForwardIterator >
uint32_t rti::pub::find_datawriters ( dds::pub::Publisher  publisher,
AnyDataWriterForwardIterator  begin,
uint32_t  max_size 
)

Retrieve all the dds::pub::DataWriter created from this dds::pub::Publisher.

Note
This is a standalone function in the namespace rti::pub
Template Parameters
AnyDataWriterForwardIteratorAn iterator whose value_type is dds::pub::AnyDataWriter
Parameters
publisherThe dds::pub::Publisher the DataWriters belong to
beginA forward iterator to the first position in the destination container to copy the found DataWriters into
max_sizeThe maximum number of DataWriters to return
Returns
The number of found DataWriters
See also
Looking up DataWriters

◆ find_datawriter_by_topic_name()

template<typename Writer >
Writer rti::pub::find_datawriter_by_topic_name ( dds::pub::Publisher  publisher,
const std::string &  topic_name 
)

<<extension>> Retrieves a dds::pub::DataWriter with the given name within the dds::pub::Publisher

Note
This is a standalone function in the namespace rti::pub

Every dds::pub::DataWriter in the system has an entity name which is configured and stored in the <<extension>> EntityName policy, ENTITY_NAME.

This operation retrieves the dds::pub::DataWriter within the dds::pub::Publisher whose name matches the one specified. If there are several dds::pub::DataWriter with the same name within the dds::pub::Publisher, the operation returns the first matching occurrence.

Template Parameters
WriterThe 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)
Parameters
publisherThe dds::pub::Publisher that created the DataWriter to find
topic_nameEntity name of the DataWriter to find
Returns
The AnyDataWriter with the given name
See also
Looking up DataWriters

◆ find_datawriter_by_name() [1/2]

template<typename Writer >
Writer rti::pub::find_datawriter_by_name ( dds::pub::Publisher  publisher,
const std::string &  datawriter_name 
)

<<extension>> Retrieves a dds::pub::DataWriter with the given name within the dds::pub::Publisher

Note
This is a standalone function in the namespace rti::pub

Every dds::pub::DataWriter in the system has an entity name which is configured and stored in the <<extension>> EntityName policy, ENTITY_NAME.

This operation retrieves the dds::pub::DataWriter within the dds::pub::Publisher whose name matches the one specified. If there are several dds::pub::DataWriter with the same name within the dds::pub::Publisher, the operation returns the first matching occurrence.

Template Parameters
WriterThe 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)
Parameters
publisherThe dds::pub::Publisher that created the DataWriter to find
datawriter_nameEntity name of the DataWriter to find
Returns
The WRITER with the given name
See also
Looking up DataWriters

◆ find_datawriter_by_name() [2/2]

template<typename Writer >
Writer rti::pub::find_datawriter_by_name ( dds::domain::DomainParticipant  participant,
const std::string &  datawriter_name 
)

<<extension>> Retrieves a dds::pub::DataWriter within the dds::domain::DomainParticipant with the given name

Note
This is a standalone function in the namespace rti::pub

Every dds::pub::DataWriter in the system has an entity name which is configured and stored in the EntityName policy, ENTITY_NAME.

Every dds::pub::Publisher in the system has an entity name which is also configured and stored in the EntityName policy.

This operation retrieves a dds::pub::DataWriter within a dds::pub::Publisher given the specified name which encodes both to the dds::pub::DataWriter and the dds::pub::Publisher name.

If there are several dds::pub::DataWriter with the same name within the corresponding dds::pub::Publisher this function returns the first matching occurrence.

The specified name might be given as a fully-qualified entity name or as a plain name.

The fully qualified entity name is a concatenation of the dds::pub::Publisher to which the dds::pub::DataWriter belongs and the entity name of of the dds::pub::DataWriter itself, separated by a double colon "::". For example: MyPublisherName::MyDataWriterName

The plain name contains the dds::pub::DataWriter name only. In this situation it is implied that the dds::pub::DataWriter belongs to the implicit dds::pub::Publisher so the use of a plain name is equivalent to specifying a fully qualified name with the dds::pub::Publisher name part being "implicit". For example: the plain name "MyDataWriterName" is equivalent to specifiying the fully qualified name "implicit::MyDataWriterName"

The dds::pub::DataWriter is only looked up within the dds::pub::Publisher specified in the fully qualified name, or within the implicit dds::pub::Publisher if the name was not fully qualified.

Template Parameters
WriterThe 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)
Parameters
participantThe dds::domain::DomainParticipant within which the dds::pub::DataWriter exists
datawriter_nameEntityName of the DataWriter to find
Returns
The WRITER with the given name
See also
implicit_publisher(const dds::domain::DomainParticipant& dp);
Looking up DataWriters

◆ find_flow_controller()

FlowController find_flow_controller ( dds::domain::DomainParticipant  participant,
const std::string &  name 
)

Retrieves an existing FlowController.

Note
This is a standalone function in the namespace rti::pub
Parameters
participantThe DomainParticipant associated to the FlowController
nameThe name used to create the FlowController or the name of one of the built-in FlowControllers (FlowController::DEFAULT_NAME, FlowController::FIXED_RATE_NAME, FlowController::ON_DEMAND_NAME)
Returns
The flow controller with that name in that participant or an empty reference (equals to dds::core::null) if it doesn't exist
See also
FlowController::retain()