rosserial library for mbed Inspired by nucho's rosserial library This library is still under development

Dependencies:   MODSERIAL mbed

Dependents:   mbed_roshydro_test

Library still under development!

Revision:
0:30537dec6e0b
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/control_msgs/SingleJointPositionGoal.h	Sun Feb 15 10:53:43 2015 +0000
@@ -0,0 +1,69 @@
+#ifndef _ROS_control_msgs_SingleJointPositionGoal_h
+#define _ROS_control_msgs_SingleJointPositionGoal_h
+
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include "ros/msg.h"
+#include "ros/duration.h"
+
+namespace control_msgs
+{
+
+  class SingleJointPositionGoal : public ros::Msg
+  {
+    public:
+      float position;
+      ros::Duration min_duration;
+      float max_velocity;
+
+    SingleJointPositionGoal():
+      position(0),
+      min_duration(),
+      max_velocity(0)
+    {
+    }
+
+    virtual int serialize(unsigned char *outbuffer) const
+    {
+      int offset = 0;
+      offset += serializeAvrFloat64(outbuffer + offset, this->position);
+      *(outbuffer + offset + 0) = (this->min_duration.sec >> (8 * 0)) & 0xFF;
+      *(outbuffer + offset + 1) = (this->min_duration.sec >> (8 * 1)) & 0xFF;
+      *(outbuffer + offset + 2) = (this->min_duration.sec >> (8 * 2)) & 0xFF;
+      *(outbuffer + offset + 3) = (this->min_duration.sec >> (8 * 3)) & 0xFF;
+      offset += sizeof(this->min_duration.sec);
+      *(outbuffer + offset + 0) = (this->min_duration.nsec >> (8 * 0)) & 0xFF;
+      *(outbuffer + offset + 1) = (this->min_duration.nsec >> (8 * 1)) & 0xFF;
+      *(outbuffer + offset + 2) = (this->min_duration.nsec >> (8 * 2)) & 0xFF;
+      *(outbuffer + offset + 3) = (this->min_duration.nsec >> (8 * 3)) & 0xFF;
+      offset += sizeof(this->min_duration.nsec);
+      offset += serializeAvrFloat64(outbuffer + offset, this->max_velocity);
+      return offset;
+    }
+
+    virtual int deserialize(unsigned char *inbuffer)
+    {
+      int offset = 0;
+      offset += deserializeAvrFloat64(inbuffer + offset, &(this->position));
+      this->min_duration.sec =  ((uint32_t) (*(inbuffer + offset)));
+      this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
+      this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
+      this->min_duration.sec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
+      offset += sizeof(this->min_duration.sec);
+      this->min_duration.nsec =  ((uint32_t) (*(inbuffer + offset)));
+      this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 1))) << (8 * 1);
+      this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 2))) << (8 * 2);
+      this->min_duration.nsec |= ((uint32_t) (*(inbuffer + offset + 3))) << (8 * 3);
+      offset += sizeof(this->min_duration.nsec);
+      offset += deserializeAvrFloat64(inbuffer + offset, &(this->max_velocity));
+     return offset;
+    }
+
+    const char * getType(){ return "control_msgs/SingleJointPositionGoal"; };
+    const char * getMD5(){ return "fbaaa562a23a013fd5053e5f72cbb35c"; };
+
+  };
+
+}
+#endif