![]() |
OpenSplice ISO C++ 2 DCPS
v6.x
ISO C++ 2 OpenSplice Data Distribution Service Data-Centric Publish-Subscribe API
|
#include "CorePolicy.hpp"
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) | |
ResourceLimits & | max_instances (int32_t max_instances) |
int32_t | max_instances () const |
ResourceLimits & | max_samples (int32_t max_samples) |
int32_t | max_samples () const |
ResourceLimits & | max_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 |
This QosPolicy will specify the maximum amount of resources, which can be used by a DataWriter or DataReader.
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.
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
max_samples | the max_samples value |
max_instances | the max_instances value |
max_samples_per_instance | the max_samples_per_instance value |
Definition at line 836 of file CorePolicyImpl.hpp.
dds::core::policy::ResourceLimits::ResourceLimits | ( | const ResourceLimits & | other | ) |
Copies a ResourceLimits QoS instance
other | the ResourceLimits QoS instance to copy |
Definition at line 840 of file CorePolicyImpl.hpp.
ResourceLimits & dds::core::policy::ResourceLimits::max_instances | ( | int32_t | max_instances | ) |
Sets the max_instances value
max_instances | the max_instances value |
Definition at line 857 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::ResourceLimits::max_instances | ( | ) | const |
Gets the max_instances value
Definition at line 864 of file CorePolicyImpl.hpp.
ResourceLimits & dds::core::policy::ResourceLimits::max_samples | ( | int32_t | max_samples | ) |
Sets the max_samples value
max_samples | the max_samples value |
Definition at line 844 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::ResourceLimits::max_samples | ( | ) | const |
Gets the max_samples value
Definition at line 851 of file CorePolicyImpl.hpp.
ResourceLimits & dds::core::policy::ResourceLimits::max_samples_per_instance | ( | int32_t | max_samples_per_instance | ) |
Sets the max_samples_per_instance value
max_samples_per_instance | the max_samples_per_instance value |
Definition at line 870 of file CorePolicyImpl.hpp.
int32_t dds::core::policy::ResourceLimits::max_samples_per_instance | ( | ) | const |
Gets the max_samples_per_instance value
Definition at line 877 of file CorePolicyImpl.hpp.
|
inherited |
|
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:
|
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:
|
inherited |