00001
00002 #ifndef ETHERCAT_HARDWARE_MESSAGE_MOTORTRACESAMPLE_H
00003 #define ETHERCAT_HARDWARE_MESSAGE_MOTORTRACESAMPLE_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 MotorTraceSample_ : public ros::Message
00018 {
00019 typedef MotorTraceSample_<ContainerAllocator> Type;
00020
00021 MotorTraceSample_()
00022 : timestamp(0.0)
00023 , enabled(false)
00024 , supply_voltage(0.0)
00025 , measured_motor_voltage(0.0)
00026 , programmed_pwm(0.0)
00027 , executed_current(0.0)
00028 , measured_current(0.0)
00029 , velocity(0.0)
00030 , encoder_position(0.0)
00031 , encoder_error_count(0)
00032 , motor_voltage_error_limit(0.0)
00033 , filtered_motor_voltage_error(0.0)
00034 , filtered_abs_motor_voltage_error(0.0)
00035 , filtered_measured_voltage_error(0.0)
00036 , filtered_abs_measured_voltage_error(0.0)
00037 , filtered_current_error(0.0)
00038 , filtered_abs_current_error(0.0)
00039 {
00040 }
00041
00042 MotorTraceSample_(const ContainerAllocator& _alloc)
00043 : timestamp(0.0)
00044 , enabled(false)
00045 , supply_voltage(0.0)
00046 , measured_motor_voltage(0.0)
00047 , programmed_pwm(0.0)
00048 , executed_current(0.0)
00049 , measured_current(0.0)
00050 , velocity(0.0)
00051 , encoder_position(0.0)
00052 , encoder_error_count(0)
00053 , motor_voltage_error_limit(0.0)
00054 , filtered_motor_voltage_error(0.0)
00055 , filtered_abs_motor_voltage_error(0.0)
00056 , filtered_measured_voltage_error(0.0)
00057 , filtered_abs_measured_voltage_error(0.0)
00058 , filtered_current_error(0.0)
00059 , filtered_abs_current_error(0.0)
00060 {
00061 }
00062
00063 typedef double _timestamp_type;
00064 double timestamp;
00065
00066 typedef uint8_t _enabled_type;
00067 uint8_t enabled;
00068
00069 typedef double _supply_voltage_type;
00070 double supply_voltage;
00071
00072 typedef double _measured_motor_voltage_type;
00073 double measured_motor_voltage;
00074
00075 typedef double _programmed_pwm_type;
00076 double programmed_pwm;
00077
00078 typedef double _executed_current_type;
00079 double executed_current;
00080
00081 typedef double _measured_current_type;
00082 double measured_current;
00083
00084 typedef double _velocity_type;
00085 double velocity;
00086
00087 typedef double _encoder_position_type;
00088 double encoder_position;
00089
00090 typedef uint32_t _encoder_error_count_type;
00091 uint32_t encoder_error_count;
00092
00093 typedef double _motor_voltage_error_limit_type;
00094 double motor_voltage_error_limit;
00095
00096 typedef double _filtered_motor_voltage_error_type;
00097 double filtered_motor_voltage_error;
00098
00099 typedef double _filtered_abs_motor_voltage_error_type;
00100 double filtered_abs_motor_voltage_error;
00101
00102 typedef double _filtered_measured_voltage_error_type;
00103 double filtered_measured_voltage_error;
00104
00105 typedef double _filtered_abs_measured_voltage_error_type;
00106 double filtered_abs_measured_voltage_error;
00107
00108 typedef double _filtered_current_error_type;
00109 double filtered_current_error;
00110
00111 typedef double _filtered_abs_current_error_type;
00112 double filtered_abs_current_error;
00113
00114
00115 private:
00116 static const char* __s_getDataType_() { return "ethercat_hardware/MotorTraceSample"; }
00117 public:
00118 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00119
00120 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00121
00122 private:
00123 static const char* __s_getMD5Sum_() { return "3734a66334bc2033448f9c561d39c5e0"; }
00124 public:
00125 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00126
00127 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00128
00129 private:
00130 static const char* __s_getMessageDefinition_() { return "float64 timestamp\n\
00131 bool enabled\n\
00132 float64 supply_voltage\n\
00133 float64 measured_motor_voltage\n\
00134 float64 programmed_pwm\n\
00135 float64 executed_current\n\
00136 float64 measured_current\n\
00137 float64 velocity\n\
00138 float64 encoder_position\n\
00139 uint32 encoder_error_count\n\
00140 float64 motor_voltage_error_limit\n\
00141 float64 filtered_motor_voltage_error\n\
00142 float64 filtered_abs_motor_voltage_error\n\
00143 float64 filtered_measured_voltage_error\n\
00144 float64 filtered_abs_measured_voltage_error\n\
00145 float64 filtered_current_error\n\
00146 float64 filtered_abs_current_error\n\
00147 "; }
00148 public:
00149 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00150
00151 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00152
00153 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00154 {
00155 ros::serialization::OStream stream(write_ptr, 1000000000);
00156 ros::serialization::serialize(stream, timestamp);
00157 ros::serialization::serialize(stream, enabled);
00158 ros::serialization::serialize(stream, supply_voltage);
00159 ros::serialization::serialize(stream, measured_motor_voltage);
00160 ros::serialization::serialize(stream, programmed_pwm);
00161 ros::serialization::serialize(stream, executed_current);
00162 ros::serialization::serialize(stream, measured_current);
00163 ros::serialization::serialize(stream, velocity);
00164 ros::serialization::serialize(stream, encoder_position);
00165 ros::serialization::serialize(stream, encoder_error_count);
00166 ros::serialization::serialize(stream, motor_voltage_error_limit);
00167 ros::serialization::serialize(stream, filtered_motor_voltage_error);
00168 ros::serialization::serialize(stream, filtered_abs_motor_voltage_error);
00169 ros::serialization::serialize(stream, filtered_measured_voltage_error);
00170 ros::serialization::serialize(stream, filtered_abs_measured_voltage_error);
00171 ros::serialization::serialize(stream, filtered_current_error);
00172 ros::serialization::serialize(stream, filtered_abs_current_error);
00173 return stream.getData();
00174 }
00175
00176 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00177 {
00178 ros::serialization::IStream stream(read_ptr, 1000000000);
00179 ros::serialization::deserialize(stream, timestamp);
00180 ros::serialization::deserialize(stream, enabled);
00181 ros::serialization::deserialize(stream, supply_voltage);
00182 ros::serialization::deserialize(stream, measured_motor_voltage);
00183 ros::serialization::deserialize(stream, programmed_pwm);
00184 ros::serialization::deserialize(stream, executed_current);
00185 ros::serialization::deserialize(stream, measured_current);
00186 ros::serialization::deserialize(stream, velocity);
00187 ros::serialization::deserialize(stream, encoder_position);
00188 ros::serialization::deserialize(stream, encoder_error_count);
00189 ros::serialization::deserialize(stream, motor_voltage_error_limit);
00190 ros::serialization::deserialize(stream, filtered_motor_voltage_error);
00191 ros::serialization::deserialize(stream, filtered_abs_motor_voltage_error);
00192 ros::serialization::deserialize(stream, filtered_measured_voltage_error);
00193 ros::serialization::deserialize(stream, filtered_abs_measured_voltage_error);
00194 ros::serialization::deserialize(stream, filtered_current_error);
00195 ros::serialization::deserialize(stream, filtered_abs_current_error);
00196 return stream.getData();
00197 }
00198
00199 ROS_DEPRECATED virtual uint32_t serializationLength() const
00200 {
00201 uint32_t size = 0;
00202 size += ros::serialization::serializationLength(timestamp);
00203 size += ros::serialization::serializationLength(enabled);
00204 size += ros::serialization::serializationLength(supply_voltage);
00205 size += ros::serialization::serializationLength(measured_motor_voltage);
00206 size += ros::serialization::serializationLength(programmed_pwm);
00207 size += ros::serialization::serializationLength(executed_current);
00208 size += ros::serialization::serializationLength(measured_current);
00209 size += ros::serialization::serializationLength(velocity);
00210 size += ros::serialization::serializationLength(encoder_position);
00211 size += ros::serialization::serializationLength(encoder_error_count);
00212 size += ros::serialization::serializationLength(motor_voltage_error_limit);
00213 size += ros::serialization::serializationLength(filtered_motor_voltage_error);
00214 size += ros::serialization::serializationLength(filtered_abs_motor_voltage_error);
00215 size += ros::serialization::serializationLength(filtered_measured_voltage_error);
00216 size += ros::serialization::serializationLength(filtered_abs_measured_voltage_error);
00217 size += ros::serialization::serializationLength(filtered_current_error);
00218 size += ros::serialization::serializationLength(filtered_abs_current_error);
00219 return size;
00220 }
00221
00222 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > Ptr;
00223 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> const> ConstPtr;
00224 };
00225 typedef ::ethercat_hardware::MotorTraceSample_<std::allocator<void> > MotorTraceSample;
00226
00227 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample> MotorTraceSamplePtr;
00228 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample const> MotorTraceSampleConstPtr;
00229
00230
00231 template<typename ContainerAllocator>
00232 std::ostream& operator<<(std::ostream& s, const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> & v)
00233 {
00234 ros::message_operations::Printer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::stream(s, "", v);
00235 return s;}
00236
00237 }
00238
00239 namespace ros
00240 {
00241 namespace message_traits
00242 {
00243 template<class ContainerAllocator>
00244 struct MD5Sum< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > {
00245 static const char* value()
00246 {
00247 return "3734a66334bc2033448f9c561d39c5e0";
00248 }
00249
00250 static const char* value(const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> &) { return value(); }
00251 static const uint64_t static_value1 = 0x3734a66334bc2033ULL;
00252 static const uint64_t static_value2 = 0x448f9c561d39c5e0ULL;
00253 };
00254
00255 template<class ContainerAllocator>
00256 struct DataType< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > {
00257 static const char* value()
00258 {
00259 return "ethercat_hardware/MotorTraceSample";
00260 }
00261
00262 static const char* value(const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> &) { return value(); }
00263 };
00264
00265 template<class ContainerAllocator>
00266 struct Definition< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > {
00267 static const char* value()
00268 {
00269 return "float64 timestamp\n\
00270 bool enabled\n\
00271 float64 supply_voltage\n\
00272 float64 measured_motor_voltage\n\
00273 float64 programmed_pwm\n\
00274 float64 executed_current\n\
00275 float64 measured_current\n\
00276 float64 velocity\n\
00277 float64 encoder_position\n\
00278 uint32 encoder_error_count\n\
00279 float64 motor_voltage_error_limit\n\
00280 float64 filtered_motor_voltage_error\n\
00281 float64 filtered_abs_motor_voltage_error\n\
00282 float64 filtered_measured_voltage_error\n\
00283 float64 filtered_abs_measured_voltage_error\n\
00284 float64 filtered_current_error\n\
00285 float64 filtered_abs_current_error\n\
00286 ";
00287 }
00288
00289 static const char* value(const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> &) { return value(); }
00290 };
00291
00292 template<class ContainerAllocator> struct IsFixedSize< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > : public TrueType {};
00293 }
00294 }
00295
00296 namespace ros
00297 {
00298 namespace serialization
00299 {
00300
00301 template<class ContainerAllocator> struct Serializer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >
00302 {
00303 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00304 {
00305 stream.next(m.timestamp);
00306 stream.next(m.enabled);
00307 stream.next(m.supply_voltage);
00308 stream.next(m.measured_motor_voltage);
00309 stream.next(m.programmed_pwm);
00310 stream.next(m.executed_current);
00311 stream.next(m.measured_current);
00312 stream.next(m.velocity);
00313 stream.next(m.encoder_position);
00314 stream.next(m.encoder_error_count);
00315 stream.next(m.motor_voltage_error_limit);
00316 stream.next(m.filtered_motor_voltage_error);
00317 stream.next(m.filtered_abs_motor_voltage_error);
00318 stream.next(m.filtered_measured_voltage_error);
00319 stream.next(m.filtered_abs_measured_voltage_error);
00320 stream.next(m.filtered_current_error);
00321 stream.next(m.filtered_abs_current_error);
00322 }
00323
00324 ROS_DECLARE_ALLINONE_SERIALIZER;
00325 };
00326 }
00327 }
00328
00329 namespace ros
00330 {
00331 namespace message_operations
00332 {
00333
00334 template<class ContainerAllocator>
00335 struct Printer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >
00336 {
00337 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> & v)
00338 {
00339 s << indent << "timestamp: ";
00340 Printer<double>::stream(s, indent + " ", v.timestamp);
00341 s << indent << "enabled: ";
00342 Printer<uint8_t>::stream(s, indent + " ", v.enabled);
00343 s << indent << "supply_voltage: ";
00344 Printer<double>::stream(s, indent + " ", v.supply_voltage);
00345 s << indent << "measured_motor_voltage: ";
00346 Printer<double>::stream(s, indent + " ", v.measured_motor_voltage);
00347 s << indent << "programmed_pwm: ";
00348 Printer<double>::stream(s, indent + " ", v.programmed_pwm);
00349 s << indent << "executed_current: ";
00350 Printer<double>::stream(s, indent + " ", v.executed_current);
00351 s << indent << "measured_current: ";
00352 Printer<double>::stream(s, indent + " ", v.measured_current);
00353 s << indent << "velocity: ";
00354 Printer<double>::stream(s, indent + " ", v.velocity);
00355 s << indent << "encoder_position: ";
00356 Printer<double>::stream(s, indent + " ", v.encoder_position);
00357 s << indent << "encoder_error_count: ";
00358 Printer<uint32_t>::stream(s, indent + " ", v.encoder_error_count);
00359 s << indent << "motor_voltage_error_limit: ";
00360 Printer<double>::stream(s, indent + " ", v.motor_voltage_error_limit);
00361 s << indent << "filtered_motor_voltage_error: ";
00362 Printer<double>::stream(s, indent + " ", v.filtered_motor_voltage_error);
00363 s << indent << "filtered_abs_motor_voltage_error: ";
00364 Printer<double>::stream(s, indent + " ", v.filtered_abs_motor_voltage_error);
00365 s << indent << "filtered_measured_voltage_error: ";
00366 Printer<double>::stream(s, indent + " ", v.filtered_measured_voltage_error);
00367 s << indent << "filtered_abs_measured_voltage_error: ";
00368 Printer<double>::stream(s, indent + " ", v.filtered_abs_measured_voltage_error);
00369 s << indent << "filtered_current_error: ";
00370 Printer<double>::stream(s, indent + " ", v.filtered_current_error);
00371 s << indent << "filtered_abs_current_error: ";
00372 Printer<double>::stream(s, indent + " ", v.filtered_abs_current_error);
00373 }
00374 };
00375
00376
00377 }
00378 }
00379
00380 #endif // ETHERCAT_HARDWARE_MESSAGE_MOTORTRACESAMPLE_H
00381