Skip to content

Commit

Permalink
Regenerate types with Fast DDS-Gen v4 (#172)
Browse files Browse the repository at this point in the history
* Refs #21368: Regenerate shape types with Gen v4

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #21368: Regenerate keyless shape types with Gen v4

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

* Refs #21368: Add ROS2 mangling to keyless shape types

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>

---------

Signed-off-by: JesusPoderoso <jesuspoderoso@eprosima.com>
  • Loading branch information
JesusPoderoso authored Aug 27, 2024
1 parent ffefb63 commit 3d236a1
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
8 changes: 8 additions & 0 deletions types/KeylessShapeTypeCdrAux.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ void serialize_key(

static_cast<void>(scdr);
static_cast<void>(data);
scdr << data.color();

scdr << data.x();

scdr << data.y();

scdr << data.shapesize();

}


Expand Down
5 changes: 3 additions & 2 deletions types/KeylessShapeTypePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ namespace shapes_demo_typesupport {
namespace idl {
KeylessShapeTypePubSubType::KeylessShapeTypePubSubType()
{
set_name("shapes_demo_typesupport::idl::KeylessShapeType");
set_name("shapes_demo_typesupport::idl::dds_::KeylessShapeType_");
uint32_t type_size = shapes_demo_typesupport_idl_KeylessShapeType_max_cdr_typesize;
type_size += static_cast<uint32_t>(eprosima::fastcdr::Cdr::alignment(type_size, 4)); /* possible submessage alignment */
max_serialized_type_size = type_size + 4; /*encapsulation*/
Expand Down Expand Up @@ -186,7 +186,8 @@ namespace shapes_demo_typesupport {
shapes_demo_typesupport_idl_KeylessShapeType_max_key_cdr_typesize);

// Object that serializes the data.
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv1);
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv2);
ser.set_encoding_flag(eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR2);
eprosima::fastcdr::serialize_key(ser, *p_type);
if (force_md5 || shapes_demo_typesupport_idl_KeylessShapeType_max_key_cdr_typesize > 16)
{
Expand Down
3 changes: 2 additions & 1 deletion types/ShapeCdrAux.ipp
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,10 @@ void serialize_key(
eprosima::fastcdr::Cdr& scdr,
const ShapeType& data)
{

static_cast<void>(scdr);
static_cast<void>(data);
scdr << data.color();
scdr << data.color();



Expand Down
3 changes: 2 additions & 1 deletion types/ShapePubSubTypes.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,8 @@ bool ShapeTypePubSubType::compute_key(
ShapeType_max_key_cdr_typesize);

// Object that serializes the data.
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv1);
eprosima::fastcdr::Cdr ser(fastbuffer, eprosima::fastcdr::Cdr::BIG_ENDIANNESS, eprosima::fastcdr::CdrVersion::XCDRv2);
ser.set_encoding_flag(eprosima::fastcdr::EncodingAlgorithmFlag::PLAIN_CDR2);
eprosima::fastcdr::serialize_key(ser, *p_type);
if (force_md5 || ShapeType_max_key_cdr_typesize > 16)
{
Expand Down

0 comments on commit 3d236a1

Please sign in to comment.