kinect2_console.h
Go to the documentation of this file.
1 
18 #pragma once
19 #ifndef __KINECT2_CONSOLE_H__
20 #define __KINECT2_CONSOLE_H__
21 
22 #include <string>
23 #include <ros/console.h>
24 
25 // Set this to '0' to disable the extended colored output
26 #define EXTENDED_OUTPUT 1
27 
28 #if EXTENDED_OUTPUT
29 
30 #define NO_COLOR "\033[0m"
31 #define FG_BLACK "\033[30m"
32 #define FG_RED "\033[31m"
33 #define FG_GREEN "\033[32m"
34 #define FG_YELLOW "\033[33m"
35 #define FG_BLUE "\033[34m"
36 #define FG_MAGENTA "\033[35m"
37 #define FG_CYAN "\033[36m"
38 
39 const std::string getFunctionName(const std::string &name);
40 #define OUT_AUX(FUNC_COLOR, MSG_COLOR, STREAM, MSG) STREAM(FUNC_COLOR "[" << getFunctionName(__PRETTY_FUNCTION__) << "] " MSG_COLOR << MSG << NO_COLOR)
41 
42 #define OUT_DEBUG(msg) OUT_AUX(FG_BLUE, NO_COLOR, ROS_DEBUG_STREAM, msg)
43 #define OUT_INFO(msg) OUT_AUX(FG_GREEN, NO_COLOR, ROS_INFO_STREAM, msg)
44 #define OUT_WARN(msg) OUT_AUX(FG_YELLOW, FG_YELLOW, ROS_WARN_STREAM, msg)
45 #define OUT_ERROR(msg) OUT_AUX(FG_RED, FG_RED, ROS_ERROR_STREAM, msg)
46 
47 #else
48 
49 #define NO_COLOR ""
50 #define FG_BLACK ""
51 #define FG_RED ""
52 #define FG_GREEN ""
53 #define FG_YELLOW ""
54 #define FG_BLUE ""
55 #define FG_MAGENTA ""
56 #define FG_CYAN ""
57 
58 #define OUT_DEBUG(msg) ROS_DEBUG_STREAM(msg)
59 #define OUT_INFO(msg) ROS_INFO_STREAM(msg)
60 #define OUT_WARN(msg) ROS_WARN_STREAM(msg)
61 #define OUT_ERROR(msg) ROS_WARN_STREAM(msg)
62 
63 #endif
64 
65 #endif //__KINECT2_CONSOLE_H__
const std::string getFunctionName(const std::string &name)


kinect2_registration
Author(s):
autogenerated on Wed Jan 3 2018 03:48:04