Macros | Enumerations | Functions
sick_scan_logging.h File Reference
#include <string>
#include <sstream>
Include dependency graph for sick_scan_logging.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define ROS_DEBUG(...)   SICK_INFO_LOG(::ros::console::levels::Debug,__VA_ARGS__)
 
#define ROS_DEBUG_STREAM(args)   SICK_INFO_LOG_STREAM(::ros::console::levels::Debug,args)
 
#define ROS_ERROR(...)   SICK_ERROR_LOG(::ros::console::levels::Error,SICK_DIAGNOSTIC_STATUS_ERROR,__VA_ARGS__)
 
#define ROS_ERROR_STREAM(args)   SICK_ERROR_LOG_STREAM(::ros::console::levels::Error,SICK_DIAGNOSTIC_STATUS_ERROR,args)
 
#define ROS_FATAL(...)   SICK_ERROR_LOG(::ros::console::levels::Fatal,SICK_DIAGNOSTIC_STATUS_ERROR,__VA_ARGS__)
 
#define ROS_FATAL_STREAM(args)   SICK_ERROR_LOG_STREAM(::ros::console::levels::Fatal,SICK_DIAGNOSTIC_STATUS_ERROR,args)
 
#define ROS_INFO(...)   SICK_INFO_LOG(::ros::console::levels::Info,__VA_ARGS__)
 
#define ROS_INFO_STREAM(args)   SICK_INFO_LOG_STREAM(::ros::console::levels::Info,args)
 
#define ROS_WARN(...)   SICK_ERROR_LOG(::ros::console::levels::Warn,SICK_DIAGNOSTIC_STATUS_WARN,__VA_ARGS__)
 
#define ROS_WARN_STREAM(args)   SICK_ERROR_LOG_STREAM(::ros::console::levels::Warn,SICK_DIAGNOSTIC_STATUS_WARN,args)
 
#define SICK_DIAGNOSTIC_STATUS_ERROR   (SICK_DIAGNOSTIC_STATUS::SICK_DIAG_ERROR)
 
#define SICK_DIAGNOSTIC_STATUS_WARN   (SICK_DIAGNOSTIC_STATUS::WARN)
 
#define SICK_ERROR_LOG(ros_level, diag_status, ...)   do{ std::string _msg=vargs_to_string(__VA_ARGS__); setDiagnosticStatus(diag_status,_msg); if(ros_level>=getVerboseLevel()){ROS_LOG(ros_level,ROSCONSOLE_DEFAULT_NAME,__VA_ARGS__);} notifyLogMessageListener(ros_level,_msg); }while(0)
 
#define SICK_ERROR_LOG_STREAM(ros_level, diag_status, args)   do{ std::stringstream _msg; _msg<<args; setDiagnosticStatus(diag_status,_msg.str()); if(ros_level>=getVerboseLevel()){ROS_LOG_STREAM(ros_level,ROSCONSOLE_DEFAULT_NAME,args);} notifyLogMessageListener(ros_level,_msg.str()); }while(0)
 
#define SICK_INFO_LOG(ros_level, ...)   do{ std::string _msg=vargs_to_string(__VA_ARGS__); if(ros_level>=getVerboseLevel()){ROS_LOG(ros_level,ROSCONSOLE_DEFAULT_NAME,__VA_ARGS__);} notifyLogMessageListener(ros_level,_msg); }while(0)
 
#define SICK_INFO_LOG_STREAM(ros_level, args)   do{ std::stringstream _msg; _msg<<args; if(ros_level>=getVerboseLevel()){ROS_LOG_STREAM(ros_level,ROSCONSOLE_DEFAULT_NAME,args);} notifyLogMessageListener(ros_level,_msg.str()); }while(0)
 

Enumerations

enum  SICK_DIAGNOSTIC_STATUS {
  OK = 0, WARN = 1, SICK_DIAG_ERROR = 2, INIT = 3,
  EXIT = 4
}
 

Functions

void getDiagnosticStatus (SICK_DIAGNOSTIC_STATUS &status_code, std::string &status_message)
 
int32_t getVerboseLevel ()
 
void notifyDiagnosticListener (SICK_DIAGNOSTIC_STATUS status_code, const std::string &status_message)
 
void notifyLogMessageListener (int msg_level, const std::string &message)
 
void setDiagnosticStatus (SICK_DIAGNOSTIC_STATUS status_code, const std::string &status_message)
 
void setVerboseLevel (int32_t verbose_level)
 
