Skip to content

Commit b37e8b7

Browse files
Regenerate example and tests types due to Gen release v3.2.1 (#88)
Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
1 parent eb271e1 commit b37e8b7

4 files changed

Lines changed: 136 additions & 128 deletions

File tree

fastdds_python/test/types/test_completePubSubTypes.cxx

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ StructTypePubSubType::StructTypePubSubType()
3636
setName("StructType");
3737
uint32_t type_size =
3838
#if FASTCDR_VERSION_MAJOR == 1
39-
StructType::getMaxCdrSerializedSize();
39+
static_cast<uint32_t>(StructType::getMaxCdrSerializedSize());
4040
#else
4141
StructType_max_cdr_typesize;
4242
#endif
@@ -139,23 +139,24 @@ std::function<uint32_t()> StructTypePubSubType::getSerializedSizeProvider(
139139
return [data, data_representation]() -> uint32_t
140140
{
141141
#if FASTCDR_VERSION_MAJOR == 1
142-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
142+
static_cast<void>(data_representation);
143+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
143144
4u /*encapsulation*/;
144145
#else
145-
try
146-
{
147-
eprosima::fastcdr::CdrSizeCalculator calculator(
148-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
149-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
150-
size_t current_alignment {0};
151-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
152-
*static_cast<StructType*>(data), current_alignment)) +
153-
4u /*encapsulation*/;
154-
}
155-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
156-
{
157-
return 0;
158-
}
146+
try
147+
{
148+
eprosima::fastcdr::CdrSizeCalculator calculator(
149+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
150+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
151+
size_t current_alignment {0};
152+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
153+
*static_cast<StructType*>(data), current_alignment)) +
154+
4u /*encapsulation*/;
155+
}
156+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
157+
{
158+
return 0;
159+
}
159160
#endif // FASTCDR_VERSION_MAJOR == 1
160161
};
161162
}
@@ -231,7 +232,7 @@ CompleteTestTypePubSubType::CompleteTestTypePubSubType()
231232
setName("CompleteTestType");
232233
uint32_t type_size =
233234
#if FASTCDR_VERSION_MAJOR == 1
234-
CompleteTestType::getMaxCdrSerializedSize();
235+
static_cast<uint32_t>(CompleteTestType::getMaxCdrSerializedSize());
235236
#else
236237
CompleteTestType_max_cdr_typesize;
237238
#endif
@@ -334,23 +335,24 @@ std::function<uint32_t()> CompleteTestTypePubSubType::getSerializedSizeProvider(
334335
return [data, data_representation]() -> uint32_t
335336
{
336337
#if FASTCDR_VERSION_MAJOR == 1
337-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
338+
static_cast<void>(data_representation);
339+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
338340
4u /*encapsulation*/;
339341
#else
340-
try
341-
{
342-
eprosima::fastcdr::CdrSizeCalculator calculator(
343-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
344-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
345-
size_t current_alignment {0};
346-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
347-
*static_cast<CompleteTestType*>(data), current_alignment)) +
348-
4u /*encapsulation*/;
349-
}
350-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
351-
{
352-
return 0;
353-
}
342+
try
343+
{
344+
eprosima::fastcdr::CdrSizeCalculator calculator(
345+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
346+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
347+
size_t current_alignment {0};
348+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
349+
*static_cast<CompleteTestType*>(data), current_alignment)) +
350+
4u /*encapsulation*/;
351+
}
352+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
353+
{
354+
return 0;
355+
}
354356
#endif // FASTCDR_VERSION_MAJOR == 1
355357
};
356358
}
@@ -422,7 +424,7 @@ KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType()
422424
setName("KeyedCompleteTestType");
423425
uint32_t type_size =
424426
#if FASTCDR_VERSION_MAJOR == 1
425-
KeyedCompleteTestType::getMaxCdrSerializedSize();
427+
static_cast<uint32_t>(KeyedCompleteTestType::getMaxCdrSerializedSize());
426428
#else
427429
KeyedCompleteTestType_max_cdr_typesize;
428430
#endif
@@ -525,23 +527,24 @@ std::function<uint32_t()> KeyedCompleteTestTypePubSubType::getSerializedSizeProv
525527
return [data, data_representation]() -> uint32_t
526528
{
527529
#if FASTCDR_VERSION_MAJOR == 1
528-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
530+
static_cast<void>(data_representation);
531+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
529532
4u /*encapsulation*/;
530533
#else
531-
try
532-
{
533-
eprosima::fastcdr::CdrSizeCalculator calculator(
534-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
535-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
536-
size_t current_alignment {0};
537-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
538-
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
539-
4u /*encapsulation*/;
540-
}
541-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
542-
{
543-
return 0;
544-
}
534+
try
535+
{
536+
eprosima::fastcdr::CdrSizeCalculator calculator(
537+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
538+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
539+
size_t current_alignment {0};
540+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
541+
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
542+
4u /*encapsulation*/;
543+
}
544+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
545+
{
546+
return 0;
547+
}
545548
#endif // FASTCDR_VERSION_MAJOR == 1
546549
};
547550
}

fastdds_python/test/types/test_included_modulesPubSubTypes.cxx

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace eprosima {
3838
setName("eprosima::test2::StructType2");
3939
uint32_t type_size =
4040
#if FASTCDR_VERSION_MAJOR == 1
41-
StructType2::getMaxCdrSerializedSize();
41+
static_cast<uint32_t>(StructType2::getMaxCdrSerializedSize());
4242
#else
4343
eprosima_test2_StructType2_max_cdr_typesize;
4444
#endif
@@ -141,23 +141,24 @@ namespace eprosima {
141141
return [data, data_representation]() -> uint32_t
142142
{
143143
#if FASTCDR_VERSION_MAJOR == 1
144-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType2*>(data))) +
144+
static_cast<void>(data_representation);
145+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType2*>(data))) +
145146
4u /*encapsulation*/;
146147
#else
147-
try
148-
{
149-
eprosima::fastcdr::CdrSizeCalculator calculator(
150-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
151-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
152-
size_t current_alignment {0};
153-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
154-
*static_cast<StructType2*>(data), current_alignment)) +
155-
4u /*encapsulation*/;
156-
}
157-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
158-
{
159-
return 0;
160-
}
148+
try
149+
{
150+
eprosima::fastcdr::CdrSizeCalculator calculator(
151+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
152+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
153+
size_t current_alignment {0};
154+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
155+
*static_cast<StructType2*>(data), current_alignment)) +
156+
4u /*encapsulation*/;
157+
}
158+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
159+
{
160+
return 0;
161+
}
161162
#endif // FASTCDR_VERSION_MAJOR == 1
162163
};
163164
}

