ROS 2 rclcpp + rcl - rolling  rolling-a919a6e5
ROS 2 C++ Client Library with ROS Client Library
logging_rosout.h
Go to the documentation of this file.
1 // Copyright 2018-2019 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 
16 
17 #ifndef RCL__LOGGING_ROSOUT_H_
18 #define RCL__LOGGING_ROSOUT_H_
19 
20 #include "rcl/allocator.h"
21 #include "rcl/error_handling.h"
22 #include "rcl/node.h"
23 #include "rcl/macros.h"
24 #include "rcl/types.h"
25 #include "rcl/visibility_control.h"
26 
27 #include "rmw/qos_profiles.h"
28 
29 #ifdef __cplusplus
30 extern "C"
31 {
32 #endif
33 
35 
53 RCL_PUBLIC
54 RCL_WARN_UNUSED
57  const rcl_allocator_t * allocator);
58 
60 
75 RCL_PUBLIC
76 RCL_WARN_UNUSED
79 
81 
106 RCL_PUBLIC
107 RCL_WARN_UNUSED
108 rcl_ret_t
110  rcl_node_t * node);
111 
113 
132 RCL_PUBLIC
133 RCL_WARN_UNUSED
134 rcl_ret_t
136  rcl_node_t * node);
137 
139 
165 RCL_PUBLIC
166 void
168  const rcutils_log_location_t * location,
169  int severity,
170  const char * name,
171  rcutils_time_point_value_t timestamp,
172  const char * format,
173  va_list * args);
174 
176 
204 RCL_PUBLIC
205 RCL_WARN_UNUSED
206 rcl_ret_t
208  const char * logger_name, const char * sublogger_name);
209 
211 
233 RCL_PUBLIC
234 RCL_WARN_UNUSED
235 rcl_ret_t
237  const char * logger_name, const char * sublogger_name);
238 
239 #ifdef __cplusplus
240 }
241 #endif
242 
243 #endif // RCL__LOGGING_ROSOUT_H_
rcutils_allocator_t rcl_allocator_t
Encapsulation of an allocator.
Definition: allocator.h:31
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_logging_rosout_add_sublogger(const char *logger_name, const char *sublogger_name)
Add a subordinate logger based on a logger.
RCL_PUBLIC void rcl_logging_rosout_output_handler(const rcutils_log_location_t *location, int severity, const char *name, rcutils_time_point_value_t timestamp, const char *format, va_list *args)
The output handler outputs log messages to rosout topics.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_logging_rosout_init_publisher_for_node(rcl_node_t *node)
Creates a rosout publisher for a node and registers it to be used by the logging system.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_logging_rosout_fini_publisher_for_node(rcl_node_t *node)
Deregisters a rosout publisher for a node and cleans up allocated resources.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_logging_rosout_fini(void)
Uninitializes the rcl_logging_rosout features.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_logging_rosout_init(const rcl_allocator_t *allocator)
Initializes the rcl_logging_rosout features.
RCL_PUBLIC RCL_WARN_UNUSED rcl_ret_t rcl_logging_rosout_remove_sublogger(const char *logger_name, const char *sublogger_name)
Remove a subordinate logger and cleans up allocated resources.
Structure which encapsulates a ROS Node.
Definition: node.h:45
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:24