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

Add qos interfaces with no-op #271

Merged
merged 8 commits into from
May 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion rmw_fastrtps_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ add_library(rmw_fastrtps_cpp
src/get_service.cpp
src/get_subscriber.cpp
src/identifier.cpp
src/qos.cpp
src/rmw_logging.cpp
src/rmw_client.cpp
src/rmw_compare_gids_equal.cpp
Expand Down
160 changes: 0 additions & 160 deletions rmw_fastrtps_cpp/src/qos.cpp

This file was deleted.

45 changes: 0 additions & 45 deletions rmw_fastrtps_cpp/src/qos.hpp

This file was deleted.

2 changes: 1 addition & 1 deletion rmw_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
#include "rmw_fastrtps_shared_cpp/custom_client_info.hpp"
#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp"
#include "rmw_fastrtps_shared_cpp/namespace_prefix.hpp"
#include "rmw_fastrtps_shared_cpp/qos.hpp"
#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"

#include "rmw_fastrtps_cpp/identifier.hpp"

#include "./qos.hpp"
#include "./type_support_common.hpp"

using Domain = eprosima::fastrtps::Domain;
Expand Down
7 changes: 7 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ rmw_destroy_node(rmw_node_t * node)
eprosima_fastrtps_identifier, node);
}

rmw_ret_t
rmw_node_assert_liveliness(const rmw_node_t * node)
{
return rmw_fastrtps_shared_cpp::__rmw_node_assert_liveliness(
eprosima_fastrtps_identifier, node);
}

const rmw_guard_condition_t *
rmw_node_get_graph_guard_condition(const rmw_node_t * node)
{
Expand Down
15 changes: 13 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@
#include "rmw/error_handling.h"
#include "rmw/rmw.h"

#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"
#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp"
#include "rmw_fastrtps_shared_cpp/custom_publisher_info.hpp"
#include "rmw_fastrtps_shared_cpp/namespace_prefix.hpp"
#include "rmw_fastrtps_shared_cpp/qos.hpp"
#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"

#include "rmw_fastrtps_cpp/identifier.hpp"

#include "./qos.hpp"
#include "./type_support_common.hpp"

using Domain = eprosima::fastrtps::Domain;
Expand Down Expand Up @@ -111,6 +111,10 @@ rmw_create_publisher(
eprosima::fastrtps::PublisherAttributes publisherParam;
const eprosima::fastrtps::rtps::GUID_t * guid = nullptr;

if (!is_valid_qos(*qos_policies)) {
return nullptr;
}

// Load default XML profile.
Domain::getDefaultPublisherAttributes(publisherParam);

Expand Down Expand Up @@ -233,6 +237,13 @@ rmw_publisher_count_matched_subscriptions(
publisher, subscription_count);
}

rmw_ret_t
rmw_publisher_assert_liveliness(const rmw_publisher_t * publisher)
{
return rmw_fastrtps_shared_cpp::__rmw_publisher_assert_liveliness(
eprosima_fastrtps_identifier, publisher);
}

rmw_ret_t
rmw_publisher_get_actual_qos(
const rmw_publisher_t * publisher,
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
#include "rmw/allocators.h"
#include "rmw/rmw.h"

#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"
#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp"
#include "rmw_fastrtps_shared_cpp/custom_service_info.hpp"
#include "rmw_fastrtps_shared_cpp/namespace_prefix.hpp"
#include "rmw_fastrtps_shared_cpp/qos.hpp"
#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"

#include "rmw_fastrtps_cpp/identifier.hpp"

#include "./type_support_common.hpp"
#include "./qos.hpp"

using Domain = eprosima::fastrtps::Domain;
using Participant = eprosima::fastrtps::Participant;
Expand Down
8 changes: 6 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@
#include "rmw/error_handling.h"
#include "rmw/rmw.h"

#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"
#include "rmw_fastrtps_shared_cpp/custom_participant_info.hpp"
#include "rmw_fastrtps_shared_cpp/custom_subscriber_info.hpp"
#include "rmw_fastrtps_shared_cpp/namespace_prefix.hpp"
#include "rmw_fastrtps_shared_cpp/qos.hpp"
#include "rmw_fastrtps_shared_cpp/rmw_common.hpp"

#include "fastrtps/participant/Participant.h"
#include "fastrtps/subscriber/Subscriber.h"

#include "rmw_fastrtps_cpp/identifier.hpp"

#include "./qos.hpp"
#include "./type_support_common.hpp"

using Domain = eprosima::fastrtps::Domain;
Expand Down Expand Up @@ -110,6 +110,10 @@ rmw_create_subscription(
}
}

if (!is_valid_qos(*qos_policies)) {
return nullptr;
}

(void)ignore_local_publications;
CustomSubscriberInfo * info = nullptr;
rmw_subscription_t * rmw_subscription = nullptr;
Expand Down
10 changes: 10 additions & 0 deletions rmw_fastrtps_cpp/src/rmw_take.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,14 @@ rmw_take_serialized_message_with_info(
eprosima_fastrtps_identifier, subscription, serialized_message, taken, message_info,
allocation);
}

rmw_ret_t
rmw_take_event(
const rmw_event_t * event_handle,
void * event_info,
bool * taken)
{
return rmw_fastrtps_shared_cpp::__rmw_take_event(
eprosima_fastrtps_identifier, event_handle, event_info, taken);
}
} // extern "C"
3 changes: 2 additions & 1 deletion rmw_fastrtps_cpp/src/rmw_wait.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ rmw_wait(
rmw_guard_conditions_t * guard_conditions,
rmw_services_t * services,
rmw_clients_t * clients,
rmw_events_t * events,
rmw_wait_set_t * wait_set,
const rmw_time_t * wait_timeout)
{
return rmw_fastrtps_shared_cpp::__rmw_wait(
subscriptions, guard_conditions, services, clients, wait_set, wait_timeout);
subscriptions, guard_conditions, services, clients, events, wait_set, wait_timeout);
}
} // extern "C"
1 change: 0 additions & 1 deletion rmw_fastrtps_dynamic_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ add_library(rmw_fastrtps_dynamic_cpp
src/get_service.cpp
src/get_subscriber.cpp
src/identifier.cpp
src/qos.cpp
src/rmw_logging.cpp
src/rmw_client.cpp
src/rmw_compare_gids_equal.cpp
Expand Down
Loading