OpenSplice ISO C++ 2 DCPS  v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
dds::core::policy::ResourceLimits Class Reference

More...

#include "CorePolicy.hpp"

Inheritance diagram for dds::core::policy::ResourceLimits:
Inheritance graph

Public Member Functions

 ResourceLimits (int32_t max_samples=dds::core::LENGTH_UNLIMITED, int32_t max_instances=dds::core::LENGTH_UNLIMITED, int32_t max_samples_per_instance=dds::core::LENGTH_UNLIMITED)
 
 ResourceLimits (const ResourceLimits &other)
 
ResourceLimitsmax_instances (int32_t max_instances)
 
int32_t max_instances () const
 
ResourceLimitsmax_samples (int32_t max_samples)
 
int32_t max_samples () const
 
ResourceLimitsmax_samples_per_instance (int32_t max_samples_per_instance)
 
int32_t max_samples_per_instance () const
 
bool operator!= (const Value &other) const
 
D * operator-> ()
 
const D * operator-> () const
 
bool operator== (const Value &other) const
 

Detailed Description

This QosPolicy will specify the maximum amount of resources, which can be used by a DataWriter or DataReader.

Attributes

Value Meaning Concerns RxO Changeable
A long:
max_samples
Specifies the maximum number of data-samples the DataWriter (or DataReader) can manage across all the instances associated with it. Represents the maximum samples the middleware can store for any one DataWriter (or DataReader). It is inconsistent for this value to be less than max_samples_per_instance. By default, LENGTH_UNLIMITED. Topic, DataReader, DataWriter No No
A long:
max_instances
Represents the maximum number of instances DataWriter (or DataReader) can manage. By default, LENGTH_UNLIMITED.
A long:
max_samples_per_instance
Represents the maximum number of samples of any one instance a DataWriter (or DataReader) can manage. It is inconsistent for this value to be greater than max_samples. By default, LENGTH_UNLIMITED.

This policy controls the resources that the Service can use in order to meet the requirements imposed by the application and other QoS settings.

If the DataWriter objects are communicating samples faster than they are ultimately taken by the DataReader objects, the middleware will eventually hit against some of the QoS-imposed resource limits. Note that this may occur when just a single DataReader cannot keep up with its corresponding DataWriter. The behaviour in this case depends on the setting for the RELIABILITY QoS. If reliability is BEST_EFFORT, then the Service is allowed to drop samples. If the reliability is RELIABLE, the Service will block the DataWriter or discard the sample at the DataReader in order not to lose existing samples.

The constant LENGTH_UNLIMITED may be used to indicate the absence of a particular limit. For example setting max_samples_per_instance to LENGH_UNLIMITED will cause the middleware to not enforce this particular limit.

The setting of RESOURCE_LIMITS max_samples must be consistent with the max_samples_per_instance. For these two values to be consistent they must verify that “max_samples >= max_samples_per_instance.”

The setting of RESOURCE_LIMITS max_samples_per_instance must be consistent with the HISTORY depth. For these two QoS to be consistent, they must verify that “depth <= max_samples_per_instance.” An attempt to set this policy to inconsistent values when an entity is created via a set_qos operation will cause the operation to fail.

Definition at line 1382 of file CorePolicy.hpp.

Constructor & Destructor Documentation

◆ ResourceLimits() [1/2]

dds::core::policy::ResourceLimits::ResourceLimits ( int32_t  max_samples = dds::core::LENGTH_UNLIMITED,
int32_t  max_instances = dds::core::LENGTH_UNLIMITED,
int32_t  max_samples_per_instance = dds::core::LENGTH_UNLIMITED 
)

Creates a ResourceLimits QoS instance

Parameters
max_samplesthe max_samples value
max_instancesthe max_instances value
max_samples_per_instancethe max_samples_per_instance value

Definition at line 836 of file CorePolicyImpl.hpp.

◆ ResourceLimits() [2/2]

dds::core::policy::ResourceLimits::ResourceLimits ( const ResourceLimits other)

Copies a ResourceLimits QoS instance

Parameters
otherthe ResourceLimits QoS instance to copy

Definition at line 840 of file CorePolicyImpl.hpp.

Member Function Documentation

◆ max_instances() [1/2]

ResourceLimits & dds::core::policy::ResourceLimits::max_instances ( int32_t  max_instances)

Sets the max_instances value

Parameters
max_instancesthe max_instances value

Definition at line 857 of file CorePolicyImpl.hpp.

◆ max_instances() [2/2]

int32_t dds::core::policy::ResourceLimits::max_instances ( ) const

Gets the max_instances value

Returns
the max_instances value

Definition at line 864 of file CorePolicyImpl.hpp.

◆ max_samples() [1/2]

ResourceLimits & dds::core::policy::ResourceLimits::max_samples ( int32_t  max_samples)

Sets the max_samples value

Parameters
max_samplesthe max_samples value

Definition at line 844 of file CorePolicyImpl.hpp.

◆ max_samples() [2/2]

int32_t dds::core::policy::ResourceLimits::max_samples ( ) const

Gets the max_samples value

Returns
the max_samples value

Definition at line 851 of file CorePolicyImpl.hpp.

◆ max_samples_per_instance() [1/2]

ResourceLimits & dds::core::policy::ResourceLimits::max_samples_per_instance ( int32_t  max_samples_per_instance)

Sets the max_samples_per_instance value

Parameters
max_samples_per_instancethe max_samples_per_instance value

Definition at line 870 of file CorePolicyImpl.hpp.

◆ max_samples_per_instance() [2/2]

int32_t dds::core::policy::ResourceLimits::max_samples_per_instance ( ) const

Gets the max_samples_per_instance value

Returns
the max_samples_per_instance value

Definition at line 877 of file CorePolicyImpl.hpp.

◆ operator!=()

template<typename D >
bool dds::core::Value< D >::operator!= ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if not equal

Definition at line 99 of file Value.hpp.

◆ operator->() [1/2]

template<typename D >
D * dds::core::Value< D >::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 Value and on all its subclasses as follows:

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

Definition at line 111 of file Value.hpp.

◆ operator->() [2/2]

template<typename D >
const D * dds::core::Value< D >::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 Value and on all its subclasses as follows:

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

Definition at line 105 of file Value.hpp.

◆ operator==()

template<typename D >
bool dds::core::Value< D >::operator== ( const Value< D > &  other) const
inherited

Compare this Value with another Value

Parameters
otherValue
Returns
true if equal

Definition at line 93 of file Value.hpp.


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