diff --git a/rmw_iceoryx_cpp/src/rmw_count.cpp b/rmw_iceoryx_cpp/src/rmw_count.cpp index 9c87cd2..2bc4202 100644 --- a/rmw_iceoryx_cpp/src/rmw_count.cpp +++ b/rmw_iceoryx_cpp/src/rmw_count.cpp @@ -84,6 +84,46 @@ rmw_count_subscribers( return RMW_RET_OK; } +rmw_ret_t +rmw_count_services( + const rmw_node_t * node, + const char * service_name, + size_t * count) +{ + RCUTILS_CHECK_ARGUMENT_FOR_NULL(node, RMW_RET_ERROR); + RCUTILS_CHECK_ARGUMENT_FOR_NULL(service_name, RMW_RET_ERROR); + RCUTILS_CHECK_ARGUMENT_FOR_NULL(count, RMW_RET_ERROR); + + RMW_CHECK_TYPE_IDENTIFIERS_MATCH( + rmw_count_subscribers + : node, node->implementation_identifier, + rmw_get_implementation_identifier(), return RMW_RET_ERROR); + + /// @todo There is no API to find out which 'ServiceDescription' is offered by which node + RMW_SET_ERROR_MSG("rmw_count_services is not supported in iceoryx"); + return RMW_RET_UNSUPPORTED; +} + +rmw_ret_t +rmw_count_clients( + const rmw_node_t * node, + const char * service_name, + size_t * count) +{ + RCUTILS_CHECK_ARGUMENT_FOR_NULL(node, RMW_RET_ERROR); + RCUTILS_CHECK_ARGUMENT_FOR_NULL(service_name, RMW_RET_ERROR); + RCUTILS_CHECK_ARGUMENT_FOR_NULL(count, RMW_RET_ERROR); + + RMW_CHECK_TYPE_IDENTIFIERS_MATCH( + rmw_count_subscribers + : node, node->implementation_identifier, + rmw_get_implementation_identifier(), return RMW_RET_ERROR); + + /// @todo There is no API to find out which 'ServiceDescription' is offered by which node + RMW_SET_ERROR_MSG("rmw_count_clients is not supported in iceoryx"); + return RMW_RET_UNSUPPORTED; +} + rmw_ret_t rmw_subscription_count_matched_publishers( const rmw_subscription_t * subscription,