Cyclone ISO C++ API Reference Guide
dds::core::QosProvider Class Reference

The QosProvider API allows users to specify the QoS settings of their DCPS entities outside of application code in XML. More...

#include "QosProvider.hpp"

Inherits dds::core::Reference< DELEGATE >.

Public Member Functions

 QosProvider (const std::string &uri)
 
 QosProvider (const std::string &uri, const std::string &profile)
 
dds::sub::qos::DataReaderQos datareader_qos ()
 
dds::sub::qos::DataReaderQos datareader_qos (const std::string &id)
 
dds::pub::qos::DataWriterQos datawriter_qos ()
 
dds::pub::qos::DataWriterQos datawriter_qos (const std::string &id)
 
bool is_nil () const
 
bool operator!= (const null_type nil) const
 
template<typename R >
bool operator!= (const R &ref) const
 
DELEGATE * operator-> ()
 
const DELEGATE * operator-> () const
 
bool operator== (const null_type) const
 
template<typename R >
bool operator== (const R &ref) const
 
dds::domain::qos::DomainParticipantQos participant_qos ()
 
dds::domain::qos::DomainParticipantQos participant_qos (const std::string &id)
 
dds::pub::qos::PublisherQos publisher_qos ()
 
dds::pub::qos::PublisherQos publisher_qos (const std::string &id)
 
dds::sub::qos::SubscriberQos subscriber_qos ()
 
dds::sub::qos::SubscriberQos subscriber_qos (const std::string &id)
 
dds::topic::qos::TopicQos topic_qos ()
 
dds::topic::qos::TopicQos topic_qos (const std::string &id)
 

Detailed Description

The QosProvider API allows users to specify the QoS settings of their DCPS entities outside of application code in XML.

The QosProvider is delivered as part of the DCPS API of Vortex OpenSplice.

See also
QoS Provider extensive information.

Definition at line 54 of file QosProvider.hpp.

Constructor & Destructor Documentation

◆ QosProvider() [1/2]

dds::core::QosProvider::QosProvider ( const std::string &  uri,
const std::string &  profile 
)
explicit

Constructs a new QosProvider based on the provided uri and profile.

A QosProvider instance that is instantiated with all profiles and/or QoS’s loaded from the location specified by the provided uri.

Initialization of the QosProvider will fail under the following conditions:

  • No uri is provided.
  • The resource pointed to by uri cannot be found.
  • The content of the resource pointed to by uri is malformed (e.g., malformed XML). When initialization fails (for example, due to a parse error or when the resource identified by uri cannot be found), then PreconditionNotMetError will be thrown.

Look here for more information.

Parameters
uriA Uniform Resource Identifier (URI) that points to the location where the QoS profile needs to be loaded from. Currently only URI’s with a ‘file’ scheme that point to an XML file are supported. If profiles and/or QoS settings are not uniquely identifiable by name within the resource pointed to by uri, a random one of them will be stored.
profileThe name of the QoS profile within the xml file that serves as the default QoS profile for the get qos operations.
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorWhen multiple thread try to invoke the function concurrently.

◆ QosProvider() [2/2]

dds::core::QosProvider::QosProvider ( const std::string &  uri)
explicit

Constructs a new QosProvider based on the provided uri.

A QosProvider instance that is instantiated with all profiles and/or QoS’s loaded from the location specified by the provided uri.

Initialization of the QosProvider will fail under the following conditions:

  • No uri is provided.
  • The resource pointed to by uri cannot be found.
  • The content of the resource pointed to by uri is malformed (e.g., malformed XML). When initialization fails (for example, due to a parse error or when the resource identified by uri cannot be found), then PreconditionNotMetError will be thrown.

Look here for more information.

Parameters
uriA Uniform Resource Identifier (URI) that points to the location where the QoS profile needs to be loaded from. Currently only URI’s with a ‘file’ scheme that point to an XML file are supported. If profiles and/or QoS settings are not uniquely identifiable by name within the resource pointed to by uri, a random one of them will be stored.
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorWhen multiple thread try to invoke the function concurrently.

Member Function Documentation

◆ datareader_qos() [1/2]

dds::sub::qos::DataReaderQos dds::core::QosProvider::datareader_qos ( )

Resolves the DataReaderQos from the uri this QosProvider is associated with.

Returns
DataReadertQos from the given URI (and profile)
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no DataReaderQos can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ datareader_qos() [2/2]

dds::sub::qos::DataReaderQos dds::core::QosProvider::datareader_qos ( const std::string &  id)

Resolves the DataReaderQos identified by the id from the uri this QosProvider is associated with.

Parameters
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
DataReaderQos from the given URI (and profile) using the id
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no DataReaderQos that matches the provided id can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ datawriter_qos() [1/2]

dds::pub::qos::DataWriterQos dds::core::QosProvider::datawriter_qos ( )

Resolves the DataWriterQos from the uri this QosProvider is associated with.

Returns
DataWriterQos from the given URI (and profile)
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no DataWriterQos can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ datawriter_qos() [2/2]

dds::pub::qos::DataWriterQos dds::core::QosProvider::datawriter_qos ( const std::string &  id)

Resolves the DataWriterQos identified by the id from the uri this QosProvider is associated with.

Parameters
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
DataWriterQos from the given URI (and profile) using the id
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no DataWriterQos that matches the provided id can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ is_nil()

template<typename DELEGATE>
bool dds::core::Reference< DELEGATE >::is_nil ( ) const
inherited

Check if the referenced object is nil.

In other words, check if the reference is pointing to a null object.

