Skip to content

Commit

Permalink
Apply suggested changes
Browse files Browse the repository at this point in the history
Signed-off-by: Lucia Echevarria <[email protected]>
  • Loading branch information
LuciaEchevarria99 committed Jun 3, 2024
1 parent e15ac04 commit 72b790f
Show file tree
Hide file tree
Showing 41 changed files with 267 additions and 1,081 deletions.
2 changes: 1 addition & 1 deletion ddspipe_core/include/ddspipe_core/types/dds/Guid.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#pragma once

#include <fastrtps/rtps/common/Guid.h>
#include <fastdds/rtps/common/Guid.h>

#include <ddspipe_core/library/library_dll.h>
#include <ddspipe_core/types/dds/GuidPrefix.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ struct DdsTopic : public DistributedTopic
const std::string& type_name,
utils::Formatter& error_msg) noexcept;

void set_type_ids(
const fastdds::dds::xtypes::TypeIdentifierPair& _type_ids) noexcept;

/////////////////////////
// VARIABLES
/////////////////////////
Expand Down
3 changes: 1 addition & 2 deletions ddspipe_core/src/cpp/types/logging/LogEntryPubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ bool LogEntryPubSubType::getKey(

void LogEntryPubSubType::register_type_object_representation()
{
eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids;
register_LogEntry_type_identifier(type_ids);
register_LogEntry_type_identifier(type_identifiers_);
}


Expand Down
327 changes: 72 additions & 255 deletions ddspipe_core/src/cpp/types/logging/LogEntryTypeObjectSupport.cxx

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ bool MonitoringErrorStatusPubSubType::getKey(

void MonitoringErrorStatusPubSubType::register_type_object_representation()
{
eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids;
register_MonitoringErrorStatus_type_identifier(type_ids);
register_MonitoringErrorStatus_type_identifier(type_identifiers_);
}

MonitoringStatusPubSubType::MonitoringStatusPubSubType()
Expand Down Expand Up @@ -415,8 +414,7 @@ bool MonitoringStatusPubSubType::getKey(

void MonitoringStatusPubSubType::register_type_object_representation()
{
eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids;
register_MonitoringStatus_type_identifier(type_ids);
register_MonitoringStatus_type_identifier(type_identifiers_);
}


Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,7 @@ bool DdsTopicDataPubSubType::getKey(

void DdsTopicDataPubSubType::register_type_object_representation()
{
eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids;
register_DdsTopicData_type_identifier(type_ids);
register_DdsTopicData_type_identifier(type_identifiers_);
}

DdsTopicPubSubType::DdsTopicPubSubType()
Expand Down Expand Up @@ -415,8 +414,7 @@ bool DdsTopicPubSubType::getKey(

void DdsTopicPubSubType::register_type_object_representation()
{
eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids;
register_DdsTopic_type_identifier(type_ids);
register_DdsTopic_type_identifier(type_identifiers_);
}

MonitoringTopicsPubSubType::MonitoringTopicsPubSubType()
Expand Down Expand Up @@ -609,8 +607,7 @@ bool MonitoringTopicsPubSubType::getKey(

void MonitoringTopicsPubSubType::register_type_object_representation()
{
eprosima::fastdds::dds::xtypes::TypeIdentifierPair type_ids;
register_MonitoringTopics_type_identifier(type_ids);
register_MonitoringTopics_type_identifier(type_identifiers_);
}


Expand Down

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions ddspipe_core/src/cpp/types/topic/dds/DdsTopic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ bool DdsTopic::is_valid_dds_topic(
return true;
}

void DdsTopic::set_type_ids(
const fastdds::dds::xtypes::TypeIdentifierPair& _type_ids) noexcept
{
type_ids = _type_ids;
}

/////////////////////////
// OPERATORS
/////////////////////////
Expand Down
2 changes: 1 addition & 1 deletion ddspipe_core/test/unittest/types/endpoint/GuidTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <cpp_utils/testing/gtest_aux.hpp>
#include <gtest/gtest.h>

#include <fastrtps/rtps/common/Guid.h>
#include <fastdds/rtps/common/Guid.h>
#include <fastdds/rtps/common/EntityId_t.hpp>

#include <ddspipe_core/types/dds/Guid.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@
#include <fastdds/rtps/reader/ReaderDiscoveryInfo.h>
#include <fastdds/rtps/rtps_fwd.h>
#include <fastdds/rtps/writer/WriterDiscoveryInfo.h>
#include <fastrtps/rtps/attributes/RTPSParticipantAttributes.h>
#include <fastrtps/rtps/participant/RTPSParticipantListener.h>
#include <fastrtps/rtps/RTPSDomain.h>
#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
#include <fastdds/rtps/participant/RTPSParticipantListener.h>
#include <fastdds/rtps/RTPSDomain.h>

#include <ddspipe_core/dynamic/DiscoveryDatabase.hpp>
#include <ddspipe_core/efficiency/payload/PayloadPool.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
#include <cpp_utils/time/time_utils.hpp>

#include <fastdds/rtps/rtps_fwd.h>
#include <fastrtps/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/TopicAttributes.h>
#include <fastrtps/qos/ReaderQos.h>
#include <fastrtps/rtps/history/ReaderHistory.h>
#include <fastrtps/rtps/attributes/ReaderAttributes.h>
#include <fastrtps/rtps/reader/RTPSReader.h>
#include <fastrtps/rtps/reader/ReaderListener.h>
#include <fastdds/dds/subscriber/qos/ReaderQos.hpp>
#include <fastdds/rtps/history/ReaderHistory.h>
#include <fastdds/rtps/attributes/ReaderAttributes.h>
#include <fastdds/rtps/reader/RTPSReader.h>
#include <fastdds/rtps/reader/ReaderListener.h>
#include <fastdds/utils/TimedMutex.hpp>

#include <ddspipe_core/types/dds/Guid.hpp>
Expand Down Expand Up @@ -198,7 +198,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener
const fastrtps::rtps::HistoryAttributes& history_attributes,
const fastrtps::rtps::ReaderAttributes& reader_attributes,
const fastrtps::TopicAttributes& topic_attributes,
const fastrtps::ReaderQos& reader_qos);
const fastdds::dds::ReaderQos& reader_qos);

// Specific enable/disable do not need to be implemented

Expand All @@ -210,7 +210,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener
const fastrtps::rtps::HistoryAttributes& history_attributes,
const fastrtps::rtps::ReaderAttributes& reader_attributes,
const fastrtps::TopicAttributes& topic_attributes,
const fastrtps::ReaderQos& reader_qos);
const fastdds::dds::ReaderQos& reader_qos);

/**
* @brief Return an allocated object
Expand Down Expand Up @@ -275,7 +275,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener
const core::types::DdsTopic& topic) noexcept;

//! Reader QoS to create RTPS Reader
static fastrtps::ReaderQos reckon_reader_qos_(
static fastdds::dds::ReaderQos reckon_reader_qos_(
const core::types::DdsTopic& topic) noexcept;

/////
Expand Down Expand Up @@ -326,7 +326,7 @@ class CommonReader : public BaseReader, public fastrtps::rtps::ReaderListener
fastrtps::TopicAttributes topic_attributes_;

//! Reader QoS to create the internal RTPS Reader.
fastrtps::ReaderQos reader_qos_;
fastdds::dds::ReaderQos reader_qos_;
};

} /* namespace rtps */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
#pragma once

#include <fastdds/dds/topic/TopicDataType.hpp>
#include <fastdds/dds/core/ReturnCode.hpp>
#include <fastdds/dds/domain/DomainParticipantFactory.hpp>

#include <ddspipe_core/efficiency/payload/PayloadPool.hpp>
#include <ddspipe_core/types/data/RtpsPayloadData.hpp>
Expand All @@ -38,7 +40,8 @@ class TopicDataType : public eprosima::fastdds::dds::TopicDataType
TopicDataType(
const std::string& type_name,
const bool keyed,
const std::shared_ptr<core::PayloadPool>& payload_pool);
const std::shared_ptr<core::PayloadPool>& payload_pool,
const fastdds::dds::xtypes::TypeIdentifierPair& type_ids);

//! Default destructor
DDSPIPE_PARTICIPANTS_DllAPI
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

#include <fastdds/rtps/reader/ReaderDiscoveryInfo.h>
#include <fastdds/rtps/writer/WriterDiscoveryInfo.h>
#include <fastrtps/rtps/common/InstanceHandle.h>
#include <fastdds/rtps/common/InstanceHandle.h>

#include <ddspipe_core/dynamic/DiscoveryDatabase.hpp>
#include <ddspipe_core/types/dds/Endpoint.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#pragma once

#include <fastdds/rtps/rtps_fwd.h>
#include <fastrtps/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/TopicAttributes.h>
#include <fastrtps/qos/WriterQos.h>
#include <fastrtps/rtps/history/WriterHistory.h>
#include <fastrtps/rtps/attributes/WriterAttributes.h>
#include <fastrtps/rtps/writer/RTPSWriter.h>
#include <fastdds/dds/publisher/qos/WriterQos.hpp>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/attributes/WriterAttributes.h>
#include <fastdds/rtps/writer/RTPSWriter.h>

#include <ddspipe_core/types/participant/ParticipantId.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
#include <fastdds/rtps/rtps_fwd.h>
#include <fastdds/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/TopicAttributes.h>
#include <fastrtps/qos/WriterQos.h>
#include <fastrtps/rtps/history/WriterHistory.h>
#include <fastrtps/rtps/attributes/WriterAttributes.h>
#include <fastrtps/rtps/writer/RTPSWriter.h>
#include <fastrtps/rtps/writer/WriterListener.h>
#include <fastdds/dds/publisher/qos/WriterQos.hpp>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/attributes/WriterAttributes.h>
#include <fastdds/rtps/writer/RTPSWriter.h>
#include <fastdds/rtps/writer/WriterListener.h>

#include <ddspipe_core/types/participant/ParticipantId.hpp>
#include <ddspipe_core/types/data/RtpsPayloadData.hpp>
Expand Down Expand Up @@ -161,7 +161,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener
const fastrtps::rtps::HistoryAttributes& history_attributes,
const fastrtps::rtps::WriterAttributes& writer_attributes,
const fastrtps::TopicAttributes& topic_attributes,
const fastrtps::WriterQos& writer_qos,
const fastdds::dds::WriterQos& writer_qos,
const utils::PoolConfiguration& pool_configuration);

