ROS 2 rclcpp + rcl - rolling  rolling-e7363f10
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 <stdarg.h>
21 
22 #include "rcl/allocator.h"
23 #include "rcl/node.h"
24 #include "rcl/macros.h"
25 #include "rcl/types.h"
26 #include "rcl/visibility_control.h"
27 
28 #include "rcutils/logging.h"
29 #include "rcutils/time.h"
30 
31 #ifdef __cplusplus
32 extern "C"
33 {
34 #endif
35 
37 
55 RCL_PUBLIC
56 RCL_WARN_UNUSED
59  const rcl_allocator_t * allocator);
60 
62 
77 RCL_PUBLIC
78 RCL_WARN_UNUSED
81 
83 
108 RCL_PUBLIC
109 RCL_WARN_UNUSED
110 rcl_ret_t
112  rcl_node_t * node);
113 
115 
134 RCL_PUBLIC
135 RCL_WARN_UNUSED
136 rcl_ret_t
138  rcl_node_t * node);
139 
141 
167 RCL_PUBLIC
168 void
170  const rcutils_log_location_t * location,
171  int severity,
172  const char * name,
173  rcutils_time_point_value_t timestamp,
174  const char * format,
175  va_list * args);
176 
178 
206 RCL_PUBLIC
207 RCL_WARN_UNUSED
208 rcl_ret_t
210  const char * logger_name, const char * sublogger_name);
211 
213 
235 RCL_PUBLIC
236 RCL_WARN_UNUSED
237 rcl_ret_t
239  const char * logger_name, const char * sublogger_name);
240 
241 #ifdef __cplusplus
242 }
243 #endif
244 
245 #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:49
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:25