Skip to content

Commit

Permalink
Changes to build Fast DDS with XTypes refactor (#116)
Browse files Browse the repository at this point in the history
* Refs #19960. Apply types header-only

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #19975. Using new ReturnCode_t

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #20129: update TypeInformationParameter constructor. Define xtypes namespace and DomainId_t

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #20335: ignore TypeSupport constructor passing a DynamicPubSubType

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #20335: regenerate types

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #19451: regenerate types

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #19451: Ignore DomainParticipantFactory::get_dynamic_type_builder_from_xml_by_name

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #20734: fixes after rebase

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #20734: remove obsolete file

Signed-off-by: JLBuenoLopez-eProsima <[email protected]>

* Refs #20734: Fix some tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #20734. Fix tests

Signed-off-by: Ricardo González Moreno <[email protected]>

* Refs #20734. Regenerate idl dll exporting missing

Signed-off-by: Ricardo González Moreno <[email protected]>

---------

Signed-off-by: Ricardo González Moreno <[email protected]>
Signed-off-by: JLBuenoLopez-eProsima <[email protected]>
Co-authored-by: Ricardo González Moreno <[email protected]>
  • Loading branch information
JLBuenoLopez and richiware authored Apr 5, 2024
1 parent a1c89b1 commit 8a20026
Show file tree
Hide file tree
Showing 69 changed files with 85,361 additions and 48,347 deletions.
9 changes: 8 additions & 1 deletion fastdds_python/src/swig/fastdds.i
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ namespace builtin {
// Just declaring the namespace

} // namespace builtin

namespace xtypes {

// Just declaring the namespace

} // namespace xtypes
} // namespace dds
} // namespace fastdds
} // namespace eprosima
Expand Down Expand Up @@ -151,7 +157,6 @@ namespace builtin {
%include "fastdds/rtps/common/SequenceNumber.i"
%include "fastdds/rtps/common/SampleIdentity.i"
%include "fastdds/rtps/common/WriteParams.i"
%include "fastrtps/types/TypesBase.i"

/*
%include "fastdds/rtps/common/SerializedPayload.i"
Expand Down Expand Up @@ -429,6 +434,7 @@ namespace builtin {
*/

%include "fastdds/dds/common/InstanceHandle.i"
%include "fastdds/dds/core/ReturnCode.i"
%include "fastdds/dds/core/status/StatusMask.i"
%include "fastdds/dds/core/policy/ParameterTypes.i"
%include "fastdds/dds/core/policy/QosPolicies.i"
Expand All @@ -449,6 +455,7 @@ namespace builtin {
%include "fastdds/dds/core/UserAllocatedSequence.i"
%include "fastdds/dds/core/LoanableSequence.i"
%include "fastdds/dds/core/LoanableArray.i"
%include "fastdds/dds/core/Types.i"
%include "fastdds/dds/core/policy/ReaderDataLifecycleQosPolicy.i"
%include "fastdds/dds/core/policy/WriterDataLifecycleQosPolicy.i"
%include "fastdds/dds/core/status/LivelinessChangedStatus.i"
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima).
// Copyright 2023 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.
Expand All @@ -13,7 +13,10 @@
// limitations under the License.

%{
#include "fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp"
#include "fastdds/dds/core/ReturnCode.hpp"
%}

%include "fastdds/dds/builtin/typelookup/TypeLookupReplyListener.hpp"

%include "fastdds/dds/core/detail/DDSReturnCode.hpp"
%include "fastdds/dds/core/detail/DDSSecurityReturnCode.hpp"
%include "fastdds/dds/core/ReturnCode.hpp"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2022 Proyectos y Sistemas de Mantenimiento SL (eProsima).
// 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.
Expand All @@ -13,7 +13,7 @@
// limitations under the License.

%{
#include "fastdds/dds/builtin/typelookup/TypeLookupManager.hpp"
#include "fastdds/dds/core/Types.hpp"
%}

%include "fastdds/dds/builtin/typelookup/TypeLookupManager.hpp"
%include "fastdds/dds/core/Types.hpp"
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
// Ignore overloaded constructor that have no effect on target language
%ignore eprosima::fastdds::dds::TypeIdV1::TypeIdV1(TypeIdV1 &&);
%ignore eprosima::fastdds::dds::TypeObjectV1::TypeObjectV1(TypeObjectV1 &&);
%ignore eprosima::fastdds::dds::xtypes::TypeInformation::TypeInformation(TypeInformation &&);
%ignore eprosima::fastdds::dds::xtypes::TypeInformationParameter::TypeInformationParameter(TypeInformationParameter &&);

namespace eprosima {
namespace fastdds {
Expand Down
12 changes: 6 additions & 6 deletions fastdds_python/src/swig/fastdds/dds/domain/DomainParticipant.i
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
eprosima::fastdds::dds::DomainParticipantListener* old_listener =
const_cast<eprosima::fastdds::dds::DomainParticipantListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -75,9 +75,9 @@
eprosima::fastdds::dds::DomainParticipantListener* old_listener =
const_cast<eprosima::fastdds::dds::DomainParticipantListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener, mask);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener, mask);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -174,7 +174,7 @@
{
eprosima::fastdds::dds::PublisherListener* listener =
const_cast<eprosima::fastdds::dds::PublisherListener*>(publisher->get_listener());
eprosima::fastrtps::types::ReturnCode_t ret = self->delete_publisher(publisher);
eprosima::fastdds::dds::ReturnCode_t ret = self->delete_publisher(publisher);

if (nullptr != listener)
{
Expand Down Expand Up @@ -259,7 +259,7 @@
{
eprosima::fastdds::dds::SubscriberListener* listener =
const_cast<eprosima::fastdds::dds::SubscriberListener*>(subscriber->get_listener());
eprosima::fastrtps::types::ReturnCode_t ret = self->delete_subscriber(subscriber);
eprosima::fastdds::dds::ReturnCode_t ret = self->delete_subscriber(subscriber);

if (nullptr != listener)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@
{
eprosima::fastdds::dds::DomainParticipantListener* listener =
const_cast<eprosima::fastdds::dds::DomainParticipantListener*>(part->get_listener());
eprosima::fastrtps::types::ReturnCode_t ret = self->delete_participant(part);
eprosima::fastdds::dds::ReturnCode_t ret = self->delete_participant(part);

if (nullptr != listener)
{
Expand All @@ -144,5 +144,6 @@
%ignore eprosima::fastdds::dds::DomainParticipantFactory::create_participant;
%ignore eprosima::fastdds::dds::DomainParticipantFactory::create_participant_with_profile;
%ignore eprosima::fastdds::dds::DomainParticipantFactory::delete_participant;
%ignore eprosima::fastdds::dds::DomainParticipantFactory::get_dynamic_type_builder_from_xml_by_name;

%include "fastdds/dds/domain/DomainParticipantFactory.hpp"
12 changes: 6 additions & 6 deletions fastdds_python/src/swig/fastdds/dds/publisher/DataWriter.i
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
%extend eprosima::fastdds::dds::DataWriter
{
// TODO Document with %feature("autodoc")
eprosima::fastrtps::types::ReturnCode_t clear_history(size_t* removed)
eprosima::fastdds::dds::ReturnCode_t clear_history(size_t* removed)
{
eprosima::fastrtps::types::ReturnCode_t ret = self->clear_history(removed);
eprosima::fastdds::dds::ReturnCode_t ret = self->clear_history(removed);
return ret;
}

Expand All @@ -50,9 +50,9 @@
eprosima::fastdds::dds::DataWriterListener* old_listener =
const_cast<eprosima::fastdds::dds::DataWriterListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -88,9 +88,9 @@
eprosima::fastdds::dds::DataWriterListener* old_listener =
const_cast<eprosima::fastdds::dds::DataWriterListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener, mask);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener, mask);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down
10 changes: 5 additions & 5 deletions fastdds_python/src/swig/fastdds/dds/publisher/Publisher.i
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
eprosima::fastdds::dds::PublisherListener* old_listener =
const_cast<eprosima::fastdds::dds::PublisherListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -76,9 +76,9 @@
eprosima::fastdds::dds::PublisherListener* old_listener =
const_cast<eprosima::fastdds::dds::PublisherListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener, mask);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener, mask);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -187,7 +187,7 @@
{
eprosima::fastdds::dds::DataWriterListener* listener =
const_cast<eprosima::fastdds::dds::DataWriterListener*>(writer->get_listener());
eprosima::fastrtps::types::ReturnCode_t ret = self->delete_datawriter(writer);
eprosima::fastdds::dds::ReturnCode_t ret = self->delete_datawriter(writer);

if (nullptr != listener)
{
Expand Down
12 changes: 6 additions & 6 deletions fastdds_python/src/swig/fastdds/dds/subscriber/DataReader.i
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@
eprosima::fastdds::dds::DataReaderListener* old_listener =
const_cast<eprosima::fastdds::dds::DataReaderListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -79,16 +79,16 @@
eprosima::fastdds::dds::DataReaderListener* old_listener =
const_cast<eprosima::fastdds::dds::DataReaderListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener, mask);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener, mask);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
if (nullptr != listener)
{
Swig::Director* director = SWIG_DIRECTOR_CAST(listener);

if (nullptr != director)
{
Py_INCREF(director->swig_get_self());
Expand All @@ -97,7 +97,7 @@
if (nullptr != old_listener)
{
Swig::Director* director = SWIG_DIRECTOR_CAST(old_listener);

if (nullptr != director)
{
Py_DECREF(director->swig_get_self());
Expand Down
10 changes: 5 additions & 5 deletions fastdds_python/src/swig/fastdds/dds/subscriber/Subscriber.i
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@
eprosima::fastdds::dds::SubscriberListener* old_listener =
const_cast<eprosima::fastdds::dds::SubscriberListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -75,9 +75,9 @@
eprosima::fastdds::dds::SubscriberListener* old_listener =
const_cast<eprosima::fastdds::dds::SubscriberListener*>(self->get_listener());

eprosima::fastrtps::types::ReturnCode_t ret = self->set_listener(listener, mask);
eprosima::fastdds::dds::ReturnCode_t ret = self->set_listener(listener, mask);

if ( (eprosima::fastrtps::types::ReturnCode_t::RETCODE_OK == ret) && (listener != old_listener) )
if ( (eprosima::fastdds::dds::RETCODE_OK == ret) && (listener != old_listener) )
{

SWIG_PYTHON_THREAD_BEGIN_BLOCK;
Expand Down Expand Up @@ -182,7 +182,7 @@
{
eprosima::fastdds::dds::DataReaderListener* listener =
const_cast<eprosima::fastdds::dds::DataReaderListener*>(reader->get_listener());
eprosima::fastrtps::types::ReturnCode_t ret = self->delete_datareader(reader);
eprosima::fastdds::dds::ReturnCode_t ret = self->delete_datareader(reader);

if (nullptr != listener)
{
Expand Down
3 changes: 2 additions & 1 deletion fastdds_python/src/swig/fastdds/dds/topic/TypeSupport.i
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@

// This constructor takes ownership of the TopicDataType pointer
// We need SWIG to be aware of it, so we ignore it here and redefine it later
%ignore eprosima::fastdds::dds::TypeSupport::TypeSupport(fastdds::dds::TopicDataType*);
%ignore eprosima::fastdds::dds::TypeSupport::TypeSupport(TopicDataType*);

%ignore eprosima::fastdds::dds::TypeSupport::TypeSupport(DynamicPubSubType);

%include "fastdds/dds/topic/TypeSupport.hpp"

Expand Down
Loading

0 comments on commit 8a20026

Please sign in to comment.