message_handler_ros.h
Go to the documentation of this file.
1 /*
2  * Software License Agreement (BSD-3 License)
3  *
4  * Copyright (c) 2018 Daniel Koch.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * * Redistributions of source code must retain the above copyright notice, this
11  * list of conditions and the following disclaimer.
12  *
13  * * Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * * Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24  * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  */
32 
38 #ifndef ASYNC_COMM_MESSAGE_HANDLER_ROS_H
39 #define ASYNC_COMM_MESSAGE_HANDLER_ROS_H
40 
42 
43 #include <ros/ros.h>
44 
45 namespace async_comm
46 {
47 namespace util
48 {
49 
58 {
59 public:
60  inline void debug(const std::string &message) override { ROS_DEBUG("[async_comm]: %s", message.c_str()); }
61  inline void info(const std::string &message) override { ROS_INFO("[async_comm]: %s", message.c_str()); }
62  inline void warn(const std::string &message) override { ROS_WARN("[async_comm]: %s", message.c_str()); }
63  inline void error(const std::string &message) override { ROS_ERROR("[async_comm]: %s", message.c_str()); }
64  inline void fatal(const std::string &message) override { ROS_FATAL("[async_comm]: %s", message.c_str()); }
65 };
66 
67 } // namespace util
68 } // namespace async_comm
69 
70 #endif // ASYNC_COMM_MESSAGE_HANDLER_ROS_H
void fatal(const std::string &message) override
void debug(const std::string &message) override
void warn(const std::string &message) override
void error(const std::string &message) override
Abstract base class for message handler.
Message handler implementation for ROS environments.
void info(const std::string &message) override


async_comm
Author(s):
autogenerated on Fri May 14 2021 02:35:38