complete motor

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_BUILTIN_MESSAGE_TRAITS_H
Jeonghoon 11:2228e8931266 29 #define ROSLIB_BUILTIN_MESSAGE_TRAITS_H
Jeonghoon 11:2228e8931266 30
Jeonghoon 11:2228e8931266 31 #include "message_traits.h"
Jeonghoon 11:2228e8931266 32 #include "ros/time.h"
Jeonghoon 11:2228e8931266 33
Jeonghoon 11:2228e8931266 34 namespace ros
Jeonghoon 11:2228e8931266 35 {
Jeonghoon 11:2228e8931266 36 namespace message_traits
Jeonghoon 11:2228e8931266 37 {
Jeonghoon 11:2228e8931266 38
Jeonghoon 11:2228e8931266 39 #define ROSLIB_CREATE_SIMPLE_TRAITS(Type) \
Jeonghoon 11:2228e8931266 40 template<> struct IsSimple<Type> : public TrueType {}; \
Jeonghoon 11:2228e8931266 41 template<> struct IsFixedSize<Type> : public TrueType {};
Jeonghoon 11:2228e8931266 42
Jeonghoon 11:2228e8931266 43 ROSLIB_CREATE_SIMPLE_TRAITS(uint8_t)
Jeonghoon 11:2228e8931266 44 ROSLIB_CREATE_SIMPLE_TRAITS(int8_t)
Jeonghoon 11:2228e8931266 45 ROSLIB_CREATE_SIMPLE_TRAITS(uint16_t)
Jeonghoon 11:2228e8931266 46 ROSLIB_CREATE_SIMPLE_TRAITS(int16_t)
Jeonghoon 11:2228e8931266 47 ROSLIB_CREATE_SIMPLE_TRAITS(uint32_t)
Jeonghoon 11:2228e8931266 48 ROSLIB_CREATE_SIMPLE_TRAITS(int32_t)
Jeonghoon 11:2228e8931266 49 ROSLIB_CREATE_SIMPLE_TRAITS(uint64_t)
Jeonghoon 11:2228e8931266 50 ROSLIB_CREATE_SIMPLE_TRAITS(int64_t)
Jeonghoon 11:2228e8931266 51 ROSLIB_CREATE_SIMPLE_TRAITS(float)
Jeonghoon 11:2228e8931266 52 ROSLIB_CREATE_SIMPLE_TRAITS(double)
Jeonghoon 11:2228e8931266 53 ROSLIB_CREATE_SIMPLE_TRAITS(Time)
Jeonghoon 11:2228e8931266 54 ROSLIB_CREATE_SIMPLE_TRAITS(Duration)
Jeonghoon 11:2228e8931266 55
Jeonghoon 11:2228e8931266 56 // because std::vector<bool> is not a true vector, bool is not a simple type
Jeonghoon 11:2228e8931266 57 template<> struct IsFixedSize<bool> : public TrueType {};
Jeonghoon 11:2228e8931266 58
Jeonghoon 11:2228e8931266 59 } // namespace message_traits
Jeonghoon 11:2228e8931266 60 } // namespace ros
Jeonghoon 11:2228e8931266 61
Jeonghoon 11:2228e8931266 62 #endif // ROSLIB_BUILTIN_MESSAGE_TRAITS_H