00001
00002 #ifndef ETHERCAT_HARDWARE_MESSAGE_ACTUATORINFO_H
00003 #define ETHERCAT_HARDWARE_MESSAGE_ACTUATORINFO_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
00014 namespace ethercat_hardware
00015 {
00016 template <class ContainerAllocator>
00017 struct ActuatorInfo_ : public ros::Message
00018 {
00019 typedef ActuatorInfo_<ContainerAllocator> Type;
00020
00021 ActuatorInfo_()
00022 : id(0)
00023 , name()
00024 , robot_name()
00025 , motor_make()
00026 , motor_model()
00027 , max_current(0.0)
00028 , speed_constant(0.0)
00029 , motor_resistance(0.0)
00030 , motor_torque_constant(0.0)
00031 , encoder_reduction(0.0)
00032 , pulses_per_revolution(0.0)
00033 {
00034 }
00035
00036 ActuatorInfo_(const ContainerAllocator& _alloc)
00037 : id(0)
00038 , name(_alloc)
00039 , robot_name(_alloc)
00040 , motor_make(_alloc)
00041 , motor_model(_alloc)
00042 , max_current(0.0)
00043 , speed_constant(0.0)
00044 , motor_resistance(0.0)
00045 , motor_torque_constant(0.0)
00046 , encoder_reduction(0.0)
00047 , pulses_per_revolution(0.0)
00048 {
00049 }
00050
00051 typedef uint32_t _id_type;
00052 uint32_t id;
00053
00054 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _name_type;
00055 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > name;
00056
00057 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _robot_name_type;
00058 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > robot_name;
00059
00060 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _motor_make_type;
00061 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > motor_make;
00062
00063 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _motor_model_type;
00064 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > motor_model;
00065
00066 typedef double _max_current_type;
00067 double max_current;
00068
00069 typedef double _speed_constant_type;
00070 double speed_constant;
00071
00072 typedef double _motor_resistance_type;
00073 double motor_resistance;
00074
00075 typedef double _motor_torque_constant_type;
00076 double motor_torque_constant;
00077
00078 typedef double _encoder_reduction_type;
00079 double encoder_reduction;
00080
00081 typedef double _pulses_per_revolution_type;
00082 double pulses_per_revolution;
00083
00084
00085 private:
00086 static const char* __s_getDataType_() { return "ethercat_hardware/ActuatorInfo"; }
00087 public:
00088 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00089
00090 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00091
00092 private:
00093 static const char* __s_getMD5Sum_() { return "40f44d8ec4380adc0b63713486eecb09"; }
00094 public:
00095 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00096
00097 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00098
00099 private:
00100 static const char* __s_getMessageDefinition_() { return "uint32 id\n\
00101 string name\n\
00102 string robot_name\n\
00103 string motor_make\n\
00104 string motor_model\n\
00105 float64 max_current\n\
00106 float64 speed_constant\n\
00107 float64 motor_resistance\n\
00108 float64 motor_torque_constant\n\
00109 float64 encoder_reduction\n\
00110 float64 pulses_per_revolution\n\
00111 "; }
00112 public:
00113 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00114
00115 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00116
00117 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00118 {
00119 ros::serialization::OStream stream(write_ptr, 1000000000);
00120 ros::serialization::serialize(stream, id);
00121 ros::serialization::serialize(stream, name);
00122 ros::serialization::serialize(stream, robot_name);
00123 ros::serialization::serialize(stream, motor_make);
00124 ros::serialization::serialize(stream, motor_model);
00125 ros::serialization::serialize(stream, max_current);
00126 ros::serialization::serialize(stream, speed_constant);
00127 ros::serialization::serialize(stream, motor_resistance);
00128 ros::serialization::serialize(stream, motor_torque_constant);
00129 ros::serialization::serialize(stream, encoder_reduction);
00130 ros::serialization::serialize(stream, pulses_per_revolution);
00131 return stream.getData();
00132 }
00133
00134 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00135 {
00136 ros::serialization::IStream stream(read_ptr, 1000000000);
00137 ros::serialization::deserialize(stream, id);
00138 ros::serialization::deserialize(stream, name);
00139 ros::serialization::deserialize(stream, robot_name);
00140 ros::serialization::deserialize(stream, motor_make);
00141 ros::serialization::deserialize(stream, motor_model);
00142 ros::serialization::deserialize(stream, max_current);
00143 ros::serialization::deserialize(stream, speed_constant);
00144 ros::serialization::deserialize(stream, motor_resistance);
00145 ros::serialization::deserialize(stream, motor_torque_constant);
00146 ros::serialization::deserialize(stream, encoder_reduction);
00147 ros::serialization::deserialize(stream, pulses_per_revolution);
00148 return stream.getData();
00149 }
00150
00151 ROS_DEPRECATED virtual uint32_t serializationLength() const
00152 {
00153 uint32_t size = 0;
00154 size += ros::serialization::serializationLength(id);
00155 size += ros::serialization::serializationLength(name);
00156 size += ros::serialization::serializationLength(robot_name);
00157 size += ros::serialization::serializationLength(motor_make);
00158 size += ros::serialization::serializationLength(motor_model);
00159 size += ros::serialization::serializationLength(max_current);
00160 size += ros::serialization::serializationLength(speed_constant);
00161 size += ros::serialization::serializationLength(motor_resistance);
00162 size += ros::serialization::serializationLength(motor_torque_constant);
00163 size += ros::serialization::serializationLength(encoder_reduction);
00164 size += ros::serialization::serializationLength(pulses_per_revolution);
00165 return size;
00166 }
00167
00168 typedef boost::shared_ptr< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> > Ptr;
00169 typedef boost::shared_ptr< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> const> ConstPtr;
00170 };
00171 typedef ::ethercat_hardware::ActuatorInfo_<std::allocator<void> > ActuatorInfo;
00172
00173 typedef boost::shared_ptr< ::ethercat_hardware::ActuatorInfo> ActuatorInfoPtr;
00174 typedef boost::shared_ptr< ::ethercat_hardware::ActuatorInfo const> ActuatorInfoConstPtr;
00175
00176
00177 template<typename ContainerAllocator>
00178 std::ostream& operator<<(std::ostream& s, const ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> & v)
00179 {
00180 ros::message_operations::Printer< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> >::stream(s, "", v);
00181 return s;}
00182
00183 }
00184
00185 namespace ros
00186 {
00187 namespace message_traits
00188 {
00189 template<class ContainerAllocator>
00190 struct MD5Sum< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> > {
00191 static const char* value()
00192 {
00193 return "40f44d8ec4380adc0b63713486eecb09";
00194 }
00195
00196 static const char* value(const ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> &) { return value(); }
00197 static const uint64_t static_value1 = 0x40f44d8ec4380adcULL;
00198 static const uint64_t static_value2 = 0x0b63713486eecb09ULL;
00199 };
00200
00201 template<class ContainerAllocator>
00202 struct DataType< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> > {
00203 static const char* value()
00204 {
00205 return "ethercat_hardware/ActuatorInfo";
00206 }
00207
00208 static const char* value(const ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> &) { return value(); }
00209 };
00210
00211 template<class ContainerAllocator>
00212 struct Definition< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> > {
00213 static const char* value()
00214 {
00215 return "uint32 id\n\
00216 string name\n\
00217 string robot_name\n\
00218 string motor_make\n\
00219 string motor_model\n\
00220 float64 max_current\n\
00221 float64 speed_constant\n\
00222 float64 motor_resistance\n\
00223 float64 motor_torque_constant\n\
00224 float64 encoder_reduction\n\
00225 float64 pulses_per_revolution\n\
00226 ";
00227 }
00228
00229 static const char* value(const ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> &) { return value(); }
00230 };
00231
00232 }
00233 }
00234
00235 namespace ros
00236 {
00237 namespace serialization
00238 {
00239
00240 template<class ContainerAllocator> struct Serializer< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> >
00241 {
00242 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00243 {
00244 stream.next(m.id);
00245 stream.next(m.name);
00246 stream.next(m.robot_name);
00247 stream.next(m.motor_make);
00248 stream.next(m.motor_model);
00249 stream.next(m.max_current);
00250 stream.next(m.speed_constant);
00251 stream.next(m.motor_resistance);
00252 stream.next(m.motor_torque_constant);
00253 stream.next(m.encoder_reduction);
00254 stream.next(m.pulses_per_revolution);
00255 }
00256
00257 ROS_DECLARE_ALLINONE_SERIALIZER;
00258 };
00259 }
00260 }
00261
00262 namespace ros
00263 {
00264 namespace message_operations
00265 {
00266
00267 template<class ContainerAllocator>
00268 struct Printer< ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> >
00269 {
00270 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ethercat_hardware::ActuatorInfo_<ContainerAllocator> & v)
00271 {
00272 s << indent << "id: ";
00273 Printer<uint32_t>::stream(s, indent + " ", v.id);
00274 s << indent << "name: ";
00275 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.name);
00276 s << indent << "robot_name: ";
00277 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.robot_name);
00278 s << indent << "motor_make: ";
00279 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.motor_make);
00280 s << indent << "motor_model: ";
00281 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.motor_model);
00282 s << indent << "max_current: ";
00283 Printer<double>::stream(s, indent + " ", v.max_current);
00284 s << indent << "speed_constant: ";
00285 Printer<double>::stream(s, indent + " ", v.speed_constant);
00286 s << indent << "motor_resistance: ";
00287 Printer<double>::stream(s, indent + " ", v.motor_resistance);
00288 s << indent << "motor_torque_constant: ";
00289 Printer<double>::stream(s, indent + " ", v.motor_torque_constant);
00290 s << indent << "encoder_reduction: ";
00291 Printer<double>::stream(s, indent + " ", v.encoder_reduction);
00292 s << indent << "pulses_per_revolution: ";
00293 Printer<double>::stream(s, indent + " ", v.pulses_per_revolution);
00294 }
00295 };
00296
00297
00298 }
00299 }
00300
00301 #endif // ETHERCAT_HARDWARE_MESSAGE_ACTUATORINFO_H
00302