Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _ROS_SERVICE_UpdatePins_h
00019 #define _ROS_SERVICE_UpdatePins_h
00020 #include <stdint.h>
00021 #include <string.h>
00022 #include <stdlib.h>
00023 #include "ros/msg.h"
00024
00025 namespace cob_hand_bridge
00026 {
00027
00028 static const char UPDATEPINS[] = "cob_hand_bridge/UpdatePins";
00029
00030 class UpdatePinsRequest : public ros::Msg
00031 {
00032 public:
00033 uint32_t set_pins;
00034 uint32_t clear_pins;
00035
00036 UpdatePinsRequest():
00037 set_pins(0),
00038 clear_pins(0)
00039 {
00040 }
00041
00042 virtual int serialize(unsigned char *outbuffer) const
00043 {
00044 int offset = 0;
00045 *(outbuffer + offset + 0) = (this->set_pins >> (8 * 0)) & 0xFF;
00046 *(outbuffer + offset + 1) = (this->set_pins >> (8 * 1)) & 0xFF;
00047 *(outbuffer + offset + 2) = (this->set_pins >> (8 * 2)) & 0xFF;
00048 *(outbuffer + offset + 3) = (this->set_pins >> (8 * 3)) & 0xFF;
00049 offset += sizeof(this->set_pins);
00050 *(outbuffer + offset + 0) = (this->clear_pins >> (8 * 0)) & 0xFF;
00051 *(outbuffer + offset + 1) = (this->clear_pins >> (8 * 1)) & 0xFF;
00052 *(outbuffer + offset + 2) = (this->clear_pins >> (8 * 2)) & 0xFF;
00053 *(outbuffer + offset + 3) = (this->clear_pins >> (8 * 3)) & 0xFF;
00054 offset += sizeof(this->clear_pins);
00055 return offset;
00056 }
00057
00058 virtual int deserialize(unsigned char *inbuffer)
00059 {
00060 int offset = 0;
00061 this->set_pins = ((uint32_t) (*(inbuffer + offset)));
00062 this->set_pins |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00063 this->set_pins |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00064 this->set_pins |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00065 offset += sizeof(this->set_pins);
00066 this->clear_pins = ((uint32_t) (*(inbuffer + offset)));
00067 this->clear_pins |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00068 this->clear_pins |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00069 this->clear_pins |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00070 offset += sizeof(this->clear_pins);
00071 return offset;
00072 }
00073
00074 const char * getType(){ return UPDATEPINS; };
00075 const char * getMD5(){ return "54c611b52e3951b09beb1eddc8d57861"; };
00076
00077 };
00078
00079 class UpdatePinsResponse : public ros::Msg
00080 {
00081 public:
00082 bool success;
00083
00084 UpdatePinsResponse():
00085 success(0)
00086 {
00087 }
00088
00089 virtual int serialize(unsigned char *outbuffer) const
00090 {
00091 int offset = 0;
00092 union {
00093 bool real;
00094 uint8_t base;
00095 } u_success;
00096 u_success.real = this->success;
00097 *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
00098 offset += sizeof(this->success);
00099 return offset;
00100 }
00101
00102 virtual int deserialize(unsigned char *inbuffer)
00103 {
00104 int offset = 0;
00105 union {
00106 bool real;
00107 uint8_t base;
00108 } u_success;
00109 u_success.base = 0;
00110 u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
00111 this->success = u_success.real;
00112 offset += sizeof(this->success);
00113 return offset;
00114 }
00115
00116 const char * getType(){ return UPDATEPINS; };
00117 const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; };
00118
00119 };
00120
00121 class UpdatePins {
00122 public:
00123 typedef UpdatePinsRequest Request;
00124 typedef UpdatePinsResponse Response;
00125 };
00126
00127 }
00128 #endif