Skip to content

Commit

Permalink
Make private the necessary headers from include/fastrtps (#4545)
Browse files Browse the repository at this point in the history
* Refs #20567: Include what you use in latency test

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Remove unnecesary and deprecated headers

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Migrate allocations test to DDS

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make ParticipantAttributes private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make ReplierAttributes & RequesterAttributes private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make PublisherAttributes private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make SubscriberAttributes private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make Discovery private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make ProxyPool private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make Semaphore private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make MessageReceiver private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make BuiltinProtocols private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make Liveliness private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make LivelinessManager private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make LivelinessData private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make shared_mutex private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make StringMatching private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make TimeConversion private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Make DBQueue private

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Add notes to versions.md

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Apply Eliana's suggestions

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

* Refs #20567: Correctly export API in Windows for ReplierQos and RequesterQos

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

---------

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz authored and richiprosima committed Apr 16, 2024
1 parent 05c2c47 commit ab3d31a
Show file tree
Hide file tree
Showing 185 changed files with 1,895 additions and 3,516 deletions.
1 change: 1 addition & 0 deletions fuzz/C++/fuzz_processCDRMsg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,5 @@ message(STATUS "Configuring fuzz_processCDRMsg...")
file(GLOB SOURCES_CXX "fuzz_*.cxx")

add_executable(fuzz_processCDRMsg ${SOURCES_CXX})
target_include_directories(fuzz_processCDRMsg PRIVATE ${CMAKE_SOURCE_DIR}/src/cpp/rtps/messages)
target_link_libraries(fuzz_processCDRMsg fastdds fastcdr foonathan_memory $ENV{LIB_FUZZING_ENGINE})
3 changes: 2 additions & 1 deletion fuzz/C++/fuzz_processCDRMsg/fuzz_processCDRMsg.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
#include <string.h>

#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
#include <fastdds/rtps/messages/MessageReceiver.h>

#include <MessageReceiver.h>

#define MIN_SIZE RTPSMESSAGE_HEADER_SIZE
#define MAX_SIZE 64000
Expand Down
35 changes: 27 additions & 8 deletions include/fastdds/dds/domain/DomainParticipant.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,20 +27,21 @@

#include <fastdds/dds/builtin/topic/ParticipantBuiltinTopicData.hpp>
#include <fastdds/dds/builtin/topic/TopicBuiltinTopicData.hpp>
#include <fastdds/dds/core/status/StatusMask.hpp>
#include <fastdds/dds/core/Entity.hpp>
#include <fastdds/dds/core/status/StatusMask.hpp>
#include <fastdds/dds/domain/qos/DomainParticipantQos.hpp>
#include <fastdds/dds/domain/qos/ReplierQos.hpp>
#include <fastdds/dds/domain/qos/RequesterQos.hpp>
#include <fastdds/dds/topic/ContentFilteredTopic.hpp>
#include <fastdds/dds/topic/IContentFilterFactory.hpp>
#include <fastdds/dds/topic/TypeSupport.hpp>
#include <fastdds/dds/topic/Topic.hpp>
#include <fastdds/dds/topic/TopicListener.hpp>
#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
#include <fastdds/dds/topic/TypeSupport.hpp>
#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/SampleIdentity.h>
#include <fastdds/rtps/common/Time_t.h>
#include <fastrtps/types/TypesBase.h>
#include <fastrtps/types/TypeIdentifier.h>
#include <fastrtps/types/TypesBase.h>

using eprosima::fastrtps::types::ReturnCode_t;

Expand All @@ -60,10 +61,6 @@ namespace types {
class TypeInformation;
} // namespace types

class ParticipantAttributes;
class PublisherAttributes;
class SubscriberAttributes;

} //namespace fastrtps

namespace fastdds {
Expand Down Expand Up @@ -668,6 +665,28 @@ class DomainParticipant : public Entity
const std::string& profile_name,
TopicQos& qos) const;

