rcl  master
C API providing common ROS client library functionality.
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 
15 #ifndef RCL__LOGGING_ROSOUT_H_
16 #define RCL__LOGGING_ROSOUT_H_
17 
18 #include "rcl/allocator.h"
19 #include "rcl/error_handling.h"
20 #include "rcl/node.h"
21 #include "rcl/types.h"
22 #include "rcl/visibility_control.h"
23 
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28 
30 
52  const rcl_allocator_t * allocator);
53 
55 
74 
76 
102 RCL_LOCAL
104 rcl_ret_t
106  rcl_node_t * node);
107 
109 
128 RCL_LOCAL
130 rcl_ret_t
132  rcl_node_t * node);
133 
135 
159  const rcutils_log_location_t * location,
160  int severity,
161  const char * name,
162  rcutils_time_point_value_t timestamp,
163  const char * format,
164  va_list * args);
165 
166 #ifdef __cplusplus
167 }
168 #endif
169 
170 #endif // RCL__LOGGING_ROSOUT_H_
rmw_ret_t rcl_ret_t
Definition: types.h:20
int64_t rcutils_time_point_value_t
#define RCL_LOCAL
Definition: visibility_control.h:49
RCL_LOCAL rcl_ret_t rcl_logging_rosout_init(const rcl_allocator_t *allocator)
Initializes the rcl_logging_rosout features.
RCL_LOCAL rcl_ret_t rcl_logging_rosout_fini()
Uninitializes the rcl_logging_rosout features.
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.
#define RCL_WARN_UNUSED
Ignored return values of functions with this macro will emit a warning.
Definition: macros.h:25
#define RCL_PUBLIC
Definition: visibility_control.h:48
RCL_LOCAL 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_LOCAL 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.
Structure which encapsulates a ROS Node.
Definition: node.h:39