00001
00002 #ifndef PR2_POWER_BOARD_SERVICE_POWERBOARDCOMMAND2_H
00003 #define PR2_POWER_BOARD_SERVICE_POWERBOARDCOMMAND2_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 "ros/service_traits.h"
00014
00015
00016
00017
00018 namespace pr2_power_board
00019 {
00020 template <class ContainerAllocator>
00021 struct PowerBoardCommand2Request_ : public ros::Message
00022 {
00023 typedef PowerBoardCommand2Request_<ContainerAllocator> Type;
00024
00025 PowerBoardCommand2Request_()
00026 : circuit(0)
00027 , command()
00028 , reset_stats(false)
00029 , reset_circuits(false)
00030 {
00031 }
00032
00033 PowerBoardCommand2Request_(const ContainerAllocator& _alloc)
00034 : circuit(0)
00035 , command(_alloc)
00036 , reset_stats(false)
00037 , reset_circuits(false)
00038 {
00039 }
00040
00041 typedef int32_t _circuit_type;
00042 int32_t circuit;
00043
00044 typedef std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > _command_type;
00045 std::basic_string<char, std::char_traits<char>, typename ContainerAllocator::template rebind<char>::other > command;
00046
00047 typedef uint8_t _reset_stats_type;
00048 uint8_t reset_stats;
00049
00050 typedef uint8_t _reset_circuits_type;
00051 uint8_t reset_circuits;
00052
00053 enum { NUMBER_OF_CIRCUITS = 3 };
00054 enum { BASE = 0 };
00055 enum { RIGHT_ARM = 1 };
00056 enum { LEFT_ARM = 2 };
00057
00058 private:
00059 static const char* __s_getDataType_() { return "pr2_power_board/PowerBoardCommand2Request"; }
00060 public:
00061 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00062
00063 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00064
00065 private:
00066 static const char* __s_getMD5Sum_() { return "a31aee1db4294698375ff2a8cf53fea5"; }
00067 public:
00068 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00069
00070 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00071
00072 private:
00073 static const char* __s_getServerMD5Sum_() { return "4f143c27e05688798e6220ba69c6906a"; }
00074 public:
00075 ROS_DEPRECATED static const std::string __s_getServerMD5Sum() { return __s_getServerMD5Sum_(); }
00076
00077 ROS_DEPRECATED const std::string __getServerMD5Sum() const { return __s_getServerMD5Sum_(); }
00078
00079 private:
00080 static const char* __s_getMessageDefinition_() { return "int32 NUMBER_OF_CIRCUITS = 3\n\
00081 \n\
00082 \n\
00083 \n\
00084 int32 circuit\n\
00085 \n\
00086 \n\
00087 \n\
00088 int32 BASE = 0\n\
00089 int32 RIGHT_ARM = 1\n\
00090 int32 LEFT_ARM = 2\n\
00091 \n\
00092 \n\
00093 \n\
00094 \n\
00095 string command\n\
00096 \n\
00097 \n\
00098 bool reset_stats\n\
00099 \n\
00100 \n\
00101 bool reset_circuits\n\
00102 \n\
00103 "; }
00104 public:
00105 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00106
00107 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00108
00109 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00110 {
00111 ros::serialization::OStream stream(write_ptr, 1000000000);
00112 ros::serialization::serialize(stream, circuit);
00113 ros::serialization::serialize(stream, command);
00114 ros::serialization::serialize(stream, reset_stats);
00115 ros::serialization::serialize(stream, reset_circuits);
00116 return stream.getData();
00117 }
00118
00119 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00120 {
00121 ros::serialization::IStream stream(read_ptr, 1000000000);
00122 ros::serialization::deserialize(stream, circuit);
00123 ros::serialization::deserialize(stream, command);
00124 ros::serialization::deserialize(stream, reset_stats);
00125 ros::serialization::deserialize(stream, reset_circuits);
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(circuit);
00133 size += ros::serialization::serializationLength(command);
00134 size += ros::serialization::serializationLength(reset_stats);
00135 size += ros::serialization::serializationLength(reset_circuits);
00136 return size;
00137 }
00138
00139 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> > Ptr;
00140 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> const> ConstPtr;
00141 };
00142 typedef ::pr2_power_board::PowerBoardCommand2Request_<std::allocator<void> > PowerBoardCommand2Request;
00143
00144 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Request> PowerBoardCommand2RequestPtr;
00145 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Request const> PowerBoardCommand2RequestConstPtr;
00146
00147
00148 template <class ContainerAllocator>
00149 struct PowerBoardCommand2Response_ : public ros::Message
00150 {
00151 typedef PowerBoardCommand2Response_<ContainerAllocator> Type;
00152
00153 PowerBoardCommand2Response_()
00154 : success(false)
00155 {
00156 }
00157
00158 PowerBoardCommand2Response_(const ContainerAllocator& _alloc)
00159 : success(false)
00160 {
00161 }
00162
00163 typedef uint8_t _success_type;
00164 uint8_t success;
00165
00166
00167 private:
00168 static const char* __s_getDataType_() { return "pr2_power_board/PowerBoardCommand2Response"; }
00169 public:
00170 ROS_DEPRECATED static const std::string __s_getDataType() { return __s_getDataType_(); }
00171
00172 ROS_DEPRECATED const std::string __getDataType() const { return __s_getDataType_(); }
00173
00174 private:
00175 static const char* __s_getMD5Sum_() { return "358e233cde0c8a8bcfea4ce193f8fc15"; }
00176 public:
00177 ROS_DEPRECATED static const std::string __s_getMD5Sum() { return __s_getMD5Sum_(); }
00178
00179 ROS_DEPRECATED const std::string __getMD5Sum() const { return __s_getMD5Sum_(); }
00180
00181 private:
00182 static const char* __s_getServerMD5Sum_() { return "4f143c27e05688798e6220ba69c6906a"; }
00183 public:
00184 ROS_DEPRECATED static const std::string __s_getServerMD5Sum() { return __s_getServerMD5Sum_(); }
00185
00186 ROS_DEPRECATED const std::string __getServerMD5Sum() const { return __s_getServerMD5Sum_(); }
00187
00188 private:
00189 static const char* __s_getMessageDefinition_() { return "\n\
00190 bool success\n\
00191 \n\
00192 \n\
00193 "; }
00194 public:
00195 ROS_DEPRECATED static const std::string __s_getMessageDefinition() { return __s_getMessageDefinition_(); }
00196
00197 ROS_DEPRECATED const std::string __getMessageDefinition() const { return __s_getMessageDefinition_(); }
00198
00199 ROS_DEPRECATED virtual uint8_t *serialize(uint8_t *write_ptr, uint32_t seq) const
00200 {
00201 ros::serialization::OStream stream(write_ptr, 1000000000);
00202 ros::serialization::serialize(stream, success);
00203 return stream.getData();
00204 }
00205
00206 ROS_DEPRECATED virtual uint8_t *deserialize(uint8_t *read_ptr)
00207 {
00208 ros::serialization::IStream stream(read_ptr, 1000000000);
00209 ros::serialization::deserialize(stream, success);
00210 return stream.getData();
00211 }
00212
00213 ROS_DEPRECATED virtual uint32_t serializationLength() const
00214 {
00215 uint32_t size = 0;
00216 size += ros::serialization::serializationLength(success);
00217 return size;
00218 }
00219
00220 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > Ptr;
00221 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> const> ConstPtr;
00222 };
00223 typedef ::pr2_power_board::PowerBoardCommand2Response_<std::allocator<void> > PowerBoardCommand2Response;
00224
00225 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Response> PowerBoardCommand2ResponsePtr;
00226 typedef boost::shared_ptr< ::pr2_power_board::PowerBoardCommand2Response const> PowerBoardCommand2ResponseConstPtr;
00227
00228 struct PowerBoardCommand2
00229 {
00230
00231 typedef PowerBoardCommand2Request Request;
00232 typedef PowerBoardCommand2Response Response;
00233 Request request;
00234 Response response;
00235
00236 typedef Request RequestType;
00237 typedef Response ResponseType;
00238 };
00239 }
00240
00241 namespace ros
00242 {
00243 namespace message_traits
00244 {
00245 template<class ContainerAllocator>
00246 struct MD5Sum< ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> > {
00247 static const char* value()
00248 {
00249 return "a31aee1db4294698375ff2a8cf53fea5";
00250 }
00251
00252 static const char* value(const ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> &) { return value(); }
00253 static const uint64_t static_value1 = 0xa31aee1db4294698ULL;
00254 static const uint64_t static_value2 = 0x375ff2a8cf53fea5ULL;
00255 };
00256
00257 template<class ContainerAllocator>
00258 struct DataType< ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> > {
00259 static const char* value()
00260 {
00261 return "pr2_power_board/PowerBoardCommand2Request";
00262 }
00263
00264 static const char* value(const ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> &) { return value(); }
00265 };
00266
00267 template<class ContainerAllocator>
00268 struct Definition< ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> > {
00269 static const char* value()
00270 {
00271 return "int32 NUMBER_OF_CIRCUITS = 3\n\
00272 \n\
00273 \n\
00274 \n\
00275 int32 circuit\n\
00276 \n\
00277 \n\
00278 \n\
00279 int32 BASE = 0\n\
00280 int32 RIGHT_ARM = 1\n\
00281 int32 LEFT_ARM = 2\n\
00282 \n\
00283 \n\
00284 \n\
00285 \n\
00286 string command\n\
00287 \n\
00288 \n\
00289 bool reset_stats\n\
00290 \n\
00291 \n\
00292 bool reset_circuits\n\
00293 \n\
00294 ";
00295 }
00296
00297 static const char* value(const ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> &) { return value(); }
00298 };
00299
00300 }
00301 }
00302
00303
00304 namespace ros
00305 {
00306 namespace message_traits
00307 {
00308 template<class ContainerAllocator>
00309 struct MD5Sum< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > {
00310 static const char* value()
00311 {
00312 return "358e233cde0c8a8bcfea4ce193f8fc15";
00313 }
00314
00315 static const char* value(const ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> &) { return value(); }
00316 static const uint64_t static_value1 = 0x358e233cde0c8a8bULL;
00317 static const uint64_t static_value2 = 0xcfea4ce193f8fc15ULL;
00318 };
00319
00320 template<class ContainerAllocator>
00321 struct DataType< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > {
00322 static const char* value()
00323 {
00324 return "pr2_power_board/PowerBoardCommand2Response";
00325 }
00326
00327 static const char* value(const ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> &) { return value(); }
00328 };
00329
00330 template<class ContainerAllocator>
00331 struct Definition< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > {
00332 static const char* value()
00333 {
00334 return "\n\
00335 bool success\n\
00336 \n\
00337 \n\
00338 ";
00339 }
00340
00341 static const char* value(const ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> &) { return value(); }
00342 };
00343
00344 template<class ContainerAllocator> struct IsFixedSize< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > : public TrueType {};
00345 }
00346 }
00347
00348 namespace ros
00349 {
00350 namespace serialization
00351 {
00352
00353 template<class ContainerAllocator> struct Serializer< ::pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> >
00354 {
00355 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00356 {
00357 stream.next(m.circuit);
00358 stream.next(m.command);
00359 stream.next(m.reset_stats);
00360 stream.next(m.reset_circuits);
00361 }
00362
00363 ROS_DECLARE_ALLINONE_SERIALIZER;
00364 };
00365 }
00366 }
00367
00368
00369 namespace ros
00370 {
00371 namespace serialization
00372 {
00373
00374 template<class ContainerAllocator> struct Serializer< ::pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> >
00375 {
00376 template<typename Stream, typename T> inline static void allInOne(Stream& stream, T m)
00377 {
00378 stream.next(m.success);
00379 }
00380
00381 ROS_DECLARE_ALLINONE_SERIALIZER;
00382 };
00383 }
00384 }
00385
00386 namespace ros
00387 {
00388 namespace service_traits
00389 {
00390 template<>
00391 struct MD5Sum<pr2_power_board::PowerBoardCommand2> {
00392 static const char* value()
00393 {
00394 return "4f143c27e05688798e6220ba69c6906a";
00395 }
00396
00397 static const char* value(const pr2_power_board::PowerBoardCommand2&) { return value(); }
00398 };
00399
00400 template<>
00401 struct DataType<pr2_power_board::PowerBoardCommand2> {
00402 static const char* value()
00403 {
00404 return "pr2_power_board/PowerBoardCommand2";
00405 }
00406
00407 static const char* value(const pr2_power_board::PowerBoardCommand2&) { return value(); }
00408 };
00409
00410 template<class ContainerAllocator>
00411 struct MD5Sum<pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> > {
00412 static const char* value()
00413 {
00414 return "4f143c27e05688798e6220ba69c6906a";
00415 }
00416
00417 static const char* value(const pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> &) { return value(); }
00418 };
00419
00420 template<class ContainerAllocator>
00421 struct DataType<pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> > {
00422 static const char* value()
00423 {
00424 return "pr2_power_board/PowerBoardCommand2";
00425 }
00426
00427 static const char* value(const pr2_power_board::PowerBoardCommand2Request_<ContainerAllocator> &) { return value(); }
00428 };
00429
00430 template<class ContainerAllocator>
00431 struct MD5Sum<pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > {
00432 static const char* value()
00433 {
00434 return "4f143c27e05688798e6220ba69c6906a";
00435 }
00436
00437 static const char* value(const pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> &) { return value(); }
00438 };
00439
00440 template<class ContainerAllocator>
00441 struct DataType<pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> > {
00442 static const char* value()
00443 {
00444 return "pr2_power_board/PowerBoardCommand2";
00445 }
00446
00447 static const char* value(const pr2_power_board::PowerBoardCommand2Response_<ContainerAllocator> &) { return value(); }
00448 };
00449
00450 }
00451 }
00452
00453 #endif // PR2_POWER_BOARD_SERVICE_POWERBOARDCOMMAND2_H
00454