Skip to content

[22876] Extend QoS in discovery data #5712

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Mar 20, 2025
12 changes: 12 additions & 0 deletions include/fastdds/dds/core/policy/ParameterTypes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,18 @@ enum ParameterId_t : uint16_t
PID_DATASHARING = 0x8006,
PID_NETWORK_CONFIGURATION_SET = 0x8007,
PID_CUSTOM_RELATED_SAMPLE_IDENTITY = 0x800f,
PID_RTPS_ENDPOINT = 0x8010,
/* Writer specific */
PID_WRITER_DATA_LIFECYCLE = 0x8020,
PID_PUBLISH_MODE = 0x8021,
PID_RTPS_RELIABLE_WRITER = 0x8022,
PID_WRITER_RESOURCE_LIMITS = 0x8023,
/* Reader specific */
PID_READER_DATA_LIFECYCLE = 0x8040,
PID_RTPS_RELIABLE_READER = 0x8041,
PID_READER_RESOURCE_LIMITS = 0x8042,
/* Participant specific */
PID_WIREPROTOCOL_CONFIG = 0x8080
};

/*!
Expand Down
12 changes: 12 additions & 0 deletions include/fastdds/dds/core/policy/QosPolicies.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2858,6 +2858,12 @@ class RTPSEndpointQos

virtual FASTDDS_EXPORTED_API ~RTPSEndpointQos() = default;

inline void clear()
{
RTPSEndpointQos reset = RTPSEndpointQos();
std::swap(*this, reset);
}

bool operator ==(
const RTPSEndpointQos& b) const
{
Expand Down Expand Up @@ -2916,6 +2922,12 @@ class WriterResourceLimitsQos
*/
virtual FASTDDS_EXPORTED_API ~WriterResourceLimitsQos() = default;

inline void clear()
{
WriterResourceLimitsQos reset = WriterResourceLimitsQos();
std::swap(*this, reset);
}

