$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-clearpath_common/doc_stacks/2013-03-01_14-27-57.340522/clearpath_common/clearpath_base/msg/Joy.msg */ 00002 #ifndef CLEARPATH_BASE_MESSAGE_JOY_H 00003 #define CLEARPATH_BASE_MESSAGE_JOY_H 00004 #include <string> 00005 #include <vector> 00006 #include <map> 00007 #include <ostream> 00008 #include "ros/serialization.h" 00009 #include "ros/builtin_message_traits.h" 00010 #include "ros/message_operations.h" 00011 #include "ros/time.h" 00012 00013 #include "ros/macros.h" 00014 00015 #include "ros/assert.h" 00016 00017 00018 namespace clearpath_base 00019 { 00020 template <class ContainerAllocator> 00021 struct Joy_ { 00022 typedef Joy_<ContainerAllocator> Type; 00023 00024 Joy_() 00025 : axes() 00026 , buttons() 00027 { 00028 } 00029 00030 Joy_(const ContainerAllocator& _alloc) 00031 : axes(_alloc) 00032 , buttons(_alloc) 00033 { 00034 } 00035 00036 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _axes_type; 00037 std::vector<float, typename ContainerAllocator::template rebind<float>::other > axes; 00038 00039 typedef std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > _buttons_type; 00040 std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > buttons; 00041 00042 00043 ROS_DEPRECATED uint32_t get_axes_size() const { return (uint32_t)axes.size(); } 00044 ROS_DEPRECATED void set_axes_size(uint32_t size) { axes.resize((size_t)size); } 00045 ROS_DEPRECATED void get_axes_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->axes; } 00046 ROS_DEPRECATED void set_axes_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->axes = vec; } 00047 ROS_DEPRECATED uint32_t get_buttons_size() const { return (uint32_t)buttons.size(); } 00048 ROS_DEPRECATED void set_buttons_size(uint32_t size) { buttons.resize((size_t)size); } 00049 ROS_DEPRECATED void get_buttons_vec(std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) const { vec = this->buttons; } 00050 ROS_DEPRECATED void set_buttons_vec(const std::vector<int32_t, typename ContainerAllocator::template rebind<int32_t>::other > & vec) { this->buttons = vec; } 00051 private: 00052 static const char* __s_getDataType_() { return "clearpath_base/Joy"; } 00053 public: 00054 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00055 00056 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00057 00058 private: 00059 static const char* __s_getMD5Sum_() { return "e3ef016fcdf22397038b36036c66f7c8"; } 00060 public: 00061 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00062 00063 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00064 00065 private: 00066 static const char* __s_getMessageDefinition_() { return "float32[] axes\n\ 00067 int32[] buttons\n\ 00068 \n\ 00069 "; } 00070 public: 00071 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00072 00073 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00074 00075 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00076 { 00077 ros::serialization::OStream stream(write_ptr, 1000000000); 00078 ros::serialization::serialize(stream, axes); 00079 ros::serialization::serialize(stream, buttons); 00080 return stream.getData(); 00081 } 00082 00083 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00084 { 00085 ros::serialization::IStream stream(read_ptr, 1000000000); 00086 ros::serialization::deserialize(stream, axes); 00087 ros::serialization::deserialize(stream, buttons); 00088 return stream.getData(); 00089 } 00090 00091 ROS_DEPRECATED virtual uint32_t serializationLength() const 00092 { 00093 uint32_t size = 0; 00094 size += ros::serialization::serializationLength(axes); 00095 size += ros::serialization::serializationLength(buttons); 00096 return size; 00097 } 00098 00099 typedef boost::shared_ptr< ::clearpath_base::Joy_<ContainerAllocator> > Ptr; 00100 typedef boost::shared_ptr< ::clearpath_base::Joy_<ContainerAllocator> const> ConstPtr; 00101 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00102 }; // struct Joy 00103 typedef ::clearpath_base::Joy_<std::allocator<void> > Joy; 00104 00105 typedef boost::shared_ptr< ::clearpath_base::Joy> JoyPtr; 00106 typedef boost::shared_ptr< ::clearpath_base::Joy const> JoyConstPtr; 00107 00108 00109 template<typename ContainerAllocator> 00110 std::ostream& operator<<(std::ostream& s, const ::clearpath_base::Joy_<ContainerAllocator> & v) 00111 { 00112 ros::message_operations::Printer< ::clearpath_base::Joy_<ContainerAllocator> >::stream(s, "", v); 00113 return s;} 00114 00115 } // namespace clearpath_base 00116 00117 namespace ros 00118 { 00119 namespace message_traits 00120 { 00121 template<class ContainerAllocator> struct IsMessage< ::clearpath_base::Joy_<ContainerAllocator> > : public TrueType {}; 00122 template<class ContainerAllocator> struct IsMessage< ::clearpath_base::Joy_<ContainerAllocator> const> : public TrueType {}; 00123 template<class ContainerAllocator> 00124 struct MD5Sum< ::clearpath_base::Joy_<ContainerAllocator> > { 00125 static const char* value() 00126 { 00127 return "e3ef016fcdf22397038b36036c66f7c8"; 00128 } 00129 00130 static const char* value(const ::clearpath_base::Joy_<ContainerAllocator> &) { return value(); } 00131 static const uint64_t static_value1 = 0xe3ef016fcdf22397ULL; 00132 static const uint64_t static_value2 = 0x038b36036c66f7c8ULL; 00133 }; 00134 00135 template<class ContainerAllocator> 00136 struct DataType< ::clearpath_base::Joy_<ContainerAllocator> > { 00137 static const char* value() 00138 { 00139 return "clearpath_base/Joy"; 00140 } 00141 00142 static const char* value(const ::clearpath_base::Joy_<ContainerAllocator> &) { return value(); } 00143 }; 00144 00145 template<class ContainerAllocator> 00146 struct Definition< ::clearpath_base::Joy_<ContainerAllocator> > { 00147 static const char* value() 00148 { 00149 return "float32[] axes\n\ 00150 int32[] buttons\n\ 00151 \n\ 00152 "; 00153 } 00154 00155 static const char* value(const ::clearpath_base::Joy_<ContainerAllocator> &) { return value(); } 00156 }; 00157 00158 } // namespace message_traits 00159 } // namespace ros 00160 00161 namespace ros 00162 { 00163 namespace serialization 00164 { 00165 00166 template<class ContainerAllocator> struct Serializer< ::clearpath_base::Joy_<ContainerAllocator> > 00167 { 00168 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00169 { 00170 stream.next(m.axes); 00171 stream.next(m.buttons); 00172 } 00173 00174 ROS_DECLARE_ALLINONE_SERIALIZER; 00175 }; // struct Joy_ 00176 } // namespace serialization 00177 } // namespace ros 00178 00179 namespace ros 00180 { 00181 namespace message_operations 00182 { 00183 00184 template<class ContainerAllocator> 00185 struct Printer< ::clearpath_base::Joy_<ContainerAllocator> > 00186 { 00187 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::clearpath_base::Joy_<ContainerAllocator> & v) 00188 { 00189 s << indent << "axes[]" << std::endl; 00190 for (size_t i = 0; i < v.axes.size(); ++i) 00191 { 00192 s << indent << " axes[" << i << "]: "; 00193 Printer<float>::stream(s, indent + " ", v.axes[i]); 00194 } 00195 s << indent << "buttons[]" << std::endl; 00196 for (size_t i = 0; i < v.buttons.size(); ++i) 00197 { 00198 s << indent << " buttons[" << i << "]: "; 00199 Printer<int32_t>::stream(s, indent + " ", v.buttons[i]); 00200 } 00201 } 00202 }; 00203 00204 00205 } // namespace message_operations 00206 } // namespace ros 00207 00208 #endif // CLEARPATH_BASE_MESSAGE_JOY_H 00209