rosout_appender.h
Go to the documentation of this file.
1 #include "sick_scan/sick_scan_base.h" /* Base definitions included in all header files, added by add_sick_scan_base_header.py. Do not edit this line. */
2 /*
3  * Software License Agreement (BSD License)
4  *
5  * Copyright (c) 2008, Willow Garage, Inc.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Willow Garage, Inc. nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  */
35 
36 #ifndef ROSCPP_ROSOUT_APPENDER_H
37 #define ROSCPP_ROSOUT_APPENDER_H
38 
39 #include <ros/message_forward.h>
40 #include "common.h"
41 
42 #include <memory>
43 //#include <boost/weak_ptr.hpp>
44 
45 #include <thread>
46 
47 namespace rosgraph_msgs
48 {
50 }
51 
52 namespace roswrap
53 {
54 
55 class Publication;
56 typedef std::shared_ptr<Publication> PublicationPtr;
57 typedef std::weak_ptr<Publication> PublicationWPtr;
58 
60 {
61 public:
63  ~ROSOutAppender();
64 
65  const std::string& getLastError() const;
66 
67  virtual void log(::ros::console::Level level, const char* str, const char* file, const char* function, int line);
68 
69 protected:
70  void logThread();
71 
72  std::string last_error_;
73 
74  typedef std::vector<rosgraph_msgs::LogPtr> V_Log;
76  std::mutex queue_mutex_;
77  std::condition_variable queue_condition_;
79 
80  std::thread publish_thread_;
81 };
82 
83 } // namespace roswrap
84 
85 #endif
roswrap::PublicationWPtr
std::weak_ptr< Publication > PublicationWPtr
Definition: rosout_appender.h:57
rosgraph_msgs
roswrap::ROSOutAppender::V_Log
std::vector< rosgraph_msgs::LogPtr > V_Log
Definition: rosout_appender.h:74
roswrap::ROSOutAppender::queue_condition_
std::condition_variable queue_condition_
Definition: rosout_appender.h:77
roswrap::ROSOutAppender::publish_thread_
std::thread publish_thread_
Definition: rosout_appender.h:80
ros::console::LogAppender
roswrap::ROSOutAppender::log_queue_
V_Log log_queue_
Definition: rosout_appender.h:75
roswrap::ROSOutAppender::queue_mutex_
std::mutex queue_mutex_
Definition: rosout_appender.h:76
roswrap::ROSOutAppender
Definition: rosout_appender.h:59
roswrap
Definition: param_modi.cpp:41
imu_delay_tester.line
line
Definition: imu_delay_tester.py:135
ros::console::levels::Level
Level
rosgraph_msgs::ROS_DECLARE_MESSAGE
ROS_DECLARE_MESSAGE(Log)
common.h
sick_scan_base.h
roswrap::ROSOutAppender::last_error_
std::string last_error_
Definition: rosout_appender.h:72
roswrap::ROSOutAppender::shutting_down_
bool shutting_down_
Definition: rosout_appender.h:78
roswrap::PublicationPtr
std::shared_ptr< Publication > PublicationPtr
Definition: forwards.h:68
ROSCPP_DECL
#define ROSCPP_DECL
Definition: roswrap/src/cfgsimu/sick_scan/ros/common.h:63


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