Skip to content

Commit

Permalink
Remove RMW interfaces
Browse files Browse the repository at this point in the history
Signed-off-by: methylDragon <methylDragon@gmail.com>
  • Loading branch information
methylDragon committed Apr 8, 2023
1 parent 2ab3722 commit 4de8ad6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 253 deletions.
1 change: 0 additions & 1 deletion rmw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ include(cmake/configure_rmw_library.cmake)
set(rmw_sources
"src/allocators.c"
"src/convert_rcutils_ret_to_rmw_ret.c"
"src/dynamic_message_type_support.c"
"src/event.c"
"src/init.c"
"src/init_options.c"
Expand Down
96 changes: 0 additions & 96 deletions rmw/include/rmw/dynamic_message_type_support.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,102 +35,6 @@ extern "C"

/// Interfaces for runtime interface reflection

// RUNTIME INTERFACE REFLECTION TYPE SUPPORT =======================================================
/// Get dynamic type message typesupport with bound message description
/**
* NOTE: Take note of the ownership rules for the returned struct and the `description` argument!
*
* If the user passes a NULL description, it is deferred instead, the middleware is responsibile
* for populating the fields on type discovery!!!
*
* Ownership:
* - The `rosidl_message_type_support_t *` returned from this function has different ownership
* rules compared to the statically allocated `rosidl_message_type_support_t` structs from
* code-generated types!
* - The caller is responsible for deallocating the returned pointer
*
* <hr>
* Attribute | Adherence
* ------------------ | -------------
* Allocates Memory | Yes
* Thread-Safe | No
* Uses Atomics | No
* Lock-Free | Yes
*/
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_dynamic_message_type_support_handle_create(
rosidl_dynamic_typesupport_serialization_support_t * serialization_support,
bool middleware_supports_type_discovery,
const rosidl_type_hash_t * type_hash,
const rosidl_runtime_c__type_description__TypeDescription * type_description,
const rosidl_runtime_c__type_description__TypeSource__Sequence * type_description_sources,
rosidl_message_type_support_t ** ts); // OUT

/// Destroy a rosidl_message_type_support_t obtained with
/// `rmw_dynamic_message_type_support_handle_create()`, which has dynamically allocated members
///
/// NOTE: Using this on a statically allocated typesupport will cause undefined behavior!
/// (Static memory will get freed in that case.)
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_dynamic_message_type_support_handle_destroy(rosidl_message_type_support_t * type_support);

/// Get the name of the rmw_dynamic_typesupport_c identifier
/**
* \return Name of rmw_dynamic_typesupport_c identifier
*/
RMW_PUBLIC
RMW_WARN_UNUSED
const char *
rmw_get_dynamic_typesupport_identifier(void);

/// Construct serialization support-specific rosidl_dynamic_typesupport_dynamic_type_t from a given
/// type description
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_create_dynamic_message_type_from_description(
rosidl_dynamic_typesupport_serialization_support_t * serialization_support,
const rosidl_runtime_c__type_description__TypeDescription * type_description,
rosidl_dynamic_typesupport_dynamic_type_t ** ts); // OUT

RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_create_dynamic_message_from_dynamic_message_type(
rosidl_dynamic_typesupport_dynamic_type_t * dynamic_message_type,
rosidl_dynamic_typesupport_dynamic_data_t ** cloned_dynamic_message_type); // OUT

RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_clone_dynamic_message(
const rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message,
rosidl_dynamic_typesupport_dynamic_data_t ** cloned_dynamic_message); // OUT

// NOTE(methylDragon): The responsibility is on the user to ensure that the dynamic message's
// dynamic type matches the layout of the buffer
/// The user must provide a rosidl_dynamic_typesupport_dynamic_data_t with dynamic data impl
/// that matches the serialization library used to serialize the buffer. It must also match the
/// layout of the buffer if the serialization library cannot infer the layout from the buffer alone.
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_serialized_to_dynamic_message(
rmw_serialized_message_t * serialized_message,
rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message);

RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
rmw_dynamic_message_to_serialized(
rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message,
rmw_serialized_message_t * serialized_message);

// INTERFACES FOR RMW IMPLEMENTATIONS TO FULFILL ===================================================
RMW_PUBLIC
RMW_WARN_UNUSED
rmw_ret_t
Expand Down
156 changes: 0 additions & 156 deletions rmw/src/dynamic_message_type_support.c

This file was deleted.

0 comments on commit 4de8ad6

Please sign in to comment.