00001
00002 #ifndef ETHERCAT_HARDWARE_MESSAGE_MOTORTRACESAMPLE_H
00003 #define ETHERCAT_HARDWARE_MESSAGE_MOTORTRACESAMPLE_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 ethercat_hardware
00019 {
00020 template <class ContainerAllocator>
00021 struct MotorTraceSample_ {
00022 typedef MotorTraceSample_<ContainerAllocator> Type;
00023
00024 MotorTraceSample_()
00025 : timestamp(0.0)
00026 , enabled(false)
00027 , supply_voltage(0.0)
00028 , measured_motor_voltage(0.0)
00029 , programmed_pwm(0.0)
00030 , executed_current(0.0)
00031 , measured_current(0.0)
00032 , velocity(0.0)
00033 , encoder_position(0.0)
00034 , encoder_error_count(0)
00035 , motor_voltage_error_limit(0.0)
00036 , filtered_motor_voltage_error(0.0)
00037 , filtered_abs_motor_voltage_error(0.0)
00038 , filtered_measured_voltage_error(0.0)
00039 , filtered_abs_measured_voltage_error(0.0)
00040 , filtered_current_error(0.0)
00041 , filtered_abs_current_error(0.0)
00042 {
00043 }
00044
00045 MotorTraceSample_(const ContainerAllocator& _alloc)
00046 : timestamp(0.0)
00047 , enabled(false)
00048 , supply_voltage(0.0)
00049 , measured_motor_voltage(0.0)
00050 , programmed_pwm(0.0)
00051 , executed_current(0.0)
00052 , measured_current(0.0)
00053 , velocity(0.0)
00054 , encoder_position(0.0)
00055 , encoder_error_count(0)
00056 , motor_voltage_error_limit(0.0)
00057 , filtered_motor_voltage_error(0.0)
00058 , filtered_abs_motor_voltage_error(0.0)
00059 , filtered_measured_voltage_error(0.0)
00060 , filtered_abs_measured_voltage_error(0.0)
00061 , filtered_current_error(0.0)
00062 , filtered_abs_current_error(0.0)
00063 {
00064 }
00065
00066 typedef double _timestamp_type;
00067 double timestamp;
00068
00069 typedef uint8_t _enabled_type;
00070 uint8_t enabled;
00071
00072 typedef double _supply_voltage_type;
00073 double supply_voltage;
00074
00075 typedef double _measured_motor_voltage_type;
00076 double measured_motor_voltage;
00077
00078 typedef double _programmed_pwm_type;
00079 double programmed_pwm;
00080
00081 typedef double _executed_current_type;
00082 double executed_current;
00083
00084 typedef double _measured_current_type;
00085 double measured_current;
00086
00087 typedef double _velocity_type;
00088 double velocity;
00089
00090 typedef double _encoder_position_type;
00091 double encoder_position;
00092
00093 typedef uint32_t _encoder_error_count_type;
00094 uint32_t encoder_error_count;
00095
00096 typedef double _motor_voltage_error_limit_type;
00097 double motor_voltage_error_limit;
00098
00099 typedef double _filtered_motor_voltage_error_type;
00100 double filtered_motor_voltage_error;
00101
00102 typedef double _filtered_abs_motor_voltage_error_type;
00103 double filtered_abs_motor_voltage_error;
00104
00105 typedef double _filtered_measured_voltage_error_type;
00106 double filtered_measured_voltage_error;
00107
00108 typedef double _filtered_abs_measured_voltage_error_type;
00109 double filtered_abs_measured_voltage_error;
00110
00111 typedef double _filtered_current_error_type;
00112 double filtered_current_error;
00113
00114 typedef double _filtered_abs_current_error_type;
00115 double filtered_abs_current_error;
00116
00117
00118 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > Ptr;
00119 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> const> ConstPtr;
00120 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00121 };
00122 typedef ::ethercat_hardware::MotorTraceSample_<std::allocator<void> > MotorTraceSample;
00123
00124 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample> MotorTraceSamplePtr;
00125 typedef boost::shared_ptr< ::ethercat_hardware::MotorTraceSample const> MotorTraceSampleConstPtr;
00126
00127
00128 template<typename ContainerAllocator>
00129 std::ostream& operator<<(std::ostream& s, const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> & v)
00130 {
00131 ros::message_operations::Printer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >::stream(s, "", v);
00132 return s;}
00133
00134 }
00135
00136 namespace ros
00137 {
00138 namespace message_traits
00139 {
00140 template<class ContainerAllocator> struct IsMessage< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > : public TrueType {};
00141 template<class ContainerAllocator> struct IsMessage< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> const> : public TrueType {};
00142 template<class ContainerAllocator>
00143 struct MD5Sum< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > {
00144 static const char* value()
00145 {
00146 return "3734a66334bc2033448f9c561d39c5e0";
00147 }
00148
00149 static const char* value(const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> &) { return value(); }
00150 static const uint64_t static_value1 = 0x3734a66334bc2033ULL;
00151 static const uint64_t static_value2 = 0x448f9c561d39c5e0ULL;
00152 };
00153
00154 template<class ContainerAllocator>
00155 struct DataType< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > {
00156 static const char* value()
00157 {
00158 return "ethercat_hardware/MotorTraceSample";
00159 }
00160
00161 static const char* value(const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> &) { return value(); }
00162 };
00163
00164 template<class ContainerAllocator>
00165 struct Definition< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > {
00166 static const char* value()
00167 {
00168 return "float64 timestamp\n\
00169 bool enabled\n\
00170 float64 supply_voltage\n\
00171 float64 measured_motor_voltage\n\
00172 float64 programmed_pwm\n\
00173 float64 executed_current\n\
00174 float64 measured_current\n\
00175 float64 velocity\n\
00176 float64 encoder_position\n\
00177 uint32 encoder_error_count\n\
00178 float64 motor_voltage_error_limit\n\
00179 float64 filtered_motor_voltage_error\n\
00180 float64 filtered_abs_motor_voltage_error\n\
00181 float64 filtered_measured_voltage_error\n\
00182 float64 filtered_abs_measured_voltage_error\n\
00183 float64 filtered_current_error\n\
00184 float64 filtered_abs_current_error\n\
00185 ";
00186 }
00187
00188 static const char* value(const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> &) { return value(); }
00189 };
00190
00191 template<class ContainerAllocator> struct IsFixedSize< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> > : public TrueType {};
00192 }
00193 }
00194
00195 namespace ros
00196 {
00197 namespace serialization
00198 {
00199
00200 template<class ContainerAllocator> struct Serializer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >
00201 {
00202 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00203 {
00204 stream.next(m.timestamp);
00205 stream.next(m.enabled);
00206 stream.next(m.supply_voltage);
00207 stream.next(m.measured_motor_voltage);
00208 stream.next(m.programmed_pwm);
00209 stream.next(m.executed_current);
00210 stream.next(m.measured_current);
00211 stream.next(m.velocity);
00212 stream.next(m.encoder_position);
00213 stream.next(m.encoder_error_count);
00214 stream.next(m.motor_voltage_error_limit);
00215 stream.next(m.filtered_motor_voltage_error);
00216 stream.next(m.filtered_abs_motor_voltage_error);
00217 stream.next(m.filtered_measured_voltage_error);
00218 stream.next(m.filtered_abs_measured_voltage_error);
00219 stream.next(m.filtered_current_error);
00220 stream.next(m.filtered_abs_current_error);
00221 }
00222
00223 ROS_DECLARE_ALLINONE_SERIALIZER;
00224 };
00225 }
00226 }
00227
00228 namespace ros
00229 {
00230 namespace message_operations
00231 {
00232
00233 template<class ContainerAllocator>
00234 struct Printer< ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> >
00235 {
00236 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::ethercat_hardware::MotorTraceSample_<ContainerAllocator> & v)
00237 {
00238 s << indent << "timestamp: ";
00239 Printer<double>::stream(s, indent + " ", v.timestamp);
00240 s << indent << "enabled: ";
00241 Printer<uint8_t>::stream(s, indent + " ", v.enabled);
00242 s << indent << "supply_voltage: ";
00243 Printer<double>::stream(s, indent + " ", v.supply_voltage);
00244 s << indent << "measured_motor_voltage: ";
00245 Printer<double>::stream(s, indent + " ", v.measured_motor_voltage);
00246 s << indent << "programmed_pwm: ";
00247 Printer<double>::stream(s, indent + " ", v.programmed_pwm);
00248 s << indent << "executed_current: ";
00249 Printer<double>::stream(s, indent + " ", v.executed_current);
00250 s << indent << "measured_current: ";
00251 Printer<double>::stream(s, indent + " ", v.measured_current);
00252 s << indent << "velocity: ";
00253 Printer<double>::stream(s, indent + " ", v.velocity);
00254 s << indent << "encoder_position: ";
00255 Printer<double>::stream(s, indent + " ", v.encoder_position);
00256 s << indent << "encoder_error_count: ";
00257 Printer<uint32_t>::stream(s, indent + " ", v.encoder_error_count);
00258 s << indent << "motor_voltage_error_limit: ";
00259 Printer<double>::stream(s, indent + " ", v.motor_voltage_error_limit);
00260 s << indent << "filtered_motor_voltage_error: ";
00261 Printer<double>::stream(s, indent + " ", v.filtered_motor_voltage_error);
00262 s << indent << "filtered_abs_motor_voltage_error: ";
00263 Printer<double>::stream(s, indent + " ", v.filtered_abs_motor_voltage_error);
00264 s << indent << "filtered_measured_voltage_error: ";
00265 Printer<double>::stream(s, indent + " ", v.filtered_measured_voltage_error);
00266 s << indent << "filtered_abs_measured_voltage_error: ";
00267 Printer<double>::stream(s, indent + " ", v.filtered_abs_measured_voltage_error);
00268 s << indent << "filtered_current_error: ";
00269 Printer<double>::stream(s, indent + " ", v.filtered_current_error);
00270 s << indent << "filtered_abs_current_error: ";
00271 Printer<double>::stream(s, indent + " ", v.filtered_abs_current_error);
00272 }
00273 };
00274
00275
00276 }
00277 }
00278
00279 #endif // ETHERCAT_HARDWARE_MESSAGE_MOTORTRACESAMPLE_H
00280