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
geometry_msgs/Twist.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_geometry_msgs_Twist_h |
nucho | 3:1cf99502f396 | 2 | #define _ROS_geometry_msgs_Twist_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 | 3:1cf99502f396 | 7 | #include "ros/msg.h" |
nucho | 0:77afd7560544 | 8 | #include "geometry_msgs/Vector3.h" |
nucho | 0:77afd7560544 | 9 | |
nucho | 0:77afd7560544 | 10 | namespace geometry_msgs |
nucho | 0:77afd7560544 | 11 | { |
nucho | 0:77afd7560544 | 12 | |
nucho | 0:77afd7560544 | 13 | class Twist : public ros::Msg |
nucho | 0:77afd7560544 | 14 | { |
nucho | 0:77afd7560544 | 15 | public: |
nucho | 0:77afd7560544 | 16 | geometry_msgs::Vector3 linear; |
nucho | 0:77afd7560544 | 17 | geometry_msgs::Vector3 angular; |
nucho | 0:77afd7560544 | 18 | |
nucho | 3:1cf99502f396 | 19 | virtual int serialize(unsigned char *outbuffer) const |
nucho | 0:77afd7560544 | 20 | { |
nucho | 0:77afd7560544 | 21 | int offset = 0; |
nucho | 0:77afd7560544 | 22 | offset += this->linear.serialize(outbuffer + offset); |
nucho | 0:77afd7560544 | 23 | offset += this->angular.serialize(outbuffer + offset); |
nucho | 0:77afd7560544 | 24 | return offset; |
nucho | 0:77afd7560544 | 25 | } |
nucho | 0:77afd7560544 | 26 | |
nucho | 0:77afd7560544 | 27 | virtual int deserialize(unsigned char *inbuffer) |
nucho | 0:77afd7560544 | 28 | { |
nucho | 0:77afd7560544 | 29 | int offset = 0; |
nucho | 0:77afd7560544 | 30 | offset += this->linear.deserialize(inbuffer + offset); |
nucho | 0:77afd7560544 | 31 | offset += this->angular.deserialize(inbuffer + offset); |
nucho | 0:77afd7560544 | 32 | return offset; |
nucho | 0:77afd7560544 | 33 | } |
nucho | 0:77afd7560544 | 34 | |
nucho | 3:1cf99502f396 | 35 | virtual const char * getType(){ return "geometry_msgs/Twist"; }; |
nucho | 3:1cf99502f396 | 36 | virtual const char * getMD5(){ return "9f195f881246fdfa2798d1d3eebca84a"; }; |
nucho | 0:77afd7560544 | 37 | |
nucho | 0:77afd7560544 | 38 | }; |
nucho | 0:77afd7560544 | 39 | |
nucho | 0:77afd7560544 | 40 | } |
nucho | 0:77afd7560544 | 41 | #endif |