/**
* Fills the ReplierQos with the values of the XML profile.
*
* @param profile_name Replier profile name.
* @param qos ReplierQos object where the qos is returned.
* @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_replier_qos_from_profile(
const std::string& profile_name,
ReplierQos& qos) const;

/**
* Fills the RequesterQos with the values of the XML profile.
*
* @param profile_name Requester profile name.
* @param qos RequesterQos object where the qos is returned.
* @return RETCODE_OK if the profile exists. RETCODE_BAD_PARAMETER otherwise.
*/
FASTDDS_EXPORTED_API ReturnCode_t get_requester_qos_from_profile(
const std::string& profile_name,
RequesterQos& qos) const;

/**
* Retrieves the list of DomainParticipants that have been discovered in the domain and are not "ignored".
*
Expand Down
80 changes: 80 additions & 0 deletions include/fastdds/dds/domain/qos/ReplierQos.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2024 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 ReplierQos.hpp
*/

#ifndef _FASTDDS_REPLIERQOS_HPP_
#define _FASTDDS_REPLIERQOS_HPP_

#include <string>

#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
#include <fastdds/fastdds_dll.hpp>

namespace eprosima {
namespace fastdds {
namespace dds {

class ReplierQos
{
public:

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

/**
* @brief Equal comparison operator
*/
FASTDDS_EXPORTED_API bool operator ==(
const ReplierQos& b) const
{
return (this->service_name == b.service_name) &&
(this->request_topic_name == b.request_topic_name) &&
(this->reply_topic_name == b.reply_topic_name) &&
(this->writer_qos == b.writer_qos) &&
(this->reader_qos == b.reader_qos);
}

//! Service name
std::string service_name;

//! Request type
std::string request_type;

//! Reply type
std::string reply_type;

//! Request topic name
std::string request_topic_name;

//! Reply topic name
std::string reply_topic_name;

//! DataWriter QoS for the reply writer
DataWriterQos writer_qos;

//! DataReader QoS for the reply reader
DataReaderQos reader_qos;
};

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

#endif /* _FASTDDS_REPLIERQOS_HPP_ */
80 changes: 80 additions & 0 deletions include/fastdds/dds/domain/qos/RequesterQos.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
// Copyright 2024 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 RequesterQos.hpp
*/

#ifndef _FASTDDS_REQUESTERQOS_HPP_
#define _FASTDDS_REQUESTERQOS_HPP_

#include <string>

#include <fastdds/dds/publisher/qos/DataWriterQos.hpp>
#include <fastdds/dds/subscriber/qos/DataReaderQos.hpp>
#include <fastdds/fastdds_dll.hpp>

namespace eprosima {
namespace fastdds {
namespace dds {

class RequesterQos
{
public:

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

/**
* @brief Equal comparison operator
*/
FASTDDS_EXPORTED_API bool operator ==(
const RequesterQos& b) const
{
return (this->service_name == b.service_name) &&
(this->request_topic_name == b.request_topic_name) &&
(this->reply_topic_name == b.reply_topic_name) &&
(this->writer_qos == b.writer_qos) &&
(this->reader_qos == b.reader_qos);
}

//! Service name
std::string service_name;

//! Request type
std::string request_type;

//! Reply type
std::string reply_type;

//! Request topic name
std::string request_topic_name;

//! Reply topic name
std::string reply_topic_name;

//! DataWriter QoS for the request writer
DataWriterQos writer_qos;

//! DataReader QoS for the request reader
DataReaderQos reader_qos;
};

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

#endif /* _FASTDDS_REQUESTERQOS_HPP_ */
1 change: 1 addition & 0 deletions include/fastdds/rtps/common/LocatorSelectorEntry.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@

#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/Locator.h>
#include <fastdds/rtps/common/LocatorList.hpp>
#include <fastdds/utils/collections/ResourceLimitedVector.hpp>

namespace eprosima {
Expand Down
41 changes: 0 additions & 41 deletions include/fastdds/rtps/rtps_all.h

This file was deleted.

Loading

0 comments on commit ab3d31a

Please sign in to comment.