Template Class TQosProvider

Inheritance Relationships

Base Type

Class Documentation

template<typename DELEGATE>
class TQosProvider : public dds::core::Reference<DELEGATE>

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.

Public Functions

explicit TQosProvider(const std::string &uri, const std::string &profile)

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
  • uri – A 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.

  • profile – The name of the QoS profile within the xml file that serves as the default QoS profile for the get qos operations.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – When multiple thread try to invoke the function concurrently.

explicit TQosProvider(const std::string &uri)

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

uri – A 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – When multiple thread try to invoke the function concurrently.

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

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

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no DomainParticipantQos can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

DomainParticipantQos from the given URI (and profile)

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

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

Parameters

id – The 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no DomainParticipantQos that matches the provided id can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

DomainParticipantQos from the given URI (and profile) using the id

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

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

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no TopicQos can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

TopicQos from the given URI (and profile)

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

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

Parameters

id – The 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no TopicQos that matches the provided id can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

TopicQos from the given URI (and profile) using the id

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

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

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no SubscriberQos can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

SubscriberQos from the given URI (and profile)

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

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

Parameters

id – The 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no SubscriberQos that matches the provided id can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

SubscriberQos from the given URI (and profile) using the id

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

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

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no DataReaderQos can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

DataReadertQos from the given URI (and profile)

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

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

Parameters

id – The 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no DataReaderQos that matches the provided id can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

DataReaderQos from the given URI (and profile) using the id

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

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

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no PublisherQos can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

PublisherQos from the given URI (and profile)

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

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

Parameters

id – The 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no PublisherQos that matches the provided id can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

PublisherQos from the given URI (and profile) using the id

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

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

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no DataWriterQos can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

DataWriterQos from the given URI (and profile)

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

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

Parameters

id – The 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.

Throws
  • dds::core::Error – An internal error has occurred.

  • dds::core::PreconditionNotMetError – If no DataWriterQos that matches the provided id can be found within the uri associated with the QosProvider.

  • dds::core::OutOfResourcesError – The Data Distribution Service ran out of resources to complete this operation.

Returns

DataWriterQos from the given URI (and profile) using the id