This program is porting rosserial_arduino for mbed http://www.ros.org/wiki/rosserial_arduino This program supported the revision of 169 of rosserial.
Dependents: rosserial_mbed robot_S2
roscpp/Empty.h@4:684f39d0c346, 2012-02-29 (annotated)
- Committer:
- nucho
- Date:
- Wed Feb 29 23:00:21 2012 +0000
- Revision:
- 4:684f39d0c346
- Parent:
- 3:1cf99502f396
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nucho | 3:1cf99502f396 | 1 | #ifndef _ROS_SERVICE_Empty_h |
nucho | 3:1cf99502f396 | 2 | #define _ROS_SERVICE_Empty_h |
nucho | 3:1cf99502f396 | 3 | #include <stdint.h> |
nucho | 3:1cf99502f396 | 4 | #include <string.h> |
nucho | 3:1cf99502f396 | 5 | #include <stdlib.h> |
nucho | 3:1cf99502f396 | 6 | #include "ros/msg.h" |
nucho | 3:1cf99502f396 | 7 | |
nucho | 3:1cf99502f396 | 8 | namespace roscpp |
nucho | 3:1cf99502f396 | 9 | { |
nucho | 3:1cf99502f396 | 10 | |
nucho | 3:1cf99502f396 | 11 | static const char EMPTY[] = "roscpp/Empty"; |
nucho | 3:1cf99502f396 | 12 | |
nucho | 3:1cf99502f396 | 13 | class EmptyRequest : public ros::Msg |
nucho | 3:1cf99502f396 | 14 | { |
nucho | 3:1cf99502f396 | 15 | public: |
nucho | 3:1cf99502f396 | 16 | |
nucho | 3:1cf99502f396 | 17 | virtual int serialize(unsigned char *outbuffer) const |
nucho | 3:1cf99502f396 | 18 | { |
nucho | 3:1cf99502f396 | 19 | int offset = 0; |
nucho | 3:1cf99502f396 | 20 | return offset; |
nucho | 3:1cf99502f396 | 21 | } |
nucho | 3:1cf99502f396 | 22 | |
nucho | 3:1cf99502f396 | 23 | virtual int deserialize(unsigned char *inbuffer) |
nucho | 3:1cf99502f396 | 24 | { |
nucho | 3:1cf99502f396 | 25 | int offset = 0; |
nucho | 3:1cf99502f396 | 26 | return offset; |
nucho | 3:1cf99502f396 | 27 | } |
nucho | 3:1cf99502f396 | 28 | |
nucho | 3:1cf99502f396 | 29 | virtual const char * getType(){ return EMPTY; }; |
nucho | 3:1cf99502f396 | 30 | virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; |
nucho | 3:1cf99502f396 | 31 | |
nucho | 3:1cf99502f396 | 32 | }; |
nucho | 3:1cf99502f396 | 33 | |
nucho | 3:1cf99502f396 | 34 | class EmptyResponse : public ros::Msg |
nucho | 3:1cf99502f396 | 35 | { |
nucho | 3:1cf99502f396 | 36 | public: |
nucho | 3:1cf99502f396 | 37 | |
nucho | 3:1cf99502f396 | 38 | virtual int serialize(unsigned char *outbuffer) const |
nucho | 3:1cf99502f396 | 39 | { |
nucho | 3:1cf99502f396 | 40 | int offset = 0; |
nucho | 3:1cf99502f396 | 41 | return offset; |
nucho | 3:1cf99502f396 | 42 | } |
nucho | 3:1cf99502f396 | 43 | |
nucho | 3:1cf99502f396 | 44 | virtual int deserialize(unsigned char *inbuffer) |
nucho | 3:1cf99502f396 | 45 | { |
nucho | 3:1cf99502f396 | 46 | int offset = 0; |
nucho | 3:1cf99502f396 | 47 | return offset; |
nucho | 3:1cf99502f396 | 48 | } |
nucho | 3:1cf99502f396 | 49 | |
nucho | 3:1cf99502f396 | 50 | virtual const char * getType(){ return EMPTY; }; |
nucho | 3:1cf99502f396 | 51 | virtual const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; }; |
nucho | 3:1cf99502f396 | 52 | |
nucho | 3:1cf99502f396 | 53 | }; |
nucho | 3:1cf99502f396 | 54 | |
nucho | 3:1cf99502f396 | 55 | class Empty { |
nucho | 3:1cf99502f396 | 56 | public: |
nucho | 3:1cf99502f396 | 57 | typedef EmptyRequest Request; |
nucho | 3:1cf99502f396 | 58 | typedef EmptyResponse Response; |
nucho | 3:1cf99502f396 | 59 | }; |
nucho | 3:1cf99502f396 | 60 | |
nucho | 3:1cf99502f396 | 61 | } |
nucho | 3:1cf99502f396 | 62 | #endif |