00001
00002 #ifndef COB_SCRIPT_SERVER_MESSAGE_SCRIPTSTATE_H
00003 #define COB_SCRIPT_SERVER_MESSAGE_SCRIPTSTATE_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 "std_msgs/Header.h"
00014
00015 namespace cob_script_server
00016 {
00017 template <class ContainerAllocator>
00018 struct ScriptState_ : public ros::Message
00019 {
00020 typedef ScriptState_<ContainerAllocator> Type;
00021
00022 ScriptState_()
00023 : header()
00024 , number(0)
00025 , function_name()
00026 , component_name()
00027 , parameter_name()
00028 , full_graph_name()
00029 , state(0)
00030 , error_code(0)
00031 {
00032 }
00033
00034 ScriptState_(const ContainerAllocator& _alloc)
00035 : header(_alloc)
00036 , number(0)
00037 , function_name(_alloc)
00038 , component_name(_alloc)
00039 , parameter_name(_alloc)
00040 , full_graph_name(_alloc)
00041 , state(0)
00042 , error_code(0)
00043 {
00044 }
00045
00046 typedef ::std_msgs::Header_<ContainerAllocator> _header_type;
00047 ::std_msgs::Header_<ContainerAllocator> header;
00048
00049 typedef int16_t _number_type;
00050 int16_t number;
00051
00052 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _function_name_type;
00053 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > function_name;
00054
00055 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _component_name_type;
00056 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > component_name;
00057
00058 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _parameter_name_type;
00059 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > parameter_name;
00060
00061 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _full_graph_name_type;
00062 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > full_graph_name;
00063
00064 typedef int8_t _state_type;
00065 int8_t state;
00066
00067 typedef int16_t _error_code_type;
00068 int16_t error_code;
00069
00070 enum { UNKNOWN = 0 };
00071 enum { ACTIVE = 1 };
00072 enum { SUCCEEDED = 2 };
00073 enum { FAILED = 3 };
00074 enum { PAUSED = 4 };
00075
00076 private:
00077 static const char* __s_getDataType_() { return "cob_script_server/ScriptState"; }
00078 public:
00079 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00080
00081 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00082
00083 private:
00084 static const char* __s_getMD5Sum_() { return "4981a5a5be8dbf926085d25a1acf43ca"; }
00085 public:
00086 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00087
00088 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00089
00090 private:
00091 static const char* __s_getMessageDefinition_() { return "Header header\n\
00092 int16 number\n\
00093 string function_name\n\
00094 string component_name\n\
00095 string parameter_name\n\
00096 string full_graph_name\n\
00097 \n\
00098 # Possible execution states\n\
00099 byte UNKNOWN=0\n\
00100 byte ACTIVE=1\n\
00101 byte SUCCEEDED=2\n\
00102 byte FAILED=3\n\
00103 byte PAUSED=4\n\
00104 \n\
00105 byte state # state of execution\n\
00106 int16 error_code # current error_code for state\n\
00107 \n\
00108 ================================================================================\n\
00109 MSG: std_msgs/Header\n\
00110 # Standard metadata for higher-level stamped data types.\n\
00111 # This is generally used to communicate timestamped data \n\
00112 # in a particular coordinate frame.\n\
00113 # \n\
00114 # sequence ID: consecutively increasing ID \n\
00115 uint32 seq\n\
00116 #Two-integer timestamp that is expressed as:\n\
00117 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00118 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00119 # time-handling sugar is provided by the client library\n\
00120 time stamp\n\
00121 #Frame this data is associated with\n\
00122 # 0: no frame\n\
00123 # 1: global frame\n\
00124 string frame_id\n\
00125 \n\
00126 "; }
00127 public:
00128 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00129
00130 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00131
00132 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00133 {
00134 ros::serialization::OStream stream(write_ptr, 1000000000);
00135 ros::serialization::serialize(stream, header);
00136 ros::serialization::serialize(stream, number);
00137 ros::serialization::serialize(stream, function_name);
00138 ros::serialization::serialize(stream, component_name);
00139 ros::serialization::serialize(stream, parameter_name);
00140 ros::serialization::serialize(stream, full_graph_name);
00141 ros::serialization::serialize(stream, state);
00142 ros::serialization::serialize(stream, error_code);
00143 return stream.getData();
00144 }
00145
00146 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00147 {
00148 ros::serialization::IStream stream(read_ptr, 1000000000);
00149 ros::serialization::deserialize(stream, header);
00150 ros::serialization::deserialize(stream, number);
00151 ros::serialization::deserialize(stream, function_name);
00152 ros::serialization::deserialize(stream, component_name);
00153 ros::serialization::deserialize(stream, parameter_name);
00154 ros::serialization::deserialize(stream, full_graph_name);
00155 ros::serialization::deserialize(stream, state);
00156 ros::serialization::deserialize(stream, error_code);
00157 return stream.getData();
00158 }
00159
00160 ROS_DEPRECATED virtual uint32_t serializationLength() const
00161 {
00162 uint32_t size = 0;
00163 size += ros::serialization::serializationLength(header);
00164 size += ros::serialization::serializationLength(number);
00165 size += ros::serialization::serializationLength(function_name);
00166 size += ros::serialization::serializationLength(component_name);
00167 size += ros::serialization::serializationLength(parameter_name);
00168 size += ros::serialization::serializationLength(full_graph_name);
00169 size += ros::serialization::serializationLength(state);
00170 size += ros::serialization::serializationLength(error_code);
00171 return size;
00172 }
00173
00174 typedef boost::shared_ptr< ::cob_script_server::ScriptState_<ContainerAllocator> > Ptr;
00175 typedef boost::shared_ptr< ::cob_script_server::ScriptState_<ContainerAllocator> const> ConstPtr;
00176 };
00177 typedef ::cob_script_server::ScriptState_<std::allocator<void> > ScriptState;
00178
00179 typedef boost::shared_ptr< ::cob_script_server::ScriptState> ScriptStatePtr;
00180 typedef boost::shared_ptr< ::cob_script_server::ScriptState const> ScriptStateConstPtr;
00181
00182
00183 template<typename ContainerAllocator>
00184 std::ostream& operator<<(std::ostream& s, const ::cob_script_server::ScriptState_<ContainerAllocator> & v)
00185 {
00186 ros::message_operations::Printer< ::cob_script_server::ScriptState_<ContainerAllocator> >::stream(s, "", v);
00187 return s;}
00188
00189 }
00190
00191 namespace ros
00192 {
00193 namespace message_traits
00194 {
00195 template<class ContainerAllocator>
00196 struct MD5Sum< ::cob_script_server::ScriptState_<ContainerAllocator> > {
00197 static const char* value()
00198 {
00199 return "4981a5a5be8dbf926085d25a1acf43ca";
00200 }
00201
00202 static const char* value(const ::cob_script_server::ScriptState_<ContainerAllocator> &) { return value(); }
00203 static const uint64_t static_value1 = 0x4981a5a5be8dbf92ULL;
00204 static const uint64_t static_value2 = 0x6085d25a1acf43caULL;
00205 };
00206
00207 template<class ContainerAllocator>
00208 struct DataType< ::cob_script_server::ScriptState_<ContainerAllocator> > {
00209 static const char* value()
00210 {
00211 return "cob_script_server/ScriptState";
00212 }
00213
00214 static const char* value(const ::cob_script_server::ScriptState_<ContainerAllocator> &) { return value(); }
00215 };
00216
00217 template<class ContainerAllocator>
00218 struct Definition< ::cob_script_server::ScriptState_<ContainerAllocator> > {
00219 static const char* value()
00220 {
00221 return "Header header\n\
00222 int16 number\n\
00223 string function_name\n\
00224 string component_name\n\
00225 string parameter_name\n\
00226 string full_graph_name\n\
00227 \n\
00228 # Possible execution states\n\
00229 byte UNKNOWN=0\n\
00230 byte ACTIVE=1\n\
00231 byte SUCCEEDED=2\n\
00232 byte FAILED=3\n\
00233 byte PAUSED=4\n\
00234 \n\
00235 byte state # state of execution\n\
00236 int16 error_code # current error_code for state\n\
00237 \n\
00238 ================================================================================\n\
00239 MSG: std_msgs/Header\n\
00240 # Standard metadata for higher-level stamped data types.\n\
00241 # This is generally used to communicate timestamped data \n\
00242 # in a particular coordinate frame.\n\
00243 # \n\
00244 # sequence ID: consecutively increasing ID \n\
00245 uint32 seq\n\
00246 #Two-integer timestamp that is expressed as:\n\
00247 # * stamp.secs: seconds (stamp_secs) since epoch\n\
00248 # * stamp.nsecs: nanoseconds since stamp_secs\n\
00249 # time-handling sugar is provided by the client library\n\
00250 time stamp\n\
00251 #Frame this data is associated with\n\
00252 # 0: no frame\n\
00253 # 1: global frame\n\
00254 string frame_id\n\
00255 \n\
00256 ";
00257 }
00258
00259 static const char* value(const ::cob_script_server::ScriptState_<ContainerAllocator> &) { return value(); }
00260 };
00261
00262 template<class ContainerAllocator> struct HasHeader< ::cob_script_server::ScriptState_<ContainerAllocator> > : public TrueType {};
00263 template<class ContainerAllocator> struct HasHeader< const ::cob_script_server::ScriptState_<ContainerAllocator> > : public TrueType {};
00264 }
00265 }
00266
00267 namespace ros
00268 {
00269 namespace serialization
00270 {
00271
00272 template<class ContainerAllocator> struct Serializer< ::cob_script_server::ScriptState_<ContainerAllocator> >
00273 {
00274 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00275 {
00276 stream.next(m.header);
00277 stream.next(m.number);
00278 stream.next(m.function_name);
00279 stream.next(m.component_name);
00280 stream.next(m.parameter_name);
00281 stream.next(m.full_graph_name);
00282 stream.next(m.state);
00283 stream.next(m.error_code);
00284 }
00285
00286 ROS_DECLARE_ALLINONE_SERIALIZER;
00287 };
00288 }
00289 }
00290
00291 namespace ros
00292 {
00293 namespace message_operations
00294 {
00295
00296 template<class ContainerAllocator>
00297 struct Printer< ::cob_script_server::ScriptState_<ContainerAllocator> >
00298 {
00299 template<typename Stream> static void stream(Stream& s, const std::string& indent, const ::cob_script_server::ScriptState_<ContainerAllocator> & v)
00300 {
00301 s << indent << "header: ";
00302 s << std::endl;
00303 Printer< ::std_msgs::Header_<ContainerAllocator> >::stream(s, indent + " ", v.header);
00304 s << indent << "number: ";
00305 Printer<int16_t>::stream(s, indent + " ", v.number);
00306 s << indent << "function_name: ";
00307 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.function_name);
00308 s << indent << "component_name: ";
00309 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.component_name);
00310 s << indent << "parameter_name: ";
00311 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.parameter_name);
00312 s << indent << "full_graph_name: ";
00313 Printer<std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > >::stream(s, indent + " ", v.full_graph_name);
00314 s << indent << "state: ";
00315 Printer<int8_t>::stream(s, indent + " ", v.state);
00316 s << indent << "error_code: ";
00317 Printer<int16_t>::stream(s, indent + " ", v.error_code);
00318 }
00319 };
00320
00321
00322 }
00323 }
00324
00325 #endif // COB_SCRIPT_SERVER_MESSAGE_SCRIPTSTATE_H
00326