TranslateRecognitionId.h
Go to the documentation of this file.
00001 #ifndef _ROS_SERVICE_TranslateRecognitionId_h
00002 #define _ROS_SERVICE_TranslateRecognitionId_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace household_objects_database_msgs
00009 {
00010 
00011 static const char TRANSLATERECOGNITIONID[] = "household_objects_database_msgs/TranslateRecognitionId";
00012 
00013   class TranslateRecognitionIdRequest : public ros::Msg
00014   {
00015     public:
00016       const char* recognition_id;
00017 
00018     virtual int serialize(unsigned char *outbuffer) const
00019     {
00020       int offset = 0;
00021       uint32_t length_recognition_id = strlen(this->recognition_id);
00022       memcpy(outbuffer + offset, &length_recognition_id, sizeof(uint32_t));
00023       offset += 4;
00024       memcpy(outbuffer + offset, this->recognition_id, length_recognition_id);
00025       offset += length_recognition_id;
00026       return offset;
00027     }
00028 
00029     virtual int deserialize(unsigned char *inbuffer)
00030     {
00031       int offset = 0;
00032       uint32_t length_recognition_id;
00033       memcpy(&length_recognition_id, (inbuffer + offset), sizeof(uint32_t));
00034       offset += 4;
00035       for(unsigned int k= offset; k< offset+length_recognition_id; ++k){
00036           inbuffer[k-1]=inbuffer[k];
00037       }
00038       inbuffer[offset+length_recognition_id-1]=0;
00039       this->recognition_id = (char *)(inbuffer + offset-1);
00040       offset += length_recognition_id;
00041      return offset;
00042     }
00043 
00044     const char * getType(){ return TRANSLATERECOGNITIONID; };
00045     const char * getMD5(){ return "4d95610f63ed69a670a8f8aaa3c6aa36"; };
00046 
00047   };
00048 
00049   class TranslateRecognitionIdResponse : public ros::Msg
00050   {
00051     public:
00052       int32_t household_objects_id;
00053       int32_t ID_NOT_FOUND;
00054       int32_t DATABASE_ERROR;
00055       int32_t OTHER_ERROR;
00056       int32_t result;
00057       enum { SUCCESS = 0 };
00058 
00059     virtual int serialize(unsigned char *outbuffer) const
00060     {
00061       int offset = 0;
00062       union {
00063         int32_t real;
00064         uint32_t base;
00065       } u_household_objects_id;
00066       u_household_objects_id.real = this->household_objects_id;
00067       *(outbuffer + offset + 0) = (u_household_objects_id.base >> (8 * 0)) & 0xFF;
00068       *(outbuffer + offset + 1) = (u_household_objects_id.base >> (8 * 1)) & 0xFF;
00069       *(outbuffer + offset + 2) = (u_household_objects_id.base >> (8 * 2)) & 0xFF;
00070       *(outbuffer + offset + 3) = (u_household_objects_id.base >> (8 * 3)) & 0xFF;
00071       offset += sizeof(this->household_objects_id);
00072       union {
00073         int32_t real;
00074         uint32_t base;
00075       } u_ID_NOT_FOUND;
00076       u_ID_NOT_FOUND.real = this->ID_NOT_FOUND;
00077       *(outbuffer + offset + 0) = (u_ID_NOT_FOUND.base >> (8 * 0)) & 0xFF;
00078       *(outbuffer + offset + 1) = (u_ID_NOT_FOUND.base >> (8 * 1)) & 0xFF;
00079       *(outbuffer + offset + 2) = (u_ID_NOT_FOUND.base >> (8 * 2)) & 0xFF;
00080       *(outbuffer + offset + 3) = (u_ID_NOT_FOUND.base >> (8 * 3)) & 0xFF;
00081       offset += sizeof(this->ID_NOT_FOUND);
00082       union {
00083         int32_t real;
00084         uint32_t base;
00085       } u_DATABASE_ERROR;
00086       u_DATABASE_ERROR.real = this->DATABASE_ERROR;
00087       *(outbuffer + offset + 0) = (u_DATABASE_ERROR.base >> (8 * 0)) & 0xFF;
00088       *(outbuffer + offset + 1) = (u_DATABASE_ERROR.base >> (8 * 1)) & 0xFF;
00089       *(outbuffer + offset + 2) = (u_DATABASE_ERROR.base >> (8 * 2)) & 0xFF;
00090       *(outbuffer + offset + 3) = (u_DATABASE_ERROR.base >> (8 * 3)) & 0xFF;
00091       offset += sizeof(this->DATABASE_ERROR);
00092       union {
00093         int32_t real;
00094         uint32_t base;
00095       } u_OTHER_ERROR;
00096       u_OTHER_ERROR.real = this->OTHER_ERROR;
00097       *(outbuffer + offset + 0) = (u_OTHER_ERROR.base >> (8 * 0)) & 0xFF;
00098       *(outbuffer + offset + 1) = (u_OTHER_ERROR.base >> (8 * 1)) & 0xFF;
00099       *(outbuffer + offset + 2) = (u_OTHER_ERROR.base >> (8 * 2)) & 0xFF;
00100       *(outbuffer + offset + 3) = (u_OTHER_ERROR.base >> (8 * 3)) & 0xFF;
00101       offset += sizeof(this->OTHER_ERROR);
00102       union {
00103         int32_t real;
00104         uint32_t base;
00105       } u_result;
00106       u_result.real = this->result;
00107       *(outbuffer + offset + 0) = (u_result.base >> (8 * 0)) & 0xFF;
00108       *(outbuffer + offset + 1) = (u_result.base >> (8 * 1)) & 0xFF;
00109       *(outbuffer + offset + 2) = (u_result.base >> (8 * 2)) & 0xFF;
00110       *(outbuffer + offset + 3) = (u_result.base >> (8 * 3)) & 0xFF;
00111       offset += sizeof(this->result);
00112       return offset;
00113     }
00114 
00115     virtual int deserialize(unsigned char *inbuffer)
00116     {
00117       int offset = 0;
00118       union {
00119         int32_t real;
00120         uint32_t base;
00121       } u_household_objects_id;
00122       u_household_objects_id.base = 0;
00123       u_household_objects_id.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00124       u_household_objects_id.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00125       u_household_objects_id.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00126       u_household_objects_id.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00127       this->household_objects_id = u_household_objects_id.real;
00128       offset += sizeof(this->household_objects_id);
00129       union {
00130         int32_t real;
00131         uint32_t base;
00132       } u_ID_NOT_FOUND;
00133       u_ID_NOT_FOUND.base = 0;
00134       u_ID_NOT_FOUND.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00135       u_ID_NOT_FOUND.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00136       u_ID_NOT_FOUND.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00137       u_ID_NOT_FOUND.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00138       this->ID_NOT_FOUND = u_ID_NOT_FOUND.real;
00139       offset += sizeof(this->ID_NOT_FOUND);
00140       union {
00141         int32_t real;
00142         uint32_t base;
00143       } u_DATABASE_ERROR;
00144       u_DATABASE_ERROR.base = 0;
00145       u_DATABASE_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00146       u_DATABASE_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00147       u_DATABASE_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00148       u_DATABASE_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00149       this->DATABASE_ERROR = u_DATABASE_ERROR.real;
00150       offset += sizeof(this->DATABASE_ERROR);
00151       union {
00152         int32_t real;
00153         uint32_t base;
00154       } u_OTHER_ERROR;
00155       u_OTHER_ERROR.base = 0;
00156       u_OTHER_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00157       u_OTHER_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00158       u_OTHER_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00159       u_OTHER_ERROR.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00160       this->OTHER_ERROR = u_OTHER_ERROR.real;
00161       offset += sizeof(this->OTHER_ERROR);
00162       union {
00163         int32_t real;
00164         uint32_t base;
00165       } u_result;
00166       u_result.base = 0;
00167       u_result.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00168       u_result.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00169       u_result.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00170       u_result.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00171       this->result = u_result.real;
00172       offset += sizeof(this->result);
00173      return offset;
00174     }
00175 
00176     const char * getType(){ return TRANSLATERECOGNITIONID; };
00177     const char * getMD5(){ return "b4afd505fbee150bf06acaffa82e84cf"; };
00178 
00179   };
00180 
00181   class TranslateRecognitionId {
00182     public:
00183     typedef TranslateRecognitionIdRequest Request;
00184     typedef TranslateRecognitionIdResponse Response;
00185   };
00186 
00187 }
00188 #endif


ric_mc
Author(s): RoboTiCan
autogenerated on Fri May 20 2016 03:48:56