$search
00001 /* Auto-generated by genmsg_cpp for file /home/rosbuild/hudson/workspace/doc-electric-dynamixel_motor/doc_stacks/2013-03-05_11-51-27.351858/dynamixel_motor/dynamixel_msgs/msg/MotorState.msg */ 00002 #ifndef DYNAMIXEL_MSGS_MESSAGE_MOTORSTATE_H 00003 #define DYNAMIXEL_MSGS_MESSAGE_MOTORSTATE_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 dynamixel_msgs 00019 { 00020 template <class ContainerAllocator> 00021 struct MotorState_ { 00022 typedef MotorState_<ContainerAllocator> Type; 00023 00024 MotorState_() 00025 : timestamp(0.0) 00026 , id(0) 00027 , goal(0) 00028 , position(0) 00029 , error(0) 00030 , speed(0) 00031 , load(0.0) 00032 , voltage(0.0) 00033 , temperature(0) 00034 , moving(false) 00035 { 00036 } 00037 00038 MotorState_(const ContainerAllocator& _alloc) 00039 : timestamp(0.0) 00040 , id(0) 00041 , goal(0) 00042 , position(0) 00043 , error(0) 00044 , speed(0) 00045 , load(0.0) 00046 , voltage(0.0) 00047 , temperature(0) 00048 , moving(false) 00049 { 00050 } 00051 00052 typedef double _timestamp_type; 00053 double timestamp; 00054 00055 typedef int32_t _id_type; 00056 int32_t id; 00057 00058 typedef int32_t _goal_type; 00059 int32_t goal; 00060 00061 typedef int32_t _position_type; 00062 int32_t position; 00063 00064 typedef int32_t _error_type; 00065 int32_t error; 00066 00067 typedef int32_t _speed_type; 00068 int32_t speed; 00069 00070 typedef double _load_type; 00071 double load; 00072 00073 typedef double _voltage_type; 00074 double voltage; 00075 00076 typedef int32_t _temperature_type; 00077 int32_t temperature; 00078 00079 typedef uint8_t _moving_type; 00080 uint8_t moving; 00081 00082 00083 private: 00084 static const char* __s_getDataType_() { return "dynamixel_msgs/MotorState"; } 00085 public: 00086 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); } 00087 00088 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); } 00089 00090 private: 00091 static const char* __s_getMD5Sum_() { return "1cefdc3ff0c7d52e475886024476b74d"; } 00092 public: 00093 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); } 00094 00095 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); } 00096 00097 private: 00098 static const char* __s_getMessageDefinition_() { return "float64 timestamp # motor state is at this time\n\ 00099 int32 id # motor id\n\ 00100 int32 goal # commanded position (in encoder units)\n\ 00101 int32 position # current position (in encoder units)\n\ 00102 int32 error # difference between current and goal positions\n\ 00103 int32 speed # current speed (0.111 rpm per unit)\n\ 00104 float64 load # current load - ratio of applied torque over maximum torque\n\ 00105 float64 voltage # current voltage (V)\n\ 00106 int32 temperature # current temperature (degrees Celsius)\n\ 00107 bool moving # whether the motor is currently in motion\n\ 00108 \n\ 00109 "; } 00110 public: 00111 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); } 00112 00113 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); } 00114 00115 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const 00116 { 00117 ros::serialization::OStream stream(write_ptr, 1000000000); 00118 ros::serialization::serialize(stream, timestamp); 00119 ros::serialization::serialize(stream, id); 00120 ros::serialization::serialize(stream, goal); 00121 ros::serialization::serialize(stream, position); 00122 ros::serialization::serialize(stream, error); 00123 ros::serialization::serialize(stream, speed); 00124 ros::serialization::serialize(stream, load); 00125 ros::serialization::serialize(stream, voltage); 00126 ros::serialization::serialize(stream, temperature); 00127 ros::serialization::serialize(stream, moving); 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, timestamp); 00135 ros::serialization::deserialize(stream, id); 00136 ros::serialization::deserialize(stream, goal); 00137 ros::serialization::deserialize(stream, position); 00138 ros::serialization::deserialize(stream, error); 00139 ros::serialization::deserialize(stream, speed); 00140 ros::serialization::deserialize(stream, load); 00141 ros::serialization::deserialize(stream, voltage); 00142 ros::serialization::deserialize(stream, temperature); 00143 ros::serialization::deserialize(stream, moving); 00144 return stream.getData(); 00145 } 00146 00147 ROS_DEPRECATED virtual uint32_t serializationLength() const 00148 { 00149 uint32_t size = 0; 00150 size += ros::serialization::serializationLength(timestamp); 00151 size += ros::serialization::serializationLength(id); 00152 size += ros::serialization::serializationLength(goal); 00153 size += ros::serialization::serializationLength(position); 00154 size += ros::serialization::serializationLength(error); 00155 size += ros::serialization::serializationLength(speed); 00156 size += ros::serialization::serializationLength(load); 00157 size += ros::serialization::serializationLength(voltage); 00158 size += ros::serialization::serializationLength(temperature); 00159 size += ros::serialization::serializationLength(moving); 00160 return size; 00161 } 00162 00163 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState_<ContainerAllocator> > Ptr; 00164 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState_<ContainerAllocator> const> ConstPtr; 00165 boost::shared_ptr<std::map<std::string, std::string> > __connection_header; 00166 }; // struct MotorState 00167 typedef ::dynamixel_msgs::MotorState_<std::allocator<void> > MotorState; 00168 00169 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState> MotorStatePtr; 00170 typedef boost::shared_ptr< ::dynamixel_msgs::MotorState const> MotorStateConstPtr; 00171 00172 00173 template<typename ContainerAllocator> 00174 std::ostream& operator<<(std::ostream& s, const ::dynamixel_msgs::MotorState_<ContainerAllocator> & v) 00175 { 00176 ros::message_operations::Printer< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::stream(s, "", v); 00177 return s;} 00178 00179 } // namespace dynamixel_msgs 00180 00181 namespace ros 00182 { 00183 namespace message_traits 00184 { 00185 template<class ContainerAllocator> struct IsMessage< ::dynamixel_msgs::MotorState_<ContainerAllocator> > : public TrueType {}; 00186 template<class ContainerAllocator> struct IsMessage< ::dynamixel_msgs::MotorState_<ContainerAllocator> const> : public TrueType {}; 00187 template<class ContainerAllocator> 00188 struct MD5Sum< ::dynamixel_msgs::MotorState_<ContainerAllocator> > { 00189 static const char* value() 00190 { 00191 return "1cefdc3ff0c7d52e475886024476b74d"; 00192 } 00193 00194 static const char* value(const ::dynamixel_msgs::MotorState_<ContainerAllocator> &) { return value(); } 00195 static const uint64_t static_value1 = 0x1cefdc3ff0c7d52eULL; 00196 static const uint64_t static_value2 = 0x475886024476b74dULL; 00197 }; 00198 00199 template<class ContainerAllocator> 00200 struct DataType< ::dynamixel_msgs::MotorState_<ContainerAllocator> > { 00201 static const char* value() 00202 { 00203 return "dynamixel_msgs/MotorState"; 00204 } 00205 00206 static const char* value(const ::dynamixel_msgs::MotorState_<ContainerAllocator> &) { return value(); } 00207 }; 00208 00209 template<class ContainerAllocator> 00210 struct Definition< ::dynamixel_msgs::MotorState_<ContainerAllocator> > { 00211 static const char* value() 00212 { 00213 return "float64 timestamp # motor state is at this time\n\ 00214 int32 id # motor id\n\ 00215 int32 goal # commanded position (in encoder units)\n\ 00216 int32 position # current position (in encoder units)\n\ 00217 int32 error # difference between current and goal positions\n\ 00218 int32 speed # current speed (0.111 rpm per unit)\n\ 00219 float64 load # current load - ratio of applied torque over maximum torque\n\ 00220 float64 voltage # current voltage (V)\n\ 00221 int32 temperature # current temperature (degrees Celsius)\n\ 00222 bool moving # whether the motor is currently in motion\n\ 00223 \n\ 00224 "; 00225 } 00226 00227 static const char* value(const ::dynamixel_msgs::MotorState_<ContainerAllocator> &) { return value(); } 00228 }; 00229 00230 template<class ContainerAllocator> struct IsFixedSize< ::dynamixel_msgs::MotorState_<ContainerAllocator> > : public TrueType {}; 00231 } // namespace message_traits 00232 } // namespace ros 00233 00234 namespace ros 00235 { 00236 namespace serialization 00237 { 00238 00239 template<class ContainerAllocator> struct Serializer< ::dynamixel_msgs::MotorState_<ContainerAllocator> > 00240 { 00241 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m) 00242 { 00243 stream.next(m.timestamp); 00244 stream.next(m.id); 00245 stream.next(m.goal); 00246 stream.next(m.position); 00247 stream.next(m.error); 00248 stream.next(m.speed); 00249 stream.next(m.load); 00250 stream.next(m.voltage); 00251 stream.next(m.temperature); 00252 stream.next(m.moving); 00253 } 00254 00255 ROS_DECLARE_ALLINONE_SERIALIZER; 00256 }; // struct MotorState_ 00257 } // namespace serialization 00258 } // namespace ros 00259 00260 namespace ros 00261 { 00262 namespace message_operations 00263 { 00264 00265 template<class ContainerAllocator> 00266 struct Printer< ::dynamixel_msgs::MotorState_<ContainerAllocator> > 00267 { 00268 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::dynamixel_msgs::MotorState_<ContainerAllocator> & v) 00269 { 00270 s << indent << "timestamp: "; 00271 Printer<double>::stream(s, indent + " ", v.timestamp); 00272 s << indent << "id: "; 00273 Printer<int32_t>::stream(s, indent + " ", v.id); 00274 s << indent << "goal: "; 00275 Printer<int32_t>::stream(s, indent + " ", v.goal); 00276 s << indent << "position: "; 00277 Printer<int32_t>::stream(s, indent + " ", v.position); 00278 s << indent << "error: "; 00279 Printer<int32_t>::stream(s, indent + " ", v.error); 00280 s << indent << "speed: "; 00281 Printer<int32_t>::stream(s, indent + " ", v.speed); 00282 s << indent << "load: "; 00283 Printer<double>::stream(s, indent + " ", v.load); 00284 s << indent << "voltage: "; 00285 Printer<double>::stream(s, indent + " ", v.voltage); 00286 s << indent << "temperature: "; 00287 Printer<int32_t>::stream(s, indent + " ", v.temperature); 00288 s << indent << "moving: "; 00289 Printer<uint8_t>::stream(s, indent + " ", v.moving); 00290 } 00291 }; 00292 00293 00294 } // namespace message_operations 00295 } // namespace ros 00296 00297 #endif // DYNAMIXEL_MSGS_MESSAGE_MOTORSTATE_H 00298