log.hpp
Go to the documentation of this file.
00001 /*
00002  * Copyright 2015 Aldebaran
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  *
00016 */
00017 
00018 #ifndef PUBLISHER_LOG_HPP
00019 #define PUBLISHER_LOG_HPP
00020 
00021 /*
00022 * LOCAL includes
00023 */
00024 #include "basic.hpp"
00025 
00026 /*
00027 * ROS includes
00028 */
00029 #include <ros/ros.h>
00030 #include <rosgraph_msgs/Log.h>
00031 #include <ros/serialization.h>
00032 #include <std_msgs/String.h>
00033 
00034 /*
00035 * BOOST includes
00036 */
00037 #include <boost/algorithm/string.hpp>
00038 #include <boost/thread/mutex.hpp>
00039 
00040 /*
00041 * ALDEBARAN includes
00042 */
00043 #include <qi/anyobject.hpp>
00044 #include <qicore/logmessage.hpp>
00045 #include <qicore/logmanager.hpp>
00046 #include <qicore/loglistener.hpp>
00047 
00048 namespace naoqi
00049 {
00050 namespace publisher
00051 {
00052 
00053 class LogPublisher : public BasicPublisher<rosgraph_msgs::Log>
00054 {
00055 public:
00056   LogPublisher(const std::string& topic);
00057 
00058   // check whether a real copy of the log message should be more safe
00059   // remove const ref here
00060 
00061   inline bool isSubscribed() const
00062   {
00063     // We assume it is essential
00064     return true;
00065   }
00066 
00067 private:
00068   ros::Publisher pub_;
00069 
00070 };
00071 
00072 } //publisher
00073 } //naoqi
00074 
00075 #endif


naoqi_driver
Author(s): Karsten Knese
autogenerated on Sun Sep 17 2017 02:57:14