// Specific enable/disable do not need to be implemented
Expand Down Expand Up @@ -224,7 +224,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener
const fastrtps::rtps::HistoryAttributes& history_attributes,
const fastrtps::rtps::WriterAttributes& writer_attributes,
const fastrtps::TopicAttributes& topic_attributes,
const fastrtps::WriterQos& writer_qos,
const fastdds::dds::WriterQos& writer_qos,
const utils::PoolConfiguration& pool_configuration);

/**
Expand All @@ -244,7 +244,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener
const core::types::DdsTopic& topic) noexcept;

//! QoS for RTPS Writer
static fastrtps::WriterQos reckon_writer_qos_(
static fastdds::dds::WriterQos reckon_writer_qos_(
const core::types::DdsTopic& topic) noexcept;

//! Cache Change Pool Configuration
Expand Down Expand Up @@ -290,7 +290,7 @@ class CommonWriter : public BaseWriter, public fastrtps::rtps::WriterListener
fastrtps::TopicAttributes topic_attributes_;

//! Writer QoS to create the internal RTPS Writer.
fastrtps::WriterQos writer_qos_;
fastdds::dds::WriterQos writer_qos_;

//! Pool Configuration to create the internal History.
utils::PoolConfiguration pool_configuration_;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class QoSSpecificWriter : public CommonWriter
protected:

//! Specific writer QoS to override (more or less) the CommonWriter qos
static fastrtps::WriterQos reckon_writer_qos_(
static fastdds::dds::WriterQos reckon_writer_qos_(
const core::types::SpecificEndpointQoS& specific_qos,
const core::types::DdsTopic& topic) noexcept;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
#pragma once

#include <fastdds/rtps/rtps_fwd.h>
#include <fastrtps/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/HistoryAttributes.h>
#include <fastdds/rtps/attributes/TopicAttributes.h>
#include <fastrtps/qos/WriterQos.h>
#include <fastrtps/rtps/history/WriterHistory.h>
#include <fastrtps/rtps/attributes/WriterAttributes.h>
#include <fastrtps/rtps/writer/RTPSWriter.h>
#include <fastdds/dds/publisher/qos/WriterQos.hpp>
#include <fastdds/rtps/history/WriterHistory.h>
#include <fastdds/rtps/attributes/WriterAttributes.h>
#include <fastdds/rtps/writer/RTPSWriter.h>

#include <ddspipe_core/types/participant/ParticipantId.hpp>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,8 @@ fastdds::dds::Topic* CommonParticipant::topic_related_(
new TopicDataType(
topic.type_name,
topic.topic_qos.keyed,
payload_pool_))
payload_pool_,
topic.type_ids))
);
}

Expand Down
20 changes: 10 additions & 10 deletions ddspipe_participants/src/cpp/participant/dds/XmlParticipant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ XmlParticipant::XmlParticipant(
: CommonParticipant(participant_configuration, payload_pool, discovery_database)
, xml_specific_configuration_(*reinterpret_cast<XmlParticipantConfiguration*>(configuration_.get()))
{
// if (xml_specific_configuration_.participant_profile.is_set())
// {
// fastdds::dds::DomainParticipantExtendedQos extended_qos;
// if (fastdds::dds::RETCODE_OK == fastdds::dds::DomainParticipantFactory::get_instance()->get_participant_extended_qos_from_profile(
// xml_specific_configuration_.participant_profile.get_value(),
// extended_qos))
// {
// configuration_->domain = extended_qos.domainId();
// }
// }
if (xml_specific_configuration_.participant_profile.is_set())
{
fastdds::dds::DomainParticipantExtendedQos extended_qos;
if (fastdds::dds::RETCODE_OK == fastdds::dds::DomainParticipantFactory::get_instance()->get_participant_extended_qos_from_profile(
xml_specific_configuration_.participant_profile.get_value(),
extended_qos))
{
configuration_->domain = extended_qos.domainId();
}
}
}

std::shared_ptr<core::IWriter> XmlParticipant::create_writer(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
#include <fastdds/rtps/builtin/data/WriterProxyData.h>
#include <fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv4TransportDescriptor.h>
#include <fastrtps/rtps/participant/RTPSParticipant.h>
#include <fastrtps/rtps/RTPSDomain.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/RTPSDomain.h>

#include <ddspipe_core/monitoring/producers/TopicsMonitorProducer.hpp>
#include <ddspipe_core/types/dynamic_types/types.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
#include <fastdds/rtps/transport/TCPv6TransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv4TransportDescriptor.h>
#include <fastdds/rtps/transport/UDPv6TransportDescriptor.h>
#include <fastrtps/rtps/participant/RTPSParticipant.h>
#include <fastrtps/rtps/RTPSDomain.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/RTPSDomain.h>

#include <cpp_utils/exception/InitializationException.hpp>
#include <cpp_utils/Log.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@

#include <memory>

#include <fastrtps/rtps/participant/RTPSParticipant.h>
#include <fastrtps/rtps/RTPSDomain.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/RTPSDomain.h>
#include <fastdds/rtps/transport/UDPv4TransportDescriptor.h>
#include <fastdds/rtps/transport/shared_mem/SharedMemTransportDescriptor.h>
#include <fastdds/rtps/attributes/RTPSParticipantAttributes.h>
Expand Down
3 changes: 2 additions & 1 deletion ddspipe_participants/src/cpp/reader/dds/CommonReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,10 @@ utils::ReturnCode CommonReader::take_nts_(
// If the payload owner is not set, rtps_data won't release the payload on destruction
rtps_data->payload_owner = payload_pool_.get();

if (!ret)
if (ret != fastdds::dds::RETCODE_OK)
{
// There has been an error taking the data. Exit.
data.reset(rtps_data.release());
return ret;
}
} while (!should_accept_sample_(info));
Expand Down
4 changes: 2 additions & 2 deletions ddspipe_participants/src/cpp/reader/dds/SimpleReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <fastrtps/rtps/RTPSDomain.h>
#include <fastrtps/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/RTPSDomain.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>

#include <ddspipe_participants/reader/dds/SimpleReader.hpp>
#include <cpp_utils/exception/InitializationException.hpp>
Expand Down
4 changes: 2 additions & 2 deletions ddspipe_participants/src/cpp/reader/dds/SpecificQoSReader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
// limitations under the License.


#include <fastrtps/rtps/RTPSDomain.h>
#include <fastrtps/rtps/participant/RTPSParticipant.h>
#include <fastdds/rtps/RTPSDomain.h>
#include <fastdds/rtps/participant/RTPSParticipant.h>

#include <cpp_utils/exception/InconsistencyException.hpp>
#include <cpp_utils/Log.hpp>
Expand Down
Loading

0 comments on commit 72b790f

Please sign in to comment.