Skip to content

Commit

Permalink
Regenerate example and tests types due to Gen release v3.2.1 (#88)
Browse files Browse the repository at this point in the history
Signed-off-by: JesusPoderoso <[email protected]>
  • Loading branch information
JesusPoderoso authored Jan 11, 2024
1 parent eb271e1 commit b37e8b7
Show file tree
Hide file tree
Showing 4 changed files with 136 additions and 128 deletions.
99 changes: 51 additions & 48 deletions fastdds_python/test/types/test_completePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ StructTypePubSubType::StructTypePubSubType()
setName("StructType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
StructType::getMaxCdrSerializedSize();
static_cast<uint32_t>(StructType::getMaxCdrSerializedSize());
#else
StructType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -139,23 +139,24 @@ std::function<uint32_t()> StructTypePubSubType::getSerializedSizeProvider(
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down Expand Up @@ -231,7 +232,7 @@ CompleteTestTypePubSubType::CompleteTestTypePubSubType()
setName("CompleteTestType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
CompleteTestType::getMaxCdrSerializedSize();
static_cast<uint32_t>(CompleteTestType::getMaxCdrSerializedSize());
#else
CompleteTestType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -334,23 +335,24 @@ std::function<uint32_t()> CompleteTestTypePubSubType::getSerializedSizeProvider(
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<CompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<CompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down Expand Up @@ -422,7 +424,7 @@ KeyedCompleteTestTypePubSubType::KeyedCompleteTestTypePubSubType()
setName("KeyedCompleteTestType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
KeyedCompleteTestType::getMaxCdrSerializedSize();
static_cast<uint32_t>(KeyedCompleteTestType::getMaxCdrSerializedSize());
#else
KeyedCompleteTestType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -525,23 +527,24 @@ std::function<uint32_t()> KeyedCompleteTestTypePubSubType::getSerializedSizeProv
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down
33 changes: 17 additions & 16 deletions fastdds_python/test/types/test_included_modulesPubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace eprosima {
setName("eprosima::test2::StructType2");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
StructType2::getMaxCdrSerializedSize();
static_cast<uint32_t>(StructType2::getMaxCdrSerializedSize());
#else
eprosima_test2_StructType2_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -141,23 +141,24 @@ namespace eprosima {
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType2*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType2*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType2*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType2*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down
99 changes: 51 additions & 48 deletions fastdds_python/test/types/test_modulesPubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ namespace eprosima {
setName("eprosima::test::StructType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
StructType::getMaxCdrSerializedSize();
static_cast<uint32_t>(StructType::getMaxCdrSerializedSize());
#else
eprosima_test_StructType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -141,23 +141,24 @@ namespace eprosima {
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<StructType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<StructType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down Expand Up @@ -233,7 +234,7 @@ namespace eprosima {
setName("eprosima::test::CompleteTestType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
CompleteTestType::getMaxCdrSerializedSize();
static_cast<uint32_t>(CompleteTestType::getMaxCdrSerializedSize());
#else
eprosima_test_CompleteTestType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -336,23 +337,24 @@ namespace eprosima {
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<CompleteTestType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<CompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<CompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down Expand Up @@ -424,7 +426,7 @@ namespace eprosima {
setName("eprosima::test::KeyedCompleteTestType");
uint32_t type_size =
#if FASTCDR_VERSION_MAJOR == 1
KeyedCompleteTestType::getMaxCdrSerializedSize();
static_cast<uint32_t>(KeyedCompleteTestType::getMaxCdrSerializedSize());
#else
eprosima_test_KeyedCompleteTestType_max_cdr_typesize;
#endif
Expand Down Expand Up @@ -527,23 +529,24 @@ namespace eprosima {
return [data, data_representation]() -> uint32_t
{
#if FASTCDR_VERSION_MAJOR == 1
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
static_cast<void>(data_representation);
return static_cast<uint32_t>(type::getCdrSerializedSize(*static_cast<KeyedCompleteTestType*>(data))) +
4u /*encapsulation*/;
#else
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
try
{
eprosima::fastcdr::CdrSizeCalculator calculator(
data_representation == DataRepresentationId_t::XCDR_DATA_REPRESENTATION ?
eprosima::fastcdr::CdrVersion::XCDRv1 :eprosima::fastcdr::CdrVersion::XCDRv2);
size_t current_alignment {0};
return static_cast<uint32_t>(calculator.calculate_serialized_size(
*static_cast<KeyedCompleteTestType*>(data), current_alignment)) +
4u /*encapsulation*/;
}
catch (eprosima::fastcdr::exception::Exception& /*exception*/)
{
return 0;
}
#endif // FASTCDR_VERSION_MAJOR == 1
};
}
Expand Down
Loading

0 comments on commit b37e8b7

Please sign in to comment.