Program Listing for File graph.h
↰ Return to documentation for file (include/rcl/graph.h
)
// Copyright 2016-2017 Open Source Robotics Foundation, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef RCL__GRAPH_H_
#define RCL__GRAPH_H_
#ifdef __cplusplus
extern "C"
{
#endif
#include <rmw/names_and_types.h>
#include <rmw/get_topic_names_and_types.h>
#include <rmw/topic_endpoint_info_array.h>
#include "rcutils/time.h"
#include "rcutils/types.h"
#include "rosidl_runtime_c/service_type_support_struct.h"
#include "rcl/macros.h"
#include "rcl/client.h"
#include "rcl/node.h"
#include "rcl/visibility_control.h"
typedef rmw_names_and_types_t rcl_names_and_types_t;
typedef rmw_topic_endpoint_info_t rcl_topic_endpoint_info_t;
typedef rmw_topic_endpoint_info_array_t rcl_topic_endpoint_info_array_t;
#define rcl_get_zero_initialized_names_and_types rmw_get_zero_initialized_names_and_types
#define rcl_get_zero_initialized_topic_endpoint_info_array \
rmw_get_zero_initialized_topic_endpoint_info_array
#define rcl_topic_endpoint_info_array_fini rmw_topic_endpoint_info_array_fini
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_publisher_names_and_types_by_node(
const rcl_node_t * node,
rcl_allocator_t * allocator,
bool no_demangle,
const char * node_name,
const char * node_namespace,
rcl_names_and_types_t * topic_names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_subscriber_names_and_types_by_node(
const rcl_node_t * node,
rcl_allocator_t * allocator,
bool no_demangle,
const char * node_name,
const char * node_namespace,
rcl_names_and_types_t * topic_names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_service_names_and_types_by_node(
const rcl_node_t * node,
rcl_allocator_t * allocator,
const char * node_name,
const char * node_namespace,
rcl_names_and_types_t * service_names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_client_names_and_types_by_node(
const rcl_node_t * node,
rcl_allocator_t * allocator,
const char * node_name,
const char * node_namespace,
rcl_names_and_types_t * service_names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_topic_names_and_types(
const rcl_node_t * node,
rcl_allocator_t * allocator,
bool no_demangle,
rcl_names_and_types_t * topic_names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_service_names_and_types(
const rcl_node_t * node,
rcl_allocator_t * allocator,
rcl_names_and_types_t * service_names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_names_and_types_init(
rcl_names_and_types_t * names_and_types,
size_t size,
rcl_allocator_t * allocator);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_names_and_types_fini(rcl_names_and_types_t * names_and_types);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_node_names(
const rcl_node_t * node,
rcl_allocator_t allocator,
rcutils_string_array_t * node_names,
rcutils_string_array_t * node_namespaces);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_node_names_with_enclaves(
const rcl_node_t * node,
rcl_allocator_t allocator,
rcutils_string_array_t * node_names,
rcutils_string_array_t * node_namespaces,
rcutils_string_array_t * enclaves);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_count_publishers(
const rcl_node_t * node,
const char * topic_name,
size_t * count);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_count_subscribers(
const rcl_node_t * node,
const char * topic_name,
size_t * count);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_count_clients(
const rcl_node_t * node,
const char * service_name,
size_t * count);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_count_services(
const rcl_node_t * node,
const char * service_name,
size_t * count);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_wait_for_publishers(
const rcl_node_t * node,
rcl_allocator_t * allocator,
const char * topic_name,
const size_t count,
rcutils_duration_value_t timeout,
bool * success);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_wait_for_subscribers(
const rcl_node_t * node,
rcl_allocator_t * allocator,
const char * topic_name,
const size_t count,
rcutils_duration_value_t timeout,
bool * success);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_publishers_info_by_topic(
const rcl_node_t * node,
rcutils_allocator_t * allocator,
const char * topic_name,
bool no_mangle,
rcl_topic_endpoint_info_array_t * publishers_info);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_get_subscriptions_info_by_topic(
const rcl_node_t * node,
rcutils_allocator_t * allocator,
const char * topic_name,
bool no_mangle,
rcl_topic_endpoint_info_array_t * subscriptions_info);
RCL_PUBLIC
RCL_WARN_UNUSED
rcl_ret_t
rcl_service_server_is_available(
const rcl_node_t * node,
const rcl_client_t * client,
bool * is_available);
#ifdef __cplusplus
}
#endif
#endif // RCL__GRAPH_H_