00001
00002 #ifndef DYNAMIXEL_MSGS_MESSAGE_MOTORSTATELIST_H
00003 #define DYNAMIXEL_MSGS_MESSAGE_MOTORSTATELIST_H
00004 #include <string>
00005 #include <vector>
00006 #include <ostream>
00007 #include "ros/serialization.h"
00008 #include "ros/builtin_message_traits.h"
00009 #include "ros/message_operations.h"
00010 #include "ros/message.h"
00011 #include "ros/time.h"
00012
00013 #include "dynamixel_msgs/MotorState.h"
00014
00015 namespace dynamixel_msgs
00016 {
00017 template <class ContainerAllocator>
00018 struct MotorStateList_ : public ros::Message
00019 {
00020 typedef MotorStateList_<ContainerAllocator> Type;
00021
00022 MotorStateList_()
00023 : motor_states()
00024 {
00025 }
00026
00027 MotorStateList_(const ContainerAllocator& _alloc)
00028 : motor_states(_alloc)
00029 {
00030 }
00031
00032 typedef std::vector< ::dynamixel_msgs::MotorState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::other > _motor_states_type;
00033 std::vector< ::dynamixel_msgs::MotorState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::other > motor_states;
00034
00035
00036 ROS_DEPRECATED uint32_t get_motor_states_size() const { return (uint32_t)motor_states.size(); }
00037 ROS_DEPRECATED void set_motor_states_size(uint32_t size) { motor_states.resize((size_t)size); }
00038 ROS_DEPRECATED void get_motor_states_vec(std::vector< ::dynamixel_msgs::MotorState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::other > & vec) const { vec = this->motor_states; }
00039 ROS_DEPRECATED void set_motor_states_vec(const std::vector< ::dynamixel_msgs::MotorState_<ContainerAllocator> , typename ContainerAllocator::template rebind< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::other > & vec) { this->motor_states = vec; }
00040 private:
00041 static const char* __s_getDataType_() { return "dynamixel_msgs/MotorStateList"; }
00042 public:
00043 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00044
00045 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00046
00047 private:
00048 static const char* __s_getMD5Sum_() { return "9e94ccf6563ca78afce19eb097f9343c"; }
00049 public:
00050 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00051
00052 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00053
00054 private:
00055 static const char* __s_getMessageDefinition_() { return "MotorState[] motor_states\n\
00056 \n\
00057 ================================================================================\n\
00058 MSG: dynamixel_msgs/MotorState\n\
00059 float64 timestamp # motor state is at this time\n\
00060 int32 id # motor id\n\
00061 int32 goal # commanded position (in encoder units)\n\
00062 int32 position # current position (in encoder units)\n\
00063 int32 error # difference between current and goal positions\n\
00064 int32 speed # current speed (0.111 rpm per unit)\n\
00065 float64 load # current load - ratio of applied torque over maximum torque\n\
00066 float64 voltage # current voltage (V)\n\
00067 int32 temperature # current temperature (degrees Celsius)\n\
00068 bool moving # whether the motor is currently in motion\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, motor_states);
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, motor_states);
00087 return stream.getData();
00088 }
00089
00090 ROS_DEPRECATED virtual uint32_t serializationLength() const
00091 {
00092 uint32_t size = 0;
00093 size += ros::serialization::serializationLength(motor_states);
00094 return size;
00095 }
00096
00097 typedef boost::shared_ptr< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> > Ptr;
00098 typedef boost::shared_ptr< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> const> ConstPtr;
00099 };
00100 typedef ::dynamixel_msgs::MotorStateList_<std::allocator<void> > MotorStateList;
00101
00102 typedef boost::shared_ptr< ::dynamixel_msgs::MotorStateList> MotorStateListPtr;
00103 typedef boost::shared_ptr< ::dynamixel_msgs::MotorStateList const> MotorStateListConstPtr;
00104
00105
00106 template<typename ContainerAllocator>
00107 std::ostream& operator<<(std::ostream& s, const ::dynamixel_msgs::MotorStateList_<ContainerAllocator> & v)
00108 {
00109 ros::message_operations::Printer< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> >::stream(s, "", v);
00110 return s;}
00111
00112 }
00113
00114 namespace ros
00115 {
00116 namespace message_traits
00117 {
00118 template<class ContainerAllocator>
00119 struct MD5Sum< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> > {
00120 static const char* value()
00121 {
00122 return "9e94ccf6563ca78afce19eb097f9343c";
00123 }
00124
00125 static const char* value(const ::dynamixel_msgs::MotorStateList_<ContainerAllocator> &) { return value(); }
00126 static const uint64_t static_value1 = 0x9e94ccf6563ca78aULL;
00127 static const uint64_t static_value2 = 0xfce19eb097f9343cULL;
00128 };
00129
00130 template<class ContainerAllocator>
00131 struct DataType< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> > {
00132 static const char* value()
00133 {
00134 return "dynamixel_msgs/MotorStateList";
00135 }
00136
00137 static const char* value(const ::dynamixel_msgs::MotorStateList_<ContainerAllocator> &) { return value(); }
00138 };
00139
00140 template<class ContainerAllocator>
00141 struct Definition< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> > {
00142 static const char* value()
00143 {
00144 return "MotorState[] motor_states\n\
00145 \n\
00146 ================================================================================\n\
00147 MSG: dynamixel_msgs/MotorState\n\
00148 float64 timestamp # motor state is at this time\n\
00149 int32 id # motor id\n\
00150 int32 goal # commanded position (in encoder units)\n\
00151 int32 position # current position (in encoder units)\n\
00152 int32 error # difference between current and goal positions\n\
00153 int32 speed # current speed (0.111 rpm per unit)\n\
00154 float64 load # current load - ratio of applied torque over maximum torque\n\
00155 float64 voltage # current voltage (V)\n\
00156 int32 temperature # current temperature (degrees Celsius)\n\
00157 bool moving # whether the motor is currently in motion\n\
00158 \n\
00159 ";
00160 }
00161
00162 static const char* value(const ::dynamixel_msgs::MotorStateList_<ContainerAllocator> &) { return value(); }
00163 };
00164
00165 }
00166 }
00167
00168 namespace ros
00169 {
00170 namespace serialization
00171 {
00172
00173 template<class ContainerAllocator> struct Serializer< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> >
00174 {
00175 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00176 {
00177 stream.next(m.motor_states);
00178 }
00179
00180 ROS_DECLARE_ALLINONE_SERIALIZER;
00181 };
00182 }
00183 }
00184
00185 namespace ros
00186 {
00187 namespace message_operations
00188 {
00189
00190 template<class ContainerAllocator>
00191 struct Printer< ::dynamixel_msgs::MotorStateList_<ContainerAllocator> >
00192 {
00193 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::dynamixel_msgs::MotorStateList_<ContainerAllocator> & v)
00194 {
00195 s << indent << "motor_states[]" << std::endl;
00196 for (size_t i = 0; i < v.motor_states.size(); ++i)
00197 {
00198 s << indent << " motor_states[" << i << "]: ";
00199 s << std::endl;
00200 s << indent;
00201 Printer< ::dynamixel_msgs::MotorState_<ContainerAllocator> >::stream(s, indent + " ", v.motor_states[i]);
00202 }
00203 }
00204 };
00205
00206
00207 }
00208 }
00209
00210 #endif // DYNAMIXEL_MSGS_MESSAGE_MOTORSTATELIST_H
00211