catchrobo2022 mbed LPC1768 メインプログラム

Dependencies:   mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers QueryPlannerInterfaces.h Source File

QueryPlannerInterfaces.h

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