catchrobo2022 / Mbed 2 deprecated catchrobo2022_mbed

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers TowerPickUp.h Source File

TowerPickUp.h

00001 #ifndef _ROS_SERVICE_TowerPickUp_h
00002 #define _ROS_SERVICE_TowerPickUp_h
00003 #include <stdint.h>
00004 #include <string.h>
00005 #include <stdlib.h>
00006 #include "ros/msg.h"
00007 
00008 namespace jsk_recognition_msgs
00009 {
00010 
00011 static const char TOWERPICKUP[] = "jsk_recognition_msgs/TowerPickUp";
00012 
00013   class TowerPickUpRequest : public ros::Msg
00014   {
00015     public:
00016       typedef int32_t _tower_index_type;
00017       _tower_index_type tower_index;
00018 
00019     TowerPickUpRequest():
00020       tower_index(0)
00021     {
00022     }
00023 
00024     virtual int serialize(unsigned char *outbuffer) const
00025     {
00026       int offset = 0;
00027       union {
00028         int32_t real;
00029         uint32_t base;
00030       } u_tower_index;
00031       u_tower_index.real = this->tower_index;
00032       *(outbuffer + offset + 0) = (u_tower_index.base >> (8 * 0)) & 0xFF;
00033       *(outbuffer + offset + 1) = (u_tower_index.base >> (8 * 1)) & 0xFF;
00034       *(outbuffer + offset + 2) = (u_tower_index.base >> (8 * 2)) & 0xFF;
00035       *(outbuffer + offset + 3) = (u_tower_index.base >> (8 * 3)) & 0xFF;
00036       offset += sizeof(this->tower_index);
00037       return offset;
00038     }
00039 
00040     virtual int deserialize(unsigned char *inbuffer)
00041     {
00042       int offset = 0;
00043       union {
00044         int32_t real;
00045         uint32_t base;
00046       } u_tower_index;
00047       u_tower_index.base = 0;
00048       u_tower_index.base |= ((uint32_t) (*(inbuffer + offset + 0))) << (8 * 0);
00049       u_tower_index.base |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
00050       u_tower_index.base |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
00051       u_tower_index.base |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
00052       this->tower_index = u_tower_index.real;
00053       offset += sizeof(this->tower_index);
00054      return offset;
00055     }
00056 
00057     virtual const char * getType(){ return TOWERPICKUP; };
00058     virtual const char * getMD5(){ return "e8bd24109f26b6d833bc4570d67d71c9"; };
00059 
00060   };
00061 
00062   class TowerPickUpResponse : public ros::Msg
00063   {
00064     public:
00065 
00066     TowerPickUpResponse()
00067     {
00068     }
00069 
00070     virtual int serialize(unsigned char *outbuffer) const
00071     {
00072       int offset = 0;
00073       return offset;
00074     }
00075 
00076     virtual int deserialize(unsigned char *inbuffer)
00077     {
00078       int offset = 0;
00079      return offset;
00080     }
00081 
00082     virtual const char * getType(){ return TOWERPICKUP; };
00083     virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
00084 
00085   };
00086 
00087   class TowerPickUp {
00088     public:
00089     typedef TowerPickUpRequest Request;
00090     typedef TowerPickUpResponse Response;
00091   };
00092 
00093 }
00094 #endif