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 
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/types.h"
24 #include "rcl/visibility_control.h"
25 
26 #ifdef __cplusplus
27 extern "C"
28 {
29 #endif
30 
32 
37 static const rmw_qos_profile_t rcl_qos_profile_rosout_default =
38 {
40  1000,
44  {10, 0},
47  false
48 };
49 
51 
69 RCL_PUBLIC
70 RCL_WARN_UNUSED
73  const rcl_allocator_t * allocator);
74 
76 
91 RCL_PUBLIC
92 RCL_WARN_UNUSED
95 
97 
122 RCL_PUBLIC
123 RCL_WARN_UNUSED
124 rcl_ret_t
126  rcl_node_t * node);
127 
129 
148 RCL_PUBLIC
149 RCL_WARN_UNUSED
150 rcl_ret_t
152  rcl_node_t * node);
153 
155 
178 RCL_PUBLIC
180  const rcutils_log_location_t * location,
181  int severity,
182  const char * name,
183  rcutils_time_point_value_t timestamp,
184  const char * format,
185  va_list * args);
186 
187 #ifdef __cplusplus
188 }
189 #endif
190 
191 #endif // RCL__LOGGING_ROSOUT_H_
rcl_node_t
Structure which encapsulates a ROS Node.
Definition: node.h:39
rcl_logging_rosout_output_handler
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.
types.h
rcl_ret_t
rmw_ret_t rcl_ret_t
The type that holds an rcl return code.
Definition: types.h:23
rcl_logger_setting_t::name
const char * name
Name for the logger.
Definition: log_level.h:37
node.h
rcl_logging_rosout_init_publisher_for_node
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.
RMW_QOS_DEADLINE_DEFAULT
#define RMW_QOS_DEADLINE_DEFAULT
rcl_logging_rosout_fini
rcl_ret_t rcl_logging_rosout_fini()
Uninitializes the rcl_logging_rosout features.
rcutils_time_point_value_t
int64_t rcutils_time_point_value_t
rcutils_log_location_t
rcutils_allocator_t
allocator.h
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT
RMW_QOS_POLICY_LIVELINESS_SYSTEM_DEFAULT
RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT
#define RMW_QOS_LIVELINESS_LEASE_DURATION_DEFAULT
RMW_QOS_POLICY_RELIABILITY_RELIABLE
RMW_QOS_POLICY_RELIABILITY_RELIABLE
rmw_qos_profile_t
va_list
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
RMW_QOS_POLICY_DURABILITY_TRANSIENT_LOCAL
rcl_logging_rosout_init
rcl_ret_t rcl_logging_rosout_init(const rcl_allocator_t *allocator)
Initializes the rcl_logging_rosout features.
RMW_QOS_POLICY_HISTORY_KEEP_LAST
RMW_QOS_POLICY_HISTORY_KEEP_LAST
rcl_logging_rosout_fini_publisher_for_node
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.