Skip to content

Commit

Permalink
Call get_type_hash_func (#680)
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <emerson.b.knapp@gmail.com>
  • Loading branch information
emersonknapp authored Apr 6, 2023
1 parent 901339f commit 851ced8
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 12 deletions.
5 changes: 4 additions & 1 deletion rmw_fastrtps_cpp/src/publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,10 @@ rmw_fastrtps_cpp::create_publisher(
}

// Get QoS from RMW
if (!get_datawriter_qos(*qos_policies, *type_supports->type_hash, writer_qos)) {
if (!get_datawriter_qos(
*qos_policies, *type_supports->get_type_hash_func(type_supports),
writer_qos))
{
RMW_SET_ERROR_MSG("create_publisher() failed setting data writer QoS");
return nullptr;
}
Expand Down
8 changes: 6 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,9 @@ rmw_create_client(
}

if (!get_datareader_qos(
adapted_qos_policies, *type_supports->response_typesupport->type_hash, reader_qos))
adapted_qos_policies,
*type_supports->response_typesupport->get_type_hash_func(type_supports->response_typesupport),
reader_qos))
{
RMW_SET_ERROR_MSG("create_client() failed setting response DataReader QoS");
return nullptr;
Expand Down Expand Up @@ -371,7 +373,9 @@ rmw_create_client(
}

if (!get_datawriter_qos(
adapted_qos_policies, *type_supports->request_typesupport->type_hash, writer_qos))
adapted_qos_policies,
*type_supports->request_typesupport->get_type_hash_func(type_supports->request_typesupport),
writer_qos))
{
RMW_SET_ERROR_MSG("create_client() failed setting request DataWriter QoS");
return nullptr;
Expand Down
8 changes: 6 additions & 2 deletions rmw_fastrtps_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,9 @@ rmw_create_service(
}

if (!get_datareader_qos(
adapted_qos_policies, *type_supports->request_typesupport->type_hash, reader_qos))
adapted_qos_policies,
*type_supports->request_typesupport->get_type_hash_func(type_supports->request_typesupport),
reader_qos))
{
RMW_SET_ERROR_MSG("create_service() failed setting request DataReader QoS");
return nullptr;
Expand Down Expand Up @@ -374,7 +376,9 @@ rmw_create_service(
}

if (!get_datawriter_qos(
adapted_qos_policies, *type_supports->response_typesupport->type_hash, writer_qos))
adapted_qos_policies,
*type_supports->response_typesupport->get_type_hash_func(type_supports->response_typesupport),
writer_qos))
{
RMW_SET_ERROR_MSG("create_service() failed setting response DataWriter QoS");
return nullptr;
Expand Down
5 changes: 4 additions & 1 deletion rmw_fastrtps_cpp/src/subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,10 @@ create_subscription(
reader_qos.data_sharing().off();
}

if (!get_datareader_qos(*qos_policies, *type_supports->type_hash, reader_qos)) {
if (!get_datareader_qos(
*qos_policies, *type_supports->get_type_hash_func(type_supports),
reader_qos))
{
RMW_SET_ERROR_MSG("create_subscription() failed setting data reader QoS");
return nullptr;
}
Expand Down
5 changes: 4 additions & 1 deletion rmw_fastrtps_dynamic_cpp/src/publisher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,10 @@ rmw_fastrtps_dynamic_cpp::create_publisher(
}

// Get QoS from RMW
if (!get_datawriter_qos(*qos_policies, *type_supports->type_hash, writer_qos)) {
if (!get_datawriter_qos(
*qos_policies, *type_supports->get_type_hash_func(type_supports),
writer_qos))
{
RMW_SET_ERROR_MSG("create_publisher() failed setting data writer QoS");
return nullptr;
}
Expand Down
8 changes: 6 additions & 2 deletions rmw_fastrtps_dynamic_cpp/src/rmw_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,9 @@ rmw_create_client(
}

if (!get_datareader_qos(
adapted_qos_policies, *type_supports->response_typesupport->type_hash, reader_qos))
adapted_qos_policies,
*type_supports->response_typesupport->get_type_hash_func(type_supports->response_typesupport),
reader_qos))
{
RMW_SET_ERROR_MSG("create_client() failed setting response DataReader QoS");
return nullptr;
Expand Down Expand Up @@ -402,7 +404,9 @@ rmw_create_client(
}

if (!get_datawriter_qos(
adapted_qos_policies, *type_supports->request_typesupport->type_hash, writer_qos))
adapted_qos_policies,
*type_supports->request_typesupport->get_type_hash_func(type_supports->request_typesupport),
writer_qos))
{
RMW_SET_ERROR_MSG("create_client() failed setting request DataWriter QoS");
return nullptr;
Expand Down
8 changes: 6 additions & 2 deletions rmw_fastrtps_dynamic_cpp/src/rmw_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,9 @@ rmw_create_service(
}

if (!get_datareader_qos(
adapted_qos_policies, *type_supports->request_typesupport->type_hash, reader_qos))
adapted_qos_policies,
*type_supports->request_typesupport->get_type_hash_func(type_supports->request_typesupport),
reader_qos))
{
RMW_SET_ERROR_MSG("create_service() failed setting request DataReader QoS");
return nullptr;
Expand Down Expand Up @@ -405,7 +407,9 @@ rmw_create_service(
}

if (!get_datawriter_qos(
adapted_qos_policies, *type_supports->response_typesupport->type_hash, writer_qos))
adapted_qos_policies,
*type_supports->response_typesupport->get_type_hash_func(type_supports->response_typesupport),
writer_qos))
{
RMW_SET_ERROR_MSG("create_service() failed setting response DataWriter QoS");
return nullptr;
Expand Down
5 changes: 4 additions & 1 deletion rmw_fastrtps_dynamic_cpp/src/subscription.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,10 @@ create_subscription(
reader_qos.data_sharing().off();
}

if (!get_datareader_qos(*qos_policies, *type_supports->type_hash, reader_qos)) {
if (!get_datareader_qos(
*qos_policies, *type_supports->get_type_hash_func(type_supports),
reader_qos))
{
RMW_SET_ERROR_MSG("create_subscription() failed setting data reader QoS");
return nullptr;
}
Expand Down

0 comments on commit 851ced8

Please sign in to comment.