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
diff -r 000000000000 -r 30537dec6e0b moveit_msgs/LoadMap.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/moveit_msgs/LoadMap.h	Sun Feb 15 10:53:43 2015 +0000
@@ -0,0 +1,104 @@
+#ifndef _ROS_SERVICE_LoadMap_h
+#define _ROS_SERVICE_LoadMap_h
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include "ros/msg.h"
+
+namespace moveit_msgs
+{
+
+static const char LOADMAP[] = "moveit_msgs/LoadMap";
+
+  class LoadMapRequest : public ros::Msg
+  {
+    public:
+      const char* filename;
+
+    LoadMapRequest():
+      filename("")
+    {
+    }
+
+    virtual int serialize(unsigned char *outbuffer) const
+    {
+      int offset = 0;
+      uint32_t length_filename = strlen(this->filename);
+      memcpy(outbuffer + offset, &length_filename, sizeof(uint32_t));
+      offset += 4;
+      memcpy(outbuffer + offset, this->filename, length_filename);
+      offset += length_filename;
+      return offset;
+    }
+
+    virtual int deserialize(unsigned char *inbuffer)
+    {
+      int offset = 0;
+      uint32_t length_filename;
+      memcpy(&length_filename, (inbuffer + offset), sizeof(uint32_t));
+      offset += 4;
+      for(unsigned int k= offset; k< offset+length_filename; ++k){
+          inbuffer[k-1]=inbuffer[k];
+      }
+      inbuffer[offset+length_filename-1]=0;
+      this->filename = (char *)(inbuffer + offset-1);
+      offset += length_filename;
+     return offset;
+    }
+
+    const char * getType(){ return LOADMAP; };
+    const char * getMD5(){ return "030824f52a0628ead956fb9d67e66ae9"; };
+
+  };
+
+  class LoadMapResponse : public ros::Msg
+  {
+    public:
+      bool success;
+
+    LoadMapResponse():
+      success(0)
+    {
+    }
+
+    virtual int serialize(unsigned char *outbuffer) const
+    {
+      int offset = 0;
+      union {
+        bool real;
+        uint8_t base;
+      } u_success;
+      u_success.real = this->success;
+      *(outbuffer + offset + 0) = (u_success.base >> (8 * 0)) & 0xFF;
+      offset += sizeof(this->success);
+      return offset;
+    }
+
+    virtual int deserialize(unsigned char *inbuffer)
+    {
+      int offset = 0;
+      union {
+        bool real;
+        uint8_t base;
+      } u_success;
+      u_success.base = 0;
+      u_success.base |= ((uint8_t) (*(inbuffer + offset + 0))) << (8 * 0);
+      this->success = u_success.real;
+      offset += sizeof(this->success);
+     return offset;
+    }
+
+    const char * getType(){ return LOADMAP; };
+    const char * getMD5(){ return "358e233cde0c8a8bcfea4ce193f8fc15"; };
+
+  };
+
+  class LoadMap {
+    public:
+    typedef LoadMapRequest Request;
+    typedef LoadMapResponse Response;
+  };
+
+}
+#endif
+