Personal fork
Fork of rosserial_mbed_lib by
geometry_msgs/Pose.h@1:ff0ec969dad1, 2011-10-16 (annotated)
- Committer:
- nucho
- Date:
- Sun Oct 16 07:19:36 2011 +0000
- Revision:
- 1:ff0ec969dad1
- Parent:
- 0:77afd7560544
- Child:
- 3:1cf99502f396
This program supported the revision of 143 of rosserial.
And the bug fix of receive of array data.
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
nucho | 1:ff0ec969dad1 | 1 | #ifndef ros_geometry_msgs_Pose_h |
nucho | 1:ff0ec969dad1 | 2 | #define ros_geometry_msgs_Pose_h |
nucho | 0:77afd7560544 | 3 | |
nucho | 0:77afd7560544 | 4 | #include <stdint.h> |
nucho | 0:77afd7560544 | 5 | #include <string.h> |
nucho | 0:77afd7560544 | 6 | #include <stdlib.h> |
nucho | 0:77afd7560544 | 7 | #include "../ros/msg.h" |
nucho | 0:77afd7560544 | 8 | #include "geometry_msgs/Point.h" |
nucho | 0:77afd7560544 | 9 | #include "geometry_msgs/Quaternion.h" |
nucho | 0:77afd7560544 | 10 | |
nucho | 0:77afd7560544 | 11 | namespace geometry_msgs |
nucho | 0:77afd7560544 | 12 | { |
nucho | 0:77afd7560544 | 13 | |
nucho | 0:77afd7560544 | 14 | class Pose : public ros::Msg |
nucho | 0:77afd7560544 | 15 | { |
nucho | 0:77afd7560544 | 16 | public: |
nucho | 0:77afd7560544 | 17 | geometry_msgs::Point position; |
nucho | 0:77afd7560544 | 18 | geometry_msgs::Quaternion orientation; |
nucho | 0:77afd7560544 | 19 | |
nucho | 0:77afd7560544 | 20 | virtual int serialize(unsigned char *outbuffer) |
nucho | 0:77afd7560544 | 21 | { |
nucho | 0:77afd7560544 | 22 | int offset = 0; |
nucho | 0:77afd7560544 | 23 | offset += this->position.serialize(outbuffer + offset); |
nucho | 0:77afd7560544 | 24 | offset += this->orientation.serialize(outbuffer + offset); |
nucho | 0:77afd7560544 | 25 | return offset; |
nucho | 0:77afd7560544 | 26 | } |
nucho | 0:77afd7560544 | 27 | |
nucho | 0:77afd7560544 | 28 | virtual int deserialize(unsigned char *inbuffer) |
nucho | 0:77afd7560544 | 29 | { |
nucho | 0:77afd7560544 | 30 | int offset = 0; |
nucho | 0:77afd7560544 | 31 | offset += this->position.deserialize(inbuffer + offset); |
nucho | 0:77afd7560544 | 32 | offset += this->orientation.deserialize(inbuffer + offset); |
nucho | 0:77afd7560544 | 33 | return offset; |
nucho | 0:77afd7560544 | 34 | } |
nucho | 0:77afd7560544 | 35 | |
nucho | 0:77afd7560544 | 36 | virtual virtual const char * getType(){ return "geometry_msgs/Pose"; }; |
nucho | 0:77afd7560544 | 37 | |
nucho | 0:77afd7560544 | 38 | }; |
nucho | 0:77afd7560544 | 39 | |
nucho | 0:77afd7560544 | 40 | } |
nucho | 0:77afd7560544 | 41 | #endif |