std::string vargs_to_string (const char *const format,...) __attribute__((format(printf
 

Macro Definition Documentation

◆ ROS_DEBUG

#define ROS_DEBUG (   ...)    SICK_INFO_LOG(::ros::console::levels::Debug,__VA_ARGS__)

Definition at line 112 of file sick_scan_logging.h.

◆ ROS_DEBUG_STREAM

#define ROS_DEBUG_STREAM (   args)    SICK_INFO_LOG_STREAM(::ros::console::levels::Debug,args)

Definition at line 113 of file sick_scan_logging.h.

◆ ROS_ERROR

#define ROS_ERROR (   ...)    SICK_ERROR_LOG(::ros::console::levels::Error,SICK_DIAGNOSTIC_STATUS_ERROR,__VA_ARGS__)

Definition at line 127 of file sick_scan_logging.h.

◆ ROS_ERROR_STREAM

#define ROS_ERROR_STREAM (   args)    SICK_ERROR_LOG_STREAM(::ros::console::levels::Error,SICK_DIAGNOSTIC_STATUS_ERROR,args)

Definition at line 128 of file sick_scan_logging.h.

◆ ROS_FATAL

#define ROS_FATAL (   ...)    SICK_ERROR_LOG(::ros::console::levels::Fatal,SICK_DIAGNOSTIC_STATUS_ERROR,__VA_ARGS__)

Definition at line 132 of file sick_scan_logging.h.

◆ ROS_FATAL_STREAM

#define ROS_FATAL_STREAM (   args)    SICK_ERROR_LOG_STREAM(::ros::console::levels::Fatal,SICK_DIAGNOSTIC_STATUS_ERROR,args)

Definition at line 133 of file sick_scan_logging.h.

◆ ROS_INFO

#define ROS_INFO (   ...)    SICK_INFO_LOG(::ros::console::levels::Info,__VA_ARGS__)

Definition at line 117 of file sick_scan_logging.h.

◆ ROS_INFO_STREAM

#define ROS_INFO_STREAM (   args)    SICK_INFO_LOG_STREAM(::ros::console::levels::Info,args)

Definition at line 118 of file sick_scan_logging.h.

◆ ROS_WARN

#define ROS_WARN (   ...)    SICK_ERROR_LOG(::ros::console::levels::Warn,SICK_DIAGNOSTIC_STATUS_WARN,__VA_ARGS__)

Definition at line 122 of file sick_scan_logging.h.

◆ ROS_WARN_STREAM

#define ROS_WARN_STREAM (   args)    SICK_ERROR_LOG_STREAM(::ros::console::levels::Warn,SICK_DIAGNOSTIC_STATUS_WARN,args)

Definition at line 123 of file sick_scan_logging.h.

◆ SICK_DIAGNOSTIC_STATUS_ERROR

#define SICK_DIAGNOSTIC_STATUS_ERROR   (SICK_DIAGNOSTIC_STATUS::SICK_DIAG_ERROR)

Definition at line 81 of file sick_scan_logging.h.

◆ SICK_DIAGNOSTIC_STATUS_WARN

#define SICK_DIAGNOSTIC_STATUS_WARN   (SICK_DIAGNOSTIC_STATUS::WARN)

Definition at line 80 of file sick_scan_logging.h.

◆ SICK_ERROR_LOG

#define SICK_ERROR_LOG (   ros_level,
  diag_status,
  ... 
)    do{ std::string _msg=vargs_to_string(__VA_ARGS__); setDiagnosticStatus(diag_status,_msg); if(ros_level>=getVerboseLevel()){ROS_LOG(ros_level,ROSCONSOLE_DEFAULT_NAME,__VA_ARGS__);} notifyLogMessageListener(ros_level,_msg); }while(0)

Definition at line 107 of file sick_scan_logging.h.

◆ SICK_ERROR_LOG_STREAM

#define SICK_ERROR_LOG_STREAM (   ros_level,
  diag_status,
  args 
)    do{ std::stringstream _msg; _msg<<args; setDiagnosticStatus(diag_status,_msg.str()); if(ros_level>=getVerboseLevel()){ROS_LOG_STREAM(ros_level,ROSCONSOLE_DEFAULT_NAME,args);} notifyLogMessageListener(ros_level,_msg.str()); }while(0)

Definition at line 108 of file sick_scan_logging.h.

◆ SICK_INFO_LOG

#define SICK_INFO_LOG (   ros_level,
  ... 
)    do{ std::string _msg=vargs_to_string(__VA_ARGS__); if(ros_level>=getVerboseLevel()){ROS_LOG(ros_level,ROSCONSOLE_DEFAULT_NAME,__VA_ARGS__);} notifyLogMessageListener(ros_level,_msg); }while(0)

Definition at line 105 of file sick_scan_logging.h.

◆ SICK_INFO_LOG_STREAM

#define SICK_INFO_LOG_STREAM (   ros_level,
  args 
)    do{ std::stringstream _msg; _msg<<args; if(ros_level>=getVerboseLevel()){ROS_LOG_STREAM(ros_level,ROSCONSOLE_DEFAULT_NAME,args);} notifyLogMessageListener(ros_level,_msg.str()); }while(0)

Definition at line 106 of file sick_scan_logging.h.

Enumeration Type Documentation

◆ SICK_DIAGNOSTIC_STATUS

Enumerator
OK 
WARN 
SICK_DIAG_ERROR 
INIT 
EXIT 

Definition at line 71 of file sick_scan_logging.h.

Function Documentation

◆ getDiagnosticStatus()

void getDiagnosticStatus ( SICK_DIAGNOSTIC_STATUS status_code,
std::string &  status_message 
)

Definition at line 314 of file sick_generic_laser.cpp.

◆ getVerboseLevel()

int32_t getVerboseLevel ( )

Definition at line 329 of file sick_generic_laser.cpp.

◆ notifyDiagnosticListener()

void notifyDiagnosticListener ( SICK_DIAGNOSTIC_STATUS  status_code,
const std::string &  status_message 
)

Definition at line 1492 of file api_impl.cpp.

◆ notifyLogMessageListener()

void notifyLogMessageListener ( int  msg_level,
const std::string &  message 
)

Definition at line 1480 of file api_impl.cpp.

◆ setDiagnosticStatus()

void setDiagnosticStatus ( SICK_DIAGNOSTIC_STATUS  status_code,
const std::string &  status_message 
)

Definition at line 302 of file sick_generic_laser.cpp.

◆ setVerboseLevel()

void setVerboseLevel ( int32_t  verbose_level)

Definition at line 323 of file sick_generic_laser.cpp.

◆ vargs_to_string()

std::string vargs_to_string ( const char *const  format,
  ... 
)


sick_scan_xd
Author(s): Michael Lehning , Jochen Sprickerhof , Martin Günther
autogenerated on Fri Oct 25 2024 02:47:14