From d1f4978c24e36c842944f726d7a4de90b96ad6fd Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Fri, 12 Jul 2024 09:44:32 +0200 Subject: [PATCH 1/5] Refs #21301. Improvements. Signed-off-by: Miguel Company --- .../fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i b/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i index a5468968..8b9c8ea6 100644 --- a/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i +++ b/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i @@ -16,4 +16,9 @@ #include "fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp" %} +// There are two definitions of PublicationBuiltinTopicData in different namespaces +// The one in `dds` is an alias to the one in `rtps`. +// As SWIG flattens the namespaces, we cannot have two classes with the same name +%rename(PublicationBuiltinTopicData) eprosima::fastdds::rtps::PublicationBuiltinTopicData; + %include "fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp" From d601df5e896b93c5e27849f627dfdbc3de34dda2 Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Fri, 12 Jul 2024 10:22:03 +0200 Subject: [PATCH 2/5] Refs #21301. Fix typo in test. Signed-off-by: Miguel Company --- fastdds_python/test/api/test_datareader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fastdds_python/test/api/test_datareader.py b/fastdds_python/test/api/test_datareader.py index 3b9e7406..da3faef5 100644 --- a/fastdds_python/test/api/test_datareader.py +++ b/fastdds_python/test/api/test_datareader.py @@ -850,7 +850,7 @@ def test_get_liveliness_changed_status(datareader): def test_get_matched_publication_data(datareader): """ This test checks: - - DataWriter::get_matched_publication_data + - DataReader::get_matched_publication_data """ pub_data = fastdds.PublicationBuiltinTopicData() ih = fastdds.InstanceHandle_t() From fbd02d56554678f0017ce94dd03a6b55ab3ad58f Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Fri, 12 Jul 2024 10:22:30 +0200 Subject: [PATCH 3/5] Refs #21301. Remove import of `WriterProxyData`. Signed-off-by: Miguel Company --- .../rtps/builtin/data/WriterProxyData.i | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 fastdds_python/src/swig/fastdds/rtps/builtin/data/WriterProxyData.i diff --git a/fastdds_python/src/swig/fastdds/rtps/builtin/data/WriterProxyData.i b/fastdds_python/src/swig/fastdds/rtps/builtin/data/WriterProxyData.i deleted file mode 100644 index 9d7b6135..00000000 --- a/fastdds_python/src/swig/fastdds/rtps/builtin/data/WriterProxyData.i +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2022 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. - -%{ -#include "fastdds/rtps/builtin/data/WriterProxyData.hpp" -%} - -%include "fastdds/rtps/builtin/data/WriterProxyData.hpp" From 06144e31c3062832a820b7f4a4c9f3d48a2fdd6f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ricardo=20Gonz=C3=A1lez=20Moreno?= Date: Mon, 15 Jul 2024 08:31:52 +0200 Subject: [PATCH 4/5] Refs #21301. Using new PublicationBuiltinTopicData MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ricardo González Moreno --- fastdds_python/src/swig/fastdds.i | 1 + .../src/swig/fastdds/dds/builtin/topic/BuiltinTopicKey.i | 1 + .../fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i | 6 +----- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/fastdds_python/src/swig/fastdds.i b/fastdds_python/src/swig/fastdds.i index 62bcb5e8..11a48f6a 100644 --- a/fastdds_python/src/swig/fastdds.i +++ b/fastdds_python/src/swig/fastdds.i @@ -162,6 +162,7 @@ namespace xtypes { %include "fastdds/rtps/attributes/RTPSParticipantAttributes.i" %include "fastdds/rtps/attributes/ReaderAttributes.i" %include "fastdds/rtps/attributes/WriterAttributes.i" +%include "fastdds/rtps/common/RemoteLocators.i" %include "fastdds/rtps/common/SequenceNumber.i" %include "fastdds/rtps/common/SampleIdentity.i" %include "fastdds/rtps/common/WriteParams.i" diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/topic/BuiltinTopicKey.i b/fastdds_python/src/swig/fastdds/dds/builtin/topic/BuiltinTopicKey.i index dae98743..296942e2 100644 --- a/fastdds_python/src/swig/fastdds/dds/builtin/topic/BuiltinTopicKey.i +++ b/fastdds_python/src/swig/fastdds/dds/builtin/topic/BuiltinTopicKey.i @@ -16,4 +16,5 @@ #include "fastdds/dds/builtin/topic/BuiltinTopicKey.hpp" %} +%include "fastdds/rtps/builtin/data/BuiltinTopicKey.hpp" %include "fastdds/dds/builtin/topic/BuiltinTopicKey.hpp" diff --git a/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i b/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i index 8b9c8ea6..09a5fda2 100644 --- a/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i +++ b/fastdds_python/src/swig/fastdds/dds/builtin/topic/PublicationBuiltinTopicData.i @@ -16,9 +16,5 @@ #include "fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp" %} -// There are two definitions of PublicationBuiltinTopicData in different namespaces -// The one in `dds` is an alias to the one in `rtps`. -// As SWIG flattens the namespaces, we cannot have two classes with the same name -%rename(PublicationBuiltinTopicData) eprosima::fastdds::rtps::PublicationBuiltinTopicData; - +%include "fastdds/rtps/builtin/data/PublicationBuiltinTopicData.hpp" %include "fastdds/dds/builtin/topic/PublicationBuiltinTopicData.hpp" From 6e71b140145b4c7b9e2212f5682d2a239b05487a Mon Sep 17 00:00:00 2001 From: Miguel Company Date: Mon, 15 Jul 2024 10:58:00 +0200 Subject: [PATCH 5/5] Refs #21301. Rename header to `WriterDiscoveryStatus.hpp`. Signed-off-by: Miguel Company --- .../src/swig/fastdds/rtps/writer/WriterDiscoveryInfo.i | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fastdds_python/src/swig/fastdds/rtps/writer/WriterDiscoveryInfo.i b/fastdds_python/src/swig/fastdds/rtps/writer/WriterDiscoveryInfo.i index ba055cf6..af03fe71 100644 --- a/fastdds_python/src/swig/fastdds/rtps/writer/WriterDiscoveryInfo.i +++ b/fastdds_python/src/swig/fastdds/rtps/writer/WriterDiscoveryInfo.i @@ -13,7 +13,7 @@ // limitations under the License. %{ -#include "fastdds/rtps/writer/WriterDiscoveryInfo.hpp" +#include "fastdds/rtps/writer/WriterDiscoveryStatus.hpp" %} -%include "fastdds/rtps/writer/WriterDiscoveryInfo.hpp" +%include "fastdds/rtps/writer/WriterDiscoveryStatus.hpp"