fastdds_python/test/types/test_modulesPubSubTypes.cxx

Lines changed: 51 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ namespace eprosima {
3838
setName("eprosima::test::StructType");
3939
uint32_t type_size =
4040
#if FASTCDR_VERSION_MAJOR == 1
41-
StructType::getMaxCdrSerializedSize();
41+
static_cast<uint32_t>(StructType::getMaxCdrSerializedSize());
4242
#else
4343
eprosima_test_StructType_max_cdr_typesize;
4444
#endif
@@ -141,23 +141,24 @@ namespace eprosima {
141141
return [data, data_representation]() -> uint32_t
142142
{
143143
#if FASTCDR_VERSION_MAJOR == 1
144-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
144+
static_cast<void>(data_representation);
145+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
145146
4u /*encapsulation*/;
146147
#else
147-
try
148-
{
149-
eprosima::fastcdr::CdrSizeCalculator calculator(
150-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
151-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
152-
size_t current_alignment {0};
153-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
154-
*static_cast<StructType*>(data), current_alignment)) +
155-
4u /*encapsulation*/;
156-
}
157-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
158-
{
159-
return 0;
160-
}
148+
try
149+
{
150+
eprosima::fastcdr::CdrSizeCalculator calculator(
151+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
152+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
153+
size_t current_alignment {0};
154+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
155+
*static_cast<StructType*>(data), current_alignment)) +
156+
4u /*encapsulation*/;
157+
}
158+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
159+
{
160+
return 0;
161+
}
161162
#endif // FASTCDR_VERSION_MAJOR == 1
162163
};
163164
}
@@ -233,7 +234,7 @@ namespace eprosima {
233234
setName("eprosima::test::CompleteTestType");
234235
uint32_t type_size =
235236
#if FASTCDR_VERSION_MAJOR == 1
236-
CompleteTestType::getMaxCdrSerializedSize();
237+
static_cast<uint32_t>(CompleteTestType::getMaxCdrSerializedSize());
237238
#else
238239
eprosima_test_CompleteTestType_max_cdr_typesize;
239240
#endif
@@ -336,23 +337,24 @@ namespace eprosima {
336337
return [data, data_representation]() -> uint32_t
337338
{
338339
#if FASTCDR_VERSION_MAJOR == 1
339-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
340+
static_cast<void>(data_representation);
341+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
340342
4u /*encapsulation*/;
341343
#else
342-
try
343-
{
344-
eprosima::fastcdr::CdrSizeCalculator calculator(
345-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
346-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
347-
size_t current_alignment {0};
348-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
349-
*static_cast<CompleteTestType*>(data), current_alignment)) +
350-
4u /*encapsulation*/;
351-
}
352-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
353-
{
354-
return 0;
355-
}
344+
try
345+
{
346+
eprosima::fastcdr::CdrSizeCalculator calculator(
347+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
348+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
349+
size_t current_alignment {0};
350+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
351+
*static_cast<CompleteTestType*>(data), current_alignment)) +
352+
4u /*encapsulation*/;
353+
}
354+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
355+
{
356+
return 0;
357+
}
356358
#endif // FASTCDR_VERSION_MAJOR == 1
357359
};
358360
}
@@ -424,7 +426,7 @@ namespace eprosima {
424426
setName("eprosima::test::KeyedCompleteTestType");
425427
uint32_t type_size =
426428
#if FASTCDR_VERSION_MAJOR == 1
427-
KeyedCompleteTestType::getMaxCdrSerializedSize();
429+
static_cast<uint32_t>(KeyedCompleteTestType::getMaxCdrSerializedSize());
428430
#else
429431
eprosima_test_KeyedCompleteTestType_max_cdr_typesize;
430432
#endif
@@ -527,23 +529,24 @@ namespace eprosima {
527529
return [data, data_representation]() -> uint32_t
528530
{
529531
#if FASTCDR_VERSION_MAJOR == 1
530-
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
532+
static_cast<void>(data_representation);
533+
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
531534
4u /*encapsulation*/;
532535
#else
533-
try
534-
{
535-
eprosima::fastcdr::CdrSizeCalculator calculator(
536-
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
537-
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
538-
size_t current_alignment {0};
539-
return static_cast<uint32_t>(calculator.calculate_serialized_size(
540-
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
541-
4u /*encapsulation*/;
542-
}
543-
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
544-
{
545-
return 0;
546-
}
536+
try
537+
{
538+
eprosima::fastcdr::CdrSizeCalculator calculator(
539+
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
540+
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
541+
size_t current_alignment {0};
542+
return static_cast<uint32_t>(calculator.calculate_serialized_size(
543+
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
544+
4u /*encapsulation*/;
545+
}
546+
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
547+
{
548+
return 0;
549+
}
547550
#endif // FASTCDR_VERSION_MAJOR == 1
548551
};
549552
}

0 commit comments

Comments
 (0)