rosserial library for mbed Inspired by nucho's rosserial library This library is still under development
Dependents: mbed_roshydro_test
Library still under development!
map_msgs/GetMapROI.h@0:30537dec6e0b, 2015-02-15 (annotated)
- Committer:
- akashvibhute
- Date:
- Sun Feb 15 10:53:43 2015 +0000
- Revision:
- 0:30537dec6e0b
First commit; Library still need to be debugged, compilation issues with new mbed and modserial updates.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
akashvibhute | 0:30537dec6e0b | 1 | #ifndef _ROS_SERVICE_GetMapROI_h |
akashvibhute | 0:30537dec6e0b | 2 | #define _ROS_SERVICE_GetMapROI_h |
akashvibhute | 0:30537dec6e0b | 3 | #include <stdint.h> |
akashvibhute | 0:30537dec6e0b | 4 | #include <string.h> |
akashvibhute | 0:30537dec6e0b | 5 | #include <stdlib.h> |
akashvibhute | 0:30537dec6e0b | 6 | #include "ros/msg.h" |
akashvibhute | 0:30537dec6e0b | 7 | #include "nav_msgs/OccupancyGrid.h" |
akashvibhute | 0:30537dec6e0b | 8 | |
akashvibhute | 0:30537dec6e0b | 9 | namespace map_msgs |
akashvibhute | 0:30537dec6e0b | 10 | { |
akashvibhute | 0:30537dec6e0b | 11 | |
akashvibhute | 0:30537dec6e0b | 12 | static const char GETMAPROI[] = "map_msgs/GetMapROI"; |
akashvibhute | 0:30537dec6e0b | 13 | |
akashvibhute | 0:30537dec6e0b | 14 | class GetMapROIRequest : public ros::Msg |
akashvibhute | 0:30537dec6e0b | 15 | { |
akashvibhute | 0:30537dec6e0b | 16 | public: |
akashvibhute | 0:30537dec6e0b | 17 | float x; |
akashvibhute | 0:30537dec6e0b | 18 | float y; |
akashvibhute | 0:30537dec6e0b | 19 | float l_x; |
akashvibhute | 0:30537dec6e0b | 20 | float l_y; |
akashvibhute | 0:30537dec6e0b | 21 | |
akashvibhute | 0:30537dec6e0b | 22 | GetMapROIRequest(): |
akashvibhute | 0:30537dec6e0b | 23 | x(0), |
akashvibhute | 0:30537dec6e0b | 24 | y(0), |
akashvibhute | 0:30537dec6e0b | 25 | l_x(0), |
akashvibhute | 0:30537dec6e0b | 26 | l_y(0) |
akashvibhute | 0:30537dec6e0b | 27 | { |
akashvibhute | 0:30537dec6e0b | 28 | } |
akashvibhute | 0:30537dec6e0b | 29 | |
akashvibhute | 0:30537dec6e0b | 30 | virtual int serialize(unsigned char *outbuffer) const |
akashvibhute | 0:30537dec6e0b | 31 | { |
akashvibhute | 0:30537dec6e0b | 32 | int offset = 0; |
akashvibhute | 0:30537dec6e0b | 33 | offset += serializeAvrFloat64(outbuffer + offset, this->x); |
akashvibhute | 0:30537dec6e0b | 34 | offset += serializeAvrFloat64(outbuffer + offset, this->y); |
akashvibhute | 0:30537dec6e0b | 35 | offset += serializeAvrFloat64(outbuffer + offset, this->l_x); |
akashvibhute | 0:30537dec6e0b | 36 | offset += serializeAvrFloat64(outbuffer + offset, this->l_y); |
akashvibhute | 0:30537dec6e0b | 37 | return offset; |
akashvibhute | 0:30537dec6e0b | 38 | } |
akashvibhute | 0:30537dec6e0b | 39 | |
akashvibhute | 0:30537dec6e0b | 40 | virtual int deserialize(unsigned char *inbuffer) |
akashvibhute | 0:30537dec6e0b | 41 | { |
akashvibhute | 0:30537dec6e0b | 42 | int offset = 0; |
akashvibhute | 0:30537dec6e0b | 43 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->x)); |
akashvibhute | 0:30537dec6e0b | 44 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->y)); |
akashvibhute | 0:30537dec6e0b | 45 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_x)); |
akashvibhute | 0:30537dec6e0b | 46 | offset += deserializeAvrFloat64(inbuffer + offset, &(this->l_y)); |
akashvibhute | 0:30537dec6e0b | 47 | return offset; |
akashvibhute | 0:30537dec6e0b | 48 | } |
akashvibhute | 0:30537dec6e0b | 49 | |
akashvibhute | 0:30537dec6e0b | 50 | const char * getType(){ return GETMAPROI; }; |
akashvibhute | 0:30537dec6e0b | 51 | const char * getMD5(){ return "43c2ff8f45af555c0eaf070c401e9a47"; }; |
akashvibhute | 0:30537dec6e0b | 52 | |
akashvibhute | 0:30537dec6e0b | 53 | }; |
akashvibhute | 0:30537dec6e0b | 54 | |
akashvibhute | 0:30537dec6e0b | 55 | class GetMapROIResponse : public ros::Msg |
akashvibhute | 0:30537dec6e0b | 56 | { |
akashvibhute | 0:30537dec6e0b | 57 | public: |
akashvibhute | 0:30537dec6e0b | 58 | nav_msgs::OccupancyGrid sub_map; |
akashvibhute | 0:30537dec6e0b | 59 | |
akashvibhute | 0:30537dec6e0b | 60 | GetMapROIResponse(): |
akashvibhute | 0:30537dec6e0b | 61 | sub_map() |
akashvibhute | 0:30537dec6e0b | 62 | { |
akashvibhute | 0:30537dec6e0b | 63 | } |
akashvibhute | 0:30537dec6e0b | 64 | |
akashvibhute | 0:30537dec6e0b | 65 | virtual int serialize(unsigned char *outbuffer) const |
akashvibhute | 0:30537dec6e0b | 66 | { |
akashvibhute | 0:30537dec6e0b | 67 | int offset = 0; |
akashvibhute | 0:30537dec6e0b | 68 | offset += this->sub_map.serialize(outbuffer + offset); |
akashvibhute | 0:30537dec6e0b | 69 | return offset; |
akashvibhute | 0:30537dec6e0b | 70 | } |
akashvibhute | 0:30537dec6e0b | 71 | |
akashvibhute | 0:30537dec6e0b | 72 | virtual int deserialize(unsigned char *inbuffer) |
akashvibhute | 0:30537dec6e0b | 73 | { |
akashvibhute | 0:30537dec6e0b | 74 | int offset = 0; |
akashvibhute | 0:30537dec6e0b | 75 | offset += this->sub_map.deserialize(inbuffer + offset); |
akashvibhute | 0:30537dec6e0b | 76 | return offset; |
akashvibhute | 0:30537dec6e0b | 77 | } |
akashvibhute | 0:30537dec6e0b | 78 | |
akashvibhute | 0:30537dec6e0b | 79 | const char * getType(){ return GETMAPROI; }; |
akashvibhute | 0:30537dec6e0b | 80 | const char * getMD5(){ return "4d1986519c00d81967d2891a606b234c"; }; |
akashvibhute | 0:30537dec6e0b | 81 | |
akashvibhute | 0:30537dec6e0b | 82 | }; |
akashvibhute | 0:30537dec6e0b | 83 | |
akashvibhute | 0:30537dec6e0b | 84 | class GetMapROI { |
akashvibhute | 0:30537dec6e0b | 85 | public: |
akashvibhute | 0:30537dec6e0b | 86 | typedef GetMapROIRequest Request; |
akashvibhute | 0:30537dec6e0b | 87 | typedef GetMapROIResponse Response; |
akashvibhute | 0:30537dec6e0b | 88 | }; |
akashvibhute | 0:30537dec6e0b | 89 | |
akashvibhute | 0:30537dec6e0b | 90 | } |
akashvibhute | 0:30537dec6e0b | 91 | #endif |
akashvibhute | 0:30537dec6e0b | 92 |