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 visualization_msgs/MarkerArray.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/visualization_msgs/MarkerArray.h	Sun Feb 15 10:53:43 2015 +0000
@@ -0,0 +1,59 @@
+#ifndef _ROS_visualization_msgs_MarkerArray_h
+#define _ROS_visualization_msgs_MarkerArray_h
+
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include "ros/msg.h"
+#include "visualization_msgs/Marker.h"
+
+namespace visualization_msgs
+{
+
+  class MarkerArray : public ros::Msg
+  {
+    public:
+      uint8_t markers_length;
+      visualization_msgs::Marker st_markers;
+      visualization_msgs::Marker * markers;
+
+    MarkerArray():
+      markers_length(0), markers(NULL)
+    {
+    }
+
+    virtual int serialize(unsigned char *outbuffer) const
+    {
+      int offset = 0;
+      *(outbuffer + offset++) = markers_length;
+      *(outbuffer + offset++) = 0;
+      *(outbuffer + offset++) = 0;
+      *(outbuffer + offset++) = 0;
+      for( uint8_t i = 0; i < markers_length; i++){
+      offset += this->markers[i].serialize(outbuffer + offset);
+      }
+      return offset;
+    }
+
+    virtual int deserialize(unsigned char *inbuffer)
+    {
+      int offset = 0;
+      uint8_t markers_lengthT = *(inbuffer + offset++);
+      if(markers_lengthT > markers_length)
+        this->markers = (visualization_msgs::Marker*)realloc(this->markers, markers_lengthT * sizeof(visualization_msgs::Marker));
+      offset += 3;
+      markers_length = markers_lengthT;
+      for( uint8_t i = 0; i < markers_length; i++){
+      offset += this->st_markers.deserialize(inbuffer + offset);
+        memcpy( &(this->markers[i]), &(this->st_markers), sizeof(visualization_msgs::Marker));
+      }
+     return offset;
+    }
+
+    const char * getType(){ return "visualization_msgs/MarkerArray"; };
+    const char * getMD5(){ return "90da67007c26525f655c1c269094e39f"; };
+
+  };
+
+}
+#endif