ros melodic library with custom message

Dependents:   Robot_team1_QEI_Douglas Robot_team1

Revision:
0:020db18a476d
diff -r 000000000000 -r 020db18a476d ros_lib/gazebo_msgs/JointRequest.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ros_lib/gazebo_msgs/JointRequest.h	Wed Oct 30 14:59:49 2019 +0000
@@ -0,0 +1,87 @@
+#ifndef _ROS_SERVICE_JointRequest_h
+#define _ROS_SERVICE_JointRequest_h
+#include <stdint.h>
+#include <string.h>
+#include <stdlib.h>
+#include "ros/msg.h"
+
+namespace gazebo_msgs
+{
+
+static const char JOINTREQUEST[] = "gazebo_msgs/JointRequest";
+
+  class JointRequestRequest : public ros::Msg
+  {
+    public:
+      typedef const char* _joint_name_type;
+      _joint_name_type joint_name;
+
+    JointRequestRequest():
+      joint_name("")
+    {
+    }
+
+    virtual int serialize(unsigned char *outbuffer) const
+    {
+      int offset = 0;
+      uint32_t length_joint_name = strlen(this->joint_name);
+      varToArr(outbuffer + offset, length_joint_name);
+      offset += 4;
+      memcpy(outbuffer + offset, this->joint_name, length_joint_name);
+      offset += length_joint_name;
+      return offset;
+    }
+
+    virtual int deserialize(unsigned char *inbuffer)
+    {
+      int offset = 0;
+      uint32_t length_joint_name;
+      arrToVar(length_joint_name, (inbuffer + offset));
+      offset += 4;
+      for(unsigned int k= offset; k< offset+length_joint_name; ++k){
+          inbuffer[k-1]=inbuffer[k];
+      }
+      inbuffer[offset+length_joint_name-1]=0;
+      this->joint_name = (char *)(inbuffer + offset-1);
+      offset += length_joint_name;
+     return offset;
+    }
+
+    const char * getType(){ return JOINTREQUEST; };
+    const char * getMD5(){ return "0be1351618e1dc030eb7959d9a4902de"; };
+
+  };
+
+  class JointRequestResponse : public ros::Msg
+  {
+    public:
+
+    JointRequestResponse()
+    {
+    }
+
+    virtual int serialize(unsigned char *outbuffer) const
+    {
+      int offset = 0;
+      return offset;
+    }
+
+    virtual int deserialize(unsigned char *inbuffer)
+    {
+      int offset = 0;
+     return offset;
+    }
+
+    const char * getType(){ return JOINTREQUEST; };
+    const char * getMD5(){ return "d41d8cd98f00b204e9800998ecf8427e"; };
+
+  };
+
+  class JointRequest {
+    public:
+    typedef JointRequestRequest Request;
+    typedef JointRequestResponse Response;
+  };
+
+}
+#endif