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