00001
00002 #ifndef SR_ROBOT_MSGS_MESSAGE_COMMAND_H
00003 #define SR_ROBOT_MSGS_MESSAGE_COMMAND_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 "sr_robot_msgs/sendupdate.h"
00014 #include "sr_robot_msgs/contrlr.h"
00015
00016 namespace sr_robot_msgs
00017 {
00018 template <class ContainerAllocator>
00019 struct command_ : public ros::Message
00020 {
00021 typedef command_<ContainerAllocator> Type;
00022
00023 command_()
00024 : command_type(0)
00025 , sendupdate_command()
00026 , contrlr_command()
00027 {
00028 }
00029
00030 command_(const ContainerAllocator& _alloc)
00031 : command_type(0)
00032 , sendupdate_command(_alloc)
00033 , contrlr_command(_alloc)
00034 {
00035 }
00036
00037 typedef int8_t _command_type_type;
00038 int8_t command_type;
00039
00040 typedef ::sr_robot_msgs::sendupdate_<ContainerAllocator> _sendupdate_command_type;
00041 ::sr_robot_msgs::sendupdate_<ContainerAllocator> sendupdate_command;
00042
00043 typedef ::sr_robot_msgs::contrlr_<ContainerAllocator> _contrlr_command_type;
00044 ::sr_robot_msgs::contrlr_<ContainerAllocator> contrlr_command;
00045
00046
00047 private:
00048 static const char* __s_getDataType_() { return "sr_robot_msgs/command"; }
00049 public:
00050 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00051
00052 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00053
00054 private:
00055 static const char* __s_getMD5Sum_() { return "fb5780bd888e4fbc42b3012bc46be2fa"; }
00056 public:
00057 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00058
00059 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00060
00061 private:
00062 static const char* __s_getMessageDefinition_() { return "# sendupdate is 1\n\
00063 # contrlr is 2\n\
00064 int8 command_type\n\
00065 \n\
00066 sendupdate sendupdate_command\n\
00067 contrlr contrlr_command\n\
00068 \n\
00069 ================================================================================\n\
00070 MSG: sr_robot_msgs/sendupdate\n\
00071 int8 sendupdate_length\n\
00072 joint[] sendupdate_list\n\
00073 \n\
00074 \n\
00075 ================================================================================\n\
00076 MSG: sr_robot_msgs/joint\n\
00077 string joint_name\n\
00078 float32 joint_position\n\
00079 float32 joint_target\n\
00080 float32 joint_torque\n\
00081 float32 joint_temperature\n\
00082 float32 joint_current \n\
00083 string error_flag\n\
00084 \n\
00085 ================================================================================\n\
00086 MSG: sr_robot_msgs/contrlr\n\
00087 # the contrlr name (e.g. smart_motor_ff2)\n\
00088 string contrlr_name\n\
00089 \n\
00090 # specify here a list of parameter_name:value\n\
00091 # e.g. p:10 sets the p value of the controller to 10\n\
00092 # the possible parameters are:\n\
00093 #int16 p\n\
00094 #int16 i\n\
00095 #int16 d\n\
00096 #int16 imax\n\
00097 #int16 target\n\
00098 #int16 sensor\n\
00099 #int16 valve \n\
00100 #int16 deadband\n\
00101 #int16 offset\n\
00102 #int16 shift\n\
00103 #int16 max\n\
00104 #\n\
00105 ## parameters for the motors\n\
00106 #int16 motor_maxforce\n\
00107 #int16 motor_safeforce\n\
00108 #int16 force_p\n\
00109 #int16 force_i\n\
00110 #int16 force_d\n\
00111 #int16 force_imax\n\
00112 #int16 force_out_shift\n\
00113 #int16 force_deadband\n\
00114 #int16 force_offset\n\
00115 #int16 sensor_imax\n\
00116 #int16 sensor_deadband\n\
00117 #int16 sensor_offset\n\
00118 #int16 max_temperature\n\
00119 #int16 max_current\n\
00120 \n\
00121 string[] list_of_parameters\n\
00122 \n\
00123 # the size of the list_of_parameters you are sending\n\
00124 uint8 length_of_list\n\
00125 \n\
00126 \n\
00127 \n\
00128 "; }
00129 public:
00130 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00131
00132 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00133
00134 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00135 {
00136 ros::serialization::OStream stream(write_ptr, 1000000000);
00137 ros::serialization::serialize(stream, command_type);
00138 ros::serialization::serialize(stream, sendupdate_command);
00139 ros::serialization::serialize(stream, contrlr_command);
00140 return stream.getData();
00141 }
00142
00143 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00144 {
00145 ros::serialization::IStream stream(read_ptr, 1000000000);
00146 ros::serialization::deserialize(stream, command_type);
00147 ros::serialization::deserialize(stream, sendupdate_command);
00148 ros::serialization::deserialize(stream, contrlr_command);
00149 return stream.getData();
00150 }
00151
00152 ROS_DEPRECATED virtual uint32_t serializationLength() const
00153 {
00154 uint32_t size = 0;
00155 size += ros::serialization::serializationLength(command_type);
00156 size += ros::serialization::serializationLength(sendupdate_command);
00157 size += ros::serialization::serializationLength(contrlr_command);
00158 return size;
00159 }
00160
00161 typedef boost::shared_ptr< ::sr_robot_msgs::command_<ContainerAllocator> > Ptr;
00162 typedef boost::shared_ptr< ::sr_robot_msgs::command_<ContainerAllocator> const> ConstPtr;
00163 };
00164 typedef ::sr_robot_msgs::command_<std::allocator<void> > command;
00165
00166 typedef boost::shared_ptr< ::sr_robot_msgs::command> commandPtr;
00167 typedef boost::shared_ptr< ::sr_robot_msgs::command const> commandConstPtr;
00168
00169
00170 template<typename ContainerAllocator>
00171 std::ostream& operator<<(std::ostream& s, const ::sr_robot_msgs::command_<ContainerAllocator> & v)
00172 {
00173 ros::message_operations::Printer< ::sr_robot_msgs::command_<ContainerAllocator> >::stream(s, "", v);
00174 return s;}
00175
00176 }
00177
00178 namespace ros
00179 {
00180 namespace message_traits
00181 {
00182 template<class ContainerAllocator>
00183 struct MD5Sum< ::sr_robot_msgs::command_<ContainerAllocator> > {
00184 static const char* value()
00185 {
00186 return "fb5780bd888e4fbc42b3012bc46be2fa";
00187 }
00188
00189 static const char* value(const ::sr_robot_msgs::command_<ContainerAllocator> &) { return value(); }
00190 static const uint64_t static_value1 = 0xfb5780bd888e4fbcULL;
00191 static const uint64_t static_value2 = 0x42b3012bc46be2faULL;
00192 };
00193
00194 template<class ContainerAllocator>
00195 struct DataType< ::sr_robot_msgs::command_<ContainerAllocator> > {
00196 static const char* value()
00197 {
00198 return "sr_robot_msgs/command";
00199 }
00200
00201 static const char* value(const ::sr_robot_msgs::command_<ContainerAllocator> &) { return value(); }
00202 };
00203
00204 template<class ContainerAllocator>
00205 struct Definition< ::sr_robot_msgs::command_<ContainerAllocator> > {
00206 static const char* value()
00207 {
00208 return "# sendupdate is 1\n\
00209 # contrlr is 2\n\
00210 int8 command_type\n\
00211 \n\
00212 sendupdate sendupdate_command\n\
00213 contrlr contrlr_command\n\
00214 \n\
00215 ================================================================================\n\
00216 MSG: sr_robot_msgs/sendupdate\n\
00217 int8 sendupdate_length\n\
00218 joint[] sendupdate_list\n\
00219 \n\
00220 \n\
00221 ================================================================================\n\
00222 MSG: sr_robot_msgs/joint\n\
00223 string joint_name\n\
00224 float32 joint_position\n\
00225 float32 joint_target\n\
00226 float32 joint_torque\n\
00227 float32 joint_temperature\n\
00228 float32 joint_current \n\
00229 string error_flag\n\
00230 \n\
00231 ================================================================================\n\
00232 MSG: sr_robot_msgs/contrlr\n\
00233 # the contrlr name (e.g. smart_motor_ff2)\n\
00234 string contrlr_name\n\
00235 \n\
00236 # specify here a list of parameter_name:value\n\
00237 # e.g. p:10 sets the p value of the controller to 10\n\
00238 # the possible parameters are:\n\
00239 #int16 p\n\
00240 #int16 i\n\
00241 #int16 d\n\
00242 #int16 imax\n\
00243 #int16 target\n\
00244 #int16 sensor\n\
00245 #int16 valve \n\
00246 #int16 deadband\n\
00247 #int16 offset\n\
00248 #int16 shift\n\
00249 #int16 max\n\
00250 #\n\
00251 ## parameters for the motors\n\
00252 #int16 motor_maxforce\n\
00253 #int16 motor_safeforce\n\
00254 #int16 force_p\n\
00255 #int16 force_i\n\
00256 #int16 force_d\n\
00257 #int16 force_imax\n\
00258 #int16 force_out_shift\n\
00259 #int16 force_deadband\n\
00260 #int16 force_offset\n\
00261 #int16 sensor_imax\n\
00262 #int16 sensor_deadband\n\
00263 #int16 sensor_offset\n\
00264 #int16 max_temperature\n\
00265 #int16 max_current\n\
00266 \n\
00267 string[] list_of_parameters\n\
00268 \n\
00269 # the size of the list_of_parameters you are sending\n\
00270 uint8 length_of_list\n\
00271 \n\
00272 \n\
00273 \n\
00274 ";
00275 }
00276
00277 static const char* value(const ::sr_robot_msgs::command_<ContainerAllocator> &) { return value(); }
00278 };
00279
00280 }
00281 }
00282
00283 namespace ros
00284 {
00285 namespace serialization
00286 {
00287
00288 template<class ContainerAllocator> struct Serializer< ::sr_robot_msgs::command_<ContainerAllocator> >
00289 {
00290 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00291 {
00292 stream.next(m.command_type);
00293 stream.next(m.sendupdate_command);
00294 stream.next(m.contrlr_command);
00295 }
00296
00297 ROS_DECLARE_ALLINONE_SERIALIZER;
00298 };
00299 }
00300 }
00301
00302 namespace ros
00303 {
00304 namespace message_operations
00305 {
00306
00307 template<class ContainerAllocator>
00308 struct Printer< ::sr_robot_msgs::command_<ContainerAllocator> >
00309 {
00310 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::sr_robot_msgs::command_<ContainerAllocator> & v)
00311 {
00312 s << indent << "command_type: ";
00313 Printer<int8_t>::stream(s, indent + " ", v.command_type);
00314 s << indent << "sendupdate_command: ";
00315 s << std::endl;
00316 Printer< ::sr_robot_msgs::sendupdate_<ContainerAllocator> >::stream(s, indent + " ", v.sendupdate_command);
00317 s << indent << "contrlr_command: ";
00318 s << std::endl;
00319 Printer< ::sr_robot_msgs::contrlr_<ContainerAllocator> >::stream(s, indent + " ", v.contrlr_command);
00320 }
00321 };
00322
00323
00324 }
00325 }
00326
00327 #endif // SR_ROBOT_MSGS_MESSAGE_COMMAND_H
00328