rosserial for Hydro

Dependencies:   MODSERIAL

Fork of rosserial_mbed_lib by nucho

Committer:
nucho
Date:
Fri Aug 19 09:06:30 2011 +0000
Revision:
0:77afd7560544
Child:
3:1cf99502f396

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
nucho 0:77afd7560544 1 #ifndef ros_SERVICE_GetMap_h
nucho 0:77afd7560544 2 #define ros_SERVICE_GetMap_h
nucho 0:77afd7560544 3 #include <stdint.h>
nucho 0:77afd7560544 4 #include <string.h>
nucho 0:77afd7560544 5 #include <stdlib.h>
nucho 0:77afd7560544 6 #include "../ros/msg.h"
nucho 0:77afd7560544 7 #include "nav_msgs/OccupancyGrid.h"
nucho 0:77afd7560544 8
nucho 0:77afd7560544 9 namespace nav_msgs
nucho 0:77afd7560544 10 {
nucho 0:77afd7560544 11
nucho 0:77afd7560544 12 static const char GETMAP[] = "nav_msgs/GetMap";
nucho 0:77afd7560544 13
nucho 0:77afd7560544 14 class GetMapRequest : public ros::Msg
nucho 0:77afd7560544 15 {
nucho 0:77afd7560544 16 public:
nucho 0:77afd7560544 17
nucho 0:77afd7560544 18 virtual int serialize(unsigned char *outbuffer)
nucho 0:77afd7560544 19 {
nucho 0:77afd7560544 20 int offset = 0;
nucho 0:77afd7560544 21 return offset;
nucho 0:77afd7560544 22 }
nucho 0:77afd7560544 23
nucho 0:77afd7560544 24 virtual int deserialize(unsigned char *inbuffer)
nucho 0:77afd7560544 25 {
nucho 0:77afd7560544 26 int offset = 0;
nucho 0:77afd7560544 27 return offset;
nucho 0:77afd7560544 28 }
nucho 0:77afd7560544 29
nucho 0:77afd7560544 30 const char * getType(){ return GETMAP; };
nucho 0:77afd7560544 31
nucho 0:77afd7560544 32 };
nucho 0:77afd7560544 33
nucho 0:77afd7560544 34 class GetMapResponse : public ros::Msg
nucho 0:77afd7560544 35 {
nucho 0:77afd7560544 36 public:
nucho 0:77afd7560544 37 nav_msgs::OccupancyGrid map;
nucho 0:77afd7560544 38
nucho 0:77afd7560544 39 virtual int serialize(unsigned char *outbuffer)
nucho 0:77afd7560544 40 {
nucho 0:77afd7560544 41 int offset = 0;
nucho 0:77afd7560544 42 offset += this->map.serialize(outbuffer + offset);
nucho 0:77afd7560544 43 return offset;
nucho 0:77afd7560544 44 }
nucho 0:77afd7560544 45
nucho 0:77afd7560544 46 virtual int deserialize(unsigned char *inbuffer)
nucho 0:77afd7560544 47 {
nucho 0:77afd7560544 48 int offset = 0;
nucho 0:77afd7560544 49 offset += this->map.deserialize(inbuffer + offset);
nucho 0:77afd7560544 50 return offset;
nucho 0:77afd7560544 51 }
nucho 0:77afd7560544 52
nucho 0:77afd7560544 53 virtual const char * getType(){ return GETMAP; };
nucho 0:77afd7560544 54
nucho 0:77afd7560544 55 };
nucho 0:77afd7560544 56
nucho 0:77afd7560544 57 }
nucho 0:77afd7560544 58 #endif