$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-joystick_drivers/doc_stacks/2013-03-01_15-52-25.763642/joystick_drivers/joy/msg/Joy.msg */ 00002 #ifndef JOY_MESSAGE_JOY_H 00003 #define JOY_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 joy 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 "joy/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 "# This message is deprecated please use the sensor_msgs/Joy\n\ 00067 float32[] axes\n\ 00068 int32[] buttons\n\ 00069 \n\ 00070 "; } 00071 public: 00072 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00073 00074 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00075 00076 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00077 { 00078 ros::serialization::OStream stream(write_ptr, 1000000000); 00079 ros::serialization::serialize(stream, axes); 00080 ros::serialization::serialize(stream, buttons); 00081 return stream.getData(); 00082 } 00083 00084 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00085 { 00086 ros::serialization::IStream stream(read_ptr, 1000000000); 00087 ros::serialization::deserialize(stream, axes); 00088 ros::serialization::deserialize(stream, buttons); 00089 return stream.getData(); 00090 } 00091 00092 ROS_DEPRECATED virtual uint32_t serializationLength() const 00093 { 00094 uint32_t size = 0; 00095 size += ros::serialization::serializationLength(axes); 00096 size += ros::serialization::serializationLength(buttons); 00097 return size; 00098 } 00099 00100 typedef boost::shared_ptr< ::joy::Joy_<ContainerAllocator> > Ptr; 00101 typedef boost::shared_ptr< ::joy::Joy_<ContainerAllocator> const> ConstPtr; 00102 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00103 }; // struct Joy 00104 typedef ::joy::Joy_<std::allocator<void> > Joy; 00105 00106 typedef boost::shared_ptr< ::joy::Joy> JoyPtr; 00107 typedef boost::shared_ptr< ::joy::Joy const> JoyConstPtr; 00108 00109 00110 template<typename ContainerAllocator> 00111 std::ostream& operator<<(std::ostream& s, const ::joy::Joy_<ContainerAllocator> & v) 00112 { 00113 ros::message_operations::Printer< ::joy::Joy_<ContainerAllocator> >::stream(s, "", v); 00114 return s;} 00115 00116 } // namespace joy 00117 00118 namespace ros 00119 { 00120 namespace message_traits 00121 { 00122 template<class ContainerAllocator> struct IsMessage< ::joy::Joy_<ContainerAllocator> > : public TrueType {}; 00123 template<class ContainerAllocator> struct IsMessage< ::joy::Joy_<ContainerAllocator> const> : public TrueType {}; 00124 template<class ContainerAllocator> 00125 struct MD5Sum< ::joy::Joy_<ContainerAllocator> > { 00126 static const char* value() 00127 { 00128 return "e3ef016fcdf22397038b36036c66f7c8"; 00129 } 00130 00131 static const char* value(const ::joy::Joy_<ContainerAllocator> &) { return value(); } 00132 static const uint64_t static_value1 = 0xe3ef016fcdf22397ULL; 00133 static const uint64_t static_value2 = 0x038b36036c66f7c8ULL; 00134 }; 00135 00136 template<class ContainerAllocator> 00137 struct DataType< ::joy::Joy_<ContainerAllocator> > { 00138 static const char* value() 00139 { 00140 return "joy/Joy"; 00141 } 00142 00143 static const char* value(const ::joy::Joy_<ContainerAllocator> &) { return value(); } 00144 }; 00145 00146 template<class ContainerAllocator> 00147 struct Definition< ::joy::Joy_<ContainerAllocator> > { 00148 static const char* value() 00149 { 00150 return "# This message is deprecated please use the sensor_msgs/Joy\n\ 00151 float32[] axes\n\ 00152 int32[] buttons\n\ 00153 \n\ 00154 "; 00155 } 00156 00157 static const char* value(const ::joy::Joy_<ContainerAllocator> &) { return value(); } 00158 }; 00159 00160 } // namespace message_traits 00161 } // namespace ros 00162 00163 namespace ros 00164 { 00165 namespace serialization 00166 { 00167 00168 template<class ContainerAllocator> struct Serializer< ::joy::Joy_<ContainerAllocator> > 00169 { 00170 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00171 { 00172 stream.next(m.axes); 00173 stream.next(m.buttons); 00174 } 00175 00176 ROS_DECLARE_ALLINONE_SERIALIZER; 00177 }; // struct Joy_ 00178 } // namespace serialization 00179 } // namespace ros 00180 00181 namespace ros 00182 { 00183 namespace message_operations 00184 { 00185 00186 template<class ContainerAllocator> 00187 struct Printer< ::joy::Joy_<ContainerAllocator> > 00188 { 00189 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::joy::Joy_<ContainerAllocator> & v) 00190 { 00191 s << indent << "axes[]" << std::endl; 00192 for (size_t i = 0; i < v.axes.size(); ++i) 00193 { 00194 s << indent << " axes[" << i << "]: "; 00195 Printer<float>::stream(s, indent + " ", v.axes[i]); 00196 } 00197 s << indent << "buttons[]" << std::endl; 00198 for (size_t i = 0; i < v.buttons.size(); ++i) 00199 { 00200 s << indent << " buttons[" << i << "]: "; 00201 Printer<int32_t>::stream(s, indent + " ", v.buttons[i]); 00202 } 00203 } 00204 }; 00205 00206 00207 } // namespace message_operations 00208 } // namespace ros 00209 00210 #endif // JOY_MESSAGE_JOY_H 00211