Skip to content

Commit 2b27f11

Browse files
Update types for Fast DDS Gen v4.1.0 Release (#246)
Signed-off-by: cferreiragonz <carlosferreira@eprosima.com>
1 parent 9d40ba6 commit 2b27f11

33 files changed

+3161
-161
lines changed

fastdds_python/test/types/CMakeLists.txt

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11

2+
# Copyright 2025 Proyectos y Sistemas de Mantenimiento SL (eProsima).
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
216
cmake_minimum_required(VERSION 3.20)
317

418
# SWIG: use standard target name.
@@ -69,7 +83,7 @@ set(${PROJECT_NAME}_MODULE
6983
)
7084

7185
set(${PROJECT_NAME}_MODULE_FILES
72-
${PROJECT_NAME}.i
86+
test_included_modules.i
7387
)
7488

7589
SET_SOURCE_FILES_PROPERTIES(
@@ -174,7 +188,7 @@ set(${PROJECT_NAME}_MODULE
174188
)
175189

176190
set(${PROJECT_NAME}_MODULE_FILES
177-
${PROJECT_NAME}.i
191+
test_modules.i
178192
)
179193

180194
SET_SOURCE_FILES_PROPERTIES(
@@ -280,7 +294,7 @@ set(${PROJECT_NAME}_MODULE
280294
)
281295

282296
set(${PROJECT_NAME}_MODULE_FILES
283-
${PROJECT_NAME}.i
297+
test_complete.i
284298
)
285299

286300
SET_SOURCE_FILES_PROPERTIES(

fastdds_python/test/types/test_complete.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file test_complete.hpp
1717
* This header file contains the declaration of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222
#ifndef FAST_DDS_GENERATED__TEST_COMPLETE_HPP

fastdds_python/test/types/test_complete.i

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file test_complete.i
1717
* This header file contains the SWIG interface of the described types in the IDL file.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222
%module(moduleimport="if __import__('os').name == 'nt': import win32api; win32api.LoadLibrary('test_complete.dll')\nif __package__ or '.' in __name__:\n from . import _test_completeWrapper\nelse:\n import _test_completeWrapper") test_complete
@@ -50,7 +50,6 @@
5050

5151
%{
5252
#include "test_complete.hpp"
53-
5453
#include <fastdds/dds/core/LoanableSequence.hpp>
5554
%}
5655

@@ -2788,7 +2787,6 @@ namespace swig {
27882787

27892788
// Include the class interfaces
27902789
%include "test_complete.hpp"
2791-
27922790
// Include the corresponding TopicDataType
27932791
%include "test_completePubSubTypes.i"
27942792

fastdds_python/test/types/test_completeCdrAux.hpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,13 @@
1616
* @file test_completeCdrAux.hpp
1717
* This source file contains some definitions of CDR related functions.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222
#ifndef FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_HPP
2323
#define FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_HPP
2424

2525
#include "test_complete.hpp"
26-
2726
constexpr uint32_t CompleteTestType_max_cdr_typesize {8164UL};
2827
constexpr uint32_t CompleteTestType_max_key_cdr_typesize {0UL};
2928

fastdds_python/test/types/test_completeCdrAux.ipp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file test_completeCdrAux.ipp
1717
* This source file contains some declarations of CDR related functions.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222
#ifndef FAST_DDS_GENERATED__TEST_COMPLETECDRAUX_IPP

fastdds_python/test/types/test_completePubSubTypes.cxx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file test_completePubSubTypes.cpp
1717
* This header file contains the implementation of the serialization functions.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222
#include "test_completePubSubTypes.hpp"
@@ -56,7 +56,7 @@ bool StructTypePubSubType::serialize(
5656
SerializedPayload_t& payload,
5757
DataRepresentationId_t data_representation)
5858
{
59-
const StructType* p_type = static_cast<const StructType*>(data);
59+
const ::StructType* p_type = static_cast<const ::StructType*>(data);
6060

6161
// Object that manages the raw buffer.
6262
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload.data), payload.max_size);
@@ -95,7 +95,7 @@ bool StructTypePubSubType::deserialize(
9595
try
9696
{
9797
// Convert DATA to pointer of your type
98-
StructType* p_type = static_cast<StructType*>(data);
98+
::StructType* p_type = static_cast<::StructType*>(data);
9999

100100
// Object that manages the raw buffer.
101101
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload.data), payload.length);
@@ -129,7 +129,7 @@ uint32_t StructTypePubSubType::calculate_serialized_size(
129129
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
130130
size_t current_alignment {0};
131131
return static_cast<uint32_t>(calculator.calculate_serialized_size(
132-
*static_cast<const StructType*>(data), current_alignment)) +
132+
*static_cast<const ::StructType*>(data), current_alignment)) +
133133
4u /*encapsulation*/;
134134
}
135135
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
@@ -140,13 +140,13 @@ uint32_t StructTypePubSubType::calculate_serialized_size(
140140

141141
void* StructTypePubSubType::create_data()
142142
{
143-
return reinterpret_cast<void*>(new StructType());
143+
return reinterpret_cast<void*>(new ::StructType());
144144
}
145145

146146
void StructTypePubSubType::delete_data(
147147
void* data)
148148
{
149-
delete(reinterpret_cast<StructType*>(data));
149+
delete(reinterpret_cast<::StructType*>(data));
150150
}
151151

152152
bool StructTypePubSubType::compute_key(
@@ -159,7 +159,7 @@ bool StructTypePubSubType::compute_key(
159159
return false;
160160
}
161161

162-
StructType data;
162+
::StructType data;
163163
if (deserialize(payload, static_cast<void*>(&data)))
164164
{
165165
return compute_key(static_cast<void*>(&data), handle, force_md5);
@@ -178,7 +178,7 @@ bool StructTypePubSubType::compute_key(
178178
return false;
179179
}
180180

181-
const StructType* p_type = static_cast<const StructType*>(data);
181+
const ::StructType* p_type = static_cast<const ::StructType*>(data);
182182

183183
// Object that manages the raw buffer.
184184
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(key_buffer_),
@@ -238,7 +238,7 @@ bool CompleteTestTypePubSubType::serialize(
238238
SerializedPayload_t& payload,
239239
DataRepresentationId_t data_representation)
240240
{
241-
const CompleteTestType* p_type = static_cast<const CompleteTestType*>(data);
241+
const ::CompleteTestType* p_type = static_cast<const ::CompleteTestType*>(data);
242242

243243
// Object that manages the raw buffer.
244244
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload.data), payload.max_size);
@@ -277,7 +277,7 @@ bool CompleteTestTypePubSubType::deserialize(
277277
try
278278
{
279279
// Convert DATA to pointer of your type
280-
CompleteTestType* p_type = static_cast<CompleteTestType*>(data);
280+
::CompleteTestType* p_type = static_cast<::CompleteTestType*>(data);
281281

282282
// Object that manages the raw buffer.
283283
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload.data), payload.length);
@@ -311,7 +311,7 @@ uint32_t CompleteTestTypePubSubType::calculate_serialized_size(
311311
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
312312
size_t current_alignment {0};
313313
return static_cast<uint32_t>(calculator.calculate_serialized_size(
314-
*static_cast<const CompleteTestType*>(data), current_alignment)) +
314+
*static_cast<const ::CompleteTestType*>(data), current_alignment)) +
315315
4u /*encapsulation*/;
316316
}
317317
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
@@ -322,13 +322,13 @@ uint32_t CompleteTestTypePubSubType::calculate_serialized_size(
322322

323323
void* CompleteTestTypePubSubType::create_data()
324324
{
325-
return reinterpret_cast<void*>(new CompleteTestType());
325+
return reinterpret_cast<void*>(new ::CompleteTestType());
326326
}
327327

328328
void CompleteTestTypePubSubType::delete_data(
329329
void* data)
330330
{
331-
delete(reinterpret_cast<CompleteTestType*>(data));
331+
delete(reinterpret_cast<::CompleteTestType*>(data));
332332
}
333333

334334
bool CompleteTestTypePubSubType::compute_key(
@@ -341,7 +341,7 @@ bool CompleteTestTypePubSubType::compute_key(
341341
return false;
342342
}
343343

344-
CompleteTestType data;
344+
::CompleteTestType data;
345345
if (deserialize(payload, static_cast<void*>(&data)))
346346
{
347347
return compute_key(static_cast<void*>(&data), handle, force_md5);
@@ -360,7 +360,7 @@ bool CompleteTestTypePubSubType::compute_key(
360360
return false;
361361
}
362362

363-
const CompleteTestType* p_type = static_cast<const CompleteTestType*>(data);
363+
const ::CompleteTestType* p_type = static_cast<const ::CompleteTestType*>(data);
364364

365365
// Object that manages the raw buffer.
366366
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(key_buffer_),
@@ -420,7 +420,7 @@ bool KeyedCompleteTestTypePubSubType::serialize(
420420
SerializedPayload_t& payload,
421421
DataRepresentationId_t data_representation)
422422
{
423-
const KeyedCompleteTestType* p_type = static_cast<const KeyedCompleteTestType*>(data);
423+
const ::KeyedCompleteTestType* p_type = static_cast<const ::KeyedCompleteTestType*>(data);
424424

425425
// Object that manages the raw buffer.
426426
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload.data), payload.max_size);
@@ -459,7 +459,7 @@ bool KeyedCompleteTestTypePubSubType::deserialize(
459459
try
460460
{
461461
// Convert DATA to pointer of your type
462-
KeyedCompleteTestType* p_type = static_cast<KeyedCompleteTestType*>(data);
462+
::KeyedCompleteTestType* p_type = static_cast<::KeyedCompleteTestType*>(data);
463463

464464
// Object that manages the raw buffer.
465465
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(payload.data), payload.length);
@@ -493,7 +493,7 @@ uint32_t KeyedCompleteTestTypePubSubType::calculate_serialized_size(
493493
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
494494
size_t current_alignment {0};
495495
return static_cast<uint32_t>(calculator.calculate_serialized_size(
496-
*static_cast<const KeyedCompleteTestType*>(data), current_alignment)) +
496+
*static_cast<const ::KeyedCompleteTestType*>(data), current_alignment)) +
497497
4u /*encapsulation*/;
498498
}
499499
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
@@ -504,13 +504,13 @@ uint32_t KeyedCompleteTestTypePubSubType::calculate_serialized_size(
504504

505505
void* KeyedCompleteTestTypePubSubType::create_data()
506506
{
507-
return reinterpret_cast<void*>(new KeyedCompleteTestType());
507+
return reinterpret_cast<void*>(new ::KeyedCompleteTestType());
508508
}
509509

510510
void KeyedCompleteTestTypePubSubType::delete_data(
511511
void* data)
512512
{
513-
delete(reinterpret_cast<KeyedCompleteTestType*>(data));
513+
delete(reinterpret_cast<::KeyedCompleteTestType*>(data));
514514
}
515515

516516
bool KeyedCompleteTestTypePubSubType::compute_key(
@@ -523,7 +523,7 @@ bool KeyedCompleteTestTypePubSubType::compute_key(
523523
return false;
524524
}
525525

526-
KeyedCompleteTestType data;
526+
::KeyedCompleteTestType data;
527527
if (deserialize(payload, static_cast<void*>(&data)))
528528
{
529529
return compute_key(static_cast<void*>(&data), handle, force_md5);
@@ -542,7 +542,7 @@ bool KeyedCompleteTestTypePubSubType::compute_key(
542542
return false;
543543
}
544544

545-
const KeyedCompleteTestType* p_type = static_cast<const KeyedCompleteTestType*>(data);
545+
const ::KeyedCompleteTestType* p_type = static_cast<const ::KeyedCompleteTestType*>(data);
546546

547547
// Object that manages the raw buffer.
548548
eprosima::fastcdr::FastBuffer fastbuffer(reinterpret_cast<char*>(key_buffer_),

fastdds_python/test/types/test_completePubSubTypes.hpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file test_completePubSubTypes.hpp
1717
* This header file contains the declaration of the serialization functions.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222

@@ -47,7 +47,7 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType
4747
{
4848
public:
4949

50-
typedef StructType type;
50+
typedef ::StructType type;
5151

5252
eProsima_user_DllExport StructTypePubSubType();
5353

@@ -120,6 +120,7 @@ class StructTypePubSubType : public eprosima::fastdds::dds::TopicDataType
120120

121121
};
122122

123+
123124
/*!
124125
* @brief This class represents the TopicDataType of the type CompleteTestType defined by the user in the IDL file.
125126
* @ingroup test_complete
@@ -128,7 +129,7 @@ class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType
128129
{
129130
public:
130131

131-
typedef CompleteTestType type;
132+
typedef ::CompleteTestType type;
132133

133134
eProsima_user_DllExport CompleteTestTypePubSubType();
134135

@@ -201,6 +202,7 @@ class CompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicDataType
201202

202203
};
203204

205+
204206
/*!
205207
* @brief This class represents the TopicDataType of the type KeyedCompleteTestType defined by the user in the IDL file.
206208
* @ingroup test_complete
@@ -209,7 +211,7 @@ class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicData
209211
{
210212
public:
211213

212-
typedef KeyedCompleteTestType type;
214+
typedef ::KeyedCompleteTestType type;
213215

214216
eProsima_user_DllExport KeyedCompleteTestTypePubSubType();
215217

@@ -282,5 +284,6 @@ class KeyedCompleteTestTypePubSubType : public eprosima::fastdds::dds::TopicData
282284

283285
};
284286

287+
285288
#endif // FAST_DDS_GENERATED__TEST_COMPLETE_PUBSUBTYPES_HPP
286289

fastdds_python/test/types/test_completePubSubTypes.i

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
* @file test_completePubSubTypes.i
1717
* This header file contains the SWIG interface of the serialization functions.
1818
*
19-
* This file was generated by the tool fastddsgen.
19+
* This file was generated by the tool fastddsgen (version: 4.1.0).
2020
*/
2121

2222
%import(module="fastdds") "fastdds/dds/topic/TopicDataType.hpp";

0 commit comments

Comments
 (0)