Returns
true if the referenced object is null.

◆ operator!=() [1/2]

template<typename DELEGATE>
bool dds::core::Reference< DELEGATE >::operator!= ( const null_type  nil) const
inherited

Special operator!= used to check if this reference object does not equal the dds::core::null reference.

The non-null-check can be done like this:

if (r != dds::core::null) {
// Use the dds reference object r
}
Returns
true if this reference is not null.

◆ operator!=() [2/2]

template<typename DELEGATE>
template<typename R >
bool dds::core::Reference< DELEGATE >::operator!= ( const R &  ref) const
inherited

Compares two Reference objects and returns true if they are not equal.

Inequality is based on the referential inequality of the object being pointed to.

Parameters
refthe other Reference object
Returns
true when not equal

◆ operator->() [1/2]

template<typename DELEGATE>
DELEGATE* dds::core::Reference< DELEGATE >::operator-> ( )
inherited

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows:

my_dds_entity.standard_function();
my_dds_entity->vendor_specific_extension();
Returns
a reference to delegate.

◆ operator->() [2/2]

template<typename DELEGATE>
const DELEGATE* dds::core::Reference< DELEGATE >::operator-> ( ) const
inherited

The operator->() is provided to be able to directly invoke functions on the delegate.

The decision to provide direct access to the delegate was motivated by the need for providing a way that was not invasive with respect to the CXXDDS API and yet would allow for vendor-specific extension. Thus vendor-specific extensions can be invoked on the Reference and on all its subclasses as follows:

my_dds_entity.standard_function();
my_dds_entity->vendor_specific_extension();
Returns
a reference to delegate.

◆ operator==() [1/2]

template<typename DELEGATE>
bool dds::core::Reference< DELEGATE >::operator== ( const  null_type) const
inherited

Special operator== used to check if this reference object equals the dds::core::null reference.

The null-check can be done like this:

if (r == dds::core::null) {
// Do not use the dds reference object r in its current state
}
Returns
true if this reference is null.

◆ operator==() [2/2]

template<typename DELEGATE>
template<typename R >
bool dds::core::Reference< DELEGATE >::operator== ( const R &  ref) const
inherited

Compares two Reference objects and returns true if they are equal.

Equality is based on the referential equality of the object being pointed.

Parameters
refthe other Reference object
Returns
true when equal

◆ participant_qos() [1/2]

dds::domain::qos::DomainParticipantQos dds::core::QosProvider::participant_qos ( )

Resolves the DomainParticipantQos from the uri this QosProvider is associated with.

Returns
DomainParticipantQos from the given URI (and profile)
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no DomainParticipantQos can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ participant_qos() [2/2]

dds::domain::qos::DomainParticipantQos dds::core::QosProvider::participant_qos ( const std::string &  id)

Resolves the DomainParticipantQos identified by the id from the uri this QosProvider is associated with.

Parameters
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
DomainParticipantQos from the given URI (and profile) using the id
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no DomainParticipantQos that matches the provided id can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ publisher_qos() [1/2]

dds::pub::qos::PublisherQos dds::core::QosProvider::publisher_qos ( )

Resolves the PublisherQos from the uri this QosProvider is associated with.

Returns
PublisherQos from the given URI (and profile)
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no PublisherQos can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ publisher_qos() [2/2]

dds::pub::qos::PublisherQos dds::core::QosProvider::publisher_qos ( const std::string &  id)

Resolves the PublisherQos identified by the id from the uri this QosProvider is associated with.

Parameters
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
PublisherQos from the given URI (and profile) using the id
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no PublisherQos that matches the provided id can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ subscriber_qos() [1/2]

dds::sub::qos::SubscriberQos dds::core::QosProvider::subscriber_qos ( )

Resolves the SubscriberQos from the uri this QosProvider is associated with.

Returns
SubscriberQos from the given URI (and profile)
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no SubscriberQos can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ subscriber_qos() [2/2]

dds::sub::qos::SubscriberQos dds::core::QosProvider::subscriber_qos ( const std::string &  id)

Resolves the SubscriberQos identified by the id from the uri this QosProvider is associated with.

Parameters
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
SubscriberQos from the given URI (and profile) using the id
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no SubscriberQos that matches the provided id can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ topic_qos() [1/2]

dds::topic::qos::TopicQos dds::core::QosProvider::topic_qos ( )

Resolves the TopicQos from the uri this QosProvider is associated with.

Returns
TopicQos from the given URI (and profile)
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no TopicQos can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

◆ topic_qos() [2/2]

dds::topic::qos::TopicQos dds::core::QosProvider::topic_qos ( const std::string &  id)

Resolves the TopicQos identified by the id from the uri this QosProvider is associated with.

Parameters
idThe fully-qualified name that identifies a QoS within the uri associated with the QosProvider or a name that identifies a QoS within the uri associated with the QosProvider instance relative to its default QoS profile. Id’s starting with ‘::’ are interpreted as fully-qualified names and all others are interpreted as names relative to the default QoS profile of the QosProvider instance. When id is NULL it is interpreted as a non-named QoS within the default QoS profile associated with the QosProvider.
Returns
TopicQos from the given URI (and profile) using the id
Exceptions
dds::core::ErrorAn internal error has occurred.
dds::core::PreconditionNotMetErrorIf no TopicQos that matches the provided id can be found within the uri associated with the QosProvider.
dds::core::OutOfResourcesErrorThe Data Distribution Service ran out of resources to complete this operation.

The documentation for this class was generated from the following file: