00001
00002 #ifndef SR_ROBOT_MSGS_MESSAGE_ETHERCATDEBUG_H
00003 #define SR_ROBOT_MSGS_MESSAGE_ETHERCATDEBUG_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 #include "std_msgs/Header.h"
00018 #include "sr_robot_msgs/FromMotorDataType.h"
00019
00020 namespace sr_robot_msgs
00021 {
00022 template <class ContainerAllocator>
00023 struct EthercatDebug_ {
00024 typedef EthercatDebug_<ContainerAllocator> Type;
00025
00026 EthercatDebug_()
00027 : header()
00028 , sensors()
00029 , motor_data_type()
00030 , which_motors(0)
00031 , which_motor_data_arrived(0)
00032 , which_motor_data_had_errors(0)
00033 , motor_data_packet_torque()
00034 , motor_data_packet_misc()
00035 , tactile_data_type(0)
00036 , tactile_data_valid(0)
00037 , tactile()
00038 , idle_time_us(0)
00039 {
00040 }
00041
00042 EthercatDebug_(const ContainerAllocator& _alloc)
00043 : header(_alloc)
00044 , sensors(_alloc)
00045 , motor_data_type(_alloc)
00046 , which_motors(0)
00047 , which_motor_data_arrived(0)
00048 , which_motor_data_had_errors(0)
00049 , motor_data_packet_torque(_alloc)
00050 , motor_data_packet_misc(_alloc)
00051 , tactile_data_type(0)
00052 , tactile_data_valid(0)
00053 , tactile(_alloc)
00054 , idle_time_us(0)
00055 {
00056 }
00057
00058 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00059 ::std_msgs::Header_<ContainerAllocator> header;
00060
00061 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _sensors_type;
00062 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > sensors;
00063
00064 typedef ::sr_robot_msgs::FromMotorDataType_<ContainerAllocator> _motor_data_type_type;
00065 ::sr_robot_msgs::FromMotorDataType_<ContainerAllocator> motor_data_type;
00066
00067 typedef int16_t _which_motors_type;
00068 int16_t which_motors;
00069
00070 typedef int32_t _which_motor_data_arrived_type;
00071 int32_t which_motor_data_arrived;
00072
00073 typedef int32_t _which_motor_data_had_errors_type;
00074 int32_t which_motor_data_had_errors;
00075
00076 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _motor_data_packet_torque_type;
00077 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > motor_data_packet_torque;
00078
00079 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _motor_data_packet_misc_type;
00080 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > motor_data_packet_misc;
00081
00082 typedef int32_t _tactile_data_type_type;
00083 int32_t tactile_data_type;
00084
00085 typedef int16_t _tactile_data_valid_type;
00086 int16_t tactile_data_valid;
00087
00088 typedef std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > _tactile_type;
00089 std::vector<int16_t, typename ContainerAllocator::template rebind<int16_t>::other > tactile;
00090
00091 typedef int16_t _idle_time_us_type;
00092 int16_t idle_time_us;
00093
00094
00095 typedef boost::shared_ptr< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > Ptr;
00096 typedef boost::shared_ptr< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> const> ConstPtr;
00097 boost::shared_ptr<std::map<std::string, std::string> > __connection_header;
00098 };
00099 typedef ::sr_robot_msgs::EthercatDebug_<std::allocator<void> > EthercatDebug;
00100
00101 typedef boost::shared_ptr< ::sr_robot_msgs::EthercatDebug> EthercatDebugPtr;
00102 typedef boost::shared_ptr< ::sr_robot_msgs::EthercatDebug const> EthercatDebugConstPtr;
00103
00104
00105 template<typename ContainerAllocator>
00106 std::ostream& operator<<(std::ostream& s, const ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> & v)
00107 {
00108 ros::message_operations::Printer< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> >::stream(s, "", v);
00109 return s;}
00110
00111 }
00112
00113 namespace ros
00114 {
00115 namespace message_traits
00116 {
00117 template<class ContainerAllocator> struct IsMessage< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > : public TrueType {};
00118 template<class ContainerAllocator> struct IsMessage< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> const> : public TrueType {};
00119 template<class ContainerAllocator>
00120 struct MD5Sum< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > {
00121 static const char* value()
00122 {
00123 return "ed9e30784a7d4571ecf4d526e7ff529f";
00124 }
00125
00126 static const char* value(const ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> &) { return value(); }
00127 static const uint64_t static_value1 = 0xed9e30784a7d4571ULL;
00128 static const uint64_t static_value2 = 0xecf4d526e7ff529fULL;
00129 };
00130
00131 template<class ContainerAllocator>
00132 struct DataType< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > {
00133 static const char* value()
00134 {
00135 return "sr_robot_msgs/EthercatDebug";
00136 }
00137
00138 static const char* value(const ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> &) { return value(); }
00139 };
00140
00141 template<class ContainerAllocator>
00142 struct Definition< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > {
00143 static const char* value()
00144 {
00145 return "Header header\n\
00146 \n\
00147 int16[] sensors\n\
00148 FromMotorDataType motor_data_type\n\
00149 int16 which_motors\n\
00150 int32 which_motor_data_arrived\n\
00151 int32 which_motor_data_had_errors\n\
00152 int16[] motor_data_packet_torque\n\
00153 int16[] motor_data_packet_misc\n\
00154 int32 tactile_data_type\n\
00155 int16 tactile_data_valid\n\
00156 int16[] tactile\n\
00157 int16 idle_time_us\n\
00158 \n\
00159 ================================================================================\n\
00160 MSG: std_msgs/Header\n\
00161 # Standard metadata for higher-level stamped data types.\n\
00162 # This is generally used to communicate timestamped data \n\
00163 # in a particular coordinate frame.\n\
00164 # \n\
00165 # sequence ID: consecutively increasing ID \n\
00166 uint32 seq\n\
00167 #Two-integer timestamp that is expressed as:\n\
00168 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00169 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00170 # time-handling sugar is provided by the client library\n\
00171 time stamp\n\
00172 #Frame this data is associated with\n\
00173 # 0: no frame\n\
00174 # 1: global frame\n\
00175 string frame_id\n\
00176 \n\
00177 ================================================================================\n\
00178 MSG: sr_robot_msgs/FromMotorDataType\n\
00179 int16 data\n\
00180 ";
00181 }
00182
00183 static const char* value(const ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> &) { return value(); }
00184 };
00185
00186 template<class ContainerAllocator> struct HasHeader< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > : public TrueType {};
00187 template<class ContainerAllocator> struct HasHeader< const ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> > : public TrueType {};
00188 }
00189 }
00190
00191 namespace ros
00192 {
00193 namespace serialization
00194 {
00195
00196 template<class ContainerAllocator> struct Serializer< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> >
00197 {
00198 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00199 {
00200 stream.next(m.header);
00201 stream.next(m.sensors);
00202 stream.next(m.motor_data_type);
00203 stream.next(m.which_motors);
00204 stream.next(m.which_motor_data_arrived);
00205 stream.next(m.which_motor_data_had_errors);
00206 stream.next(m.motor_data_packet_torque);
00207 stream.next(m.motor_data_packet_misc);
00208 stream.next(m.tactile_data_type);
00209 stream.next(m.tactile_data_valid);
00210 stream.next(m.tactile);
00211 stream.next(m.idle_time_us);
00212 }
00213
00214 ROS_DECLARE_ALLINONE_SERIALIZER;
00215 };
00216 }
00217 }
00218
00219 namespace ros
00220 {
00221 namespace message_operations
00222 {
00223
00224 template<class ContainerAllocator>
00225 struct Printer< ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> >
00226 {
00227 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sr_robot_msgs::EthercatDebug_<ContainerAllocator> & v)
00228 {
00229 s << indent << "header: ";
00230 s << std::endl;
00231 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00232 s << indent << "sensors[]" << std::endl;
00233 for (size_t i = 0; i < v.sensors.size(); ++i)
00234 {
00235 s << indent << " sensors[" << i << "]: ";
00236 Printer<int16_t>::stream(s, indent + " ", v.sensors[i]);
00237 }
00238 s << indent << "motor_data_type: ";
00239 s << std::endl;
00240 Printer< ::sr_robot_msgs::FromMotorDataType_<ContainerAllocator> >::stream(s, indent + " ", v.motor_data_type);
00241 s << indent << "which_motors: ";
00242 Printer<int16_t>::stream(s, indent + " ", v.which_motors);
00243 s << indent << "which_motor_data_arrived: ";
00244 Printer<int32_t>::stream(s, indent + " ", v.which_motor_data_arrived);
00245 s << indent << "which_motor_data_had_errors: ";
00246 Printer<int32_t>::stream(s, indent + " ", v.which_motor_data_had_errors);
00247 s << indent << "motor_data_packet_torque[]" << std::endl;
00248 for (size_t i = 0; i < v.motor_data_packet_torque.size(); ++i)
00249 {
00250 s << indent << " motor_data_packet_torque[" << i << "]: ";
00251 Printer<int16_t>::stream(s, indent + " ", v.motor_data_packet_torque[i]);
00252 }
00253 s << indent << "motor_data_packet_misc[]" << std::endl;
00254 for (size_t i = 0; i < v.motor_data_packet_misc.size(); ++i)
00255 {
00256 s << indent << " motor_data_packet_misc[" << i << "]: ";
00257 Printer<int16_t>::stream(s, indent + " ", v.motor_data_packet_misc[i]);
00258 }
00259 s << indent << "tactile_data_type: ";
00260 Printer<int32_t>::stream(s, indent + " ", v.tactile_data_type);
00261 s << indent << "tactile_data_valid: ";
00262 Printer<int16_t>::stream(s, indent + " ", v.tactile_data_valid);
00263 s << indent << "tactile[]" << std::endl;
00264 for (size_t i = 0; i < v.tactile.size(); ++i)
00265 {
00266 s << indent << " tactile[" << i << "]: ";
00267 Printer<int16_t>::stream(s, indent + " ", v.tactile[i]);
00268 }
00269 s << indent << "idle_time_us: ";
00270 Printer<int16_t>::stream(s, indent + " ", v.idle_time_us);
00271 }
00272 };
00273
00274
00275 }
00276 }
00277
00278 #endif // SR_ROBOT_MSGS_MESSAGE_ETHERCATDEBUG_H
00279