bool operator ==(
const WriterResourceLimitsQos& b) const
{
Expand Down
73 changes: 73 additions & 0 deletions include/fastdds/dds/core/policy/RTPSReliableReaderQos.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
// Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @file RTPSReliableReaderQos.hpp
*/

#ifndef FASTDDS_DDS_CORE_POLICY__RTPSRELIABLEREADERQOS_HPP
#define FASTDDS_DDS_CORE_POLICY__RTPSRELIABLEREADERQOS_HPP

#include <fastdds/dds/core/policy/QosPolicies.hpp>
#include <fastdds/rtps/attributes/ReaderAttributes.hpp>

namespace eprosima {
namespace fastdds {
namespace dds {

//! Qos Policy to configure the DisablePositiveACKsQos and the reader attributes
class RTPSReliableReaderQos
{
public:

/**
* @brief Constructor
*/
FASTDDS_EXPORTED_API RTPSReliableReaderQos()
{
}

/**
* @brief Destructor
*/
virtual FASTDDS_EXPORTED_API ~RTPSReliableReaderQos() = default;

bool operator ==(
const RTPSReliableReaderQos& b) const
{
return (this->times == b.times) &&
(this->disable_positive_acks == b.disable_positive_acks);
}

inline void clear()
{
*this = RTPSReliableReaderQos();
}

/*!
* @brief Times associated with the Reliable Readers events.
*/
fastdds::rtps::ReaderTimes times;

/*!
* @brief Control the sending of positive ACKs
*/
DisablePositiveACKsQosPolicy disable_positive_acks;
};

} //namespace dds
} //namespace fastdds
} //namespace eprosima

#endif // FASTDDS_DDS_CORE_POLICY__RTPSRELIABLEREADERQOS_HPP
72 changes: 72 additions & 0 deletions include/fastdds/dds/core/policy/RTPSReliableWriterQos.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
// Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @file RTPSReliableWriterQos.hpp
*/

#ifndef FASTDDS_DDS_CORE_POLICY__RTPSRELIABLEWRITERQOS_HPP
#define FASTDDS_DDS_CORE_POLICY__RTPSRELIABLEWRITERQOS_HPP

#include <fastdds/rtps/attributes/WriterAttributes.hpp>

namespace eprosima {
namespace fastdds {
namespace dds {

//! Qos Policy to configure the DisablePositiveACKsQos and the writer timing attributes
class RTPSReliableWriterQos
{
public:

/**
* @brief Constructor
*/
FASTDDS_EXPORTED_API RTPSReliableWriterQos()
{
}

/**
* @brief Destructor
*/
virtual FASTDDS_EXPORTED_API ~RTPSReliableWriterQos() = default;

bool operator ==(
const RTPSReliableWriterQos& b) const
{
return (this->times == b.times) &&
(this->disable_positive_acks == b.disable_positive_acks) &&
(this->disable_heartbeat_piggyback == b.disable_heartbeat_piggyback);
}

inline void clear()
{
*this = RTPSReliableWriterQos();
}

//!Writer Timing Attributes
fastdds::rtps::WriterTimes times;

//!Disable positive acks QoS, implemented in the library.
DisablePositiveACKsQosPolicy disable_positive_acks;

//! Disable heartbeat piggyback mechanism.
bool disable_heartbeat_piggyback = false;
};

} //namespace dds
} //namespace fastdds
} //namespace eprosima

#endif // FASTDDS_DDS_CORE_POLICY__RTPSRELIABLEWRITERQOS_HPP
84 changes: 84 additions & 0 deletions include/fastdds/dds/core/policy/ReaderResourceLimitsQos.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
// Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

/**
* @file ReaderResourceLimitsQos.hpp
*/

#ifndef FASTDDS_DDS_CORE_POLICY__READERRESOURCELIMITSQOS_HPP
#define FASTDDS_DDS_CORE_POLICY__READERRESOURCELIMITSQOS_HPP


#include <fastdds/dds/core/policy/QosPolicies.hpp>

namespace eprosima {
namespace fastdds {
namespace dds {

//! Qos Policy to configure the limit of the reader resources
class ReaderResourceLimitsQos
{
public:

/**
* @brief Constructor
*/
FASTDDS_EXPORTED_API ReaderResourceLimitsQos() = default;

/**
* @brief Destructor
*/
virtual FASTDDS_EXPORTED_API ~ReaderResourceLimitsQos() = default;

bool operator ==(
const ReaderResourceLimitsQos& b) const
{
return
(matched_publisher_allocation == b.matched_publisher_allocation) &&
(sample_infos_allocation == b.sample_infos_allocation) &&
(outstanding_reads_allocation == b.outstanding_reads_allocation) &&
(max_samples_per_read == b.max_samples_per_read);
}

inline void clear()
{
ReaderResourceLimitsQos reset = ReaderResourceLimitsQos();
std::swap(*this, reset);
}

//! Matched publishers allocation limits.
fastdds::ResourceLimitedContainerConfig matched_publisher_allocation;
//! SampleInfo allocation limits.
fastdds::ResourceLimitedContainerConfig sample_infos_allocation{ 32u };
//! Loaned collections allocation limits.
fastdds::ResourceLimitedContainerConfig outstanding_reads_allocation{ 2u };

/**
* Maximum number of samples to return on a single call to read / take.
*
* This attribute is a signed integer to be consistent with the @c max_samples argument of
* @ref DataReader methods, but should always have a strict positive value. Bear in mind that
* a big number here may cause the creation of the DataReader to fail due to pre-allocation of
* internal resources.
*
* Default value: 32.
*/
int32_t max_samples_per_read = 32;
};

} //namespace dds
} //namespace fastdds
} //namespace eprosima

#endif // FASTDDS_DDS_CORE_POLICY__READERRESOURCELIMITSQOS_HPP
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef FASTDDS_DDS_CORE_POLICY__WRITERDATALIFECYCLEQOSPOLICY_HPP
#define FASTDDS_DDS_CORE_POLICY__WRITERDATALIFECYCLEQOSPOLICY_HPP

#include <utility>

namespace eprosima {
namespace fastdds {
namespace dds {
Expand All @@ -45,6 +47,12 @@ class WriterDataLifecycleQosPolicy
{
}

inline void clear()
{
WriterDataLifecycleQosPolicy reset = WriterDataLifecycleQosPolicy();
std::swap(*this, reset);
}

bool operator ==(
const WriterDataLifecycleQosPolicy& b) const
{
Expand Down
43 changes: 1 addition & 42 deletions include/fastdds/dds/publisher/qos/DataWriterQos.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
#define FASTDDS_DDS_PUBLISHER_QOS__DATAWRITERQOS_HPP

#include <fastdds/dds/core/policy/QosPolicies.hpp>
#include <fastdds/dds/publisher/qos/WriterQos.hpp>
#include <fastdds/dds/publisher/qos/PublisherQos.hpp>
#include <fastdds/dds/core/policy/RTPSReliableWriterQos.hpp>
#include <fastdds/dds/core/policy/WriterDataLifecycleQosPolicy.hpp>
#include <fastdds/dds/publisher/qos/PublisherQos.hpp>
#include <fastdds/dds/publisher/qos/WriterQos.hpp>
Expand All @@ -33,46 +32,6 @@ namespace eprosima {
namespace fastdds {
namespace dds {

//! Qos Policy to configure the DisablePositiveACKsQos and the writer timing attributes
class RTPSReliableWriterQos
{
public:

/**
* @brief Constructor
*/
FASTDDS_EXPORTED_API RTPSReliableWriterQos()
{
}

/**
* @brief Destructor
*/
virtual FASTDDS_EXPORTED_API ~RTPSReliableWriterQos() = default;

bool operator ==(
const RTPSReliableWriterQos& b) const
{
return (this->times == b.times) &&
(this->disable_positive_acks == b.disable_positive_acks) &&
(this->disable_heartbeat_piggyback == b.disable_heartbeat_piggyback);
}

inline void clear()
{
*this = RTPSReliableWriterQos();
}

//!Writer Timing Attributes
fastdds::rtps::WriterTimes times;

//!Disable positive acks QoS, implemented in the library.
DisablePositiveACKsQosPolicy disable_positive_acks;

//! Disable heartbeat piggyback mechanism.
bool disable_heartbeat_piggyback = false;
};

/**
* Class DataWriterQos, containing all the possible Qos that can be set for a determined DataWriter.
* Although these values can be and are transmitted
Expand Down
Loading