Skip to content

Commit

Permalink
Addressed review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Company <MiguelCompany@eprosima.com>
  • Loading branch information
MiguelCompany committed Mar 16, 2021
1 parent dc327d8 commit 34e8225
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 22 deletions.
4 changes: 2 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ rmw_create_client(
eprosima::fastdds::dds::DataReaderQos dataReaderQos = subscriber->get_default_datareader_qos();

// Try to load the profile named "client",
// if it does not exist it tryes with the response topic name
// if it does not exist it tries with the response topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down Expand Up @@ -392,7 +392,7 @@ rmw_create_client(
eprosima::fastdds::dds::DataWriterQos dataWriterQos = publisher->get_default_datawriter_qos();

// Try to load the profile named "client",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the request topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
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 @@ -350,7 +350,7 @@ rmw_create_service(
eprosima::fastdds::dds::DataReaderQos dataReaderQos = subscriber->get_default_datareader_qos();

// Try to load the profile named "service",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the request topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down Expand Up @@ -395,7 +395,7 @@ rmw_create_service(
eprosima::fastdds::dds::DataWriterQos dataWriterQos = publisher->get_default_datawriter_qos();

// Try to load the profile named "service",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the request topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down
4 changes: 2 additions & 2 deletions rmw_fastrtps_cpp/src/subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ create_subscription(
}

/////
// Create the RMW Subscriber struct (info)
// Create the custom Subscriber struct (info)
CustomSubscriberInfo * info = nullptr;

info = new (std::nothrow) CustomSubscriberInfo();
Expand All @@ -169,7 +169,7 @@ create_subscription(
});

info->typesupport_identifier_ = type_support->typesupport_identifier;
info->type_support_impl_ = type_support->data;
info->type_support_impl_ = callbacks;

/////
// Create the Type Support struct
Expand Down
8 changes: 4 additions & 4 deletions rmw_fastrtps_dynamic_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ rmw_create_client(
});

if (ReturnCode_t::RETCODE_OK != response_fastdds_type.register_type(domainParticipant)) {
RMW_SET_ERROR_MSG("create_client() failed to register request type");
RMW_SET_ERROR_MSG("create_client() failed to register response type");
return nullptr;
}
info->response_type_support_ = response_fastdds_type;
Expand Down Expand Up @@ -370,15 +370,15 @@ rmw_create_client(
std::string topic_name_fallback = "client";

/////
// Create request DataReader
// Create response DataReader

// If FASTRTPS_DEFAULT_PROFILES_FILE defined, fill DataReader QoS with a subscriber profile
// located based on topic name defined by _create_topic_name(). If no profile is found, a search
// with profile_name "client" is attempted. Else, use the default Fast DDS QoS.
eprosima::fastdds::dds::DataReaderQos dataReaderQos = subscriber->get_default_datareader_qos();

// Try to load the profile named "client",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the response topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down Expand Up @@ -419,7 +419,7 @@ rmw_create_client(
eprosima::fastdds::dds::DataWriterQos dataWriterQos = publisher->get_default_datawriter_qos();

// Try to load the profile named "client",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the request topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down
6 changes: 3 additions & 3 deletions rmw_fastrtps_dynamic_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ rmw_create_service(
}

/////
// Create the RMW Service struct (info)
// Create the custom Service struct (info)
CustomServiceInfo * info = new (std::nothrow) CustomServiceInfo();
if (!info) {
RMW_SET_ERROR_MSG("create_service() failed to allocate custom info");
Expand Down Expand Up @@ -380,7 +380,7 @@ rmw_create_service(
eprosima::fastdds::dds::DataReaderQos dataReaderQos = subscriber->get_default_datareader_qos();

// Try to load the profile named "service",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the request topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down Expand Up @@ -425,7 +425,7 @@ rmw_create_service(
eprosima::fastdds::dds::DataWriterQos dataWriterQos = publisher->get_default_datawriter_qos();

// Try to load the profile named "service",
// if it does not exist it tryes with the request topic name
// if it does not exist it tries with the request topic name
// It does not need to check the return code, as if any of the profile does not exist,
// the QoS is already set correctly:
// If none exist is default, if only one exists is the one chosen,
Expand Down
6 changes: 4 additions & 2 deletions rmw_fastrtps_dynamic_cpp/src/subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ create_subscription(
bool keyed,
bool create_subscription_listener)
{
RCUTILS_CAN_RETURN_WITH_ERROR_OF(nullptr);

/////
// Check input parameters
RMW_CHECK_ARGUMENT_FOR_NULL(participant_info, nullptr);
Expand Down Expand Up @@ -150,13 +152,13 @@ create_subscription(
fastdds_type))
{
RMW_SET_ERROR_MSG_WITH_FORMAT_STRING(
"create_publisher() called with existing topic name %s with incompatible type %s",
"create_subscription() called with existing topic name %s with incompatible type %s",
topic_name_mangled.c_str(), type_name.c_str());
return nullptr;
}

/////
// Create the RMW Subscriber struct (info)
// Create the custom Subscriber struct (info)
CustomSubscriberInfo * info = nullptr;

info = new (std::nothrow) CustomSubscriberInfo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@

#include "rcpputils/thread_safety_annotations.hpp"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"

class ClientListener;
class ClientPubListener;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
#include "rcpputils/thread_safety_annotations.hpp"
#include "rmw/rmw.h"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"
#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@

#include "rcpputils/thread_safety_annotations.hpp"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"
#include "rmw_fastrtps_shared_cpp/guid_utils.hpp"

class ServiceListener;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

#include "rmw/impl/cpp/macros.hpp"

#include "rmw_fastrtps_shared_cpp/TypeSupport.hpp"
#include "rmw_fastrtps_shared_cpp/custom_event_info.hpp"


Expand Down
2 changes: 0 additions & 2 deletions rmw_fastrtps_shared_cpp/src/rmw_take.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include <vector>

#include "rmw/allocators.h"
#include "rmw/error_handling.h"
#include "rmw/serialized_message.h"
Expand Down

0 comments on commit 34e8225

Please sign in to comment.