$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-tu-darmstadt-ros-pkg/doc_stacks/2013-03-05_12-22-58.304137/hector_quadrotor/hector_uav_msgs/msg/MotorCommand.msg */ 00002 #ifndef HECTOR_UAV_MSGS_MESSAGE_MOTORCOMMAND_H 00003 #define HECTOR_UAV_MSGS_MESSAGE_MOTORCOMMAND_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 #include "std_msgs/Header.h" 00018 00019 namespace hector_uav_msgs 00020 { 00021 template <class ContainerAllocator> 00022 struct MotorCommand_ { 00023 typedef MotorCommand_<ContainerAllocator> Type; 00024 00025 MotorCommand_() 00026 : header() 00027 , force() 00028 , torque() 00029 , frequency() 00030 , voltage() 00031 { 00032 } 00033 00034 MotorCommand_(const ContainerAllocator& _alloc) 00035 : header(_alloc) 00036 , force(_alloc) 00037 , torque(_alloc) 00038 , frequency(_alloc) 00039 , voltage(_alloc) 00040 { 00041 } 00042 00043 typedef ::std_msgs::Header_<ContainerAllocator> _header_type; 00044 ::std_msgs::Header_<ContainerAllocator> header; 00045 00046 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _force_type; 00047 std::vector<float, typename ContainerAllocator::template rebind<float>::other > force; 00048 00049 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _torque_type; 00050 std::vector<float, typename ContainerAllocator::template rebind<float>::other > torque; 00051 00052 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _frequency_type; 00053 std::vector<float, typename ContainerAllocator::template rebind<float>::other > frequency; 00054 00055 typedef std::vector<float, typename ContainerAllocator::template rebind<float>::other > _voltage_type; 00056 std::vector<float, typename ContainerAllocator::template rebind<float>::other > voltage; 00057 00058 00059 ROS_DEPRECATED uint32_t get_force_size() const { return (uint32_t)force.size(); } 00060 ROS_DEPRECATED void set_force_size(uint32_t size) { force.resize((size_t)size); } 00061 ROS_DEPRECATED void get_force_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->force; } 00062 ROS_DEPRECATED void set_force_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->force = vec; } 00063 ROS_DEPRECATED uint32_t get_torque_size() const { return (uint32_t)torque.size(); } 00064 ROS_DEPRECATED void set_torque_size(uint32_t size) { torque.resize((size_t)size); } 00065 ROS_DEPRECATED void get_torque_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->torque; } 00066 ROS_DEPRECATED void set_torque_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->torque = vec; } 00067 ROS_DEPRECATED uint32_t get_frequency_size() const { return (uint32_t)frequency.size(); } 00068 ROS_DEPRECATED void set_frequency_size(uint32_t size) { frequency.resize((size_t)size); } 00069 ROS_DEPRECATED void get_frequency_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->frequency; } 00070 ROS_DEPRECATED void set_frequency_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->frequency = vec; } 00071 ROS_DEPRECATED uint32_t get_voltage_size() const { return (uint32_t)voltage.size(); } 00072 ROS_DEPRECATED void set_voltage_size(uint32_t size) { voltage.resize((size_t)size); } 00073 ROS_DEPRECATED void get_voltage_vec(std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) const { vec = this->voltage; } 00074 ROS_DEPRECATED void set_voltage_vec(const std::vector<float, typename ContainerAllocator::template rebind<float>::other > & vec) { this->voltage = vec; } 00075 private: 00076 static const char* __s_getDataType_() { return "hector_uav_msgs/MotorCommand"; } 00077 public: 00078 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00079 00080 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00081 00082 private: 00083 static const char* __s_getMD5Sum_() { return "ccd4d4d4606731d1c73409e9bfa55808"; } 00084 public: 00085 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00086 00087 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00088 00089 private: 00090 static const char* __s_getMessageDefinition_() { return "Header header\n\ 00091 float32[] force\n\ 00092 float32[] torque\n\ 00093 float32[] frequency\n\ 00094 float32[] voltage\n\ 00095 \n\ 00096 ================================================================================\n\ 00097 MSG: std_msgs/Header\n\ 00098 # Standard metadata for higher-level stamped data types.\n\ 00099 # This is generally used to communicate timestamped data \n\ 00100 # in a particular coordinate frame.\n\ 00101 # \n\ 00102 # sequence ID: consecutively increasing ID \n\ 00103 uint32 seq\n\ 00104 #Two-integer timestamp that is expressed as:\n\ 00105 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00106 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00107 # time-handling sugar is provided by the client library\n\ 00108 time stamp\n\ 00109 #Frame this data is associated with\n\ 00110 # 0: no frame\n\ 00111 # 1: global frame\n\ 00112 string frame_id\n\ 00113 \n\ 00114 "; } 00115 public: 00116 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00117 00118 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00119 00120 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00121 { 00122 ros::serialization::OStream stream(write_ptr, 1000000000); 00123 ros::serialization::serialize(stream, header); 00124 ros::serialization::serialize(stream, force); 00125 ros::serialization::serialize(stream, torque); 00126 ros::serialization::serialize(stream, frequency); 00127 ros::serialization::serialize(stream, voltage); 00128 return stream.getData(); 00129 } 00130 00131 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr) 00132 { 00133 ros::serialization::IStream stream(read_ptr, 1000000000); 00134 ros::serialization::deserialize(stream, header); 00135 ros::serialization::deserialize(stream, force); 00136 ros::serialization::deserialize(stream, torque); 00137 ros::serialization::deserialize(stream, frequency); 00138 ros::serialization::deserialize(stream, voltage); 00139 return stream.getData(); 00140 } 00141 00142 ROS_DEPRECATED virtual uint32_t serializationLength() const 00143 { 00144 uint32_t size = 0; 00145 size += ros::serialization::serializationLength(header); 00146 size += ros::serialization::serializationLength(force); 00147 size += ros::serialization::serializationLength(torque); 00148 size += ros::serialization::serializationLength(frequency); 00149 size += ros::serialization::serializationLength(voltage); 00150 return size; 00151 } 00152 00153 typedef boost::shared_ptr< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > Ptr; 00154 typedef boost::shared_ptr< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> const> ConstPtr; 00155 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00156 }; // struct MotorCommand 00157 typedef ::hector_uav_msgs::MotorCommand_<std::allocator<void> > MotorCommand; 00158 00159 typedef boost::shared_ptr< ::hector_uav_msgs::MotorCommand> MotorCommandPtr; 00160 typedef boost::shared_ptr< ::hector_uav_msgs::MotorCommand const> MotorCommandConstPtr; 00161 00162 00163 template<typename ContainerAllocator> 00164 std::ostream& operator<<(std::ostream& s, const ::hector_uav_msgs::MotorCommand_<ContainerAllocator> & v) 00165 { 00166 ros::message_operations::Printer< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> >::stream(s, "", v); 00167 return s;} 00168 00169 } // namespace hector_uav_msgs 00170 00171 namespace ros 00172 { 00173 namespace message_traits 00174 { 00175 template<class ContainerAllocator> struct IsMessage< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > : public TrueType {}; 00176 template<class ContainerAllocator> struct IsMessage< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> const> : public TrueType {}; 00177 template<class ContainerAllocator> 00178 struct MD5Sum< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > { 00179 static const char* value() 00180 { 00181 return "ccd4d4d4606731d1c73409e9bfa55808"; 00182 } 00183 00184 static const char* value(const ::hector_uav_msgs::MotorCommand_<ContainerAllocator> &) { return value(); } 00185 static const uint64_t static_value1 = 0xccd4d4d4606731d1ULL; 00186 static const uint64_t static_value2 = 0xc73409e9bfa55808ULL; 00187 }; 00188 00189 template<class ContainerAllocator> 00190 struct DataType< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > { 00191 static const char* value() 00192 { 00193 return "hector_uav_msgs/MotorCommand"; 00194 } 00195 00196 static const char* value(const ::hector_uav_msgs::MotorCommand_<ContainerAllocator> &) { return value(); } 00197 }; 00198 00199 template<class ContainerAllocator> 00200 struct Definition< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > { 00201 static const char* value() 00202 { 00203 return "Header header\n\ 00204 float32[] force\n\ 00205 float32[] torque\n\ 00206 float32[] frequency\n\ 00207 float32[] voltage\n\ 00208 \n\ 00209 ================================================================================\n\ 00210 MSG: std_msgs/Header\n\ 00211 # Standard metadata for higher-level stamped data types.\n\ 00212 # This is generally used to communicate timestamped data \n\ 00213 # in a particular coordinate frame.\n\ 00214 # \n\ 00215 # sequence ID: consecutively increasing ID \n\ 00216 uint32 seq\n\ 00217 #Two-integer timestamp that is expressed as:\n\ 00218 # * stamp.secs: seconds (stamp_secs) since epoch\n\ 00219 # * stamp.nsecs: nanoseconds since stamp_secs\n\ 00220 # time-handling sugar is provided by the client library\n\ 00221 time stamp\n\ 00222 #Frame this data is associated with\n\ 00223 # 0: no frame\n\ 00224 # 1: global frame\n\ 00225 string frame_id\n\ 00226 \n\ 00227 "; 00228 } 00229 00230 static const char* value(const ::hector_uav_msgs::MotorCommand_<ContainerAllocator> &) { return value(); } 00231 }; 00232 00233 template<class ContainerAllocator> struct HasHeader< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > : public TrueType {}; 00234 template<class ContainerAllocator> struct HasHeader< const ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > : public TrueType {}; 00235 } // namespace message_traits 00236 } // namespace ros 00237 00238 namespace ros 00239 { 00240 namespace serialization 00241 { 00242 00243 template<class ContainerAllocator> struct Serializer< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > 00244 { 00245 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00246 { 00247 stream.next(m.header); 00248 stream.next(m.force); 00249 stream.next(m.torque); 00250 stream.next(m.frequency); 00251 stream.next(m.voltage); 00252 } 00253 00254 ROS_DECLARE_ALLINONE_SERIALIZER; 00255 }; // struct MotorCommand_ 00256 } // namespace serialization 00257 } // namespace ros 00258 00259 namespace ros 00260 { 00261 namespace message_operations 00262 { 00263 00264 template<class ContainerAllocator> 00265 struct Printer< ::hector_uav_msgs::MotorCommand_<ContainerAllocator> > 00266 { 00267 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::hector_uav_msgs::MotorCommand_<ContainerAllocator> & v) 00268 { 00269 s << indent << "header: "; 00270 s << std::endl; 00271 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header); 00272 s << indent << "force[]" << std::endl; 00273 for (size_t i = 0; i < v.force.size(); ++i) 00274 { 00275 s << indent << " force[" << i << "]: "; 00276 Printer<float>::stream(s, indent + " ", v.force[i]); 00277 } 00278 s << indent << "torque[]" << std::endl; 00279 for (size_t i = 0; i < v.torque.size(); ++i) 00280 { 00281 s << indent << " torque[" << i << "]: "; 00282 Printer<float>::stream(s, indent + " ", v.torque[i]); 00283 } 00284 s << indent << "frequency[]" << std::endl; 00285 for (size_t i = 0; i < v.frequency.size(); ++i) 00286 { 00287 s << indent << " frequency[" << i << "]: "; 00288 Printer<float>::stream(s, indent + " ", v.frequency[i]); 00289 } 00290 s << indent << "voltage[]" << std::endl; 00291 for (size_t i = 0; i < v.voltage.size(); ++i) 00292 { 00293 s << indent << " voltage[" << i << "]: "; 00294 Printer<float>::stream(s, indent + " ", v.voltage[i]); 00295 } 00296 } 00297 }; 00298 00299 00300 } // namespace message_operations 00301 } // namespace ros 00302 00303 #endif // HECTOR_UAV_MSGS_MESSAGE_MOTORCOMMAND_H 00304