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


ric_mc
Author(s): RoboTiCan
autogenerated on Thu Aug 27 2015 14:39:50