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