It has only one change from original one. I added robotfeedback message on it.
Dependents: RobotFeedback mobileRobotITU
Fork of ros_lib_indigo by
diagnostic_msgs/DiagnosticArray.h
- Committer:
- randalthor
- Date:
- 2017-03-04
- Revision:
- 4:80d9bee5079a
- Parent:
- 0:fd24f7ca9688
File content as of revision 4:80d9bee5079a:
#ifndef _ROS_diagnostic_msgs_DiagnosticArray_h #define _ROS_diagnostic_msgs_DiagnosticArray_h #include <stdint.h> #include <string.h> #include <stdlib.h> #include "ros/msg.h" #include "std_msgs/Header.h" #include "diagnostic_msgs/DiagnosticStatus.h" namespace diagnostic_msgs { class DiagnosticArray : public ros::Msg { public: std_msgs::Header header; uint8_t status_length; diagnostic_msgs::DiagnosticStatus st_status; diagnostic_msgs::DiagnosticStatus * status; DiagnosticArray(): header(), status_length(0), status(NULL) { } virtual int serialize(unsigned char *outbuffer) const { int offset = 0; offset += this->header.serialize(outbuffer + offset); *(outbuffer + offset++) = status_length; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; *(outbuffer + offset++) = 0; for( uint8_t i = 0; i < status_length; i++){ offset += this->status[i].serialize(outbuffer + offset); } return offset; } virtual int deserialize(unsigned char *inbuffer) { int offset = 0; offset += this->header.deserialize(inbuffer + offset); uint8_t status_lengthT = *(inbuffer + offset++); if(status_lengthT > status_length) this->status = (diagnostic_msgs::DiagnosticStatus*)realloc(this->status, status_lengthT * sizeof(diagnostic_msgs::DiagnosticStatus)); offset += 3; status_length = status_lengthT; for( uint8_t i = 0; i < status_length; i++){ offset += this->st_status.deserialize(inbuffer + offset); memcpy( &(this->status[i]), &(this->st_status), sizeof(diagnostic_msgs::DiagnosticStatus)); } return offset; } const char * getType(){ return "diagnostic_msgs/DiagnosticArray"; }; const char * getMD5(){ return "60810da900de1dd6ddd437c3503511da"; }; }; } #endif