Skip to content

Commit

Permalink
Merge pull request #116 from cwecht/event-listeners-updated
Browse files Browse the repository at this point in the history
Event listeners updated
  • Loading branch information
clalancette authored May 9, 2023
2 parents 5a4ba5e + ecda67c commit 78a5de3
Show file tree
Hide file tree
Showing 18 changed files with 477 additions and 86 deletions.
11 changes: 11 additions & 0 deletions rmw_connextdds/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@
Changelog for package rmw_connextdds
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.15.0 (2023-04-27)
-------------------

0.14.0 (2023-04-12)
-------------------
* Dynamic Subscription (BONUS: Allocators): rmw_connextdds (`#115 <https://github.com/ros2/rmw_connextdds/issues/115>`_)
* Revert "Refactor serialization support to use allocators and refs"
* Refactor serialization support to use allocators and refs
* Add stubs for new rmw interfaces (`#111 <https://github.com/ros2/rmw_connextdds/issues/111>`_)
* Contributors: methylDragon

0.13.0 (2022-11-02)
-------------------
* Add rmw_get_gid_for_client impl (`#92 <https://github.com/ros2/rmw_connextdds/issues/92>`_)
Expand Down
2 changes: 1 addition & 1 deletion rmw_connextdds/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rmw_connextdds</name>
<version>0.13.0</version>
<version>0.15.0</version>
<description>A ROS 2 RMW implementation built with RTI Connext DDS Professional.</description>
<maintainer email="[email protected]">Andrea Sorbini</maintainer>
<license>Apache License 2.0</license>
Expand Down
51 changes: 51 additions & 0 deletions rmw_connextdds/src/rmw_api_impl_ndds.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -981,3 +981,54 @@ rmw_feature_supported(rmw_feature_t feature)
}
}
}

/******************************************************************************
* Dynamic message typesupport
******************************************************************************/
rmw_ret_t
rmw_take_dynamic_message(
const rmw_subscription_t * subscription,
rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message,
bool * taken,
rmw_subscription_allocation_t * allocation)
{
static_cast<void>(subscription);
static_cast<void>(dynamic_message);
static_cast<void>(taken);
static_cast<void>(allocation);

RMW_SET_ERROR_MSG("rmw_take_dynamic_message: unimplemented");
return RMW_RET_UNSUPPORTED;
}

rmw_ret_t
rmw_take_dynamic_message_with_info(
const rmw_subscription_t * subscription,
rosidl_dynamic_typesupport_dynamic_data_t * dynamic_message,
bool * taken,
rmw_message_info_t * message_info,
rmw_subscription_allocation_t * allocation)
{
static_cast<void>(subscription);
static_cast<void>(dynamic_message);
static_cast<void>(taken);
static_cast<void>(message_info);
static_cast<void>(allocation);

RMW_SET_ERROR_MSG("rmw_take_dynamic_message_with_info: unimplemented");
return RMW_RET_UNSUPPORTED;
}

rmw_ret_t
rmw_serialization_support_init(
const char * serialization_lib_name,
rcutils_allocator_t * allocator,
rosidl_dynamic_typesupport_serialization_support_t * serialization_support)
{
static_cast<void>(serialization_lib_name);
static_cast<void>(allocator);
static_cast<void>(serialization_support);

RMW_SET_ERROR_MSG("rmw_serialization_support_init: unimplemented");
return RMW_RET_UNSUPPORTED;
}
12 changes: 12 additions & 0 deletions rmw_connextdds_common/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,18 @@
Changelog for package rmw_connextdds_common
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0.15.0 (2023-04-27)
-------------------

0.14.0 (2023-04-12)
-------------------
* [rmw_connextdds] New RMW discovery options (`#108 <https://github.com/ros2/rmw_connextdds/issues/108>`_)
* Call get_type_hash_func (`#113 <https://github.com/ros2/rmw_connextdds/issues/113>`_)
* Type hash distribution during discovery (rep2011) (`#104 <https://github.com/ros2/rmw_connextdds/issues/104>`_)
* Implement matched event (`#101 <https://github.com/ros2/rmw_connextdds/issues/101>`_)
* Add in implementation of inconsistent topic. (`#103 <https://github.com/ros2/rmw_connextdds/issues/103>`_)
* Contributors: Barry Xu, Chris Lalancette, Emerson Knapp, Grey, Michael Carroll

0.13.0 (2022-11-02)
-------------------
* Add rmw_get_gid_for_client impl (`#92 <https://github.com/ros2/rmw_connextdds/issues/92>`_)
Expand Down
17 changes: 10 additions & 7 deletions rmw_connextdds_common/include/rmw_connextdds/context.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
#include <mutex>
#include <regex>
#include <string>
#include <memory>

#include "rmw_connextdds/dds_api.hpp"
#include "rmw_connextdds/log.hpp"
Expand Down Expand Up @@ -78,8 +79,11 @@ struct rmw_context_impl_s
DDS_DataReader * dr_publications;
DDS_DataReader * dr_subscriptions;

/* Keep track of whether the DomainParticipant is localhost only */
bool localhost_only;
/* Keep track of what discovery settings were used when initializing */
rmw_discovery_options_t * discovery_options;

/* Manage the memory of the domain tag */
char * domain_tag;

/* Global configuration for QoS profiles */
std::string qos_ctx_name;
Expand Down Expand Up @@ -160,7 +164,8 @@ struct rmw_context_impl_s
dr_participants(nullptr),
dr_publications(nullptr),
dr_subscriptions(nullptr),
localhost_only(base->options.localhost_only == RMW_LOCALHOST_ONLY_ENABLED)
discovery_options(nullptr),
domain_tag(nullptr)
{
/* destructor relies on these being initialized properly */
common.thread_is_running.store(false);
Expand All @@ -180,17 +185,15 @@ struct rmw_context_impl_s
// node_count is increased
rmw_ret_t
initialize_node(
const char * const node_name,
const char * const node_namespace,
const bool localhost_only);
const rmw_discovery_options_t * const discovery_options);

// Destroys the participant, when node_count reaches 0.
rmw_ret_t
finalize_node();

// Initialize the DomainParticipant associated with the context.
rmw_ret_t
initialize_participant(const bool localhost_only);
initialize_participant();

// Enable the DomainParticipant associated with the context.
rmw_ret_t
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,9 @@ class RMW_Connext_StatusCondition : public RMW_Connext_Condition
user_data_[event_type] = nullptr;
new_event_cb_[event_type] = nullptr;
}
}

void
on_inconsistent_topic(const struct DDS_InconsistentTopicStatus * status);

void
Expand Down Expand Up @@ -848,6 +851,7 @@ class RMW_Connext_SubscriberStatusCondition : public RMW_Connext_StatusCondition
}

void notify_new_data();

inline rmw_ret_t
get_matched_status(rmw_matched_status_t * const status)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class RMW_Connext_MessageTypeSupport

const rosidl_type_hash_t & type_hash() const
{
return *_type_support_fastrtps->type_hash;
return *_type_support_fastrtps->get_type_hash_func(_type_support_fastrtps);
}

uint32_t type_serialized_size_max() const
Expand Down
2 changes: 1 addition & 1 deletion rmw_connextdds_common/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rmw_connextdds_common</name>
<version>0.13.0</version>
<version>0.15.0</version>
<description>Common source for RMW implementations built with RTI Connext DDS Professional and RTI Connext DDS Micro.</description>
<maintainer email="[email protected]">Andrea Sorbini</maintainer>
<license>Apache License 2.0</license>
Expand Down
Loading

0 comments on commit 78a5de3

Please sign in to comment.