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
Diff: nav_msgs/Path.h
- Revision:
- 3:1cf99502f396
- Parent:
- 1:ff0ec969dad1
--- a/nav_msgs/Path.h Sun Oct 16 09:35:11 2011 +0000 +++ b/nav_msgs/Path.h Sat Nov 12 23:54:45 2011 +0000 @@ -1,10 +1,10 @@ -#ifndef ros_nav_msgs_Path_h -#define ros_nav_msgs_Path_h +#ifndef _ROS_nav_msgs_Path_h +#define _ROS_nav_msgs_Path_h #include <stdint.h> #include <string.h> #include <stdlib.h> -#include "../ros/msg.h" +#include "ros/msg.h" #include "std_msgs/Header.h" #include "geometry_msgs/PoseStamped.h" @@ -15,11 +15,11 @@ { public: std_msgs::Header header; - unsigned char poses_length; + uint8_t poses_length; geometry_msgs::PoseStamped st_poses; geometry_msgs::PoseStamped * poses; - virtual int serialize(unsigned char *outbuffer) + virtual int serialize(unsigned char *outbuffer) const { int offset = 0; offset += this->header.serialize(outbuffer + offset); @@ -27,7 +27,7 @@ *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; - for( unsigned char i = 0; i < poses_length; i++){ + for( uint8_t i = 0; i < poses_length; i++){ offset += this->poses[i].serialize(outbuffer + offset); } return offset; @@ -37,19 +37,20 @@ { int offset = 0; offset += this->header.deserialize(inbuffer + offset); - unsigned char poses_lengthT = *(inbuffer + offset++); + uint8_t poses_lengthT = *(inbuffer + offset++); if(poses_lengthT > poses_length) this->poses = (geometry_msgs::PoseStamped*)realloc(this->poses, poses_lengthT * sizeof(geometry_msgs::PoseStamped)); offset += 3; poses_length = poses_lengthT; - for( unsigned char i = 0; i < poses_length; i++){ + for( uint8_t i = 0; i < poses_length; i++){ offset += this->st_poses.deserialize(inbuffer + offset); memcpy( &(this->poses[i]), &(this->st_poses), sizeof(geometry_msgs::PoseStamped)); } return offset; } - virtual const char * getType(){ return "nav_msgs/Path"; }; + virtual const char * getType(){ return "nav_msgs/Path"; }; + virtual const char * getMD5(){ return "6227e2b7e9cce15051f669a5e197bbf7"; }; };