rcl  beta1
C API providing common ROS client library functionality.
graph.h
Go to the documentation of this file.
1 // Copyright 2016 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RCL__GRAPH_H_
16 #define RCL__GRAPH_H_
17 
18 #if __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include <rmw/rmw.h>
24 #include <rmw/types.h>
25 
26 #include "rosidl_generator_c/service_type_support.h"
27 
28 #include "rcl/macros.h"
29 #include "rcl/client.h"
30 #include "rcl/node.h"
31 #include "rcl/visibility_control.h"
32 
34 
35 
39 rcl_topic_names_and_types_t
41 
43 
75  const rcl_node_t * node,
76  rcl_topic_names_and_types_t * topic_names_and_types);
77 
79 
101  rcl_topic_names_and_types_t * topic_names_and_types);
102 
104 
135 rcl_ret_t
137  const rcl_node_t * node,
138  const char * topic_name,
139  size_t * count);
140 
142 
173 rcl_ret_t
175  const rcl_node_t * node,
176  const char * topic_name,
177  size_t * count);
178 
180 
213 rcl_ret_t
215  const rcl_node_t * node,
216  const rcl_client_t * client,
217  bool * is_available);
218 
219 #if __cplusplus
220 }
221 #endif
222 
223 #endif // RCL__GRAPH_H_
rcl_ret_t rcl_destroy_topic_names_and_types(rcl_topic_names_and_types_t *topic_names_and_types)
Destroy a struct which was previously given to rcl_get_topic_names_and_types.
rmw_ret_t rcl_ret_t
Definition: types.h:20
Structure which encapsulates a ROS Client.
Definition: client.h:33
rcl_topic_names_and_types_t rcl_get_zero_initialized_topic_names_and_types(void)
Return a rcl_topic_names_and_types_t struct with members initialized to NULL.
rmw_topic_names_and_types_t rcl_topic_names_and_types_t
Definition: graph.h:33
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition: macros.h:25
rcl_ret_t rcl_count_publishers(const rcl_node_t *node, const char *topic_name, size_t *count)
Return the number of publishers on a given topic.
#define RCL_PUBLIC
Definition: visibility_control.h:48
rcl_ret_t rcl_service_server_is_available(const rcl_node_t *node, const rcl_client_t *client, bool *is_available)
Check if a service server is available for the given service client.
rcl_ret_t rcl_count_subscribers(const rcl_node_t *node, const char *topic_name, size_t *count)
Return the number of subscriptions on a given topic.
rcl_ret_t rcl_get_topic_names_and_types(const rcl_node_t *node, rcl_topic_names_and_types_t *topic_names_and_types)
Return a list of topic names and their types.
Structure which encapsulates a ROS Node.
Definition: node.h:37