Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding interfaces to support @key annotation #116

Merged
merged 7 commits into from Apr 8, 2024

Conversation

MiguelCompany
Copy link
Contributor

This PR adds the necessary interfaces to support @key annotation in RMW implementations using Fast CDR

Part of ros2/ros2#1538

Depends on ros2/rosidl#796

Mario-DL and others added 6 commits April 7, 2024 13:03
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
@[ if key[0] != package_name]@
ROSIDL_TYPESUPPORT_FASTRTPS_C_IMPORT_@(package_name)
@[ end if]@
size_t get_serialized_size_key_@('__'.join(key))(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add include cstddef

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* \param [in,out] is_unbounded Whether the key has any unbounded member.
* \return The maximum key serialized size, in bytes.
*/
size_t (* max_serialized_size_key)(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include cstddef

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/// Callback function for key serialization
/**
* \param[in] untyped_ros_message Type erased pointer to message instance.
* \param [in,out] Fast CDR serializer.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* \param [in,out] Fast CDR serializer.
* \param [in,out] cdr Fast CDR serializer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ROSIDL_TYPESUPPORT_FASTRTPS_CPP_PUBLIC_@(package_name)
get_serialized_size_key(
const @('::'.join([package_name] + list(interface_path.parents[0].parts) + [message.structure.namespaced_type.name])) & ros_message,
size_t current_alignment);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <cstddef>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bool cdr_serialize_key(
const @('::'.join(type_.namespaced_name())) &,
eprosima::fastcdr::Cdr &);
size_t get_serialized_size_key(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

include <cstddef>

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Signed-off-by: Miguel Company <miguelcompany@eprosima.com>
@MiguelCompany
Copy link
Contributor Author

@ahcorde I applied your suggestions in cbd7a48

@ahcorde
Copy link
Contributor

ahcorde commented Apr 8, 2024

  • Linux Build Status
  • Linux-aarch64 Build Status
  • Windows Build Status
  • Windows Debug Build Status

@ahcorde ahcorde merged commit 5fdc817 into ros2:rolling Apr 8, 2024
2 of 3 checks passed
mjcarroll added a commit that referenced this pull request Apr 9, 2024
Bug introduced in #116

Signed-off-by: Michael Carroll <mjcarroll@intrinsic.ai>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants