Pipe Inpection Robot / Mbed OS GPG_motor_latest

Dependencies:   BufferedSerial motor_sn7544

Committer:
Jeonghoon
Date:
Thu Nov 21 11:39:20 2019 +0000
Revision:
13:3ac8d2472417
Parent:
11:2228e8931266
complete motor

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Jeonghoon 11:2228e8931266 1 /*
Jeonghoon 11:2228e8931266 2 * Copyright (C) 2009, Willow Garage, Inc.
Jeonghoon 11:2228e8931266 3 *
Jeonghoon 11:2228e8931266 4 * Redistribution and use in source and binary forms, with or without
Jeonghoon 11:2228e8931266 5 * modification, are permitted provided that the following conditions are met:
Jeonghoon 11:2228e8931266 6 * * Redistributions of source code must retain the above copyright notice,
Jeonghoon 11:2228e8931266 7 * this list of conditions and the following disclaimer.
Jeonghoon 11:2228e8931266 8 * * Redistributions in binary form must reproduce the above copyright
Jeonghoon 11:2228e8931266 9 * notice, this list of conditions and the following disclaimer in the
Jeonghoon 11:2228e8931266 10 * documentation and/or other materials provided with the distribution.
Jeonghoon 11:2228e8931266 11 * * Neither the names of Willow Garage, Inc. nor the names of its
Jeonghoon 11:2228e8931266 12 * contributors may be used to endorse or promote products derived from
Jeonghoon 11:2228e8931266 13 * this software without specific prior written permission.
Jeonghoon 11:2228e8931266 14 *
Jeonghoon 11:2228e8931266 15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
Jeonghoon 11:2228e8931266 16 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
Jeonghoon 11:2228e8931266 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
Jeonghoon 11:2228e8931266 18 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
Jeonghoon 11:2228e8931266 19 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
Jeonghoon 11:2228e8931266 20 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
Jeonghoon 11:2228e8931266 21 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
Jeonghoon 11:2228e8931266 22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
Jeonghoon 11:2228e8931266 23 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
Jeonghoon 11:2228e8931266 24 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
Jeonghoon 11:2228e8931266 25 * POSSIBILITY OF SUCH DAMAGE.
Jeonghoon 11:2228e8931266 26 */
Jeonghoon 11:2228e8931266 27
Jeonghoon 11:2228e8931266 28 #ifndef ROSLIB_MESSAGE_FORWARD_H
Jeonghoon 11:2228e8931266 29 #define ROSLIB_MESSAGE_FORWARD_H
Jeonghoon 11:2228e8931266 30
Jeonghoon 11:2228e8931266 31 // Make sure that either __GLIBCXX__ or _LIBCPP_VERSION is defined.
Jeonghoon 11:2228e8931266 32 #include <cstddef>
Jeonghoon 11:2228e8931266 33
Jeonghoon 11:2228e8931266 34 // C++ standard section 17.4.3.1/1 states that forward declarations of STL types
Jeonghoon 11:2228e8931266 35 // that aren't specializations involving user defined types results in undefined
Jeonghoon 11:2228e8931266 36 // behavior. Apparently only libc++ has a problem with this and won't compile it.
Jeonghoon 11:2228e8931266 37 #ifndef _LIBCPP_VERSION
Jeonghoon 11:2228e8931266 38 namespace std
Jeonghoon 11:2228e8931266 39 {
Jeonghoon 11:2228e8931266 40 template<typename T> class allocator;
Jeonghoon 11:2228e8931266 41 }
Jeonghoon 11:2228e8931266 42 #else
Jeonghoon 11:2228e8931266 43 #include <memory>
Jeonghoon 11:2228e8931266 44 #endif
Jeonghoon 11:2228e8931266 45
Jeonghoon 11:2228e8931266 46 namespace boost
Jeonghoon 11:2228e8931266 47 {
Jeonghoon 11:2228e8931266 48 template<typename T> class shared_ptr;
Jeonghoon 11:2228e8931266 49 }
Jeonghoon 11:2228e8931266 50
Jeonghoon 11:2228e8931266 51 /**
Jeonghoon 11:2228e8931266 52 * \brief Forward-declare a message, including Ptr and ConstPtr types, with an allocator
Jeonghoon 11:2228e8931266 53 *
Jeonghoon 11:2228e8931266 54 * \param msg The "base" message type, i.e., the name of the .msg file
Jeonghoon 11:2228e8931266 55 * \param new_name The name you'd like the message to have
Jeonghoon 11:2228e8931266 56 * \param alloc The allocator to use, e.g. std::allocator
Jeonghoon 11:2228e8931266 57 */
Jeonghoon 11:2228e8931266 58 #define ROS_DECLARE_MESSAGE_WITH_ALLOCATOR(msg, new_name, alloc) \
Jeonghoon 11:2228e8931266 59 template<class Allocator> struct msg##_; \
Jeonghoon 11:2228e8931266 60 typedef msg##_<alloc<void> > new_name; \
Jeonghoon 11:2228e8931266 61 typedef boost::shared_ptr<new_name> new_name##Ptr; \
Jeonghoon 11:2228e8931266 62 typedef boost::shared_ptr<new_name const> new_name##ConstPtr;
Jeonghoon 11:2228e8931266 63
Jeonghoon 11:2228e8931266 64 /**
Jeonghoon 11:2228e8931266 65 * \brief Forward-declare a message, including Ptr and ConstPtr types, using std::allocator
Jeonghoon 11:2228e8931266 66 * \param msg The "base" message type, i.e. the name of the .msg file
Jeonghoon 11:2228e8931266 67 */
Jeonghoon 11:2228e8931266 68 #define ROS_DECLARE_MESSAGE(msg) ROS_DECLARE_MESSAGE_WITH_ALLOCATOR(msg, msg, std::allocator)
Jeonghoon 11:2228e8931266 69
Jeonghoon 11:2228e8931266 70 #endif // ROSLIB_MESSAGE_FORWARD_H